Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MrToph committed Dec 27, 2021
1 parent 2d87e1d commit 2297a60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Config = {
TOKEN_SALE_USDC: string;
TOKEN_SALE_ARENA_PRICE: BN;
TOKEN_SALE_RECIPIENT: string;
TOKEN_SALE_WHITELIST: typeof TOKEN_SALE_WHITELIST
TOKEN_SALE_WHITELIST: typeof TOKEN_SALE_WHITELIST;
EXPORT_FILENAME: string;
};

Expand Down
10 changes: 6 additions & 4 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ task('deploy', 'deploy contracts').setAction(async (taskArgs, hre) => {
await governor.deployed();
console.log(`governor address: ${governor.address}`);


console.log(`deploying tokensale...`);
const TokenSaleFactory = (await hre.ethers.getContractFactory('TokenSale')) as TokenSale__factory;
tokenSale = await TokenSaleFactory.deploy(
Expand Down Expand Up @@ -117,13 +116,16 @@ task('deploy', 'deploy contracts').setAction(async (taskArgs, hre) => {
await revokableTokenLock.transferOwnership(timelock.address);

// set up token sale whitelist
await tokenSale.changeWhiteList(config.TOKEN_SALE_WHITELIST.map(({buyer}) => buyer), config.TOKEN_SALE_WHITELIST.map(({arenaAmount}) => arenaAmount))
await tokenSale.changeWhiteList(
config.TOKEN_SALE_WHITELIST.map(({buyer}) => buyer),
config.TOKEN_SALE_WHITELIST.map(({arenaAmount}) => arenaAmount)
);
// transfer token sale admin role to timelock
await tokenSale.transferOwnership(timelock.address);

// transfer all tokens held by deployer to token sale and timelock
const TOKEN_SALE_SUPPLY = config.TOKEN_SALE_WHITELIST.reduce((sum, el) => sum.add(el.arenaAmount), BN.from(`0`))
console.log(`transferring ${TOKEN_SALE_SUPPLY.toString()} ARENA to TokenSale. Remaining back to Timelock`)
const TOKEN_SALE_SUPPLY = config.TOKEN_SALE_WHITELIST.reduce((sum, el) => sum.add(el.arenaAmount), BN.from(`0`));
console.log(`transferring ${TOKEN_SALE_SUPPLY.toString()} ARENA to TokenSale. Remaining back to Timelock`);
await token.transfer(tokenSale.address, TOKEN_SALE_SUPPLY);
await token.transfer(timelock.address, config.FREE_SUPPLY.sub(TOKEN_SALE_SUPPLY));

Expand Down

0 comments on commit 2297a60

Please sign in to comment.