From 799668e4b6e5a8587c9d3e3e90391f65eb02bef8 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:43:03 +0100 Subject: [PATCH] chore(deployment): deploy to testnets and update docs --- contracts/.env.example | 4 + contracts/.gitignore | 2 +- contracts/default-deployed-contracts.json | 575 ++++++++++++++++ contracts/deploy-config-example.json | 69 +- contracts/hardhat.config.ts | 20 + contracts/package.json | 12 +- contracts/tasks/helpers/constants.ts | 12 +- .../smart-contracts/DeployedContracts.md | 651 +++++++++++++++++- .../quick-start/deployment.md | 213 +++++- 9 files changed, 1538 insertions(+), 20 deletions(-) create mode 100644 contracts/default-deployed-contracts.json diff --git a/contracts/.env.example b/contracts/.env.example index ac5ff764cd..3b20821410 100644 --- a/contracts/.env.example +++ b/contracts/.env.example @@ -5,6 +5,10 @@ ETH_ETHERSCAN_API_KEY= OPTIMISM_ETHERSCAN_API_KEY= # api key for scroll etherscan SCROLL_ETHERSCAN_API_KEY= +# api key for base etherscan +BASE_ETHERSCAN_API_KEY= +# api key for arbitrum etherscan +ARB_ETHERSCAN_API_KEY= # RPC url to talk to optimism mainnet SEPOLIA_RPC_URL= # RPC url to talk to optimism sepolia diff --git a/contracts/.gitignore b/contracts/.gitignore index 5450ea952a..33df86cb67 100644 --- a/contracts/.gitignore +++ b/contracts/.gitignore @@ -1,4 +1,4 @@ docs .env +deploy-config.jsong deployed-contracts.json -deploy-config.json diff --git a/contracts/default-deployed-contracts.json b/contracts/default-deployed-contracts.json new file mode 100644 index 0000000000..fde2d73a13 --- /dev/null +++ b/contracts/default-deployed-contracts.json @@ -0,0 +1,575 @@ +{ + "optimism_sepolia": { + "instance": { + "0x4473aC3e68ad78D67757336ABaAa2Dced08cfcdF": { + "id": "ConstantInitialVoiceCreditProxy", + "deploymentTxHash": "0x8b62e4abe0db623981b8873a5f88f3c447b4202159e5d47b1d3158c1914afb91", + "verify": { + "args": "[\"99\"]" + } + }, + "0xa4fF6765C207C84AbeFCe0226b24204f9ceBAB45": { + "id": "FreeForAllGatekeeper", + "deploymentTxHash": "0x7fa84fe66edeb0f6d13999344289d0404eac443e52dab4c9b25d7415ff84e45b", + "verify": { + "args": "[]" + } + }, + "0xB1abb44291ff487f96636758b07Ccd9881f64c9A": { + "id": "Verifier", + "deploymentTxHash": "0x50377144a799369d26cb0f4de471a9c95a3b7de0a3aed18363cb1204ee45213a", + "verify": { + "args": "[]" + } + }, + "0x07490eba00dc4ACA6721D052Fa4C5002Aa077233": { + "id": "PoseidonT3", + "deploymentTxHash": "0x799a38ec8dfa740286f496da91d3549cfc923aa8f7c32cf0af2e03829ddb105f", + "verify": { + "args": "[]" + } + }, + "0xbb0e724CE02e5E7eDd31e632dc6e59F229a1126d": { + "id": "PoseidonT4", + "deploymentTxHash": "0x82e8dedbfd9a583b7b09d5e3d7a0b14d0b7a5062438ab70d3154d15f888ef960", + "verify": { + "args": "[]" + } + }, + "0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679": { + "id": "PoseidonT5", + "deploymentTxHash": "0xd57d72b7d519b81bd80b01c0b80669fb4c14b3b349b3d5555e7007ec0adae68d", + "verify": { + "args": "[]" + } + }, + "0xfD77833F10a29c76A6a0ede235Eb651D744d0E2F": { + "id": "PoseidonT6", + "deploymentTxHash": "0xb37f2be891314378b5f8579ba5bd95df7b0f1652b4f91356ddeb9e86ea7311fe", + "verify": { + "args": "[]" + } + }, + "0xad844a9567ada5996FFC0D2DeC78b3767a1c0501": { + "id": "PollFactory", + "deploymentTxHash": "0x99a4dd853297e4aa9a824c509268926875f9ec2971b6c6e74b3179fd4f8845ca", + "verify": { + "args": "[]" + } + }, + "0xbBb6f1B4232F993e5a026217a3D596B332062CB3": { + "id": "MessageProcessorFactory", + "deploymentTxHash": "0xe817a6c240bdbb19a974f9a36eed9fd89794229496ed51db591b23382910bbb2", + "verify": { + "args": "[]" + } + }, + "0x1356f05179cdcAD2D8708B539A75de082118de92": { + "id": "TallyFactory", + "deploymentTxHash": "0x7b57994dccdbeeff25d9f7f58fde0f35cd10ce53eb160009c565033a370a0600", + "verify": { + "args": "[]" + } + }, + "0x94f29E6d14A01c1330CE8f7421Db489Fe5A14976": { + "id": "MACI", + "deploymentTxHash": "0x2d6b3a6227101b91aabe847b9849a778332570ea77f6e33f51218b024af49798", + "verify": { + "args": "[\"0xad844a9567ada5996FFC0D2DeC78b3767a1c0501\",\"0xbBb6f1B4232F993e5a026217a3D596B332062CB3\",\"0x1356f05179cdcAD2D8708B539A75de082118de92\",\"0xa4fF6765C207C84AbeFCe0226b24204f9ceBAB45\",\"0x4473aC3e68ad78D67757336ABaAa2Dced08cfcdF\",10,\"16015576667038038422103932363190100635991292382181099511410843174865570503661,166510078825589460025300915201657086611944528317298994959376081297530246971,10057734083972610459557695472359628128485394923403014377687504571662791937025,4904828619307091008204672239231377290495002626534171783829482835985709082773,18694062287284245784028624966421731916526814537891066525886866373016385890569\"]" + } + }, + "0x42B1AB3d98B8235204E75112e5d9E974cE7531cC": { + "id": "VkRegistry", + "deploymentTxHash": "0x1b05a22de2735ed74b58532303e7af01659b066206e696f4c8e6df61bc97f442", + "verify": { + "args": "[]" + } + }, + "0x6f9F7Fef2FF7F5D1Ff8966F751EC154146d8f431": { + "id": "ConstantInitialVoiceCreditProxy", + "deploymentTxHash": "0xe5b6ce84a95af89c64cff82901bc26b96d67bf4ffb18d4e82ebfcbc19c4392f2", + "verify": { + "args": "[\"99\"]" + } + }, + "0x6b414ff158581Ac940797463a44221d0ba6A0B9C": { + "id": "FreeForAllGatekeeper", + "deploymentTxHash": "0x5f7640018acb7155aa510e05cca92ad40003327dfe75fcab7d61bd21fefdea67", + "verify": { + "args": "[]" + } + }, + "0x7a65434FA0A87B7132DAFAd9732fA7e5516851BC": { + "id": "MACI", + "deploymentTxHash": "0xd5bbab2d0a4c583d108b4b75661fb215ea477aa4cc0943982576863177a29cdb", + "verify": { + "args": "[\"0xad844a9567ada5996FFC0D2DeC78b3767a1c0501\",\"0xbBb6f1B4232F993e5a026217a3D596B332062CB3\",\"0x1356f05179cdcAD2D8708B539A75de082118de92\",\"0x6b414ff158581Ac940797463a44221d0ba6A0B9C\",\"0x6f9F7Fef2FF7F5D1Ff8966F751EC154146d8f431\",10,\"16015576667038038422103932363190100635991292382181099511410843174865570503661,166510078825589460025300915201657086611944528317298994959376081297530246971,10057734083972610459557695472359628128485394923403014377687504571662791937025,4904828619307091008204672239231377290495002626534171783829482835985709082773,18694062287284245784028624966421731916526814537891066525886866373016385890569\"]" + } + } + }, + "named": { + "Verifier": { + "address": "0xB1abb44291ff487f96636758b07Ccd9881f64c9A", + "count": 1 + }, + "PoseidonT3": { + "address": "0x07490eba00dc4ACA6721D052Fa4C5002Aa077233", + "count": 1 + }, + "PoseidonT4": { + "address": "0xbb0e724CE02e5E7eDd31e632dc6e59F229a1126d", + "count": 1 + }, + "PoseidonT5": { + "address": "0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679", + "count": 1 + }, + "PoseidonT6": { + "address": "0xfD77833F10a29c76A6a0ede235Eb651D744d0E2F", + "count": 1 + }, + "PollFactory": { + "address": "0xad844a9567ada5996FFC0D2DeC78b3767a1c0501", + "count": 1 + }, + "MessageProcessorFactory": { + "address": "0xbBb6f1B4232F993e5a026217a3D596B332062CB3", + "count": 1 + }, + "TallyFactory": { + "address": "0x1356f05179cdcAD2D8708B539A75de082118de92", + "count": 1 + }, + "VkRegistry": { + "address": "0x42B1AB3d98B8235204E75112e5d9E974cE7531cC", + "count": 1 + }, + "ConstantInitialVoiceCreditProxy": { + "address": "0x6f9F7Fef2FF7F5D1Ff8966F751EC154146d8f431", + "count": 1 + }, + "FreeForAllGatekeeper": { + "address": "0x6b414ff158581Ac940797463a44221d0ba6A0B9C", + "count": 1 + }, + "MACI": { + "address": "0x7a65434FA0A87B7132DAFAd9732fA7e5516851BC", + "count": 1 + } + } + }, + "arbitrum_sepolia": { + "instance": { + "0x41a29A58A63A998c9Edde6883Bcec2d89835a8e9": { + "id": "ConstantInitialVoiceCreditProxy", + "deploymentTxHash": "0x897bfb740aba18fff51fcde7c5c1f97b2727f4a0122118fa300411684004211c", + "verify": { + "args": "[\"99\"]" + } + }, + "0x9e98cAA76492338627BAD0e5a6AA2762d827E169": { + "id": "FreeForAllGatekeeper", + "deploymentTxHash": "0x5a740ad234560fab4097150f6c6acbf95224b4949ff3d82b477903a435a60621", + "verify": { + "args": "[]" + } + }, + "0xB400794f463d90ce5f462A43d8E6f9155656d02d": { + "id": "Verifier", + "deploymentTxHash": "0xbf743a2514c0a57bb7972a5a2cbaa2b57ffeac78c51ed730b5ccf29e2a428ad3", + "verify": { + "args": "[]" + } + }, + "0xa0e0aC07c211D329ebA2D6ec552F4dC1B230A89A": { + "id": "PoseidonT3", + "deploymentTxHash": "0x8c0f24d6d5837334143bf181ae74ae8c4d8218f40681146f88cc6d793b416065", + "verify": { + "args": "[]" + } + }, + "0x0CC8B7Aed7d79a8B948636242706265548D0B10a": { + "id": "PoseidonT4", + "deploymentTxHash": "0xbc566db1ae8192e94418cfc9082d2a8f7dc71352438b92790a8ae9e01de86999", + "verify": { + "args": "[]" + } + }, + "0x43B519FF023757508311518AC41B5fA1CfD57181": { + "id": "PoseidonT5", + "deploymentTxHash": "0x28c63a2021aac9f0400affd73d9bd57de107a557bed40299ab0ee7adb58fdcb1", + "verify": { + "args": "[]" + } + }, + "0xb123798B1b21082100D289BeA24bFF0F8dfcbEe1": { + "id": "PoseidonT6", + "deploymentTxHash": "0xdfa42ab39a49f75c8d14cd750610b1cf2aaecf6f767362f732551416ae4445c5", + "verify": { + "args": "[]" + } + }, + "0xBa350B0cF67a0dEDa103A5d0d297bd120bF87E39": { + "id": "PollFactory", + "deploymentTxHash": "0x4a955482e8a4ecb0e275cb978980b2b85c765c0ced4e9005612ac989a5769d11", + "verify": { + "args": "[]" + } + }, + "0x96FD5e4E40671Bf8d5f1d0E3F3402488680B8376": { + "id": "MessageProcessorFactory", + "deploymentTxHash": "0x51727155edfd8c178c583801f24714dd9e4fbdd6e7c9bbbe0e7663ea3d9a3198", + "verify": { + "args": "[]" + } + }, + "0xEEBc671e15B3f1c7483161F866d76ad84645d7C8": { + "id": "TallyFactory", + "deploymentTxHash": "0xc1c7e05a40164b8429517eed34b2042e593df11091840a9820451ee0d8f796c9", + "verify": { + "args": "[]" + } + }, + "0x1446a1a1af027e58C8Bd29e231C01dB35b2F485E": { + "id": "MACI", + "deploymentTxHash": "0xa54de8b23459983b9f8f30064d9a5de5b24873dee6b9839f989d02c100320e64", + "verify": { + "args": "[\"0xBa350B0cF67a0dEDa103A5d0d297bd120bF87E39\",\"0x96FD5e4E40671Bf8d5f1d0E3F3402488680B8376\",\"0xEEBc671e15B3f1c7483161F866d76ad84645d7C8\",\"0x9e98cAA76492338627BAD0e5a6AA2762d827E169\",\"0x41a29A58A63A998c9Edde6883Bcec2d89835a8e9\",10,\"16015576667038038422103932363190100635991292382181099511410843174865570503661,166510078825589460025300915201657086611944528317298994959376081297530246971,10057734083972610459557695472359628128485394923403014377687504571662791937025,4904828619307091008204672239231377290495002626534171783829482835985709082773,18694062287284245784028624966421731916526814537891066525886866373016385890569\"]" + } + }, + "0xE21F9Ea298b62032B3C2206955cd12c4Ab0a046b": { + "id": "VkRegistry", + "deploymentTxHash": "0x2216dc97941a301e817d630a1a5ec31a7997f0d3ea5bcf5581defd374d8ab8aa", + "verify": { + "args": "[]" + } + } + }, + "named": { + "ConstantInitialVoiceCreditProxy": { + "address": "0x41a29A58A63A998c9Edde6883Bcec2d89835a8e9", + "count": 1 + }, + "FreeForAllGatekeeper": { + "address": "0x9e98cAA76492338627BAD0e5a6AA2762d827E169", + "count": 1 + }, + "Verifier": { + "address": "0xB400794f463d90ce5f462A43d8E6f9155656d02d", + "count": 1 + }, + "PoseidonT3": { + "address": "0xa0e0aC07c211D329ebA2D6ec552F4dC1B230A89A", + "count": 1 + }, + "PoseidonT4": { + "address": "0x0CC8B7Aed7d79a8B948636242706265548D0B10a", + "count": 1 + }, + "PoseidonT5": { + "address": "0x43B519FF023757508311518AC41B5fA1CfD57181", + "count": 1 + }, + "PoseidonT6": { + "address": "0xb123798B1b21082100D289BeA24bFF0F8dfcbEe1", + "count": 1 + }, + "PollFactory": { + "address": "0xBa350B0cF67a0dEDa103A5d0d297bd120bF87E39", + "count": 1 + }, + "MessageProcessorFactory": { + "address": "0x96FD5e4E40671Bf8d5f1d0E3F3402488680B8376", + "count": 1 + }, + "TallyFactory": { + "address": "0xEEBc671e15B3f1c7483161F866d76ad84645d7C8", + "count": 1 + }, + "MACI": { + "address": "0x1446a1a1af027e58C8Bd29e231C01dB35b2F485E", + "count": 1 + }, + "VkRegistry": { + "address": "0xE21F9Ea298b62032B3C2206955cd12c4Ab0a046b", + "count": 1 + } + } + }, + "base_sepolia": { + "instance": { + "0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856": { + "id": "ConstantInitialVoiceCreditProxy", + "deploymentTxHash": "0x2d94f77f843c7f3f19eec1d0cac75a1260e0708e47ee9cb7fbf72c63ebcb156b", + "verify": { + "args": "[\"99\"]" + } + }, + "0x8BA83Dd6E0E448417C519A38c90Ee570A4CA3e9f": { + "id": "FreeForAllGatekeeper", + "deploymentTxHash": "0x24c07b7ccc8ab143f03b03749ad81e4830456d4353f3c9783ffd08b3ea2d1004", + "verify": { + "args": "[]" + } + }, + "0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27": { + "id": "Verifier", + "deploymentTxHash": "0x536d8665489c174d17d584b9dc3e6a6ccc595e5b232f8029879ae49e2c38c3d6", + "verify": { + "args": "[]" + } + }, + "0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4": { + "id": "PoseidonT3", + "deploymentTxHash": "0xc87ffe646d64cde4e819636490a8eb8d246233aeb58b42d06ff76ab04c07a301", + "verify": { + "args": "[]" + } + }, + "0x8778dA47eF619f56341fE95514e95fa0FF3B77C6": { + "id": "PoseidonT4", + "deploymentTxHash": "0xcebcf39fd5857e595b50139004123c27a29c504ed12440c062833fcda2525848", + "verify": { + "args": "[]" + } + }, + "0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968": { + "id": "PoseidonT5", + "deploymentTxHash": "0x64d9db02a0b4cb29135e56becafe30c045919f20328e3d10a50f69f27add94e9", + "verify": { + "args": "[]" + } + }, + "0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E": { + "id": "PoseidonT6", + "deploymentTxHash": "0xfd556b278a7b10b70382207c733de3f9e97ad3e2ed6821a3acd16011f3b94084", + "verify": { + "args": "[]" + } + }, + "0x2F1A5B4F8F3B7348C66A1522622b1DB712261607": { + "id": "PollFactory", + "deploymentTxHash": "0xe89d4e3c14bd680691568382e38b9400034632672b802eb1ae684afc03f7bf82", + "verify": { + "args": "[]" + } + }, + "0xE4c9d4248F1371C5C61d406A9859f9FE667567a5": { + "id": "MessageProcessorFactory", + "deploymentTxHash": "0x7d709c06be1a8055a9f12dc40eb71b27ce71fccddf5ffb1f488ed5ed3cadfbd6", + "verify": { + "args": "[]" + } + }, + "0x57034389Dbe3DE1D1C14763f55B77A2279D6d43C": { + "id": "TallyFactory", + "deploymentTxHash": "0xb5e583c45a53ac522d1025a0b594f3e58dd4fa1f837baadeb47bcc164eac0439", + "verify": { + "args": "[]" + } + }, + "0x78c3bF1b2Bc3A5512e274cA8407D2339Bb859761": { + "id": "MACI", + "deploymentTxHash": "0x8b6459ea14a920c61b17a8252ac37ebd5591f674128cb7abf3ba48e4e12b0419", + "verify": { + "args": "[\"0x2F1A5B4F8F3B7348C66A1522622b1DB712261607\",\"0xE4c9d4248F1371C5C61d406A9859f9FE667567a5\",\"0x57034389Dbe3DE1D1C14763f55B77A2279D6d43C\",\"0x8BA83Dd6E0E448417C519A38c90Ee570A4CA3e9f\",\"0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856\",10,\"16015576667038038422103932363190100635991292382181099511410843174865570503661,166510078825589460025300915201657086611944528317298994959376081297530246971,10057734083972610459557695472359628128485394923403014377687504571662791937025,4904828619307091008204672239231377290495002626534171783829482835985709082773,18694062287284245784028624966421731916526814537891066525886866373016385890569\"]" + } + }, + "0x6aA5baD99aC44bB008930c68CE2249549Cf10944": { + "id": "VkRegistry", + "deploymentTxHash": "0xdb1cbc7acc63c814dc238177adbf4012a1ccf743be3b2ef8ac2bde66177fe3a1", + "verify": { + "args": "[]" + } + } + }, + "named": { + "ConstantInitialVoiceCreditProxy": { + "address": "0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856", + "count": 1 + }, + "FreeForAllGatekeeper": { + "address": "0x8BA83Dd6E0E448417C519A38c90Ee570A4CA3e9f", + "count": 1 + }, + "Verifier": { + "address": "0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27", + "count": 1 + }, + "PoseidonT3": { + "address": "0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4", + "count": 1 + }, + "PoseidonT4": { + "address": "0x8778dA47eF619f56341fE95514e95fa0FF3B77C6", + "count": 1 + }, + "PoseidonT5": { + "address": "0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968", + "count": 1 + }, + "PoseidonT6": { + "address": "0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E", + "count": 1 + }, + "PollFactory": { + "address": "0x2F1A5B4F8F3B7348C66A1522622b1DB712261607", + "count": 1 + }, + "MessageProcessorFactory": { + "address": "0xE4c9d4248F1371C5C61d406A9859f9FE667567a5", + "count": 1 + }, + "TallyFactory": { + "address": "0x57034389Dbe3DE1D1C14763f55B77A2279D6d43C", + "count": 1 + }, + "MACI": { + "address": "0x78c3bF1b2Bc3A5512e274cA8407D2339Bb859761", + "count": 1 + }, + "VkRegistry": { + "address": "0x6aA5baD99aC44bB008930c68CE2249549Cf10944", + "count": 1 + } + } + }, + "scroll_sepolia": { + "instance": { + "0xB486cce9B4507A67Db147B0802D5673774C8D278": { + "id": "ConstantInitialVoiceCreditProxy", + "deploymentTxHash": "0x19fffe5a56c36405586b627d896513ca6949b654faac219e5d39041f7ce67d93", + "verify": { + "args": "[\"99\"]" + } + }, + "0x83dD551541C580e338206f1f677835D427C92dE2": { + "id": "FreeForAllGatekeeper", + "deploymentTxHash": "0x637fbce4ecd191f31f768f3d46a67727c29e61149cd9d2f8830f2c685cda5019", + "verify": { + "args": "[]" + } + }, + "0xD5C41106db85EDd0298279AcFCE5A722060cc5f9": { + "id": "Verifier", + "deploymentTxHash": "0xeb106e6aa2ec41e7fd36306d843cdc2a70e6b2ed3e2156664177a23db29bf400", + "verify": { + "args": "[]" + } + }, + "0x88C2c6A7535463962A34757FE63cc4F296381aba": { + "id": "PoseidonT3", + "deploymentTxHash": "0xe6f4d9bcbd8012fd7bf90aefe60818722cbeef7c40dff937aa4fb90c06e2384a", + "verify": { + "args": "[]" + } + }, + "0xF8E637e5c9EC3A8d8fa8843A6dF833348E1F1E66": { + "id": "PoseidonT4", + "deploymentTxHash": "0x041f2bfa9258dde9a411d9bf6155bdb9282dbd4eb4182cc9052e6285679c0ff1", + "verify": { + "args": "[]" + } + }, + "0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274": { + "id": "PoseidonT5", + "deploymentTxHash": "0x197041bb741918efd7d1cb1ccdd58a76e53da56fdebfa7fa3f5850349cb457d6", + "verify": { + "args": "[]" + } + }, + "0xD2F6c828606Ad8e985008Cd825012f269B50CD58": { + "id": "PoseidonT6", + "deploymentTxHash": "0xff9c1393788a82b95c00b037bfac7fcb6857836e604bdadd42049cbf0d88537a", + "verify": { + "args": "[]" + } + }, + "0x982530673Ce9e5Efa02438c694d48327Aa4fB592": { + "id": "PollFactory", + "deploymentTxHash": "0x1a0ba85163df584ea645e3f4de1173d8e7c86d4bd1641b2f6f10d8d2a5cde971", + "verify": { + "args": "[]" + } + }, + "0x50045B05cb1C76410783D8A3e5625a99d5729339": { + "id": "MessageProcessorFactory", + "deploymentTxHash": "0x85717a2b7f555c5a31d67a401b4c233a216de27c4e8ccbc8ead5ab4241f92dba", + "verify": { + "args": "[]" + } + }, + "0xbB28555E989799478442483CD1f2D370a14e2C42": { + "id": "TallyFactory", + "deploymentTxHash": "0xa7634556c12fb6e039fc189544b61ec5baa8fda94f5499e71751fa57e53c164e", + "verify": { + "args": "[]" + } + }, + "0xdA10b22B81eb8EA6BC04aa9b86d3f9d969CD49F0": { + "id": "MACI", + "deploymentTxHash": "0x21ae94c2db74f83216aac20bfc437e3a74a46a997a8979af373dde683dc4feb9", + "verify": { + "args": "[\"0x982530673Ce9e5Efa02438c694d48327Aa4fB592\",\"0x50045B05cb1C76410783D8A3e5625a99d5729339\",\"0xbB28555E989799478442483CD1f2D370a14e2C42\",\"0x83dD551541C580e338206f1f677835D427C92dE2\",\"0xB486cce9B4507A67Db147B0802D5673774C8D278\",10,\"16015576667038038422103932363190100635991292382181099511410843174865570503661,166510078825589460025300915201657086611944528317298994959376081297530246971,10057734083972610459557695472359628128485394923403014377687504571662791937025,4904828619307091008204672239231377290495002626534171783829482835985709082773,18694062287284245784028624966421731916526814537891066525886866373016385890569\"]" + } + }, + "0x3D4C58074DCD8E6526885F465ab5F311b6B290B5": { + "id": "VkRegistry", + "deploymentTxHash": "0x147fe06bd640870ef3e4dca188c89d8c75b35e3ce30bc9b972e0eae573658537", + "verify": { + "args": "[]" + } + } + }, + "named": { + "ConstantInitialVoiceCreditProxy": { + "address": "0xB486cce9B4507A67Db147B0802D5673774C8D278", + "count": 1 + }, + "FreeForAllGatekeeper": { + "address": "0x83dD551541C580e338206f1f677835D427C92dE2", + "count": 1 + }, + "Verifier": { + "address": "0xD5C41106db85EDd0298279AcFCE5A722060cc5f9", + "count": 1 + }, + "PoseidonT3": { + "address": "0x88C2c6A7535463962A34757FE63cc4F296381aba", + "count": 1 + }, + "PoseidonT4": { + "address": "0xF8E637e5c9EC3A8d8fa8843A6dF833348E1F1E66", + "count": 1 + }, + "PoseidonT5": { + "address": "0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274", + "count": 1 + }, + "PoseidonT6": { + "address": "0xD2F6c828606Ad8e985008Cd825012f269B50CD58", + "count": 1 + }, + "PollFactory": { + "address": "0x982530673Ce9e5Efa02438c694d48327Aa4fB592", + "count": 1 + }, + "MessageProcessorFactory": { + "address": "0x50045B05cb1C76410783D8A3e5625a99d5729339", + "count": 1 + }, + "TallyFactory": { + "address": "0xbB28555E989799478442483CD1f2D370a14e2C42", + "count": 1 + }, + "MACI": { + "address": "0xdA10b22B81eb8EA6BC04aa9b86d3f9d969CD49F0", + "count": 1 + }, + "VkRegistry": { + "address": "0x3D4C58074DCD8E6526885F465ab5F311b6B290B5", + "count": 1 + } + } + } +} diff --git a/contracts/deploy-config-example.json b/contracts/deploy-config-example.json index 511a70d72c..edae7d064e 100644 --- a/contracts/deploy-config-example.json +++ b/contracts/deploy-config-example.json @@ -75,6 +75,11 @@ "schema": "0xe2636f31239f7948afdd9a9c477048b7fc2a089c347af60e3aa1251e5bf63e5c", "attester": "0xcbc8a82e3dfc6faa2506f3033271ebc7447f096b" }, + "GitcoinPassportGatekeeper": { + "deploy": false, + "decoderAddress": "0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2", + "passingScore": 5 + }, "ZupassGatekeeper": { "deploy": true, "signer1": "13908133709081944902758389525983124100292637002438232157513257158004852609027", @@ -133,7 +138,7 @@ }, "GitcoinPassportGatekeeper": { "deploy": false, - "decoderAddress": "0xe53C60F8069C2f0c3a84F9B3DB5cf56f3100ba56", + "decoderAddress": "0x5558D441779Eca04A329BcD6b47830D2C6607769", "passingScore": 5 }, "ZupassGatekeeper": { @@ -302,5 +307,67 @@ "coordinatorPubkey": "macipk.9a59264310d95cfd8eb7083aebeba221b5c26e77427f12b7c0f50bc1cc35e621", "useQuadraticVoting": false } + }, + "base_sepolia": { + "ConstantInitialVoiceCreditProxy": { + "deploy": true, + "amount": 99 + }, + "FreeForAllGatekeeper": { + "deploy": true + }, + "EASGatekeeper": { + "deploy": false, + "easAddress": "0x4200000000000000000000000000000000000021", + "schema": "0xe2636f31239f7948afdd9a9c477048b7fc2a089c347af60e3aa1251e5bf63e5c", + "attester": "the-attester-address" + }, + "GitcoinPassportGatekeeper": { + "deploy": false, + "decoderAddress": "0xe53C60F8069C2f0c3a84F9B3DB5cf56f3100ba56", + "passingScore": 5 + }, + "ZupassGatekeeper": { + "deploy": false, + "signer1": "13908133709081944902758389525983124100292637002438232157513257158004852609027", + "signer2": "7654374482676219729919246464135900991450848628968334062174564799457623790084", + "eventId": "69c0caaa-c65d-5345-a20c-867774f18c67", + "zupassVerifier": "0x2272cdb3596617886d0F48524DA486044E0376d6" + }, + "SemaphoreGatekeeper": { + "deploy": false, + "semaphoreContract": "0x0A09FB3f63c13F1C54F2fA41AFB1e7a98cffc774", + "groupId": 0 + }, + "MACI": { + "stateTreeDepth": 10, + "gatekeeper": "FreeForAllGatekeeper" + }, + "VkRegistry": { + "stateTreeDepth": 10, + "intStateTreeDepth": 1, + "messageTreeDepth": 2, + "voteOptionTreeDepth": 2, + "messageBatchDepth": 1, + "zkeys": { + "qv": { + "processMessagesZkey": "../cli/zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test.0.zkey", + "tallyVotesZkey": "../cli/zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test.0.zkey", + "processWasm": "../cli/zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_js/ProcessMessages_10-2-1-2_test.wasm", + "tallyWasm": "../cli/zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_js/TallyVotes_10-1-2_test.wasm" + }, + "nonQv": { + "processMessagesZkey": "../cli/zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test.0.zkey", + "tallyVotesZkey": "../cli/zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test.0.zkey", + "processWasm": "../cli/zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_js/ProcessMessagesNonQv_10-2-1-2_test.wasm", + "tallyWasm": "../cli/zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_js/TallyVotesNonQv_10-1-2_test.wasm" + } + } + }, + "Poll": { + "pollDuration": 3600, + "coordinatorPubkey": "macipk.9a59264310d95cfd8eb7083aebeba221b5c26e77427f12b7c0f50bc1cc35e621", + "useQuadraticVoting": false + } } } diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 6ff7f4f4a4..7ecd7a1d99 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -59,6 +59,8 @@ const config: HardhatUserConfig = { scroll_sepolia: getCommonNetworkConfig(ESupportedChains.ScrollSepolia, EChainId.ScrollSepolia), arbitrum: getCommonNetworkConfig(ESupportedChains.Arbitrum, EChainId.Arbitrum), arbitrum_sepolia: getCommonNetworkConfig(ESupportedChains.ArbitrumSepolia, EChainId.ArbitrumSepolia), + base: getCommonNetworkConfig(ESupportedChains.Base, EChainId.Base), + base_sepolia: getCommonNetworkConfig(ESupportedChains.BaseSepolia, EChainId.BaseSepolia), coverage: getCommonNetworkConfig(ESupportedChains.Coverage, EChainId.Coverage, TEST_MNEMONIC), localhost: { url: "http://localhost:8545", @@ -106,6 +108,8 @@ const config: HardhatUserConfig = { [ESupportedChains.ScrollSepolia]: ETHERSCAN_API_KEYS[ESupportedChains.ScrollSepolia]!, [ESupportedChains.Arbitrum]: ETHERSCAN_API_KEYS[ESupportedChains.Arbitrum]!, [ESupportedChains.ArbitrumSepolia]: ETHERSCAN_API_KEYS[ESupportedChains.ArbitrumSepolia]!, + [ESupportedChains.Base]: ETHERSCAN_API_KEYS[ESupportedChains.Base]!, + [ESupportedChains.BaseSepolia]: ETHERSCAN_API_KEYS[ESupportedChains.BaseSepolia]!, }, customChains: [ { @@ -156,6 +160,22 @@ const config: HardhatUserConfig = { browserURL: "https://sepolia.arbiscan.io/", }, }, + { + network: ESupportedChains.Base, + chainId: EChainId.Base, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + }, + { + network: ESupportedChains.BaseSepolia, + chainId: EChainId.BaseSepolia, + urls: { + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org/", + }, + }, ], }, sourcify: { diff --git a/contracts/package.json b/contracts/package.json index d61795ac0b..a589ec9c01 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -65,6 +65,8 @@ "deploy:scroll-sepolia": "pnpm run deploy --network scroll_sepolia", "deploy:arbitrum": "pnpm run deploy --network arbitrum", "deploy:arbitrum-sepolia": "pnpm run deploy --network arbitrum_sepolia", + "deploy:base": "pnpm run deploy --network base", + "deploy:base-sepolia": "pnpm run deploy --network base_sepolia", "deploy-poll:localhost": "pnpm run deploy-poll", "deploy-poll:sepolia": "pnpm run deploy-poll --network sepolia", "deploy-poll:optimism-sepolia": "pnpm run deploy-poll --network optimism_sepolia", @@ -73,6 +75,8 @@ "deploy-poll:scroll-sepolia": "pnpm run deploy-poll --network scroll_sepolia", "deploy-poll:arbitrum": "pnpm run deploy-poll --network arbitrum", "deploy-poll:arbitrum-sepolia": "pnpm run deploy-poll --network arbitrum_sepolia", + "deploy-poll:base": "pnpm run deploy-poll --network base", + "deploy-poll:base-sepolia": "pnpm run deploy-poll --network base_sepolia", "merge:localhost": "pnpm run merge", "merge:sepolia": "pnpm run merge --network sepolia", "merge:optimism-sepolia": "pnpm run merge --network optimism_sepolia", @@ -81,6 +85,8 @@ "merge:scroll-sepolia": "pnpm run merge --network scroll_sepolia", "merge:arbitrum": "pnpm run merge --network arbitrum", "merge:arbitrum-sepolia": "pnpm run merge --network arbitrum_sepolia", + "merge:base": "pnpm run merge --network base", + "merge:base-sepolia": "pnpm run merge --network base_sepolia", "prove:localhost": "pnpm run prove", "prove:sepolia": "pnpm run prove --network sepolia", "prove:optimism-sepolia": "pnpm run prove --network optimism_sepolia", @@ -89,13 +95,17 @@ "prove:scroll-sepolia": "pnpm run prove --network scroll_sepolia", "prove:arbitrum": "pnpm run prove --network arbitrum", "prove:arbitrum-sepolia": "pnpm run prove --network arbitrum_sepolia", + "prove:base": "pnpm run prove --network base", + "prove:base-sepolia": "pnpm run prove --network base_sepolia", "verify:sepolia": "pnpm run verify --network sepolia", "verify:optimism-sepolia": "pnpm run verify --network optimism_sepolia", "verify:optimism": "pnpm run verify --network optimism", "verify:scroll": "pnpm run verify --network scroll", "verify:scroll-sepolia": "pnpm run verify --network scroll_sepolia", "verify:arbitrum": "pnpm run verify --network arbitrum", - "verify:arbitrum-sepolia": "pnpm run verify --network arbitrum_sepolia" + "verify:arbitrum-sepolia": "pnpm run verify --network arbitrum_sepolia", + "verify:base": "pnpm run verify --network base", + "verify:base-sepolia": "pnpm run verify --network base_sepolia" }, "dependencies": { "@nomicfoundation/hardhat-ethers": "^3.0.6", diff --git a/contracts/tasks/helpers/constants.ts b/contracts/tasks/helpers/constants.ts index d8f1d75977..ed02e3f624 100644 --- a/contracts/tasks/helpers/constants.ts +++ b/contracts/tasks/helpers/constants.ts @@ -9,6 +9,8 @@ export enum ESupportedChains { ScrollSepolia = "scroll_sepolia", Arbitrum = "arbitrum", ArbitrumSepolia = "arbitrum_sepolia", + Base = "base", + BaseSepolia = "base_sepolia", Coverage = "coverage", Hardhat = "hardhat", } @@ -25,6 +27,8 @@ export enum EChainId { ScrollSepolia = 534351, Arbitrum = 42161, ArbitrumSepolia = 421614, + Base = 8453, + BaseSepolia = 84532, Coverage = 1337, } @@ -43,6 +47,8 @@ export const getNetworkRpcUrls = (): Record => { const SCROLL_SEPOLIA_RPC_URL = process.env.SCROLL_SEPOLIA_RPC_URL ?? ""; const ARB_RPC_URL = process.env.ARB_RPC_URL ?? ""; const ARB_SEPOLIA_RPC_URL = process.env.ARB_SEPOLIA_RPC_URL ?? ""; + const BASE_RPC_URL = process.env.BASE_RPC_URL ?? ""; + const BASE_SEPOLIA_RPC_URL = process.env.BASE_SEPOLIA_RPC_URL ?? ""; return { [ESupportedChains.Sepolia]: SEPOLIA_RPC_URL, @@ -52,6 +58,8 @@ export const getNetworkRpcUrls = (): Record => { [ESupportedChains.ScrollSepolia]: SCROLL_SEPOLIA_RPC_URL, [ESupportedChains.Arbitrum]: ARB_RPC_URL, [ESupportedChains.ArbitrumSepolia]: ARB_SEPOLIA_RPC_URL, + [ESupportedChains.Base]: BASE_RPC_URL, + [ESupportedChains.BaseSepolia]: BASE_SEPOLIA_RPC_URL, [ESupportedChains.Coverage]: "http://localhost:8555", [ESupportedChains.Hardhat]: "http://localhost:8545", }; @@ -64,7 +72,9 @@ export const getEtherscanApiKeys = (): Record