From 130f37882b5bcd5709813eb2ba3ada53bf6e674e Mon Sep 17 00:00:00 2001 From: Sebastian Kim Date: Fri, 30 Oct 2020 16:43:21 +0900 Subject: [PATCH] Re-deploy on Goerli testnet --- .env.example | 2 +- .openzeppelin/goerli.json | 193 +++++++++++++++++++++++++ README.md | 10 +- migrations/2_deploy_wrn_reward_pool.js | 2 +- scripts/send-test-tokens.js | 8 +- truffle-config.js | 2 +- 6 files changed, 205 insertions(+), 12 deletions(-) diff --git a/.env.example b/.env.example index 130e81f..5b59322 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,2 @@ MNEMONIC= -ARCHEMY_PROJECT_ID= \ No newline at end of file +INFURA_PROJECT_ID= \ No newline at end of file diff --git a/.openzeppelin/goerli.json b/.openzeppelin/goerli.json index cf2197e..64a4b6c 100644 --- a/.openzeppelin/goerli.json +++ b/.openzeppelin/goerli.json @@ -341,6 +341,199 @@ } } } + }, + "4974130e11795187476b4df9efd6d39aac0fe9f47d3bbbe23c013ec2f8af7dc5": { + "address": "0x4f44173848E3E4F8d276065f07613291F15BC119", + "txHash": "0x5391f35ea08db7831265b3d8b08835d343c137f5a238f42ce0f8a9fea625edda", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "initialized", + "type": "t_bool", + "src": "openzeppelin/Initializable.sol:21" + }, + { + "contract": "Initializable", + "label": "initializing", + "type": "t_bool", + "src": "openzeppelin/Initializable.sol:26" + }, + { + "contract": "Initializable", + "label": "______gap", + "type": "t_array(t_uint256)50_storage", + "src": "openzeppelin/Initializable.sol:61" + }, + { + "contract": "ContextUpgradeSafe", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "openzeppelin/GSN/Context.sol:39" + }, + { + "contract": "OwnableUpgradeSafe", + "label": "_owner", + "type": "t_address", + "src": "openzeppelin/access/Ownable.sol:19" + }, + { + "contract": "OwnableUpgradeSafe", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "openzeppelin/access/Ownable.sol:79" + }, + { + "contract": "LockUpPool", + "label": "PENALTY_RATE", + "type": "t_uint256", + "src": "LockUpPool.sol:16" + }, + { + "contract": "LockUpPool", + "label": "PLATFORM_FEE_RATE", + "type": "t_uint256", + "src": "LockUpPool.sol:17" + }, + { + "contract": "LockUpPool", + "label": "SECONDS_IN_MONTH", + "type": "t_uint256", + "src": "LockUpPool.sol:18" + }, + { + "contract": "LockUpPool", + "label": "emergencyMode", + "type": "t_bool", + "src": "LockUpPool.sol:20" + }, + { + "contract": "LockUpPool", + "label": "tokenStats", + "type": "t_mapping(t_address,t_struct(TokenStats)136_storage)", + "src": "LockUpPool.sol:52" + }, + { + "contract": "LockUpPool", + "label": "pools", + "type": "t_array(t_address)dyn_storage", + "src": "LockUpPool.sol:55" + }, + { + "contract": "LockUpPool", + "label": "userLockUps", + "type": "t_mapping(t_address,t_mapping(t_address,t_struct(UserLockUp)121_storage))", + "src": "LockUpPool.sol:58" + }, + { + "contract": "LockUpPool", + "label": "______gap", + "type": "t_array(t_uint256)50_storage", + "src": "LockUpPool.sol:304" + }, + { + "contract": "WRNRewardPool", + "label": "WRNToken", + "type": "t_contract(ERC20PresetMinterPauserUpgradeSafe)2842", + "src": "WRNRewardPool.sol:12" + }, + { + "contract": "WRNRewardPool", + "label": "REWARD_START_BLOCK", + "type": "t_uint256", + "src": "WRNRewardPool.sol:15" + }, + { + "contract": "WRNRewardPool", + "label": "REWARD_PER_BLOCK", + "type": "t_uint256", + "src": "WRNRewardPool.sol:16" + }, + { + "contract": "WRNRewardPool", + "label": "REWARD_END_BLOCK", + "type": "t_uint256", + "src": "WRNRewardPool.sol:17" + }, + { + "contract": "WRNRewardPool", + "label": "REWARD_EARLY_BONUS_END_BLOCK", + "type": "t_uint256", + "src": "WRNRewardPool.sol:18" + }, + { + "contract": "WRNRewardPool", + "label": "REWARD_EARLY_BONUS_BOOST", + "type": "t_uint256", + "src": "WRNRewardPool.sol:19" + }, + { + "contract": "WRNRewardPool", + "label": "totalMultiplier", + "type": "t_uint256", + "src": "WRNRewardPool.sol:21" + }, + { + "contract": "WRNRewardPool", + "label": "wrnStats", + "type": "t_mapping(t_address,t_struct(WRNStats)1152_storage)", + "src": "WRNRewardPool.sol:34" + }, + { + "contract": "WRNRewardPool", + "label": "userWRNRewards", + "type": "t_mapping(t_address,t_mapping(t_address,t_struct(UserWRNReward)1157_storage))", + "src": "WRNRewardPool.sol:37" + }, + { + "contract": "WRNRewardPool", + "label": "devAddress", + "type": "t_address", + "src": "WRNRewardPool.sol:40" + }, + { + "contract": "WRNRewardPool", + "label": "______gap", + "type": "t_array(t_uint256)50_storage", + "src": "WRNRewardPool.sol:232" + } + ], + "types": { + "t_contract(ERC20PresetMinterPauserUpgradeSafe)2842": { + "label": "contract ERC20PresetMinterPauserUpgradeSafe" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_address,t_struct(WRNStats)1152_storage)": { + "label": "mapping(address => struct WRNRewardPool.WRNStats)" + }, + "t_mapping(t_address,t_mapping(t_address,t_struct(UserWRNReward)1157_storage))": { + "label": "mapping(address => mapping(address => struct WRNRewardPool.UserWRNReward))" + }, + "t_address": { + "label": "address" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_bool": { + "label": "bool" + }, + "t_mapping(t_address,t_struct(TokenStats)136_storage)": { + "label": "mapping(address => struct LockUpPool.TokenStats)" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_address,t_mapping(t_address,t_struct(UserLockUp)121_storage))": { + "label": "mapping(address => mapping(address => struct LockUpPool.UserLockUp))" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + } + } + } } }, "admin": { diff --git a/README.md b/README.md index 3634ad3..9d884f8 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,12 @@ A governance token distribution contract on top of LockUpPool. A maximum of 1.2M ## Görli (goerli) Testnet - ETH faucet (to pay gas): https://faucet.goerli.mudit.blog/ -- Contract : 0x7f331F0329eCF9d0e52Dd3497a4dff099aC19175 +- Contract: 0xD5B9A9dB6E11E216e08bF10B0C0e53478315E8C3 - Test tokens - - WRN: 0xD16481Fb34AF34944aC357707146e9d6CB467Dde - - HUNT: 0x5A43026dE30A2a9539Be2ff315106F4e146Ce59A - - WETH: 0xb7e94Cce902E34e618A23Cb82432B95d03096146 - - WBTC: 0xE6d830937FA8DB2ebD2c046C58F797A95550fA4E + - WRN: 0x64B45af8ED1ABA874144802B34e99262E444202f + - HUNT: 0x3cCc84296b4dDf99d628e1472F697c4649A9962F + - WETH: 0x0370789664eCBc83a9a44766c2384b9d5A638Dfb + - WBTC: 0xF0aa78e4Ea6C717891085879Bd78Fd87a98D8572 ## Gas consumption ``` diff --git a/migrations/2_deploy_wrn_reward_pool.js b/migrations/2_deploy_wrn_reward_pool.js index 7ba791b..ac9acb1 100644 --- a/migrations/2_deploy_wrn_reward_pool.js +++ b/migrations/2_deploy_wrn_reward_pool.js @@ -27,7 +27,7 @@ module.exports = async function (deployer, network, [creator]) { console.log(`- Contract: ${wrnRewardPool.address}`); console.log('- Test tokens'); - console.log(` - WRN: ${wrnToken.address}\n - HUNT: ${hunt.address}\n - WETH: ${weth.address}\n - WBTC: ${wbtc.address}`); + console.log(` - WRN: ${wrnToken.address}\n - HUNT: ${hunt.address}\n - WETH: ${weth.address}\n - WBTC: ${wbtc.address}`); console.log(`Owner: ${await wrnRewardPool.owner()} / Dev: ${await wrnRewardPool.devAddress()}`); console.log(`Sum of reward pool multiplers: ${await wrnRewardPool.totalMultiplier()}`); console.log(`Owner HUNT balance: ${await hunt.balanceOf(creator)}`); diff --git a/scripts/send-test-tokens.js b/scripts/send-test-tokens.js index 1482c04..0f9b425 100644 --- a/scripts/send-test-tokens.js +++ b/scripts/send-test-tokens.js @@ -7,15 +7,15 @@ const HDWalletProvider = require('@truffle/hdwallet-provider'); const infuraProvider = (network) => { return new HDWalletProvider( process.env.MNEMONIC, - `https://eth-${network}.alchemyapi.io/v2/${process.env.ARCHEMY_PROJECT_ID}` + `https://${network}.infura.io/v3/${process.env.INFURA_PROJECT_ID}` ) } const web3 = new Web3(infuraProvider('goerli')); const tokenAddresses = { - HUNT: '0x5A43026dE30A2a9539Be2ff315106F4e146Ce59A', - WETH: '0xb7e94Cce902E34e618A23Cb82432B95d03096146', - WBTC: '0xE6d830937FA8DB2ebD2c046C58F797A95550fA4E' + HUNT: '0x3cCc84296b4dDf99d628e1472F697c4649A9962F', + WETH: '0x0370789664eCBc83a9a44766c2384b9d5A638Dfb', + WBTC: '0xF0aa78e4Ea6C717891085879Bd78Fd87a98D8572' } async function sendETH(from, to, amount) { diff --git a/truffle-config.js b/truffle-config.js index f5e3e97..6649de1 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -6,7 +6,7 @@ dotenv.config() const infuraProvider = (network) => { return new HDWalletProvider( process.env.MNEMONIC, - `https://eth-${network}.alchemyapi.io/v2/${process.env.ARCHEMY_PROJECT_ID}` + `https://${network}.infura.io/v3/${process.env.INFURA_PROJECT_ID}` ) }