diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 4882dcf..767bffc 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -4,16 +4,20 @@ Community directory curator contracts # Deployments -| **Contract** | **Address** | **Snapshot** | -| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| **Optimism Goerli** | | | -| Directory | [`0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5`](https://goerli-optimism.etherscan.io/address/0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | -| VotingContract | [`0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b`](https://goerli-optimism.etherscan.io/address/0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | -| FeaturedVotingContract | [`0x898331B756EE1f29302DeF227a4471e960c50612`](https://goerli-optimism.etherscan.io/address/0x898331B756EE1f29302DeF227a4471e960c50612) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | -| **Optimism Mainnet** | | | -| Directory | [`0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A`](https://optimistic.etherscan.io/address/0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | -| VotingContract | [`0x321Ba646d994200257Ce4bfe18F66C9283ad1407`](https://optimistic.etherscan.io/address/0x321Ba646d994200257Ce4bfe18F66C9283ad1407) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | -| FeaturedVotingContract | [`0x2EA9700E7F27E09F254f2DaEc5E05015b2b961d0`](https://optimistic.etherscan.io/address/0x2EA9700E7F27E09F254f2DaEc5E05015b2b961d0) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | +| **Contract** | **Address** | **Snapshot** | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | +| **Optimism Goerli** | | | +| Directory | [`0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5`](https://goerli-optimism.etherscan.io/address/0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | +| VotingContract | [`0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b`](https://goerli-optimism.etherscan.io/address/0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | +| FeaturedVotingContract | [`0x898331B756EE1f29302DeF227a4471e960c50612`](https://goerli-optimism.etherscan.io/address/0x898331B756EE1f29302DeF227a4471e960c50612) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | +| **Optimism Sepolia** | | | +| Directory | [`0x6B94e21FAB8Af38E8d89dd4A0480C04e9a5c53Ab`](https://optimism-sepolia.blockscout.com/address/0x6B94e21FAB8Af38E8d89dd4A0480C04e9a5c53Ab) | [`baaa3d0`](https://github.com/status-im/community-dapp/commit/baaa3d0e12308a1f65e365237ad6eb0426e105a6) | +| VotingContract | [`0x7Ff554af5b6624db2135E4364F416d1D397f43e6`](https://optimism-sepolia.blockscout.com/address/0x7Ff554af5b6624db2135E4364F416d1D397f43e6) | [`baaa3d0`](https://github.com/status-im/community-dapp/commit/baaa3d0e12308a1f65e365237ad6eb0426e105a6) | +| FeaturedVotingContract | [`0x336DFD512164Fe8CFA809BdE94B13E76e42edD6B`](https://optimism-sepolia.blockscout.com/address/0x336DFD512164Fe8CFA809BdE94B13E76e42edD6B) | [`baaa3d0`](https://github.com/status-im/community-dapp/commit/baaa3d0e12308a1f65e365237ad6eb0426e105a6) | +| **Optimism Mainnet** | | | +| Directory | [`0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A`](https://optimistic.etherscan.io/address/0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | +| VotingContract | [`0x321Ba646d994200257Ce4bfe18F66C9283ad1407`](https://optimistic.etherscan.io/address/0x321Ba646d994200257Ce4bfe18F66C9283ad1407) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | +| FeaturedVotingContract | [`0x2EA9700E7F27E09F254f2DaEc5E05015b2b961d0`](https://optimistic.etherscan.io/address/0x2EA9700E7F27E09F254f2DaEc5E05015b2b961d0) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | ## Mock Contract diff --git a/packages/contracts/script/DeploymentConfig.s.sol b/packages/contracts/script/DeploymentConfig.s.sol index a48a1b0..e5b078a 100644 --- a/packages/contracts/script/DeploymentConfig.s.sol +++ b/packages/contracts/script/DeploymentConfig.s.sol @@ -40,11 +40,15 @@ contract DeploymentConfig is Script { address internal SNT_ADDRESS_OPTIMISM_MAINNET = 0x650AF3C15AF43dcB218406d30784416D64Cfb6B2; // solhint-disable-next-line var-name-mixedcase address internal SNT_ADDRESS_OPTIMISM_GOERLI = 0xcAD273fA2bb77875333439FDf4417D995159c3E1; + // solhint-disable-next-line var-name-mixedcase + address internal SNT_ADDRESS_OPTIMISM_SEPOLIA = 0x0B5DAd18B8791ddb24252B433ec4f21f9e6e5Ed0; // solhint-disable-next-line var-name-mixedcase address internal MULTICALL_ADDRESS_OPTIMISM = 0xeAa6877139d436Dc6d1f75F3aF15B74662617B2C; // solhint-disable-next-line var-name-mixedcase address internal MULTICALL_ADDRESS_OPTIMISM_GOERLI = 0xcA11bde05977b3631167028862bE2a173976CA11; + // solhint-disable-next-line var-name-mixedcase + address internal MULTICALL_ADDRESS_OPTIMISM_SEPOLIA = 0xcA11bde05977b3631167028862bE2a173976CA11; constructor(address _broadcaster) { deployer = _broadcaster; @@ -54,6 +58,8 @@ contract DeploymentConfig is Script { activeNetworkConfig = getOptimismMainnetConfig(); } else if (block.chainid == 420) { activeNetworkConfig = getOptimismGoerliConfig(); + } else if (block.chainid == 11_155_420) { + activeNetworkConfig = getOptimismSepoliaConfig(); } else { revert("no network config for this chain"); } @@ -95,6 +101,24 @@ contract DeploymentConfig is Script { }); } + function getOptimismSepoliaConfig() public returns (NetworkConfig memory) { + // Actually, it'd be nicer to have `multicallAddress` be part of `NetworkConfig`, + // however, adding another field to the struct causes us to run into the + // "stack too deep" error during compilation, hence, we're using an additional + // property on the contract to access the value later from there. + multicallAddress = MULTICALL_ADDRESS_OPTIMISM_SEPOLIA; + return NetworkConfig({ + votingLengthInSeconds: FOUR_MINS_IN_SECONDS, + votingVerificationLengthInSeconds: TWO_MINS_IN_SECONDS, + timeBetweenVotingInSeconds: ONE_MIN_IN_SECONDS, + featuredVotingLengthInSeconds: FOUR_MINS_IN_SECONDS, + featuredVotingVerificationLengthInSeconds: TWO_MINS_IN_SECONDS, + cooldownPeriod: 1, + featuredPerVotingCount: 3, + voteToken: SNT_ADDRESS_OPTIMISM_SEPOLIA + }); + } + function getOrCreateAnvilEthConfig() public returns (NetworkConfig memory) { vm.startBroadcast(deployer); MiniMeTokenFactory minimeFactory = new MiniMeTokenFactory();