Skip to content

Commit

Permalink
Deploy contracts to mumbai
Browse files Browse the repository at this point in the history
  • Loading branch information
vrde committed Oct 27, 2023
1 parent 4d78acf commit bc3e07c
Show file tree
Hide file tree
Showing 16 changed files with 1,624 additions and 5 deletions.
1,548 changes: 1,548 additions & 0 deletions .openzeppelin/polygon-mumbai.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions deployments/80001.DAORoles.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions deployments/80001.DIAOracleV2Mock.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions deployments/80001.GovernanceToken.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","NEOKingdom DAO Governance","NEOKGOV"]
1 change: 1 addition & 0 deletions deployments/80001.InternalMarket.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","0xf4537D936a31abb933acdBF288a274eC732B15aF"]
1 change: 1 addition & 0 deletions deployments/80001.NeokingdomToken.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["NEOKingdom DAO","NEOK"]
1 change: 1 addition & 0 deletions deployments/80001.ProxyAdmin.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions deployments/80001.RedemptionController.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608"]
1 change: 1 addition & 0 deletions deployments/80001.ResolutionManager.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","0x5b8f86C4010e58347afCEB7820A1c410b845D5d1","0xf4537D936a31abb933acdBF288a274eC732B15aF","0x74FdD2b10cF71B9b7AEB402F90aDE1a67D9C2258"]
1 change: 1 addition & 0 deletions deployments/80001.ShareholderRegistry.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","NeokingdomDAO Share","NEOKSHARE"]
1 change: 1 addition & 0 deletions deployments/80001.TokenMock.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions deployments/80001.Voting.arguments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608"]
57 changes: 57 additions & 0 deletions deployments/80001.network.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"DAORoles": {
"address": "0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608",
"blockNumber": 41716417,
"blockHash": "0x22e4050701fc9b3f840bccc7ac4a435f91da91d8d313f7c17b0b3b2d26f51653"
},
"TokenMock": {
"address": "0x32cac81e324F5eca265DfEcf0eDCcc277e1B4DE6",
"blockNumber": 41716430,
"blockHash": "0xafd5e2fd7f21556162a960c1cf61d919174d5eb59c17875c01168ccc7ae02c8d"
},
"DIAOracleV2Mock": {
"address": "0x0F7755e7B1cf0f8015180E67C97271471808d150",
"blockNumber": 41716448,
"blockHash": "0xc689bf80159aac4f28568bb580b75924d138d4055be50129d316e0b62a733b93"
},
"Voting": {
"address": "0x74FdD2b10cF71B9b7AEB402F90aDE1a67D9C2258",
"blockNumber": 41716462,
"blockHash": "0x6f251f3ad964601e4906d4966a98f9abfe85df3b530e764b6d05b2f71e4ba265"
},
"GovernanceToken": {
"address": "0xf4537D936a31abb933acdBF288a274eC732B15aF",
"blockNumber": 41716500,
"blockHash": "0x03652b4a41e53f8d614e6af957b670b92df43a30404e33b9a38a1931467324ea"
},
"NeokingdomToken": {
"address": "0xdC6dc5c5524A77633EF1b3eFb08fe0950A155E44",
"blockNumber": 41716528,
"blockHash": "0xbc5935a875c8b4283b9e1b7f2867cb9c65b9c5e0d76600cd2492b9006209b71f"
},
"RedemptionController": {
"address": "0xF610a6EB92023DCb716E218Bf8225d862F8e4A0e",
"blockNumber": 41716550,
"blockHash": "0x44a5d8b3b4065446cebf4af1abb8ed05b2439939e4611cc5e6bcc4e01e5f54d2"
},
"InternalMarket": {
"address": "0xd345D53144E237C69F08B543553FAFc78d14Ab24",
"blockNumber": 41716575,
"blockHash": "0x6e496da76dfde9f860abbf95aba5c51be0f779e3c7be5999a2a18bb0b66b4175"
},
"ShareholderRegistry": {
"address": "0x5b8f86C4010e58347afCEB7820A1c410b845D5d1",
"blockNumber": 41716600,
"blockHash": "0x2e41d94bedaa5dce30d553e37837256f533c0eb258d5e6a59f2974a92fbc93c0"
},
"ResolutionManager": {
"address": "0x62279b0624da9Ade912273C9F88287596c66e1F1",
"blockNumber": 41716626,
"blockHash": "0x098660d6b4fcc1faab2a517c78cf6b25e55c2c290b03ddf3ee1f6bbfe5d465a7"
},
"ProxyAdmin": {
"address": "0x5928Ffd33a8a57D1e82d5D5fCa6D1C9c6fe3150d",
"blockNumber": 41716645,
"blockHash": "0x405695bff1ae47693a5ddc7b25ec2c0a1c0e5e55d511c2698ba067b6598ef965"
}
}
1 change: 1 addition & 0 deletions deployments/80001.nextstep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35
5 changes: 3 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import("./tasks").catch((e) => console.log("Cannot load tasks", e.toString()));

const BLAST_API_KEY = process.env.BLAST_API_KEY || "";
const MUMBAI_PRIVATE_KEY =
process.env.RINKEBY_PRIVATE_KEY! ||
process.env.MUMBAI_PRIVATE_KEY! ||
"0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"; // well known private key
const POLYGON_PRIVATE_KEY =
process.env.POLYGON_PRIVATE_KEY! ||
Expand Down Expand Up @@ -65,7 +65,8 @@ const config: HardhatUserConfig = {
url: "http://127.0.0.1:8545",
},
mumbai: {
url: `https://polygon-testnet.blastapi.io/${BLAST_API_KEY}`,
//url: `https://polygon-testnet.blastapi.io/${BLAST_API_KEY}`,
url: "https://polygon-mumbai-bor.publicnode.com",
accounts: [MUMBAI_PRIVATE_KEY],
},
polygon: {
Expand Down
7 changes: 4 additions & 3 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function isContractName(name: string): name is ContractNames {
}
const WAIT_BLOCKS = process.env.WAIT_BLOCKS
? parseInt(process.env.WAIT_BLOCKS)
: 1;
: 5;

function getConfigPath(chainId: number) {
return `./deployments/${chainId}.network.json`;
Expand Down Expand Up @@ -128,8 +128,8 @@ export async function _deployContract(
);

if (verify) {
console.log("Wait 2 blocks");
await contract.deployTransaction.wait(2);
console.log(`Wait ${WAIT_BLOCKS} blocks`);
await contract.deployTransaction.wait(WAIT_BLOCKS);
console.log("Verify contract");
try {
await hre.run("verify", {
Expand Down Expand Up @@ -224,6 +224,7 @@ const CHAINID_TO_NAME = {
666666: "localhost",
9000: "tevmos",
9001: "evmos",
80001: "mumbai",
} as const;

const CHAINIDS = Object.keys(CHAINID_TO_NAME).map((c) => parseInt(c));
Expand Down

0 comments on commit bc3e07c

Please sign in to comment.