# Deployment Main ## xDai deployment ``` /Users/amin/.nvm/versions/node/v14.18.1/bin/node /Users/amin/.nvm/versions/node/v14.18.1/lib/node_modules/npm/bin/npm-cli.js run deploy:xDAI --scripts-prepend-node-path=auto > hardhat-project@ deploy:xDAI /Users/amin/Work/giveth/giv-token-contracts > HARDHAT_NETWORK=xDAI ts-node deployments/xDAI/1_tokenDistro_merkleDistro_Unipool.js 1640361600 0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75 2000000000 0x08ea9f608656A4a775EF73f5B187a2F1AE2ae10e 10000000 0x55FF0cef43F0DF88226E9D87D09fA036017F5586 2500000 0x24f2d06446af8d6e89febc205e7936a602a87b60 7500000 ####################### ##### Deployments ##### ####################### Deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB totalTokens: 2000000000.0 startTime: 1640361600 cliffPeriod: 0 duration: 157680000 initialPercentage: 1000 tokenAddress: 0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75 LMDuration: 1209600 cancelable: true merkletree_file: ./files/merkle_distributor_xdai_result.json merkleTokens: 170499973.0 ####################### ##### TokenDistro ##### ####################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB totalTokens: 2000000000.0 startTime: 1640361600 cliffPeriod: 0 duration: 157680000 initialPercentage: 1000 tokenAddress: 0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75 cancelable: true ######################## TokenDistro deployed to: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 ####################### ##### Check ##### ####################### TokenDistro - totalTokens: 2000000000.0 TokenDistro - startTime: 1640361600 TokenDistro - cliffPeriod: 1640361600 TokenDistro - duration: 157680000 TokenDistro - initialAmount: 200000000000000000000000000 TokenDistro - token: 0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75 TokenDistro - cancelable: true This smartcontract needs: 2000000000.0 Tokens token.mint("0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1","2000000000000000000000000000") ######################## ##### MerkleDistro ##### ######################## deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB distroAddress: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 merkletree_file: ./files/merkle_distributor_xdai_result.json ####################### MerkleDistro deployed to: 0xFad63adEFb8203F7605F25f6a921c8bf45604A5e ####################### TokenDistro - assign: MerkleDistro 170499973000000000000000000 ####################### ##### Check ##### ####################### MerkleDistro - _tokenDistro: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 MerkleDistro - _merkleRoot: 0x223689d98d7e4f96fe371721b1cdf82b54ee33315e0a3974c84c8215d95b5eb3 ###################################################### ####### 50GIV/HNY - honeyswap - xDai 10000000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 uni: 0x08ea9f608656A4a775EF73f5B187a2F1AE2ae10e duration: 1209600 ############################################## GIVHNY_XDAI deployed to: 0x4B9EfAE862a1755F7CEcb021856D467E86976755 ############################################## TokenDistro - assign: givhny_xdai 10000000 ####################### ##### Check ##### ####################### givhny_xdai(tokenDistro,duration,periodFinish,uni): givhny_xdai - tokenDistro: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 givhny_xdai - duration: 1209600 givhny_xdai - periodFinish: 0 givhny_xdai - uni: 0x08ea9f608656A4a775EF73f5B187a2F1AE2ae10e ###################################################### ####### 50GIV/WETH - honeyswap - xDai 2500000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 uni: 0x55FF0cef43F0DF88226E9D87D09fA036017F5586 duration: 1209600 ############################################## GIVHNY_XDAI deployed to: 0xfB429010C1e9D08B7347F968a7d88f0207807EF0 ############################################## TokenDistro - assign: givhny_xdai 2500000 ####################### ##### Check ##### ####################### givweth_xdai(tokenDistro,duration,periodFinish,uni): givweth_xdai - tokenDistro: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 givweth_xdai - duration: 1209600 givweth_xdai - periodFinish: 0 givweth_xdai - uni: 0x55FF0cef43F0DF88226E9D87D09fA036017F5586 ###################################################### ####### GIVstaking xDai - xDai - 7500000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 uni: 0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75 duration: 1209600 ############################################## UNIGIV deployed to: 0xD93d3bDBa18ebcB3317a57119ea44ed2Cf41C2F2 ############################################## TokenDistro - assign: givhny_xdai 7500000 ####################### ##### Check ##### ####################### unigiv(tokenDistro,duration,periodFinish,uni): unigiv - tokenDistro: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 unigiv - duration: 1209600 unigiv - periodFinish: 0 ####################### ##### Final checks ### ####################### tokenDistro.balances(tokenDistro.address) allocated: 1809500027.0 claimed: 0.0 tokenDistro.balances(merkleDistro.address) allocated: 170499973.0 claimed: 0.0 tokenDistro.balances(givhny_xdai.address) allocated: 10000000.0 claimed: 0.0 tokenDistro.balances(givweth_xdai.address) allocated: 2500000.0 claimed: 0.0 tokenDistro.balances(unigiv.address) allocated: 7500000.0 claimed: 0.0 tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),merkleDistro.address) true tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),givhny_xdai.address) true tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),givweth_xdai.address) true tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),unigiv.address) true Process finished with exit code 0 ``` ## Mainnet Deployment ``` /Users/amin/.nvm/versions/node/v14.18.1/bin/node /Users/amin/.nvm/versions/node/v14.18.1/lib/node_modules/npm/bin/npm-cli.js run deploy:mainnet --scripts-prepend-node-path=auto > hardhat-project@ deploy:mainnet /Users/amin/Work/giveth/giv-token-contracts > HARDHAT_NETWORK=mainnet ts-node deployments/mainnet/2_tokenDistro_Unipools.js 1640361600 0x900db999074d9277c5da2a43f252d74366230da0 2000000000 0xc763b6b3d0f75167db95daa6a0a0d75dd467c4e1 10000000 0x7819f1532c49388106f7762328c51ee70edd134c 2500000 2500000 ####################### ##### Deployments ##### ####################### Deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB totalTokens: 2000000000.0 startTime: 1640361600 cliffPeriod: 0 duration: 157680000 initialPercentage: 1000 tokenAddress: 0x900dB999074d9277c5DA2A43F252D74366230DA0 LMDuration: 1209600 cancelable: true ####################### ##### TokenDistro ##### ####################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB totalTokens: 2000000000.0 startTime: 1640361600 cliffPeriod: 0 duration: 157680000 initialPercentage: 1000 tokenAddress: 0x900dB999074d9277c5DA2A43F252D74366230DA0 cancelable: true ######################## TokenDistro deployed to: 0x87dE995F6744B75bBe0255A973081142aDb61f4d ####################### ##### Check ##### ####################### TokenDistro - totalTokens: 2000000000.0 TokenDistro - startTime: 1640361600 TokenDistro - cliffPeriod: 1640361600 TokenDistro - duration: 157680000 TokenDistro - initialAmount: 200000000000000000000000000 TokenDistro - token: 0x900dB999074d9277c5DA2A43F252D74366230DA0 TokenDistro - cancelable: true This smartcontract needs: 2000000000.0 Tokens token.mint("0x87dE995F6744B75bBe0255A973081142aDb61f4d","2000000000000000000000000000") ###################################################### ####### 50GIV/ETH - Uni Mainnet 10000000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0x87dE995F6744B75bBe0255A973081142aDb61f4d uni staker: 0x1f98407aaB862CdDeF78Ed252D6f557aA5b0f00d duration: 1209600 ############################################## GIVETH_UNI_REWARD deployed to: 0x3115e5aAa3D6f742d09fbB649150dfE285a9c2A3 ############################################## TokenDistro - assign: giveth_uni_reward 10000000 The new incentiveId will be 0x07421267a74d7dc99279300571a9eb5035c96b6807c1a2a8d5ff284d065c3d24 Key: { startTime: '1640361600', endTime: '1656086400', pool: '0xc763b6B3d0f75167db95Daa6a0A0d75Dd467C4E1', rewardToken: '0x3115e5aAa3D6f742d09fbB649150dfE285a9c2A3', refundee: '0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB' } Creating incentive in tx 0x7632e5fbf0acfb74e7caff2e77dcf89f64baa618b6aaf029a65e34065f4d6116... ####################### ##### Check ##### ####################### giveth_uni_reward(tokenDistro,duration,periodFinish,uni): giveth_uni_reward - tokenDistro: 0x87dE995F6744B75bBe0255A973081142aDb61f4d uniswap v3 staker - balance of giveth_uni_reward: 10000000.0 ###################################################### ####### 80GIV/ETH - Bal Mainnet 2500000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0x87dE995F6744B75bBe0255A973081142aDb61f4d uni: 0x7819f1532c49388106f7762328c51eE70EdD134c duration: 1209600 ############################################## GIVETH_BAL deployed to: 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1 ############################################## TokenDistro - assign: giveth_uni_reward 2500000 ####################### ##### Check ##### ####################### giveth_bal(tokenDistro,duration,periodFinish,uni): giveth_bal - tokenDistro: 0x87dE995F6744B75bBe0255A973081142aDb61f4d giveth_bal - duration: 1209600 giveth_bal - periodFinish: 0 giveth_bal - uni: 0x7819f1532c49388106f7762328c51eE70EdD134c ###################################################### ####### GIVstaking ETH Mainnet 2500000 ####### ###################################################### deployer: 0x34d27210cC319EC5281bDc4DC2ad8FbcF4EAEAEB tokenDistribution: 0x87dE995F6744B75bBe0255A973081142aDb61f4d uni: 0x900dB999074d9277c5DA2A43F252D74366230DA0 duration: 1209600 ############################################## UNIGIV deployed to: 0x4B9EfAE862a1755F7CEcb021856D467E86976755 ############################################## TokenDistro - assign: giveth_uni_reward 2500000 ####################### ##### Check ##### ####################### unigiv(tokenDistro,duration,periodFinish,uni): unigiv - tokenDistro: 0x87dE995F6744B75bBe0255A973081142aDb61f4d unigiv - duration: 1209600 unigiv - periodFinish: 0 unigiv - uni: 0x900dB999074d9277c5DA2A43F252D74366230DA0 ####################### ##### Final checks ### ####################### tokenDistro.balances(tokenDistro.address) allocated: 1985000000.0 claimed: 0.0 tokenDistro.balances(giveth_uni_reward.address) allocated: 10000000.0 claimed: 0.0 tokenDistro.balances(giveth_bal.address) allocated: 2500000.0 claimed: 0.0 tokenDistro.balances(unigiv.address) allocated: 2500000.0 claimed: 0.0 tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),giveth_uni_reward.address) true tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),giveth_bal.address) true tokenDistro.hasRole(tokenDistro.DISTRIBUTOR_ROLE(),unigiv.address) true Process finished with exit code 0 ```