diff --git a/.github/workflows/sphinx.dry-run.yml b/.github/workflows/sphinx.dry-run.yml
index 1ecf5ce..ed83060 100644
--- a/.github/workflows/sphinx.dry-run.yml
+++ b/.github/workflows/sphinx.dry-run.yml
@@ -23,4 +23,4 @@ jobs:
- name: Install Sphinx Solidity Library
run: yarn sphinx install
- name: Dry Run
- run: npx sphinx propose ./script/common/Proposal.s.sol --dry-run --networks mainnets
+ run: npx sphinx propose ./script/Proposal.s.sol --dry-run --networks mainnets
diff --git a/.github/workflows/sphinx.propose.yml b/.github/workflows/sphinx.propose.yml
index b43e89e..b1cdfa2 100644
--- a/.github/workflows/sphinx.propose.yml
+++ b/.github/workflows/sphinx.propose.yml
@@ -23,4 +23,4 @@ jobs:
- name: Install Sphinx Solidity Library
run: yarn sphinx install
- name: Propose
- run: npx sphinx propose ./script/common/Proposal.s.sol --confirm --networks mainnets
+ run: npx sphinx propose ./script/Proposal.s.sol --confirm --networks mainnets
diff --git a/Makefile b/Makefile
index 2a329e4..428b1d4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,12 +6,10 @@
all :; @forge build
fmt :; @forge fmt
clean :; @forge clean
-deploy :; npx sphinx deploy ./script/Deploy.s.sol --network $(chain) --confirm --verify
-connect:; npx sphinx deploy ./script/Connect.s.sol --network $(chain) --confirm
-dry-run :; npx sphinx propose ./script/common/Proposal.s.sol --networks mainnets
-propose-test :; npx sphinx propose ./script/common/Proposal.s.sol --networks testnets
-propose-prod :; npx sphinx propose ./script/common/Proposal.s.sol --networks mainnets
+dry-run :; npx sphinx propose ./script/Proposal.s.sol --networks mainnets
+propose-test :; npx sphinx propose ./script/Proposal.s.sol --networks testnets
+propose-prod :; npx sphinx propose ./script/Proposal.s.sol --networks mainnets
execute :; npx sphinx execute $(path)
diff --git a/RingDAO.md b/RingDAO.md
new file mode 100644
index 0000000..fc87338
--- /dev/null
+++ b/RingDAO.md
@@ -0,0 +1,14 @@
+#
xAccount Deploy
+## V2 Deployments
+| Contract | Canonical Cross-chain Deployment Address |
+|------------------------|--------------------------------------------|
+| RingDAOSafeMultiSig | 0x040f331774Ed6BB161412B4cEDb1358B382aF3A5 |
+| Depoist | 0x53E294d1B6ec28B251A81aa337212D7a48E6B642 |
+| Timelock | 0x849eC3ba6AD79934666Bb98eCd74cF94F5dA3835 |
+| gRING | 0xD358c5c694A12857C3A44b53943fB5ca6b042764 |
+| RingDAO | 0x2E05EE9032a28d894545708C56BE7bccd2e47826 |
+| Hub | 0xC5d919D01DB0f225AAf2Bb45Fd4f65dC0d173D75 |
+
+## Supported Chains
+
+- Koi
diff --git a/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/deployment.json b/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/deployment.json
new file mode 100644
index 0000000..4bfafa6
--- /dev/null
+++ b/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/deployment.json
@@ -0,0 +1,165 @@
+{
+ "networkConfigs": [
+ {
+ "safeAddress": "0x040f331774Ed6BB161412B4cEDb1358B382aF3A5",
+ "moduleAddress": "0x3D75d338B4711F8a33d293a2008f07a712513402",
+ "safeInitData": "0xb63e800d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e776100000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000e3993566b34e5367d1c602439997bd08c11ff70000000000000000000000000f14341a7f464320319025540e8fe48ad0fe5aec00000000000000000000000052386be2397e8eac26298f733b390684203fb58000000000000000000000000053405fb4d71591e33fe07bfbc90bd82e65720ad00000000000000000000000009f33a4809aa708d7a399fedba514e0a0d15efa8500000000000000000000000000000000000000000000000000000000000001448d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f2008f3301c9eada5642b5bb12fd047d3ebb2932e619000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248236d0b80000000000000000000000000000000000000000000000000000000000000000018f3301c9eada5642b5bb12fd047d3ebb2932e6190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002411ea37fc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "nonce": "2",
+ "chainId": "701",
+ "blockGasLimit": "20000000",
+ "blockNumber": "61948",
+ "newConfig": {
+ "projectName": "RING-DAO",
+ "orgId": "cluanacaw000111jik4xs4wkl",
+ "owners": [
+ "0x00E3993566b34e5367d1C602439997BD08c11FF7",
+ "0x0f14341A7f464320319025540E8Fe48Ad0fe5aec",
+ "0x52386BE2397e8EAc26298F733b390684203fB580",
+ "0x53405FB4d71591E33fe07bFbC90bD82E65720ad0",
+ "0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85"
+ ],
+ "mainnets": [],
+ "testnets": [
+ "darwinia_koi"
+ ],
+ "threshold": "3",
+ "saltNonce": "0"
+ },
+ "executionMode": 2,
+ "initialState": {
+ "isExecuting": false,
+ "isModuleDeployed": true,
+ "isSafeDeployed": true
+ },
+ "isSystemDeployed": true,
+ "actionInputs": [
+ {
+ "actionType": 2,
+ "contracts": [],
+ "index": "1",
+ "decodedAction": {
+ "referenceName": "0x849eC3ba6AD79934666Bb98eCd74cF94F5dA3835",
+ "functionName": "call",
+ "variables": [
+ "0x2f2ff15db09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc10000000000000000000000002e05ee9032a28d894545708c56be7bccd2e47826"
+ ],
+ "address": "",
+ "value": "0"
+ },
+ "gas": "11200000",
+ "requireSuccess": true,
+ "value": "0",
+ "operation": 0,
+ "to": "0x849eC3ba6AD79934666Bb98eCd74cF94F5dA3835",
+ "txData": "0x2f2ff15db09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc10000000000000000000000002e05ee9032a28d894545708c56be7bccd2e47826"
+ },
+ {
+ "actionType": 2,
+ "contracts": [],
+ "index": "2",
+ "decodedAction": {
+ "referenceName": "0xD358c5c694A12857C3A44b53943fB5ca6b042764",
+ "functionName": "call",
+ "variables": [
+ "0x2f2ff15d9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d75"
+ ],
+ "address": "",
+ "value": "0"
+ },
+ "gas": "11200000",
+ "requireSuccess": true,
+ "value": "0",
+ "operation": 0,
+ "to": "0xD358c5c694A12857C3A44b53943fB5ca6b042764",
+ "txData": "0x2f2ff15d9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d75"
+ },
+ {
+ "actionType": 2,
+ "contracts": [],
+ "index": "3",
+ "decodedAction": {
+ "referenceName": "0xD358c5c694A12857C3A44b53943fB5ca6b042764",
+ "functionName": "call",
+ "variables": [
+ "0x2f2ff15d3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d75"
+ ],
+ "address": "",
+ "value": "0"
+ },
+ "gas": "11200000",
+ "requireSuccess": true,
+ "value": "0",
+ "operation": 0,
+ "to": "0xD358c5c694A12857C3A44b53943fB5ca6b042764",
+ "txData": "0x2f2ff15d3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d75"
+ }
+ ],
+ "unlabeledContracts": [],
+ "arbitraryChain": false,
+ "executorAddress": "0x7e16116661CA8d66C73612382833153911Fa03B1",
+ "libraries": [],
+ "gitCommit": "5958d3498ba1ce7723e0036025dd463cc1e54e28",
+ "safeFundingRequest": {
+ "fundsRequested": "0",
+ "startingBalance": "0"
+ }
+ }
+ ],
+ "buildInfos": {},
+ "inputs": [],
+ "version": "0.2.0",
+ "merkleTree": {
+ "root": "0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c",
+ "leavesWithProofs": [
+ {
+ "leaf": {
+ "chainId": "701",
+ "index": "0",
+ "leafType": 0,
+ "data": "0x000000000000000000000000040f331774ed6bb161412b4cedb1358b382af3a50000000000000000000000003d75d338b4711f8a33d293a2008f07a712513402000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000007e16116661ca8d66c73612382833153911fa03b100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ },
+ "proof": [
+ "0x9b4511e6a5d9f1cf3fb3c76518471a27e5bd5f52a459f3c389c93453bb75e22e",
+ "0xc63e27e027eea7cb740f0d59280c1a767448bf4cc8dffc8615d303858dcffda5"
+ ]
+ },
+ {
+ "leaf": {
+ "chainId": "701",
+ "index": "1",
+ "leafType": 1,
+ "data": "0x000000000000000000000000849ec3ba6ad79934666bb98ecd74cf94f5da383500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aae60000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000442f2ff15db09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc10000000000000000000000002e05ee9032a28d894545708c56be7bccd2e4782600000000000000000000000000000000000000000000000000000000"
+ },
+ "proof": [
+ "0x81669423421fcdcf4e20fe85176a9a9bca0f52edeada63eacd5d1724ad99d671",
+ "0xc63e27e027eea7cb740f0d59280c1a767448bf4cc8dffc8615d303858dcffda5"
+ ]
+ },
+ {
+ "leaf": {
+ "chainId": "701",
+ "index": "2",
+ "leafType": 1,
+ "data": "0x000000000000000000000000d358c5c694a12857c3a44b53943fb5ca6b04276400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aae60000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000442f2ff15d9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d7500000000000000000000000000000000000000000000000000000000"
+ },
+ "proof": [
+ "0x71a27ca3ac749cc5cc8160990d60b2f3fae18300294732a0ca27c7bfda8a8572",
+ "0x2fe414aff5ac7b21839d69847c0fc092e52fe92f6adfcb0953e6658882674482"
+ ]
+ },
+ {
+ "leaf": {
+ "chainId": "701",
+ "index": "3",
+ "leafType": 1,
+ "data": "0x000000000000000000000000d358c5c694a12857c3a44b53943fb5ca6b04276400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aae60000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000442f2ff15d3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848000000000000000000000000c5d919d01db0f225aaf2bb45fd4f65dc0d173d7500000000000000000000000000000000000000000000000000000000"
+ },
+ "proof": [
+ "0x06f1889f204593ccecaa6a416f733cc3a56c293185b6cf965926916dacd6b97f",
+ "0x2fe414aff5ac7b21839d69847c0fc092e52fe92f6adfcb0953e6658882674482"
+ ]
+ }
+ ]
+ },
+ "configArtifacts": {}
+}
\ No newline at end of file
diff --git a/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/signature.json b/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/signature.json
new file mode 100644
index 0000000..a6a332b
--- /dev/null
+++ b/proposal/0xca098397ca8112fdce8ede53028d8e86c9e0ac76b7e850e99e0fabe9ff6f2f2c/signature.json
@@ -0,0 +1,14 @@
+[
+ {
+ "signer": "0x0f14341a7f464320319025540e8fe48ad0fe5aec",
+ "signature": "0xbc116c87ebab75510c26c8c780ef341dbe83595b2c1f6657a996b68b948a05753d9e769bdedd0177cd96c98b4ada74d76c1167dbcdf139d6b8d21c279d7949a51c"
+ },
+ {
+ "signer": "0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85",
+ "signature": "0xaa2f7c91f89f120b32e45ab4dfd68d6be877dcd00a5f01ac5fe0b5275de4ef844e27e572c3c5bf43cf6f357344e56bc7f82aac9f3c6ca4cd143f3a85d97c45291b"
+ },
+ {
+ "signer": "0x53405FB4d71591E33fe07bFbC90bD82E65720ad0",
+ "signature": "0x993a5ec3dc4444d9cb4fad9d58c86b83ebbb97bb35e20678c44ad2435548d0ce5a1d7e07aa3f80765e36b063e18eef39a23f177aa33eb02b6a23c2e902d4f4b81b"
+ }
+]
diff --git a/script/Proposal.s.sol b/script/Proposal.s.sol
new file mode 100644
index 0000000..151a722
--- /dev/null
+++ b/script/Proposal.s.sol
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: MIT
+pragma solidity 0.8.17;
+
+import "./ring-dao/Config.s.sol";
+
+contract Proposal is ConfigScript {}
diff --git a/script/Base.sol b/script/common/Base.sol
similarity index 94%
rename from script/Base.sol
rename to script/common/Base.sol
index a3d70e8..7711f47 100644
--- a/script/Base.sol
+++ b/script/common/Base.sol
@@ -17,8 +17,8 @@ abstract contract Base is Script, Sphinx, SphinxConstants {
function configureSphinx() public override {
sphinxConfig.projectName = "RING-DAO";
- sphinxConfig.testnets = ["sepolia", "arbitrum_sepolia"];
- sphinxConfig.mainnets = ["ethereum", "darwinia", "crab", "arbitrum", "blast", "polygon", "moonbeam"];
+ sphinxConfig.testnets = ["darwinia_koi"];
+ // sphinxConfig.mainnets = ["ethereum", "darwinia", "crab", "arbitrum", "blast", "polygon", "moonbeam"];
}
function CREATE3() public returns (address create3) {
diff --git a/script/common/Proposal.s.sol b/script/common/Proposal.s.sol
deleted file mode 100644
index 48c7e90..0000000
--- a/script/common/Proposal.s.sol
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity 0.8.17;
-
-import "../Connect.s.sol";
-
-contract Proposal is ConnectScript {}
diff --git a/script/TomlTools.sol b/script/common/TomlTools.sol
similarity index 100%
rename from script/TomlTools.sol
rename to script/common/TomlTools.sol
diff --git a/script/Connect.s.sol b/script/msgport/Connect.s.sol
similarity index 95%
rename from script/Connect.s.sol
rename to script/msgport/Connect.s.sol
index bcb24e3..150a47f 100644
--- a/script/Connect.s.sol
+++ b/script/msgport/Connect.s.sol
@@ -1,15 +1,15 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
-import {Base} from "./Base.sol";
-import {TomlTools} from "./TomlTools.sol";
-import {OracleConfig} from "./OracleConfig.sol";
-import {RelayerConfig} from "./RelayerConfig.sol";
+import {Base} from "../common/Base.sol";
+import {TomlTools} from "../common/TomlTools.sol";
+import {OracleConfig} from "../ormp/OracleConfig.sol";
+import {RelayerConfig} from "../ormp/RelayerConfig.sol";
import {safeconsole} from "forge-std/safeconsole.sol";
// Msgport
-import "../src/Msgport.sol";
+import "../../src/Msgport.sol";
import "./Deploy.s.sol";
import {PortRegistry} from "@darwinia-msgport/src/PortRegistry.sol";
diff --git a/script/Deploy.s.sol b/script/msgport/Deploy.s.sol
similarity index 98%
rename from script/Deploy.s.sol
rename to script/msgport/Deploy.s.sol
index 7388d5d..f31408a 100644
--- a/script/Deploy.s.sol
+++ b/script/msgport/Deploy.s.sol
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
-import {Base} from "./Base.sol";
-import {TomlTools} from "./TomlTools.sol";
+import {Base} from "../common/Base.sol";
+import {TomlTools} from "../common/TomlTools.sol";
import {stdJson} from "forge-std/StdJson.sol";
// Msgport
-import "../src/Msgport.sol";
+import "../../src/Msgport.sol";
contract DeployScript is Base {
using stdJson for string;
diff --git a/script/OracleConfig.sol b/script/ormp/OracleConfig.sol
similarity index 100%
rename from script/OracleConfig.sol
rename to script/ormp/OracleConfig.sol
diff --git a/script/RelayerConfig.sol b/script/ormp/RelayerConfig.sol
similarity index 100%
rename from script/RelayerConfig.sol
rename to script/ormp/RelayerConfig.sol
diff --git a/script/ring-dao/Config.s.sol b/script/ring-dao/Config.s.sol
new file mode 100644
index 0000000..200ee5b
--- /dev/null
+++ b/script/ring-dao/Config.s.sol
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: MIT
+pragma solidity 0.8.17;
+
+import {Base} from "../common/Base.sol";
+import {TomlTools} from "../common/TomlTools.sol";
+import {stdJson} from "forge-std/StdJson.sol";
+
+import "@openzeppelin/contracts/access/IAccessControl.sol";
+
+contract ConfigScript is Base {
+ address depoist = 0x53E294d1B6ec28B251A81aa337212D7a48E6B642;
+ address timelock = 0x849eC3ba6AD79934666Bb98eCd74cF94F5dA3835;
+ address gRING = 0xD358c5c694A12857C3A44b53943fB5ca6b042764;
+ address ringDAO = 0x2E05EE9032a28d894545708C56BE7bccd2e47826;
+ address hub = 0xC5d919D01DB0f225AAf2Bb45Fd4f65dC0d173D75;
+
+ bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE");
+ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
+ bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
+
+ function run() public sphinx {
+ if (!IAccessControl(timelock).hasRole(PROPOSER_ROLE, ringDAO)) {
+ IAccessControl(timelock).grantRole(PROPOSER_ROLE, ringDAO);
+ }
+ if (!IAccessControl(gRING).hasRole(MINTER_ROLE, hub)) IAccessControl(gRING).grantRole(MINTER_ROLE, hub);
+ if (!IAccessControl(gRING).hasRole(BURNER_ROLE, hub)) IAccessControl(gRING).grantRole(BURNER_ROLE, hub);
+ }
+}