-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
222 additions
and
35 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 | ||
ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY> | ||
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 | ||
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 | ||
ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY> | ||
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"deployer": "0xD5388291EAbe96b56069440C97046791E2F72573", | ||
"token": "0x1F61D4b540E8f7f8dA7431cA0F357495cBb8aeA8", | ||
"tokenLock": "0xDcF97275b1F9636a94A73D1c2720EAbA09adEE8A", | ||
"timelock": "0xFA2c6d5f42bf10D4ba9bC8D15667cca32b15b0Ef", | ||
"governor": "0xaDb5d48D2eeE2efE27E749BDd21E22D12F9dc831" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"merkleRoot": "0x07087dd5ec10dc92a26074d31dea66fb039c30cb8bcc5d7536c7f55f116cd77e", | ||
"tokenTotal": "100000000000000000000000000", | ||
"claims": { | ||
"0x3Ab0029e1C4515134464b267557cB80A39902699": { | ||
"index": 0, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0xb65812ee50d010a35d33ea8138f51244bab9e1d041b0f2afca957df9637a982d", | ||
"0xaf34733a2233e01ea3c26c3d5c1d395cf0c2932d621755578c3fd6af40078a90", | ||
"0xf92c27197c4488d872550adee9dfb8269d91bf21a007fd46e19d458f8a957b54", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0x5dcEb6f4dc5b64Af6271A5Ab3297DbE3C01dd57B": { | ||
"index": 10, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x35235d9ef7c4d7b7c2b1519977ffe024cbf108c5d12a32d360dd6bf477334ef8", | ||
"0x5f52b1c0c5936654c5c54b6481b19eddcd34dab7a699a0233ad0a7a7c2f9df16", | ||
"0x76a31b34f4818cd9e6d633f2f82154d5ccb70f67aa44fc8ca5c086adcc36be90", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0x670f9e8B37d5816c2eB93A1D94841C66652a8E26": { | ||
"index": 4, | ||
"amount": "12000000000000000000000000", | ||
"proof": [ | ||
"0x93fcf76202965e2c3851dc0e7c36fd2432c69c68d79acc9d4391d36f0423ac7e", | ||
"0x7a693601c171ca5669ece423806b262792872018e015ec1da2b81d3ce58f3339", | ||
"0xf92c27197c4488d872550adee9dfb8269d91bf21a007fd46e19d458f8a957b54", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0x697ccd97C8419EBba7347CEF03a0CD02804EbF54": { | ||
"index": 2, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x4432408e5ae10656ac93cdb82fa5850f351f15cd346c7d9d5e632431c85d0acc", | ||
"0x5f52b1c0c5936654c5c54b6481b19eddcd34dab7a699a0233ad0a7a7c2f9df16", | ||
"0x76a31b34f4818cd9e6d633f2f82154d5ccb70f67aa44fc8ca5c086adcc36be90", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0x7C0fb88c87c30eBF70340E25fe47763e53b907cF": { | ||
"index": 1, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x4db967a616609eba85727b9c2c942f1cecc264492d6f3a86fce3906fd1018e7f" | ||
] | ||
}, | ||
"0x8498EAb53e03E3143d77B2303eDBdAC6C9041D33": { | ||
"index": 8, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0xa3cfae80d8d0bc51cbac2fa27c477d4ba1a5016542a8e2bc1bdc8b37083623ce", | ||
"0xaf34733a2233e01ea3c26c3d5c1d395cf0c2932d621755578c3fd6af40078a90", | ||
"0xf92c27197c4488d872550adee9dfb8269d91bf21a007fd46e19d458f8a957b54", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0x8D31BAC0870e323354eAF6F98277860772FFB2d4": { | ||
"index": 6, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x34be75696b34e420cad14ed4eacad38166457d60ac632cbd02f0541d55e31433", | ||
"0x24ebfbbc07cb37e8b8bdbd8e34e6dfad535b1900258e269110981b5b50aa0736", | ||
"0x76a31b34f4818cd9e6d633f2f82154d5ccb70f67aa44fc8ca5c086adcc36be90", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0xD3488b8C87416946D82CC957178B0863A1F089b2": { | ||
"index": 14, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x0f139d97b83bf4dfa29769b0dcb1aa0ba4516e988a273aa0343206f3c83f1d58", | ||
"0x24ebfbbc07cb37e8b8bdbd8e34e6dfad535b1900258e269110981b5b50aa0736", | ||
"0x76a31b34f4818cd9e6d633f2f82154d5ccb70f67aa44fc8ca5c086adcc36be90", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
}, | ||
"0xD5388291EAbe96b56069440C97046791E2F72573": { | ||
"index": 12, | ||
"amount": "11000000000000000000000000", | ||
"proof": [ | ||
"0x4586c20aaf325b689c6d2cbbbd2e74894ca04caf5726685321bd72265cdf68f7", | ||
"0x7a693601c171ca5669ece423806b262792872018e015ec1da2b81d3ce58f3339", | ||
"0xf92c27197c4488d872550adee9dfb8269d91bf21a007fd46e19d458f8a957b54", | ||
"0xfe7ba1001d74de83047caed30dfb874fd6e9396997ae56e5e7b672f8f502998b" | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"0x670f9e8B37d5816c2eB93A1D94841C66652a8E26": "12000000000000000000000000", | ||
"0xD5388291EAbe96b56069440C97046791E2F72573": "11000000000000000000000000", | ||
"0x5dcEb6f4dc5b64Af6271A5Ab3297DbE3C01dd57B": "11000000000000000000000000", | ||
"0x7C0fb88c87c30eBF70340E25fe47763e53b907cF": "11000000000000000000000000", | ||
"0x3Ab0029e1C4515134464b267557cB80A39902699": "11000000000000000000000000", | ||
"0xD3488b8C87416946D82CC957178B0863A1F089b2": "11000000000000000000000000", | ||
"0x8498EAb53e03E3143d77B2303eDBdAC6C9041D33": "11000000000000000000000000", | ||
"0x697ccd97C8419EBba7347CEF03a0CD02804EbF54": "11000000000000000000000000", | ||
"0x8D31BAC0870e323354eAF6F98277860772FFB2d4": "11000000000000000000000000" | ||
} | ||
|
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,12 +1,26 @@ | ||
import {BigNumber as BN, constants} from 'ethers'; | ||
import {ONE_DAY, ONE_YEAR} from '../test/shared/Constants'; | ||
export const config = { | ||
export const allConfigs: any = { | ||
// rinkeby | ||
4: { | ||
FREE_SUPPLY: BN.from(900).mul(1_000_000).mul(constants.WeiPerEther), // 900M | ||
AIRDROP_SUPPLY: BN.from(100).mul(1_000_000).mul(constants.WeiPerEther), // 100M | ||
CLAIMABLE_PROPORTION: 2000, // 20% | ||
CLAIM_END_DATE: "2022-12-25", // TODO: edit value | ||
VEST_DURATION: 4 * ONE_YEAR, // 4 years | ||
MERKLE_ROOT: '0xf6a3174a6a23755234ca9741160ced7ad3bb030d9beebf34b81c7ccee5521325', // TODO: edit this | ||
CLAIM_END_DATE: '2022-12-25', | ||
VEST_DURATION: 4 * ONE_DAY, | ||
MERKLE_ROOT: '0x07087dd5ec10dc92a26074d31dea66fb039c30cb8bcc5d7536c7f55f116cd77e', | ||
TIMELOCK_DELAY: 1800, // 30 mins | ||
EXPORT_FILENAME: 'rinkebyAddresses.json', | ||
}, | ||
// polygon mainnet | ||
137: { | ||
FREE_SUPPLY: BN.from(900).mul(1_000_000).mul(constants.WeiPerEther), // 900M | ||
AIRDROP_SUPPLY: BN.from(100).mul(1_000_000).mul(constants.WeiPerEther), // 100M | ||
CLAIMABLE_PROPORTION: 2000, // 20% | ||
CLAIM_END_DATE: '2022-12-25', // TODO: edit value | ||
VEST_DURATION: 4 * ONE_YEAR, | ||
MERKLE_ROOT: '0x0', // TODO: edit value | ||
TIMELOCK_DELAY: 2 * ONE_DAY, // 2 days (same as ENS) | ||
EXPORT_FILENAME: 'contractAddresses.json' | ||
EXPORT_FILENAME: 'polygonAddresses.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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import {task} from 'hardhat/config'; | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import fs from 'fs'; | ||
|
||
import { | ||
ArenaToken, | ||
RevokableTokenLock, | ||
TimelockController, | ||
ArenaGovernor, | ||
} from '../typechain'; | ||
|
||
import {allConfigs} from './config'; | ||
|
||
let token: ArenaToken; | ||
let revokableTokenLock: RevokableTokenLock; | ||
let timelock: TimelockController; | ||
let governor: ArenaGovernor; | ||
|
||
task('verifyContracts', 'verify deployed contracts') | ||
.addParam('i', 'JSON file containing exported addresses') | ||
.setAction(async (taskArgs, hre) => { | ||
const networkId = (hre.network.config.chainId) as number; | ||
console.log('verifying addresses...'); | ||
const addresses = JSON.parse(fs.readFileSync(taskArgs.i, 'utf8')); | ||
|
||
token = await hre.ethers.getContractAt('ArenaToken', addresses['token']); | ||
revokableTokenLock = await hre.ethers.getContractAt('RevokableTokenLock', addresses['tokenLock']); | ||
timelock = await hre.ethers.getContractAt('TimelockController', addresses['timelock']); | ||
governor = await hre.ethers.getContractAt('ArenaGovernor', addresses['governor']); | ||
|
||
let config = allConfigs[networkId]; | ||
|
||
await verifyContract(hre, token.address, [ | ||
config.FREE_SUPPLY, | ||
config.AIRDROP_SUPPLY, | ||
config.CLAIMABLE_PROPORTION, | ||
new Date(config.CLAIM_END_DATE).getTime() / 1000, | ||
config.VEST_DURATION, | ||
]); | ||
|
||
await verifyContract(hre, revokableTokenLock.address, [token.address, addresses['deployer']]); | ||
await verifyContract(hre, timelock.address, [config.TIMELOCK_DELAY, [], []]); | ||
await verifyContract(hre, governor.address, [token.address, timelock.address]); | ||
process.exit(0); | ||
}); | ||
|
||
async function verifyContract(hre: HardhatRuntimeEnvironment, contractAddress: string, ctorArgs: any[]) { | ||
await hre.run('verify:verify', { | ||
address: contractAddress, | ||
constructorArguments: ctorArgs, | ||
}); | ||
} |