diff --git a/.env.mainnet b/.env.celo old mode 100644 new mode 100755 similarity index 95% rename from .env.mainnet rename to .env.celo index 7f88b405..a12b3134 --- a/.env.mainnet +++ b/.env.celo @@ -9,3 +9,5 @@ MULTISIG_SIGNER_1 = 0x91f2437f5C8e7A3879e14a75a7C5b4CccC76023a MULTISIG_SIGNER_2 = 0x3784a50f16af1C135b741914449BEa4AfdB0c5c4 MULTISIG_SIGNER_3 = 0x1f5979355411dF24c5Ce21Df5bD9f2fff418c194 MULTISIG_SIGNER_4 = 0x4d82BfC8823a4F3AF82B0AdE52ff3e2d74A04757 + +CELO_SCAN_API_KEY = CELOSCAN_API_KEY diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 index 29cc69f9..ef73b707 --- a/.env.example +++ b/.env.example @@ -8,4 +8,6 @@ MULTISIG_SIGNER_2 = 0x2B73d814BA2231606f9d856C7C20423915F96711 MULTISIG_SIGNER_3 = 0x2B73d814BA2231606f9d856C7C20423915F96711 MULTISIG_SIGNER_4 = 0x2B73d814BA2231606f9d856C7C20423915F96711 DEPLOYER = 0x5bC1C4C1D67C5E4384189302BC653A611568a788 -VALIDATOR_GROUPS = 0xc24baeac0Fd189637112B7e33d22FfF2730aF993,0xb35Be22BccB0dB9dC62967dcF15fEB97C20f854e,0x3D451dd723797b3DE938C5B22412032B6452591A,0x15Ed3f6b79F5Fb9Ef1D99D37314Dd626b3005F0b,0x34649AdA2cB44D851a2103Feaa8922DedDABfc1c,0xc8A81D473992c7c6D3F469A8263F24914625709d,0x81AE1C73A326325216E25ff1af9EA3871195036E,0xD72Ed2e3db984bAC3bB351FE652200dE527eFfcf \ No newline at end of file +VALIDATOR_GROUPS = 0xc24baeac0Fd189637112B7e33d22FfF2730aF993,0xb35Be22BccB0dB9dC62967dcF15fEB97C20f854e,0x3D451dd723797b3DE938C5B22412032B6452591A,0x15Ed3f6b79F5Fb9Ef1D99D37314Dd626b3005F0b,0x34649AdA2cB44D851a2103Feaa8922DedDABfc1c,0xc8A81D473992c7c6D3F469A8263F24914625709d,0x81AE1C73A326325216E25ff1af9EA3871195036E,0xD72Ed2e3db984bAC3bB351FE652200dE527eFfcf + +CELO_SCAN_API_KEY = CELOSCAN_API_KEY diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 41c7c864..6faa29c8 --- a/README.md +++ b/README.md @@ -51,6 +51,29 @@ Alfajores : ``` yarn verify:deploy --network alfajores ``` + +## Verify on CeloScan +1. Get CeloScan api key +1. Update api key in hardhat.config.ts (etherscan.apiKey) +1. Get constructor arguments of deployed smart contract + * Find contract in `deployments/[network]` (example deployments/celo/MultiSig_Proxy.json) + * In root level there are constructur arguments in `args` +4. Save constructor arguments into js file +``` +module.exports = [ + "0xb78AB3f89C97C0291B747C3Ba8814b5AA47AEcF1", + "4814d6b8a8394fe8b363a892b6618b21", + ]; +``` +5. Verify smart contract +``` +yarn hardhat verify --network [network] --constructor-args [path_to_js_file] [contract_address] +``` +example +``` +yarn hardhat verify --network celo --constructor-args arguments.js 0x78daa21fce4d30e74ff745da3204764a0ad40179 +``` + ## Deploying to local CELO node You may desire to deploy using an unlocked account in a private node. In that case, you can use the following commands : diff --git a/deployments/mainnet/.chainId b/deployments/celo/.chainId similarity index 100% rename from deployments/mainnet/.chainId rename to deployments/celo/.chainId diff --git a/deployments/mainnet/Account.json b/deployments/celo/Account.json similarity index 100% rename from deployments/mainnet/Account.json rename to deployments/celo/Account.json diff --git a/deployments/mainnet/Account_Implementation.json b/deployments/celo/Account_Implementation.json similarity index 100% rename from deployments/mainnet/Account_Implementation.json rename to deployments/celo/Account_Implementation.json diff --git a/deployments/mainnet/Account_Proxy.json b/deployments/celo/Account_Proxy.json similarity index 100% rename from deployments/mainnet/Account_Proxy.json rename to deployments/celo/Account_Proxy.json diff --git a/deployments/mainnet/Manager.json b/deployments/celo/Manager.json similarity index 100% rename from deployments/mainnet/Manager.json rename to deployments/celo/Manager.json diff --git a/deployments/mainnet/Manager_Implementation.json b/deployments/celo/Manager_Implementation.json similarity index 100% rename from deployments/mainnet/Manager_Implementation.json rename to deployments/celo/Manager_Implementation.json diff --git a/deployments/mainnet/Manager_Proxy.json b/deployments/celo/Manager_Proxy.json similarity index 100% rename from deployments/mainnet/Manager_Proxy.json rename to deployments/celo/Manager_Proxy.json diff --git a/deployments/mainnet/MultiSig.json b/deployments/celo/MultiSig.json similarity index 100% rename from deployments/mainnet/MultiSig.json rename to deployments/celo/MultiSig.json diff --git a/deployments/mainnet/MultiSig_Implementation.json b/deployments/celo/MultiSig_Implementation.json similarity index 100% rename from deployments/mainnet/MultiSig_Implementation.json rename to deployments/celo/MultiSig_Implementation.json diff --git a/deployments/mainnet/MultiSig_Proxy.json b/deployments/celo/MultiSig_Proxy.json similarity index 100% rename from deployments/mainnet/MultiSig_Proxy.json rename to deployments/celo/MultiSig_Proxy.json diff --git a/deployments/mainnet/RebasedStakedCelo.json b/deployments/celo/RebasedStakedCelo.json similarity index 100% rename from deployments/mainnet/RebasedStakedCelo.json rename to deployments/celo/RebasedStakedCelo.json diff --git a/deployments/mainnet/RebasedStakedCelo_Implementation.json b/deployments/celo/RebasedStakedCelo_Implementation.json similarity index 100% rename from deployments/mainnet/RebasedStakedCelo_Implementation.json rename to deployments/celo/RebasedStakedCelo_Implementation.json diff --git a/deployments/mainnet/RebasedStakedCelo_Proxy.json b/deployments/celo/RebasedStakedCelo_Proxy.json similarity index 100% rename from deployments/mainnet/RebasedStakedCelo_Proxy.json rename to deployments/celo/RebasedStakedCelo_Proxy.json diff --git a/deployments/mainnet/StakedCelo.json b/deployments/celo/StakedCelo.json similarity index 100% rename from deployments/mainnet/StakedCelo.json rename to deployments/celo/StakedCelo.json diff --git a/deployments/mainnet/StakedCelo_Implementation.json b/deployments/celo/StakedCelo_Implementation.json similarity index 100% rename from deployments/mainnet/StakedCelo_Implementation.json rename to deployments/celo/StakedCelo_Implementation.json diff --git a/deployments/mainnet/StakedCelo_Proxy.json b/deployments/celo/StakedCelo_Proxy.json similarity index 100% rename from deployments/mainnet/StakedCelo_Proxy.json rename to deployments/celo/StakedCelo_Proxy.json diff --git a/deployments/mainnet/solcInputs/4814d6b8a8394fe8b363a892b6618b21.json b/deployments/celo/solcInputs/4814d6b8a8394fe8b363a892b6618b21.json similarity index 100% rename from deployments/mainnet/solcInputs/4814d6b8a8394fe8b363a892b6618b21.json rename to deployments/celo/solcInputs/4814d6b8a8394fe8b363a892b6618b21.json diff --git a/deployments/mainnet/solcInputs/c489653166fa464953eb1b18da756ed2.json b/deployments/celo/solcInputs/c489653166fa464953eb1b18da756ed2.json similarity index 100% rename from deployments/mainnet/solcInputs/c489653166fa464953eb1b18da756ed2.json rename to deployments/celo/solcInputs/c489653166fa464953eb1b18da756ed2.json diff --git a/deployments/mainnet/solcInputs/ebb9b509e34d9430796242757f4afb07.json b/deployments/celo/solcInputs/ebb9b509e34d9430796242757f4afb07.json similarity index 100% rename from deployments/mainnet/solcInputs/ebb9b509e34d9430796242757f4afb07.json rename to deployments/celo/solcInputs/ebb9b509e34d9430796242757f4afb07.json diff --git a/hardhat.config.ts b/hardhat.config.ts index 94d62934..976c5bb4 100755 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -4,6 +4,7 @@ import "@nomiclabs/hardhat-ethers"; import "@nomiclabs/hardhat-waffle"; import "@nomiclabs/hardhat-web3"; import "@typechain/hardhat"; +import "@nomiclabs/hardhat-etherscan"; import "@celo/staked-celo-hardhat-deploy"; import "./lib/contractkit.plugin"; import minimist from "minimist"; @@ -86,12 +87,27 @@ module.exports = { gas: 13000000, gasPrice: 100000000000, }, - mainnet: { + celo: { url: `https://forno.celo.org/`, gas: 13000000, gasPrice: 20000000000, }, }, + etherscan: { + // Your API key for Etherscan + // Obtain one at https://celoscan.io + apiKey: process.env.CELO_SCAN_API_KEY, + customChains: [ + { + network: "celo", + chainId: 42220, + urls: { + apiURL: "https://api.celoscan.io/api", + browserURL: "https://celoscan.io", + }, + }, + ], + }, solidity: { compilers: [ { diff --git a/package.json b/package.json index ec62a32f..7f1bee11 100755 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@celo/connect": "^1.5.2", "@celo/contractkit": "^1.5.2", "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13", + "@nomiclabs/hardhat-etherscan": "^3.1.6", "@nomiclabs/hardhat-waffle": "^2.0.2", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/contracts": "^4.4.2",