-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Nguyen Khoi Nguyen <[email protected]> Co-authored-by: Jarvis Nguyen <[email protected]> Co-authored-by: jarvis <[email protected]> Co-authored-by: nguyennk92 <[email protected]>
- Loading branch information
1 parent
bc35dd9
commit 2aca7e8
Showing
45 changed files
with
2,071 additions
and
1,845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ node_modules | |
# TypeChain files | ||
/typechain | ||
/typechain-types | ||
|
||
.prettierrc.json | ||
.solhint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,91 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.7.6; | ||
|
||
import "./Common.s.sol"; | ||
import { IILOManager } from '../src/interfaces/IILOManager.sol'; | ||
import { CommonScript } from './Common.s.sol'; | ||
import { ILOPool } from '../src/ILOPool.sol'; | ||
import { ILOManager } from '../src/ILOManager.sol'; | ||
import { ILOPoolSale } from '../src/ILOPoolSale.sol'; | ||
import { TokenFactory } from '../src/TokenFactory.sol'; | ||
|
||
contract AllContractScript is CommonScript { | ||
contract AllContractsScript is CommonScript { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
address uniV3Factory = vm.envAddress("UNIV3_FACTORY"); | ||
uint256 deployerPrivateKey = vm.envUint('PRIVATE_KEY'); | ||
address uniV3Factory = vm.envAddress('UNIV3_FACTORY'); | ||
vm.startBroadcast(deployerPrivateKey); | ||
// create contracts | ||
{ | ||
ILOPool iloPool = new ILOPool{ | ||
salt: salt | ||
}(); | ||
|
||
ILOManager ilo = new ILOManager{ | ||
salt: salt | ||
}(); | ||
ILOPool iloPool = new ILOPool{ salt: salt }(); | ||
ILOPoolSale iloPoolSale = new ILOPoolSale{ salt: salt }(); | ||
ILOManager ilo = new ILOManager{ salt: salt }(); | ||
} | ||
|
||
// initialize ilo manager | ||
{ | ||
address _feeTaker = vm.envAddress("FEE_TAKER"); | ||
address _initialOwner = vm.envAddress("OWNER"); | ||
uint256 initProjectFee = vm.envUint("INIT_PROJECT_FEE"); | ||
uint16 platformFee = uint16(vm.envUint("PLATFORM_FEE")); | ||
uint16 performanceFee = uint16(vm.envUint("PERFORMANCE_FEE")); | ||
|
||
IILOManager iloManager = IILOManager(getILOManagerDeploymentAddress()); | ||
iloManager.initialize(_initialOwner, _feeTaker, getILOPoolDeploymentAddress(), uniV3Factory, initProjectFee, platformFee, performanceFee); | ||
address _feeTaker = vm.envAddress('FEE_TAKER'); | ||
address _initialOwner = vm.envAddress('OWNER'); | ||
uint256 initProjectFee = vm.envUint('INIT_PROJECT_FEE'); | ||
uint16 platformFee = uint16(vm.envUint('PLATFORM_FEE')); | ||
uint16 performanceFee = uint16(vm.envUint('PERFORMANCE_FEE')); | ||
|
||
IILOManager iloManager = IILOManager( | ||
getILOManagerDeploymentAddress() | ||
); | ||
iloManager.initialize( | ||
_initialOwner, | ||
_feeTaker, | ||
getILOPoolDeploymentAddress(), | ||
getILOPoolSaleDeploymentAddress(), | ||
uniV3Factory, | ||
initProjectFee, | ||
platformFee, | ||
performanceFee | ||
); | ||
} | ||
vm.stopBroadcast(); | ||
} | ||
} | ||
|
||
contract ILOManagerScript is CommonScript { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
uint256 deployerPrivateKey = vm.envUint('PRIVATE_KEY'); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
ILOManager ilo = new ILOManager{ | ||
salt: salt | ||
}(); | ||
ILOManager ilo = new ILOManager{ salt: salt }(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
|
||
contract ILOPoolScript is CommonScript { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
uint256 deployerPrivateKey = vm.envUint('PRIVATE_KEY'); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
ILOPool iloPool = new ILOPool{ | ||
salt: salt | ||
}(); | ||
ILOPool iloPool = new ILOPool{ salt: salt }(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
|
||
contract ILOPoolSaleScript is CommonScript { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint('PRIVATE_KEY'); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
ILOPoolSale iloPoolSale = new ILOPoolSale{ salt: salt }(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
|
||
contract TokenFactoryScript is CommonScript { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
uint256 deployerPrivateKey = vm.envUint('PRIVATE_KEY'); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
TokenFactory tokenFactory = new TokenFactory{ | ||
salt: salt | ||
}(); | ||
TokenFactory tokenFactory = new TokenFactory{ salt: salt }(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.