From 4fdbf662d6370925ee9ef9210579a530bbaeb27d Mon Sep 17 00:00:00 2001 From: echo Date: Wed, 9 Oct 2024 15:07:56 +0800 Subject: [PATCH 1/3] params --- script/Deploy.s.sol | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index e3e04c7..6619ebb 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -12,6 +12,7 @@ import {MajorityVotingBase} from "@aragon/osx/plugins/governance/majority-voting import {TokenVotingPluginSetup} from "../src/plugins/token-voting/TokenVotingPluginSetup.sol"; import {DelegationWall} from "../src/DelegationWall.sol"; +import {DelegateAnnouncer} from "../src/DelegateAnnouncer.sol"; contract Deploy is Script { address gRING = 0xdafa555e2785DC8834F4Ea9D1ED88B6049142999; @@ -22,6 +23,7 @@ contract Deploy is Script { address[] pluginAddress; DelegationWall delegationWall; + DelegateAnnouncer delegateAnnouncer; TokenVotingPluginSetup tokenVotingPluginSetup; PluginRepo tokenVotingPluginRepo; DAO ringDAO; @@ -40,6 +42,7 @@ contract Deploy is Script { console2.log("Deploying from:", msg.sender); delegationWall = new DelegationWall(); + delegateAnnouncer = new DelegateAnnouncer(); // 1. Deploying the Plugin Setup deployPluginSetup(); @@ -70,9 +73,10 @@ contract Deploy is Script { // 7. Logging the resulting addresses console2.log("Delegation Wall: ", address(delegationWall)); + console2.log("Delegation Announcer: ", address(delegateAnnouncer)); console2.log("TokenVoting Plugin Setup: ", address(tokenVotingPluginSetup)); console2.log("TokenVoting Plugin Repo: ", address(tokenVotingPluginRepo)); - console2.log("Ring DAO: ", address(ringDAO)); + console2.log("RingDAO: ", address(ringDAO)); console2.log("Installed Plugins: "); for (uint256 i = 0; i < pluginAddress.length; i++) { console2.log("- ", pluginAddress[i]); @@ -83,9 +87,9 @@ contract Deploy is Script { if (block.chainid == 701) { return 400e18; } else if (block.chainid == 44) { - revert("TODO"); + return 20_000_000e18; } else if (block.chainid == 46) { - return 40000000e18; + return 40_000_000e18; } } @@ -96,16 +100,23 @@ contract Deploy is Script { function deployPluginRepo() public { tokenVotingPluginRepo = PluginRepoFactory(pluginRepoFactory).createPluginRepoWithFirstVersion( - string.concat("ringdao-token-voting-", vm.toString(block.timestamp)), + string.concat("ringdao-token-voting-", vm.toString(block.chainid)), address(tokenVotingPluginSetup), maintainer, - hex"12", // TODO: Give these actual values on prod - hex"34" + "QmZYBxHyEd8emirXHQovFDUokGyabyKXBu7hfX7GES6ziT", + "QmScsjGhLeAuwhTpqcfY6ya1h1j4LT4hWJFJP3sQjHVyVr" ); } function getDAOSettings() public view returns (DAOFactory.DAOSettings memory) { - return DAOFactory.DAOSettings(address(0), "", string.concat("governance-", vm.toString(block.timestamp)), ""); + if (block.chainid == 701) { + return + DAOFactory.DAOSettings(address(0), "", string.concat("governance-", vm.toString(block.timestamp)), ""); + } else if (block.chainid == 44) { + return DAOFactory.DAOSettings(address(0), "", "CrabDAO", ""); + } else if (block.chainid == 46) { + return DAOFactory.DAOSettings(address(0), "", "RingDAO", ""); + } } function getPluginSettings() public view returns (DAOFactory.PluginSettings[] memory pluginSettings) { @@ -119,8 +130,8 @@ contract Deploy is Script { votingMode: MajorityVotingBase.VotingMode.Standard, supportThreshold: 500_000, // 50% minParticipation: 1, // 0.0001% - minDuration: 60 minutes, - minProposerVotingPower: 1e18 + minDuration: 2 weeks, + minProposerVotingPower: 1_000_000e18 }), TokenVotingPluginSetup.TokenSettings({addr: gRING}) ); From 98cc72437584131cde9cd8e911782fce2c2a9ff6 Mon Sep 17 00:00:00 2001 From: echo Date: Wed, 9 Oct 2024 17:36:16 +0800 Subject: [PATCH 2/3] fix subdomain --- foundry.toml | 2 +- script/Deploy.s.sol | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/foundry.toml b/foundry.toml index 2a48d2d..1f7d27d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -10,7 +10,7 @@ optimizer_runs = 999999 evm_version = "london" bytecode_hash = "ipfs" extra_output_files = ["metadata"] -eth_rpc_url = "https://koi-rpc.darwinia.network" +eth_rpc_url = "https://crab-rpc.darwinia.network" etherscan_api_key = "xxx" [rpc_endpoints] diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 6619ebb..cfb2391 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -113,9 +113,11 @@ contract Deploy is Script { return DAOFactory.DAOSettings(address(0), "", string.concat("governance-", vm.toString(block.timestamp)), ""); } else if (block.chainid == 44) { - return DAOFactory.DAOSettings(address(0), "", "CrabDAO", ""); + // crab-vote.ring-dao.eth + return DAOFactory.DAOSettings(address(0), "", "crab-vote", ""); + // vote.ring-dao.eth } else if (block.chainid == 46) { - return DAOFactory.DAOSettings(address(0), "", "RingDAO", ""); + return DAOFactory.DAOSettings(address(0), "", "vote", ""); } } From bbb8c0ddde7716d7083de80aef186f6bf321b2bc Mon Sep 17 00:00:00 2001 From: echo Date: Wed, 9 Oct 2024 18:17:18 +0800 Subject: [PATCH 3/3] deploy on crab --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 64a4c04..99d835c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,17 @@ - 0x1756B204a72e1B879D9C63b47f31640a57b8c727 ``` +## Crab +``` + Delegation Wall: 0x7479798bD9A2972afB4Da5FF9f88bd18Daf546a1 + Delegation Announcer: 0x05FFdA9C7FD9E30e49e420b0AA6c1772f94e83A7 + TokenVoting Plugin Setup: 0x879BD4Ca5158cE3b1Fc419D4e7789503923F3d76 + TokenVoting Plugin Repo: 0x5eB66e31b5Bf40D074aB149643E69ca3fee4Fb7A + CrabDAO: 0x663fC3000f0101BF16FDc9F73F02DA6Efa8c5875 + Installed Plugins: + - 0xFF335B8aF2B601d09A499199705Ed3E7bdADa66E +``` + ## Token Voting plugin This plugin is an adapted version of Aragon's [Token Voting plugin](https://github.com/aragon/osx/tree/v1.3.0/packages/contracts/src/plugins/governance/majority-voting/token).