ownership & killable
This commit is contained in:
@@ -18,11 +18,17 @@ library Deploy {
|
||||
|
||||
function newPartyPlanner() internal returns (PartyPlanner) {
|
||||
NativeWrapper wrapper = new WETH9();
|
||||
return newPartyPlanner(wrapper);
|
||||
return newPartyPlanner(msg.sender, wrapper);
|
||||
}
|
||||
|
||||
function newPartyPlanner(NativeWrapper wrapper) internal returns (PartyPlanner) {
|
||||
function newPartyPlanner(address owner) internal returns (PartyPlanner) {
|
||||
NativeWrapper wrapper = new WETH9();
|
||||
return newPartyPlanner(owner, wrapper);
|
||||
}
|
||||
|
||||
function newPartyPlanner(address owner, NativeWrapper wrapper) internal returns (PartyPlanner) {
|
||||
return new PartyPlanner(
|
||||
owner,
|
||||
wrapper,
|
||||
new PartyPoolSwapImpl(wrapper),
|
||||
new PartyPoolMintImpl(wrapper),
|
||||
@@ -34,6 +40,7 @@ library Deploy {
|
||||
}
|
||||
|
||||
function newPartyPool(
|
||||
address owner_,
|
||||
string memory name_,
|
||||
string memory symbol_,
|
||||
IERC20[] memory tokens_,
|
||||
@@ -44,10 +51,11 @@ library Deploy {
|
||||
bool _stable
|
||||
) internal returns (PartyPool) {
|
||||
NativeWrapper wrapper = new WETH9();
|
||||
return newPartyPool(name_, symbol_, tokens_, bases_, _kappa, _swapFeePpm, _flashFeePpm, wrapper, _stable);
|
||||
return newPartyPool(owner_, name_, symbol_, tokens_, bases_, _kappa, _swapFeePpm, _flashFeePpm, wrapper, _stable);
|
||||
}
|
||||
|
||||
function newPartyPool(
|
||||
address owner_,
|
||||
string memory name_,
|
||||
string memory symbol_,
|
||||
IERC20[] memory tokens_,
|
||||
@@ -60,6 +68,7 @@ library Deploy {
|
||||
) internal returns (PartyPool) {
|
||||
return _stable && tokens_.length == 2 ?
|
||||
new PartyPoolBalancedPair(
|
||||
owner_,
|
||||
name_,
|
||||
symbol_,
|
||||
tokens_,
|
||||
@@ -74,6 +83,7 @@ library Deploy {
|
||||
new PartyPoolMintImpl(wrapper)
|
||||
) :
|
||||
new PartyPool(
|
||||
owner_,
|
||||
name_,
|
||||
symbol_,
|
||||
tokens_,
|
||||
|
||||
Reference in New Issue
Block a user