Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RingDAO on testnet #11

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.propose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
14 changes: 14 additions & 0 deletions RingDAO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# <h1 align="center"> xAccount Deploy </h1>
## V2 Deployments
| Contract | Canonical Cross-chain Deployment Address |
|------------------------|--------------------------------------------|
| RingDAOSafeMultiSig | 0x040f331774Ed6BB161412B4cEDb1358B382aF3A5 |
| Depoist | 0x53E294d1B6ec28B251A81aa337212D7a48E6B642 |
| Timelock | 0x849eC3ba6AD79934666Bb98eCd74cF94F5dA3835 |
| gRING | 0xD358c5c694A12857C3A44b53943fB5ca6b042764 |
| RingDAO | 0x2E05EE9032a28d894545708C56BE7bccd2e47826 |
| Hub | 0xC5d919D01DB0f225AAf2Bb45Fd4f65dC0d173D75 |

## Supported Chains

- Koi
Original file line number Diff line number Diff line change
@@ -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": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"signer": "0x0f14341a7f464320319025540e8fe48ad0fe5aec",
"signature": "0xbc116c87ebab75510c26c8c780ef341dbe83595b2c1f6657a996b68b948a05753d9e769bdedd0177cd96c98b4ada74d76c1167dbcdf139d6b8d21c279d7949a51c"
},
{
"signer": "0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85",
"signature": "0xaa2f7c91f89f120b32e45ab4dfd68d6be877dcd00a5f01ac5fe0b5275de4ef844e27e572c3c5bf43cf6f357344e56bc7f82aac9f3c6ca4cd143f3a85d97c45291b"
},
{
"signer": "0x53405FB4d71591E33fe07bFbC90bD82E65720ad0",
"signature": "0x993a5ec3dc4444d9cb4fad9d58c86b83ebbb97bb35e20678c44ad2435548d0ce5a1d7e07aa3f80765e36b063e18eef39a23f177aa33eb02b6a23c2e902d4f4b81b"
}
]
6 changes: 6 additions & 0 deletions script/Proposal.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "./ring-dao/Config.s.sol";

contract Proposal is ConfigScript {}
4 changes: 2 additions & 2 deletions script/Base.sol → script/common/Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 0 additions & 6 deletions script/common/Proposal.s.sol

This file was deleted.

File renamed without changes.
10 changes: 5 additions & 5 deletions script/Connect.s.sol → script/msgport/Connect.s.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
6 changes: 3 additions & 3 deletions script/Deploy.s.sol → script/msgport/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions script/ring-dao/Config.s.sol
Original file line number Diff line number Diff line change
@@ -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);
}
}
Loading