-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from humanprotocol/feature/contracts-deployment
Deploy contracts with proxies on Mumbai
- Loading branch information
Showing
10 changed files
with
236 additions
and
38 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,14 +1,106 @@ | ||
# Contract addresses by network | ||
|
||
| | Network Type | Status | HMTToken | Proxy | EscrowFactory | Staking | KVStore | | ||
|---------------------|--------------|------------|--------------------------------------------|-------|--------------------------------------------|---------|--------------------------------------------| | ||
| Polygon | Mainnet | Active | 0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF | | 0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794 | | 0x6334dB76037bb6d4bc21901433E870b22ACa1F9a | | ||
| Mumbai | Testnet | Active | 0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4 | | 0x558cd800f9F0B02f3B149667bDe003284c867E94 | | 0x32e27177BA6Ea91cf28dfd91a0Da9822A4b74EcF | | ||
| Goerli | Testnet | Active | 0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317 | | 0xaAe6a2646C1F88763E62e0cD08aD050Ea66AC46F | | | | ||
| Rinkeby | Testnet | Deprecated | 0x4dCf5ac4509888714dd43A5cCc46d7ab389D9c23 | | 0x925B24444511c86F4d4E63141D8Be0A025E2dca4 | | | | ||
| Binance Smart Chain | Mainnet | Active | 0x0d501B743F22b641B8C8dfe00F1AAb881D57DDC7 | | 0xc88bC422cAAb2ac8812de03176402dbcA09533f4 | | 0x8340412Ed68BcF53a7Da72BFFc1E2E74CfdE74D0 | | ||
| Binance Smart Chain | Testnet | Active | 0xd3a31d57fdd790725d0f6b78095f62e8cd4ab317 | | 0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f | | 0x7676F326f1e30E96a76B7F1a860d56A9ac988a7d | | ||
| Moonbeam | Mainnet | Active | 0x3b25BC1dC591D24d60560d0135D6750A561D4764 | | 0x98108c28B7767a52BE38B4860832dd4e11A7ecad | | 0x6617d21ab0f16A7079e2811Cf9306CAe7018bDd9 | | ||
| Moonbeam Alpha | Testnet | Active | 0xe4C8eC5d057EacF40060b2174627a4941a5c8127 | | 0x3Cd0B117Be4CC1e31c8d7d1eD8b32208a2820902 | | 0x64009ca5fb4b34769F7240c6073FEc34bf5b64E3 | | ||
| Avalanche | Mainnet | Active | 0x12365293cb6477d4fc2686e46bb97e3fb64f1550 | | 0x9767a578ba7a5FA1563c8229943cB01cd8446BB4 | | 0x4B79eaD28F52eD5686bf0e379717e85fc7aD10Df | | ||
| Avalanche Fuji | Testnet | Active | 0x9406d5c635AD22b0d76c75E52De57A2177919ca3 | | 0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88 | | 0xd232c1426CF0653cE8a71DC98bCfDf10c471c114 | | ||
|
||
| Polygon (Mainnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2021/10/13 | HMToken | 0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF | N/A | | ||
|2022/02/28 | EscrowFactory | 0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/03/01 | EthKVStore | 0x6334dB76037bb6d4bc21901433E870b22ACa1F9a | N/A | | ||
| | Reputation | | | | ||
|
||
| Polygon Mumbai (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/04/25 | HMToken | 0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4 | N/A | | ||
|2023/01/26 | EscrowFactory | 0xd319e761b632E39234E68247D307818a20158890 | 0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d | | ||
|2023/01/26 | Staking | 0x19Fc3e859C1813ac9427a7a78BeB9ae102CE96d3 | 0x7Fd3dF914E7b6Bd96B4c744Df32183b51368Bfac | | ||
|2023/01/26 | RewardPool | 0x295514FC4C812Db24C3277d6D3175956AdEA273C | 0xf0145eD99AC3c4f877aDa7dA4D1E059ec9116BAE | | ||
|2023/01/26 | EthKVStore | 0xD7F61E812e139a5a02eDae9Dfec146E1b8eA3807 | N/A | | ||
|2023/01/26 | Reputation | 0x7B9f9Dc6c157899C1Eb1c6B86f94855cC2F537dF | 0xC522463d36f76b881bE66484e3068F11e7038Ace | | ||
|
||
| Goerli (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/10/12 | HMToken | 0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317 | N/A | | ||
|2022/10/12 | EscrowFactory | 0xaAe6a2646C1F88763E62e0cD08aD050Ea66AC46F | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
| | EthKVStore | | N/A | | ||
| | Reputation | | | | ||
|
||
| Rinkeby (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2020/09/15 | HMToken | 0x4dCf5ac4509888714dd43A5cCc46d7ab389D9c23 | N/A | | ||
|2021/03/05 | EscrowFactory | 0x925B24444511c86F4d4E63141D8Be0A025E2dca4 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
| | EthKVStore | | N/A | | ||
| | Reputation | | | | ||
|
||
| Binance SC (Mainnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/08/18 | HMToken | 0x0d501B743F22b641B8C8dfe00F1AAb881D57DDC7 | N/A | | ||
|2022/08/23 | EscrowFactory | 0xc88bC422cAAb2ac8812de03176402dbcA09533f4 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/08/23 | EthKVStore | 0x8340412Ed68BcF53a7Da72BFFc1E2E74CfdE74D0 | N/A | | ||
| | Reputation | | | | ||
|
||
| Binance SC (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/10/12 | HMToken | 0xd3a31d57fdd790725d0f6b78095f62e8cd4ab317 | N/A | | ||
|2022/10/12 | EscrowFactory | 0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/08/12 | EthKVStore | 0x7676F326f1e30E96a76B7F1a860d56A9ac988a7d | N/A | | ||
| | Reputation | | | | ||
|
||
| Moonbeam (Mainnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/05/26 | HMToken | 0x3b25BC1dC591D24d60560d0135D6750A561D4764 | N/A | | ||
|2022/06/01 | EscrowFactory | 0x98108c28B7767a52BE38B4860832dd4e11A7ecad | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/06/01 | EthKVStore | 0x6617d21ab0f16A7079e2811Cf9306CAe7018bDd9 | N/A | | ||
| | Reputation | | | | ||
|
||
| Moonbeam Alpha (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/05/31 | HMToken | 0xe4C8eC5d057EacF40060b2174627a4941a5c8127 | N/A | | ||
|2022/05/31 | EscrowFactory | 0x3Cd0B117Be4CC1e31c8d7d1eD8b32208a2820902 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/05/31 | EthKVStore | 0x64009ca5fb4b34769F7240c6073FEc34bf5b64E3 | N/A | | ||
| | Reputation | | | | ||
|
||
| Avalanche (Mainnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/09/29 | HMToken | 0x12365293cb6477d4fc2686e46bb97e3fb64f1550 | N/A | | ||
|2022/12/03 | EscrowFactory | 0x9767a578ba7a5FA1563c8229943cB01cd8446BB4 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/11/17 | EthKVStore | 0x4B79eaD28F52eD5686bf0e379717e85fc7aD10Df | N/A | | ||
| | Reputation | | | | ||
|
||
| Avalanche Fuji (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/10/23 | HMToken | 0x9406d5c635AD22b0d76c75E52De57A2177919ca3 | N/A | | ||
|2022/10/24 | EscrowFactory | 0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88 | | | ||
| | Staking | | | | ||
| | RewardPool | | | | ||
|2022/10/24 | EthKVStore | 0xd232c1426CF0653cE8a71DC98bCfDf10c471c114 | N/A | | ||
| | Reputation | | | | ||
|
||
|
||
|
||
|
||
# Old contracts | ||
|
||
|
||
| Polygon Mumbai (Testnet) | Contract | Address | Proxy | | ||
|--------------------------|----------------|--------------------------------------------|--------------------------------------------| | ||
|2022/04/25 | HMToken | 0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4 | N/A | | ||
|2022/04/25 | EscrowFactory | 0x558cd800f9F0B02f3B149667bDe003284c867E94 | | | ||
|2022/04/29 | EthKVStore | 0x32e27177BA6Ea91cf28dfd91a0Da9822A4b74EcF | N/A | | ||
|2023/01/17 | Staking | 0x76E2EF2E177097E0b296E1e305d69Fe8Bae5f774 | 0xf421fD3eB97982C205966ebB514Ab2E435c6d5B7 | | ||
|2023/01/17 | EthKVStore | 0x459EE403d060B84b5014605D6739cCFed32AFb96 | N/A | |
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
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,79 @@ | ||
/* eslint-disable no-console */ | ||
import { Console } from 'console'; | ||
import { ethers, upgrades } from 'hardhat'; | ||
|
||
async function main() { | ||
const hmtAddress = process.env.HMT_ADDRESS; | ||
if (!hmtAddress) { | ||
console.error('HMT_ADDRESS env variable missing'); | ||
return; | ||
} | ||
|
||
const Staking = await ethers.getContractFactory('Staking'); | ||
const stakingContract = await upgrades.deployProxy( | ||
Staking, | ||
[hmtAddress, 1, 1], | ||
{ initializer: 'initialize', kind: 'uups' } | ||
); | ||
await stakingContract.deployed(); | ||
console.log('Staking Proxy Address: ', stakingContract.address); | ||
console.log( | ||
'Staking Implementation Address: ', | ||
await upgrades.erc1967.getImplementationAddress(stakingContract.address) | ||
); | ||
|
||
const EscrowFactory = await ethers.getContractFactory('EscrowFactory'); | ||
const escrowFactoryContract = await upgrades.deployProxy( | ||
EscrowFactory, | ||
[stakingContract.address], | ||
{ initializer: 'initialize', kind: 'uups' } | ||
); | ||
await escrowFactoryContract.deployed(); | ||
console.log('Escrow Factory Proxy Address: ', escrowFactoryContract.address); | ||
console.log( | ||
'Escrow Factory Implementation Address: ', | ||
await upgrades.erc1967.getImplementationAddress( | ||
escrowFactoryContract.address | ||
) | ||
); | ||
|
||
const KVStore = await ethers.getContractFactory('KVStore'); | ||
const kvStoreContract = await KVStore.deploy(); | ||
await kvStoreContract.deployed(); | ||
|
||
console.log('KVStore Address: ', kvStoreContract.address); | ||
|
||
const RewardPool = await ethers.getContractFactory('RewardPool'); | ||
const rewardPoolContract = await upgrades.deployProxy( | ||
RewardPool, | ||
[hmtAddress, stakingContract.address, 1], | ||
{ initializer: 'initialize', kind: 'uups' } | ||
); | ||
await rewardPoolContract.deployed(); | ||
console.log('Reward Pool Proxy Address: ', rewardPoolContract.address); | ||
console.log( | ||
'Reward Pool Implementation Address: ', | ||
await upgrades.erc1967.getImplementationAddress(rewardPoolContract.address) | ||
); | ||
|
||
// Configure RewardPool in Staking | ||
await stakingContract.setRewardPool(rewardPoolContract.address); | ||
|
||
const Reputation = await ethers.getContractFactory('Reputation'); | ||
const reputationContract = await upgrades.deployProxy( | ||
Reputation, | ||
[stakingContract.address, 1], | ||
{ initializer: 'initialize', kind: 'uups' } | ||
); | ||
await reputationContract.deployed(); | ||
console.log('Reputation Proxy Address: ', reputationContract.address); | ||
console.log( | ||
'Reputation Implementation Address: ', | ||
await upgrades.erc1967.getImplementationAddress(reputationContract.address) | ||
); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
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
Oops, something went wrong.