autowrap; sendAmounts() restored
This commit is contained in:
@@ -4,11 +4,12 @@ pragma solidity ^0.8.30;
|
||||
import {IERC20} from "../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
|
||||
import {SafeERC20} from "../lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
|
||||
import {IPartyPlanner} from "./IPartyPlanner.sol";
|
||||
import {LMSRStabilized} from "./LMSRStabilized.sol";
|
||||
import {IPartyPool} from "./IPartyPool.sol";
|
||||
import {IWETH9} from "./IWETH9.sol";
|
||||
import {LMSRStabilized} from "./LMSRStabilized.sol";
|
||||
import {IPartyPoolDeployer} from "./PartyPoolDeployer.sol";
|
||||
import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol";
|
||||
import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol";
|
||||
import {IPartyPoolDeployer} from "./PartyPoolDeployer.sol";
|
||||
|
||||
/// @title PartyPlanner
|
||||
/// @notice Factory contract for creating and tracking PartyPool instances
|
||||
@@ -21,8 +22,8 @@ contract PartyPlanner is IPartyPlanner {
|
||||
function mintImpl() external view returns (PartyPoolMintImpl) { return MINT_IMPL; }
|
||||
|
||||
/// @notice Address of the SwapMint implementation contract used by all pools created by this factory
|
||||
PartyPoolSwapImpl private immutable SWAP_MINT_IMPL;
|
||||
function swapMintImpl() external view returns (PartyPoolSwapImpl) { return SWAP_MINT_IMPL; }
|
||||
PartyPoolSwapImpl private immutable SWAP_IMPL;
|
||||
function swapImpl() external view returns (PartyPoolSwapImpl) { return SWAP_IMPL; }
|
||||
|
||||
/// @notice Protocol fee share (ppm) applied to fees collected by pools created by this planner
|
||||
uint256 private immutable PROTOCOL_FEE_PPM;
|
||||
@@ -32,6 +33,7 @@ contract PartyPlanner is IPartyPlanner {
|
||||
address private immutable PROTOCOL_FEE_ADDRESS;
|
||||
function protocolFeeAddress() external view returns (address) { return PROTOCOL_FEE_ADDRESS; }
|
||||
|
||||
IWETH9 private immutable WRAPPER;
|
||||
IPartyPoolDeployer private immutable NORMAL_POOL_DEPLOYER;
|
||||
IPartyPoolDeployer private immutable BALANCED_PAIR_DEPLOYER;
|
||||
|
||||
@@ -42,20 +44,22 @@ contract PartyPlanner is IPartyPlanner {
|
||||
mapping(IERC20 => bool) private _tokenSupported;
|
||||
mapping(IERC20 => IPartyPool[]) private _poolsByToken;
|
||||
|
||||
/// @param _swapMintImpl address of the SwapMint implementation contract to be used by all pools
|
||||
/// @param _swapImpl address of the Swap implementation contract to be used by all pools
|
||||
/// @param _mintImpl address of the Mint implementation contract to be used by all pools
|
||||
/// @param _protocolFeePpm protocol fee share (ppm) to be used for pools created by this planner
|
||||
/// @param _protocolFeeAddress recipient address for protocol fees for pools created by this planner (may be address(0))
|
||||
constructor(
|
||||
PartyPoolSwapImpl _swapMintImpl,
|
||||
IWETH9 _wrapper,
|
||||
PartyPoolSwapImpl _swapImpl,
|
||||
PartyPoolMintImpl _mintImpl,
|
||||
IPartyPoolDeployer _deployer,
|
||||
IPartyPoolDeployer _balancedPairDeployer,
|
||||
uint256 _protocolFeePpm,
|
||||
address _protocolFeeAddress
|
||||
) {
|
||||
require(address(_swapMintImpl) != address(0), "Planner: swapMintImpl address cannot be zero");
|
||||
SWAP_MINT_IMPL = _swapMintImpl;
|
||||
WRAPPER = _wrapper;
|
||||
require(address(_swapImpl) != address(0), "Planner: swapImpl address cannot be zero");
|
||||
SWAP_IMPL = _swapImpl;
|
||||
require(address(_mintImpl) != address(0), "Planner: mintImpl address cannot be zero");
|
||||
MINT_IMPL = _mintImpl;
|
||||
require(address(_deployer) != address(0), "Planner: deployer address cannot be zero");
|
||||
@@ -107,7 +111,8 @@ contract PartyPlanner is IPartyPlanner {
|
||||
_flashFeePpm,
|
||||
PROTOCOL_FEE_PPM,
|
||||
PROTOCOL_FEE_ADDRESS,
|
||||
PartyPoolSwapImpl(SWAP_MINT_IMPL),
|
||||
WRAPPER,
|
||||
SWAP_IMPL,
|
||||
MINT_IMPL
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user