From e0fee6cf9cba46d6c8fc234a66b85d659a0d010d Mon Sep 17 00:00:00 2001 From: Jaxcoder Date: Tue, 5 Sep 2023 18:18:01 -0400 Subject: [PATCH 1/4] chore: deploy to mumbai --- .openzeppelin/polygon-mumbai.json | 567 +++++++++++++++++++++++ docs/CHAINS.md | 40 ++ docs/DEPLOY_STEPS.md | 2 - hardhat.config.ts | 55 ++- scripts/config/allo.config.ts | 12 +- scripts/config/payoutStrategy.config.ts | 25 +- scripts/config/program.config.ts | 10 + scripts/config/projectRegistry.config.ts | 24 +- scripts/config/round.config.ts | 12 +- scripts/config/votingStrategy.config.ts | 16 + 10 files changed, 732 insertions(+), 31 deletions(-) create mode 100644 .openzeppelin/polygon-mumbai.json diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json new file mode 100644 index 00000000..195f9e6a --- /dev/null +++ b/.openzeppelin/polygon-mumbai.json @@ -0,0 +1,567 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + "txHash": "0x94a284de33d1e90c4f3c374f8b8183ebcfbd50b6a159e250449d255beba507df" + }, + "proxies": [ + { + "address": "0x545B282A50EaeA01A619914d44105437036CbB36", + "txHash": "0x7bb355422daf36580722870495e81508d53fd1e309bad1e69439fcf9f6761324", + "kind": "transparent" + }, + { + "address": "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + "txHash": "0xea6004d1c7999002c559e53c035163cec97150d09bf30215c70656feb5a777c2", + "kind": "transparent" + }, + { + "address": "0xc1a26b0789C3E93b07713e90596Cad8d0442C826", + "txHash": "0x2c9356efd2a0038ce4583e0261e5ff14f715e7f07de4c92cafb5e37ba44b8d2f", + "kind": "transparent" + }, + { + "address": "0xD9B7Ce1F68A93dF783A8519ed52b74f5DcF5AFE1", + "txHash": "0x9875da3e5221e94db44d60a3bc4a4dae1bb4a68effd5807d512e06bb2216298c", + "kind": "transparent" + }, + { + "address": "0xF2a07728107B04266015E67b1468cA0a536956C8", + "txHash": "0xf1313a38b17d98fe78f516e4180ec81c4bd329115b85aad25b97dd2b1425566c", + "kind": "transparent" + }, + { + "address": "0xE1c5812e9831bc1d5BDcF50AAEc1a47C4508F3fA", + "txHash": "0xffd1648d90566cad87434821d82322c1c6446a6e7f64b944f943070e39c9ddbf", + "kind": "transparent" + } + ], + "impls": { + "094d8f3a0bf92c7d9dd1bcf3e1993ce604a860205623927e1b22ede5fe9c4c4c": { + "address": "0x3D77E65aEA55C0e07Cb018aB4Dc22D38cAD75921", + "txHash": "0x759215ae592bb71046ee530bfbdb4262d7c59a8b612c6cba35e5a844b1ffd354", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "projectsCount", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:43" + }, + { + "label": "projects", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(Project)12111_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:46" + }, + { + "label": "projectsOwners", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_struct(OwnerList)12118_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:49" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(OwnerList)12118_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.OwnerList)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Project)12111_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.Project)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(MetaPtr)14111_storage": { + "label": "struct MetaPtr", + "members": [ + { + "label": "protocol", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "pointer", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(OwnerList)12118_storage": { + "label": "struct ProjectRegistry.OwnerList", + "members": [ + { + "label": "count", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "list", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Project)12111_storage": { + "label": "struct ProjectRegistry.Project", + "members": [ + { + "label": "id", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_struct(MetaPtr)14111_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "85fb214ebcdd584f44a6a82b623ca8dffe10d1c30090a42c2e97c3c604622e01": { + "address": "0x2AFA4bE0f2468347A2F086c2167630fb1E58b725", + "txHash": "0x2710b4208b1d1e222a63b0f1f6f0e8f2c4bede0825f029db674e654f96834617", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "votingContract", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:13" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:15" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "a36cf49fd516c08806a27c0b932fd0ea57d0980e0d2acc596776c2292d83a9cf": { + "address": "0x27efa1C90e097c980c669AB1a6e326AD4164f1Cb", + "txHash": "0x8f7e75028ef6ba375a31e6fdf1bd49993c17aaaf556360ff6cf0f53536c5b925", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "payoutImplementation", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:15" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:17" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "777deeff9d03cd6e376d1feca8a0c01b6bf75339df9cacbb788c98f548a864e6": { + "address": "0xc6B90f42Ea395898B4C1B33e5C8Fa351829BCD90", + "txHash": "0x04d139cf9fc182b54a3606d5a07ca3d355a9de0baafe64bcfc01f668eef53f9d", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "protocolTreasury", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:16" + }, + { + "label": "protocolFeePercentage", + "offset": 20, + "slot": "101", + "type": "t_uint24", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:20" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint24": { + "label": "uint24", + "numberOfBytes": "3" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "96865c174eef7f8315380a3ef530172be2dda3472c66e8976749ea6c77eaa870": { + "address": "0x8eC471f30cA797FD52F9D37A47Be2517a7BD6912", + "txHash": "0xf0d1c635db18334429e4cda474d442f54a6df2fee2a06a27dc934d576413789d", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "roundImplementation", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:30" + }, + { + "label": "alloSettings", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:33" + }, + { + "label": "nonce", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:36" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/docs/CHAINS.md b/docs/CHAINS.md index 45dad668..a832a600 100644 --- a/docs/CHAINS.md +++ b/docs/CHAINS.md @@ -64,6 +64,46 @@ These are contracts that are created/deployed once for goerli | ProjectRegistry | 0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27 | | DummyVotingStrategy | 0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03 | +## Polygon PoS Mainnet + +These are contracts that are created/deployed once for polygon + +| Contract | Address | +|---------------------------------------|--------------------------------------------| +| ProgramFactory | | +| ProgramImplementation | | +| QuadraticFundingVotingStrategyFactory | | +| QFVotingStrategyImplementation | | +| MerklePayoutStrategyFactory | | +| MerklePayouStrategyImplementation | | +| DirectPayoutStrategyFactory | | +| DirectPayoutStrategyImplementation | | +| AlloSettings | | +| RoundFactory | | +| RoundImplementation | | +| ProjectRegistry | | +| DummyVotingStrategy | | + +## Polygon PoS Mumbai + +These are contracts that are created/deployed once for mumbai + +| Contract | Address | +|---------------------------------------|--------------------------------------------| +| ProgramFactory | 0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e | +| ProgramImplementation | 0x424C5C175fbd46CA0b27866044A5B956c6AbEe0D | +| QuadraticFundingVotingStrategyFactory | 0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143 | +| QFVotingStrategyImplementation | 0x04b194b14532070F5cc8D3A760c9a0957D85ad5B | +| MerklePayoutStrategyFactory | 0xc1a26b0789C3E93b07713e90596Cad8d0442C826 | +| MerklePayouStrategyImplementation | 0x74c3665540FC8B92Dd06a7e56a51eCa038C18180 | +| DirectPayoutStrategyFactory | 0xD9B7Ce1F68A93dF783A8519ed52b74f5DcF5AFE1 | +| DirectPayoutStrategyImplementation | 0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c | +| AlloSettings | 0xF2a07728107B04266015E67b1468cA0a536956C8 | +| RoundFactory | 0xE1c5812e9831bc1d5BDcF50AAEc1a47C4508F3fA | +| RoundImplementation | 0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC | +| ProjectRegistry | 0x545B282A50EaeA01A619914d44105437036CbB36 | +| DummyVotingStrategy | 0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918 | + ## Goerli Network These are contracts that are created/deployed once for goerli diff --git a/docs/DEPLOY_STEPS.md b/docs/DEPLOY_STEPS.md index 98331b6a..737205e3 100644 --- a/docs/DEPLOY_STEPS.md +++ b/docs/DEPLOY_STEPS.md @@ -255,13 +255,11 @@ pnpm run deploy-merkle-factory goerli pnpm run deploy-merkle-implementation goerli pnpm run link-merkle-implementation goerli - # direct grants pnpm run deploy-direct-factory goerli pnpm run deploy-direct-implementation goerli pnpm run link-direct-implementation goerli - # AlloSettings pnpm run deploy-allo-settings goerli pnpm run set-protocol-fee goerli diff --git a/hardhat.config.ts b/hardhat.config.ts index c117bb42..52771ecc 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -22,10 +22,10 @@ const chainIds = { goerli: 5, "optimism-goerli": 420, "fantom-testnet": 4002, - sepolia: 11155111, "pgn-sepolia": 58008, "arbitrum-goerli": 421613, "fuji-testnet": 43113, + polygon: 137, // mainnet mainnet: 1, @@ -34,6 +34,7 @@ const chainIds = { "fantom-mainnet": 250, "arbitrumOne-mainnet": 42161, "avalanche-mainnet": 43114, + mumbai: 80001, }; // This is a sample Hardhat task. To learn how to create your own go to @@ -54,6 +55,7 @@ if (!deployPrivateKey) { } const infuraIdKey = process.env.INFURA_ID as string; +const alchemyKey = process.env.ALCHEMY_API_KEY as string; /** * Generates hardhat network configuration the test networks. @@ -140,21 +142,25 @@ const config: HardhatUserConfig = { "fantom-mainnet", "https://rpc.ftm.tools" ), - "arbitrumOne": { + arbitrumOne: { accounts: [deployPrivateKey], - url: 'https://arb1.arbitrum.io/rpc', + url: "https://arb1.arbitrum.io/rpc", chainId: chainIds["arbitrumOne-mainnet"], }, "avalanche-mainnet": { accounts: [deployPrivateKey], - url: 'https://api.avax.network/ext/bc/C/rpc', + url: "https://api.avax.network/ext/bc/C/rpc", chainId: chainIds["avalanche-mainnet"], gasPrice: 25000000000, }, + polygon: { + accounts: [deployPrivateKey], + url: "https://rpc.maticvigil.com", + chainId: chainIds["polygon"], + }, // Test Networks goerli: createTestnetConfig("goerli"), - sepolia: createTestnetConfig("sepolia"), "optimism-goerli": { accounts: [deployPrivateKey], chainId: chainIds["optimism-goerli"], @@ -173,23 +179,28 @@ const config: HardhatUserConfig = { }, arbitrumGoerli: { accounts: [deployPrivateKey], - url: 'https://goerli-rollup.arbitrum.io/rpc', + url: "https://goerli-rollup.arbitrum.io/rpc", chainId: chainIds["arbitrum-goerli"], }, "fuji-testnet": { accounts: [deployPrivateKey], - url: 'https://avalanche-fuji-c-chain.publicnode.com', + url: "https://avalanche-fuji-c-chain.publicnode.com", chainId: chainIds["fuji-testnet"], gasPrice: 25000000000, }, + mumbai: { + accounts: [deployPrivateKey], + url: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, + chainId: chainIds["mumbai"], + }, localhost: createTestnetConfig("localhost", "http://localhost:8545"), hardhat: { forking: { url: `https://goerli.infura.io/v3/${infuraIdKey}`, - blockNumber: 9188740 // A recent block where both AllowanceModule an Safe factory exist - } - } + blockNumber: 9188740, // A recent block where both AllowanceModule an Safe factory exist + }, + }, }, gasReporter: { coinmarketcap: process.env.COINMARKETCAP_API_KEY, @@ -202,8 +213,6 @@ const config: HardhatUserConfig = { // @ts-ignore mainnet: process.env.ETHERSCAN_API_KEY, // @ts-ignore - sepolia: process.env.ETHERSCAN_API_KEY, - // @ts-ignore goerli: process.env.ETHERSCAN_API_KEY, // @ts-ignore optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_API_KEY, @@ -225,6 +234,10 @@ const config: HardhatUserConfig = { "avalanche-mainnet": process.env.AVALANCHE_API_KEY, // @ts-ignore "fuji-testnet": process.env.AVALANCHE_API_KEY, + // @ts-ignore + polygon: process.env.POLYGONSCAN_API_KEY, + // @ts-ignore + mumbai: process.env.POLYGONSCAN_API_KEY, }, customChains: [ { @@ -248,7 +261,7 @@ const config: HardhatUserConfig = { chainId: chainIds["fuji-testnet"], urls: { apiURL: "https://api-testnet.snowtrace.io/api", - browserURL: "https://testnet.snowtrace.io/" + browserURL: "https://testnet.snowtrace.io/", }, }, { @@ -259,6 +272,22 @@ const config: HardhatUserConfig = { browserURL: "https://snowtrace.io/", }, }, + { + network: "mumbai", + chainId: chainIds["mumbai"], + urls: { + apiURL: "https://api-testnet.polygonscan.com/api", + browserURL: "https://mumbai.polygonscan.com/", + }, + }, + { + network: "polygon", + chainId: chainIds["polygon"], + urls: { + apiURL: "https://api.polygonscan.com/api", + browserURL: "https://polygonscan.com/", + }, + }, ], }, abiExporter: abiExporter, diff --git a/scripts/config/allo.config.ts b/scripts/config/allo.config.ts index 5b40039d..f950f24a 100644 --- a/scripts/config/allo.config.ts +++ b/scripts/config/allo.config.ts @@ -57,5 +57,15 @@ export const AlloSettingsParams: DeployParams = { alloSettingsContract: "0xdf25423c9ec15347197Aa5D3a41c2ebE27587D59", newProtocolFeePercentage: 0, newProtocolTreasury: "0xB8cEF765721A6da910f14Be93e7684e9a3714123" - } + }, + "mumbai": { + alloSettingsContract: "0xF2a07728107B04266015E67b1468cA0a536956C8", + newProtocolFeePercentage: 0, + newProtocolTreasury: "0x1fd06f088c720ba3b7a3634a8f021fdd485dca42", + }, + "polygon": { + alloSettingsContract: "", + newProtocolFeePercentage: 0, + newProtocolTreasury: "0xbF91bfa8c0Bcd130cDf0a7d9C01A4Db4842B1532", + }, }; diff --git a/scripts/config/payoutStrategy.config.ts b/scripts/config/payoutStrategy.config.ts index 7a5a67d4..7bb9fc59 100644 --- a/scripts/config/payoutStrategy.config.ts +++ b/scripts/config/payoutStrategy.config.ts @@ -58,6 +58,16 @@ export const MerklePayoutParams: DeployParams = { implementation: "0xCF50D794c639D57bA8D6BB8FaE34fBd1B89D7112", contract: "", }, + "mumbai": { + factory: "0xc1a26b0789C3E93b07713e90596Cad8d0442C826", + implementation: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + contract: "", + }, + polygon: { + factory: "", + implementation: "", + contract: "", + }, }; // TODO: Update this file any time a new dummy voting contract has been deployed @@ -82,11 +92,6 @@ export const DirectPayoutParams: DeployParams = { implementation: "0xC3A195EEa198e74D67671732E1B8F8A23781D735", contract: "", }, - sepolia: { - factory: "", - implementation: "", - contract: "", - }, "optimism-mainnet": { factory: "0x2Bb670C3ffC763b691062d671b386E51Cf1840f0", implementation: "0x534d2AAc03dCd0Cb3905B591BAf04C14A95426AB", @@ -122,4 +127,14 @@ export const DirectPayoutParams: DeployParams = { implementation: "0x64ab6F2E11dF8B3Be5c8838eDe3951AC928daE9C", contract: "", }, + "mumbai": { + factory: "0xD9B7Ce1F68A93dF783A8519ed52b74f5DcF5AFE1", + implementation: "0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c", + contract: "", + }, + polygon: { + factory: "", + implementation: "", + contract: "", + }, }; diff --git a/scripts/config/program.config.ts b/scripts/config/program.config.ts index 79e72dde..69db3f83 100644 --- a/scripts/config/program.config.ts +++ b/scripts/config/program.config.ts @@ -57,5 +57,15 @@ export const programParams: DeployParams = { programFactoryContract: "0x862D7F621409cF572f179367DdF1B7144AcE1c76", programImplementationContract: "0x56296242CA408bA36393f3981879fF9692F193cC", programContract: "" + }, + "mumbai": { + programFactoryContract: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + programImplementationContract: "0x424C5C175fbd46CA0b27866044A5B956c6AbEe0D", + programContract: "" + }, + polygon: { + programFactoryContract: "", + programImplementationContract: "", + programContract: "" } }; diff --git a/scripts/config/projectRegistry.config.ts b/scripts/config/projectRegistry.config.ts index 48cea223..fe8980b2 100644 --- a/scripts/config/projectRegistry.config.ts +++ b/scripts/config/projectRegistry.config.ts @@ -7,33 +7,39 @@ type DeployParams = Record; export const projectRegistryParams: DeployParams = { mainnet: { - proxyContractAddress: "", + proxyContractAddress: "" }, goerli: { - proxyContractAddress: "0x9C789Ad2457A605a0ea1aaBEEf16585633530069", + proxyContractAddress: "0x9C789Ad2457A605a0ea1aaBEEf16585633530069" }, "optimism-mainnet": { proxyContractAddress: "", }, "fantom-mainnet": { - proxyContractAddress: "0xAdcB64860902A29c3e408586C782A2221d595B55", + proxyContractAddress: "0xAdcB64860902A29c3e408586C782A2221d595B55" }, "fantom-testnet": { - proxyContractAddress: "0x5e5b7D871efDE8224390a334045e1dcb7daAf4E2", + proxyContractAddress: "0x5e5b7D871efDE8224390a334045e1dcb7daAf4E2" }, "pgn-mainnet": { - proxyContractAddress: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + proxyContractAddress: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e" }, arbitrumGoerli: { - proxyContractAddress: "0x0CD135777dEaB6D0Bb150bDB0592aC9Baa4d0871", + proxyContractAddress: "0x0CD135777dEaB6D0Bb150bDB0592aC9Baa4d0871" }, arbitrumOne: { - proxyContractAddress: "0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27", + proxyContractAddress: "0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27" }, "fuji-testnet": { - proxyContractAddress: "0x8918401DD47f1645fF1111D8E513c0404b84d5bB", + proxyContractAddress: "0x8918401DD47f1645fF1111D8E513c0404b84d5bB" }, "avalanche-mainnet": { - proxyContractAddress: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + proxyContractAddress: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e" + }, + mumbai: { + proxyContractAddress: "0x545B282A50EaeA01A619914d44105437036CbB36", + }, + polygon: { + proxyContractAddress: "", }, }; diff --git a/scripts/config/round.config.ts b/scripts/config/round.config.ts index 940063ab..124d850e 100644 --- a/scripts/config/round.config.ts +++ b/scripts/config/round.config.ts @@ -59,5 +59,15 @@ export const roundParams: DeployParams = { roundFactoryContract: "0x3615d870d5B760cea43693ABED70Cd8A9b59b3d8", roundImplementationContract: "0x292285C40E966520D5Fd8e4Ab91583C70bBa3dc0", roundContract: "", - } + }, + "mumbai": { + roundFactoryContract: "0xE1c5812e9831bc1d5BDcF50AAEc1a47C4508F3fA", + roundImplementationContract: "0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC", + roundContract: "", + }, + polygon: { + roundFactoryContract: "", + roundImplementationContract: "", + roundContract: "", + }, }; diff --git a/scripts/config/votingStrategy.config.ts b/scripts/config/votingStrategy.config.ts index fbe7cb1f..9c24f68d 100644 --- a/scripts/config/votingStrategy.config.ts +++ b/scripts/config/votingStrategy.config.ts @@ -58,6 +58,16 @@ export const QFVotingParams: DeployParams = { implementation: "0x0BFA0AAF5f2D81f859e85C8E82A3fc5b624fc6E8", contract: "", }, + mumbai: { + factory: "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + implementation: "0x04b194b14532070F5cc8D3A760c9a0957D85ad5B", + contract: "", + }, + polygon: { + factory: "", + implementation: "", + contract: "", + }, }; // TODO: Update this file any time a new dummy voting contract has been deployed @@ -101,4 +111,10 @@ export const DummyVotingParams: Record = { "fuji-testnet": { contract: "0xCd3618509983FE4990D7770CF6f02c7145dC365F", }, + mumbai: { + contract: "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918", + }, + polygon: { + contract: "", + }, }; From 8a09583331164218f0d2123265b2823a6bfe6909 Mon Sep 17 00:00:00 2001 From: Jaxcoder Date: Tue, 5 Sep 2023 21:36:20 -0400 Subject: [PATCH 2/4] chore: polygon deploy/I got tx stuck with low gas --- docs/CHAINS.md | 2 +- docs/DEPLOY_STEPS.md | 2 ++ hardhat.config.ts | 3 ++- scripts/config/projectRegistry.config.ts | 2 +- scripts/program/deployProgramFactory.ts | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/CHAINS.md b/docs/CHAINS.md index a832a600..da217bd2 100644 --- a/docs/CHAINS.md +++ b/docs/CHAINS.md @@ -81,7 +81,7 @@ These are contracts that are created/deployed once for polygon | AlloSettings | | | RoundFactory | | | RoundImplementation | | -| ProjectRegistry | | +| ProjectRegistry | 0x5C5E2D94b107C7691B08E43169fDe76EAAB6D48b | | DummyVotingStrategy | | ## Polygon PoS Mumbai diff --git a/docs/DEPLOY_STEPS.md b/docs/DEPLOY_STEPS.md index 737205e3..b68de086 100644 --- a/docs/DEPLOY_STEPS.md +++ b/docs/DEPLOY_STEPS.md @@ -12,6 +12,8 @@ All the deploy scripts will expect network param to know which network the contr | `mainnet` | | `fuji-testnet` | | `avalanche-mainnet`| +| `mumbai` | +| `polygon` | ### Project Registry diff --git a/hardhat.config.ts b/hardhat.config.ts index 52771ecc..0eb16953 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -155,8 +155,9 @@ const config: HardhatUserConfig = { }, polygon: { accounts: [deployPrivateKey], - url: "https://rpc.maticvigil.com", + url: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, chainId: chainIds["polygon"], + gas: "auto", }, // Test Networks diff --git a/scripts/config/projectRegistry.config.ts b/scripts/config/projectRegistry.config.ts index fe8980b2..13c9dbe8 100644 --- a/scripts/config/projectRegistry.config.ts +++ b/scripts/config/projectRegistry.config.ts @@ -40,6 +40,6 @@ export const projectRegistryParams: DeployParams = { proxyContractAddress: "0x545B282A50EaeA01A619914d44105437036CbB36", }, polygon: { - proxyContractAddress: "", + proxyContractAddress: "0x5C5E2D94b107C7691B08E43169fDe76EAAB6D48b", }, }; diff --git a/scripts/program/deployProgramFactory.ts b/scripts/program/deployProgramFactory.ts index 3a5c26de..4e45032b 100644 --- a/scripts/program/deployProgramFactory.ts +++ b/scripts/program/deployProgramFactory.ts @@ -17,7 +17,7 @@ export async function main() { // Deploy ProgramFactory const contractFactory = await ethers.getContractFactory("ProgramFactory"); - const contract = await upgrades.deployProxy(contractFactory); + const contract = await upgrades.deployProxy(contractFactory, []); console.log(`Deploying Upgradable ProgramFactory to ${contract.address}`); From f3d89b621a7ca00c7e281cb294c52c1eea2ffe8a Mon Sep 17 00:00:00 2001 From: Jaxcoder Date: Wed, 6 Sep 2023 10:35:59 -0400 Subject: [PATCH 3/4] chore: deploy polygon mainnet --- .openzeppelin/polygon.json | 656 ++++++++++++++++++++++++ docs/CHAINS.md | 24 +- scripts/config/allo.config.ts | 2 +- scripts/config/payoutStrategy.config.ts | 8 +- scripts/config/program.config.ts | 4 +- scripts/config/round.config.ts | 4 +- scripts/config/votingStrategy.config.ts | 6 +- 7 files changed, 680 insertions(+), 24 deletions(-) create mode 100644 .openzeppelin/polygon.json diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json new file mode 100644 index 00000000..02a701a1 --- /dev/null +++ b/.openzeppelin/polygon.json @@ -0,0 +1,656 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x545B282A50EaeA01A619914d44105437036CbB36", + "txHash": "0x2a2ec6ec6b21695b89332ee01b939445400b1281582f8430a11be60c8b856458" + }, + "proxies": [ + { + "address": "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + "txHash": "0x53293646fb7c47d12ca3d7c04eecda1de203a6d3bc5c4caefcf5e7d026c8c661", + "kind": "transparent" + }, + { + "address": "0xc1a26b0789C3E93b07713e90596Cad8d0442C826", + "txHash": "0x8dcda883c6f94ccb76f7ea1732638a5503dee435dd155e2e0b44fb869c922968", + "kind": "transparent" + }, + { + "address": "0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c", + "txHash": "0xd50906f2f02dcf0e9bd526344e73fd7312ef3519df8a7a597490642c3d50a781", + "kind": "transparent" + }, + { + "address": "0xF2a07728107B04266015E67b1468cA0a536956C8", + "txHash": "0x299b8ad5b41f4d691b285db0903e983906c2302973456a69913e76ed220d6c61", + "kind": "transparent" + }, + { + "address": "0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC", + "txHash": "0xff4df9bb7d915d6fc26384791bafb8d1489e0d153120d7a6bdac914c2e70796d", + "kind": "transparent" + }, + { + "address": "0xeAe0848c2A2395569cAaf3598cfc06B81b9b92D7", + "txHash": "0xb6fa3df8b9f42531111d981175c97553eeb57371befe6485399dd35a97c5e7bf", + "kind": "transparent" + }, + { + "address": "0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03", + "txHash": "0xcd81dd12b08cf5ee48beaaf264cefc25a70816b0054fef4ec6d0f36225bf42df", + "kind": "transparent" + } + ], + "impls": { + "094d8f3a0bf92c7d9dd1bcf3e1993ce604a860205623927e1b22ede5fe9c4c4c": { + "address": "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + "txHash": "0x5929faf4f4d5fe1637019c2b3889094cba6b9585e0cf2251f9e5d7c056003111", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "projectsCount", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:43" + }, + { + "label": "projects", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(Project)465_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:46" + }, + { + "label": "projectsOwners", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_struct(OwnerList)472_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:49" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(OwnerList)472_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.OwnerList)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Project)465_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.Project)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(MetaPtr)914_storage": { + "label": "struct MetaPtr", + "members": [ + { + "label": "protocol", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "pointer", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(OwnerList)472_storage": { + "label": "struct ProjectRegistry.OwnerList", + "members": [ + { + "label": "count", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "list", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Project)465_storage": { + "label": "struct ProjectRegistry.Project", + "members": [ + { + "label": "id", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_struct(MetaPtr)914_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "d6cad864bee7d4183f11eb60bc8562f63cd064dd64ceb0cd5eb28937afefa981": { + "address": "0x2AFA4bE0f2468347A2F086c2167630fb1E58b725", + "txHash": "0x9af123fe3c207a0c90fcbf61bdc71afeb9cb7d98e6b3f445251049ed9cbb4125", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "programContract", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "ProgramFactory", + "src": "contracts/program/ProgramFactory.sol:12" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "85fb214ebcdd584f44a6a82b623ca8dffe10d1c30090a42c2e97c3c604622e01": { + "address": "0x27efa1C90e097c980c669AB1a6e326AD4164f1Cb", + "txHash": "0x668dd138a54f4f4caf495b3c81ab5d6652460fcc31874c42844c7a0e35c9dabe", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "votingContract", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:13" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:15" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "a36cf49fd516c08806a27c0b932fd0ea57d0980e0d2acc596776c2292d83a9cf": { + "address": "0xD9B7Ce1F68A93dF783A8519ed52b74f5DcF5AFE1", + "txHash": "0x1454e308655ab8b8445836bec566f4a8755db031a134c22bc48e86624599b57b", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "payoutImplementation", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:15" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:17" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "777deeff9d03cd6e376d1feca8a0c01b6bf75339df9cacbb788c98f548a864e6": { + "address": "0xE1c5812e9831bc1d5BDcF50AAEc1a47C4508F3fA", + "txHash": "0x76862d2160c928a718e14aa0353e78c168b57dc1907b5c3f39f2d5794646611b", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "protocolTreasury", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:16" + }, + { + "label": "protocolFeePercentage", + "offset": 20, + "slot": "101", + "type": "t_uint24", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:20" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint24": { + "label": "uint24", + "numberOfBytes": "3" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "96865c174eef7f8315380a3ef530172be2dda3472c66e8976749ea6c77eaa870": { + "address": "0x29aAF7D4E83A778DAee08Fe04B0712c4C2989AD1", + "txHash": "0xef58c6804e88d58fa272856af498d49636258e5c573d88c61a8dff044c4389fb", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "roundImplementation", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:30" + }, + { + "label": "alloSettings", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:33" + }, + { + "label": "nonce", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:36" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/docs/CHAINS.md b/docs/CHAINS.md index da217bd2..f373f29f 100644 --- a/docs/CHAINS.md +++ b/docs/CHAINS.md @@ -70,19 +70,19 @@ These are contracts that are created/deployed once for polygon | Contract | Address | |---------------------------------------|--------------------------------------------| -| ProgramFactory | | -| ProgramImplementation | | -| QuadraticFundingVotingStrategyFactory | | -| QFVotingStrategyImplementation | | -| MerklePayoutStrategyFactory | | -| MerklePayouStrategyImplementation | | -| DirectPayoutStrategyFactory | | -| DirectPayoutStrategyImplementation | | -| AlloSettings | | -| RoundFactory | | -| RoundImplementation | | +| ProgramFactory | 0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143 | +| ProgramImplementation | 0x04b194b14532070F5cc8D3A760c9a0957D85ad5B | +| QuadraticFundingVotingStrategyFactory | 0xc1a26b0789C3E93b07713e90596Cad8d0442C826 | +| QFVotingStrategyImplementation | 0x74c3665540FC8B92Dd06a7e56a51eCa038C18180 | +| MerklePayoutStrategyFactory | 0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c | +| MerklePayouStrategyImplementation | 0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4 | +| DirectPayoutStrategyFactory | 0xF2a07728107B04266015E67b1468cA0a536956C8 | +| DirectPayoutStrategyImplementation | 0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab | +| AlloSettings | 0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC | +| RoundFactory | 0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03 | +| RoundImplementation | 0xcE7c30DbcEC2a98B516E4C64fA4E3256AB813b10 | | ProjectRegistry | 0x5C5E2D94b107C7691B08E43169fDe76EAAB6D48b | -| DummyVotingStrategy | | +| DummyVotingStrategy | 0x8142cAa6dED9F63434B1ED862d53E06332874570 | ## Polygon PoS Mumbai diff --git a/scripts/config/allo.config.ts b/scripts/config/allo.config.ts index f950f24a..da86cbee 100644 --- a/scripts/config/allo.config.ts +++ b/scripts/config/allo.config.ts @@ -64,7 +64,7 @@ export const AlloSettingsParams: DeployParams = { newProtocolTreasury: "0x1fd06f088c720ba3b7a3634a8f021fdd485dca42", }, "polygon": { - alloSettingsContract: "", + alloSettingsContract: "0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC", newProtocolFeePercentage: 0, newProtocolTreasury: "0xbF91bfa8c0Bcd130cDf0a7d9C01A4Db4842B1532", }, diff --git a/scripts/config/payoutStrategy.config.ts b/scripts/config/payoutStrategy.config.ts index 7bb9fc59..51dde635 100644 --- a/scripts/config/payoutStrategy.config.ts +++ b/scripts/config/payoutStrategy.config.ts @@ -64,8 +64,8 @@ export const MerklePayoutParams: DeployParams = { contract: "", }, polygon: { - factory: "", - implementation: "", + factory: "0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c", + implementation: "0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4", contract: "", }, }; @@ -133,8 +133,8 @@ export const DirectPayoutParams: DeployParams = { contract: "", }, polygon: { - factory: "", - implementation: "", + factory: "0xF2a07728107B04266015E67b1468cA0a536956C8", + implementation: "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", contract: "", }, }; diff --git a/scripts/config/program.config.ts b/scripts/config/program.config.ts index 69db3f83..b7fc78a7 100644 --- a/scripts/config/program.config.ts +++ b/scripts/config/program.config.ts @@ -64,8 +64,8 @@ export const programParams: DeployParams = { programContract: "" }, polygon: { - programFactoryContract: "", - programImplementationContract: "", + programFactoryContract: "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + programImplementationContract: "0x04b194b14532070F5cc8D3A760c9a0957D85ad5B", programContract: "" } }; diff --git a/scripts/config/round.config.ts b/scripts/config/round.config.ts index 124d850e..a1337bc1 100644 --- a/scripts/config/round.config.ts +++ b/scripts/config/round.config.ts @@ -66,8 +66,8 @@ export const roundParams: DeployParams = { roundContract: "", }, polygon: { - roundFactoryContract: "", - roundImplementationContract: "", + roundFactoryContract: "0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03", + roundImplementationContract: "0xcE7c30DbcEC2a98B516E4C64fA4E3256AB813b10", roundContract: "", }, }; diff --git a/scripts/config/votingStrategy.config.ts b/scripts/config/votingStrategy.config.ts index 9c24f68d..eeb2130a 100644 --- a/scripts/config/votingStrategy.config.ts +++ b/scripts/config/votingStrategy.config.ts @@ -64,8 +64,8 @@ export const QFVotingParams: DeployParams = { contract: "", }, polygon: { - factory: "", - implementation: "", + factory: "0xc1a26b0789C3E93b07713e90596Cad8d0442C826", + implementation: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", contract: "", }, }; @@ -115,6 +115,6 @@ export const DummyVotingParams: Record = { contract: "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918", }, polygon: { - contract: "", + contract: "0x8142cAa6dED9F63434B1ED862d53E06332874570", }, }; From f2dc2341fa3e34d2e2d5009431062557622374c0 Mon Sep 17 00:00:00 2001 From: Jaxcoder Date: Mon, 16 Oct 2023 12:15:33 -0400 Subject: [PATCH 4/4] chore: redeploy and verify 3 contracts --- .openzeppelin/polygon.json | 15 +++++++++++++++ docs/CHAINS.md | 12 ++++++------ scripts/config/payoutStrategy.config.ts | 8 ++++---- scripts/config/votingStrategy.config.ts | 4 ++-- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index 02a701a1..028cd384 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -39,6 +39,21 @@ "address": "0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03", "txHash": "0xcd81dd12b08cf5ee48beaaf264cefc25a70816b0054fef4ec6d0f36225bf42df", "kind": "transparent" + }, + { + "address": "0xAdcB64860902A29c3e408586C782A2221d595B55", + "txHash": "0x6684a72f8deef8ea7d992443623bcb35dcf5e821f7cd1b8fa6464e434cb5683b", + "kind": "transparent" + }, + { + "address": "0x5c1EDa32B5d2F8048a709f8b18B02AbEC68601D8", + "txHash": "0x3dc8ebf3908b25252a656a0989cd9f4f37c8270e060a1dafe4a409b11e88c5d7", + "kind": "transparent" + }, + { + "address": "0x534d2AAc03dCd0Cb3905B591BAf04C14A95426AB", + "txHash": "0xeaab9c1a69435401204025c96833025fdf62af3ca1fa39e51ebe87ef7e57cccd", + "kind": "transparent" } ], "impls": { diff --git a/docs/CHAINS.md b/docs/CHAINS.md index e4c9313e..ea3aaddf 100644 --- a/docs/CHAINS.md +++ b/docs/CHAINS.md @@ -72,12 +72,12 @@ These are contracts that are created/deployed once for polygon |---------------------------------------|--------------------------------------------| | ProgramFactory | 0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143 | | ProgramImplementation | 0x04b194b14532070F5cc8D3A760c9a0957D85ad5B | -| QuadraticFundingVotingStrategyFactory | 0xc1a26b0789C3E93b07713e90596Cad8d0442C826 | -| QFVotingStrategyImplementation | 0x74c3665540FC8B92Dd06a7e56a51eCa038C18180 | -| MerklePayoutStrategyFactory | 0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c | -| MerklePayouStrategyImplementation | 0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4 | -| DirectPayoutStrategyFactory | 0xF2a07728107B04266015E67b1468cA0a536956C8 | -| DirectPayoutStrategyImplementation | 0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab | +| QuadraticFundingVotingStrategyFactory | 0xAdcB64860902A29c3e408586C782A2221d595B55 | +| QFVotingStrategyImplementation | 0x86c23265cC76B5C2790Bb86fc7375DDE220e777e | +| MerklePayoutStrategyFactory | 0x5c1EDa32B5d2F8048a709f8b18B02AbEC68601D8 | +| MerklePayouStrategyImplementation | 0xB9fd0d433d2ca03D26A182Dc709bA1EccA3B00cC | +| DirectPayoutStrategyFactory | 0x534d2AAc03dCd0Cb3905B591BAf04C14A95426AB | +| DirectPayoutStrategyImplementation | 0x87DeA2C57ac3Ab1df18D9aa327c3eE229147059f | | AlloSettings | 0x359c9fD5ef57D4eDD6C8b42a351e12352DB0DaBC | | RoundFactory | 0x5ab68dCdcA37A1C2b09c5218e28eB0d9cc3FEb03 | | RoundImplementation | 0xcE7c30DbcEC2a98B516E4C64fA4E3256AB813b10 | diff --git a/scripts/config/payoutStrategy.config.ts b/scripts/config/payoutStrategy.config.ts index 0dfaa359..82faea11 100644 --- a/scripts/config/payoutStrategy.config.ts +++ b/scripts/config/payoutStrategy.config.ts @@ -64,8 +64,8 @@ export const MerklePayoutParams: DeployParams = { contract: "", }, polygon: { - factory: "0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c", - implementation: "0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4", + factory: "0x5c1EDa32B5d2F8048a709f8b18B02AbEC68601D8", + implementation: "0xB9fd0d433d2ca03D26A182Dc709bA1EccA3B00cC", contract: "", }, "zksync-testnet": { @@ -143,8 +143,8 @@ export const DirectPayoutParams: DeployParams = { contract: "", }, polygon: { - factory: "0xF2a07728107B04266015E67b1468cA0a536956C8", - implementation: "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", + factory: "0x534d2AAc03dCd0Cb3905B591BAf04C14A95426AB", + implementation: "0x87DeA2C57ac3Ab1df18D9aa327c3eE229147059f", contract: "", }, "zksync-testnet": { diff --git a/scripts/config/votingStrategy.config.ts b/scripts/config/votingStrategy.config.ts index e8b65571..109ad299 100644 --- a/scripts/config/votingStrategy.config.ts +++ b/scripts/config/votingStrategy.config.ts @@ -64,8 +64,8 @@ export const QFVotingParams: DeployParams = { contract: "", }, polygon: { - factory: "0xc1a26b0789C3E93b07713e90596Cad8d0442C826", - implementation: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + factory: "0xAdcB64860902A29c3e408586C782A2221d595B55", + implementation: "0x86c23265cC76B5C2790Bb86fc7375DDE220e777e", contract: "", }, "zksync-testnet": {