Created
April 11, 2018 16:42
-
-
Save kirillsurkov/ca96b962630778f647d38210b9a397a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const TheAbyssDAICO = artifacts.require("TheAbyssDAICO"); | |
| const AbyssToken = artifacts.require("AbyssToken"); | |
| const PollManagedFund = artifacts.require("PollManagedFund"); | |
| const ReservationFund = artifacts.require("ReservationFund"); | |
| module.exports = (deployer, _, accounts) => { | |
| let abyssToken; | |
| let pollManagedFund; | |
| let reservationFund; | |
| let theAbyssDAICO; | |
| let tokenAddress; | |
| let fundAddress; | |
| let reservationFundAddress; | |
| let owners = [accounts[0]]; | |
| const listener = accounts[1]; | |
| const manager = accounts[2]; | |
| const teamWallet = accounts[3]; | |
| const referralTokenWallet = accounts[4]; | |
| const foundationTokenWallet = accounts[5]; | |
| const companyTokenWallet = accounts[6]; | |
| const reserveTokenWallet = accounts[7]; | |
| const bountyTokenWallet = accounts[8]; | |
| const advisorsTokenWallet = accounts[9]; | |
| const bnbTokenAddress = accounts[10]; | |
| const bnbTokenWallet = accounts[11]; | |
| deployer.deploy(AbyssToken, listener, owners, manager).then(() => AbyssToken.deployed()).then(_abyssToken => { | |
| abyssToken = _abyssToken; | |
| tokenAddress = abyssToken.address; | |
| return deployer.deploy(PollManagedFund, teamWallet, referralTokenWallet, foundationTokenWallet, companyTokenWallet, reserveTokenWallet, bountyTokenWallet, advisorsTokenWallet, owners); | |
| }).then(() => PollManagedFund.deployed()).then(_pollManagedFund => { | |
| pollManagedFund = _pollManagedFund; | |
| fundAddress = pollManagedFund.address; | |
| return deployer.deploy(ReservationFund, owners[0]); | |
| }).then(() => ReservationFund.deployed()).then(_reservationFund => { | |
| reservationFund = _reservationFund; | |
| reservationFundAddress = reservationFund.address; | |
| return deployer.deploy(TheAbyssDAICO, bnbTokenAddress, tokenAddress, fundAddress, reservationFundAddress, bnbTokenWallet, referralTokenWallet, foundationTokenWallet, advisorsTokenWallet, companyTokenWallet, reserveTokenWallet, bountyTokenWallet, owners[0]); | |
| }).then(() => TheAbyssDAICO.deployed()).then(_theAbyssDAICO => { | |
| theAbyssDAICO = _theAbyssDAICO; | |
| owners.push(theAbyssDAICO.address); | |
| return abyssToken.setOwners(owners, {from: owners[0]}); | |
| }).then(() => { | |
| return pollManagedFund.setCrowdsaleAddress(theAbyssDAICO.address); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment