From d727fffaaded320d3fdab89bdee7e91ad12057ed Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Wed, 2 Oct 2024 13:34:39 +0700 Subject: [PATCH] script: also remve operator roles --- foundry.toml | 27 ++++++++++++++++--- remappings.txt | 12 ++++----- run.sh | 2 +- ...02_GrantAdminRoleForMultisig_Mainnet.s.sol | 12 +++++++++ soldeer.lock | 27 ++++++++++--------- 5 files changed, 57 insertions(+), 23 deletions(-) diff --git a/foundry.toml b/foundry.toml index 525a604..db06d00 100644 --- a/foundry.toml +++ b/foundry.toml @@ -30,6 +30,27 @@ runs = 256 runs = 256 [dependencies] -"@fdk" = { version = "0.3.0-beta", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.0-beta.zip" } -"@pythnetwork-pyth-sdk-solidity" = { version = "2.2.0" } -"@openzeppelin-contracts" = { version = "4.9.3" } +fdk = { version = "0.3.1-beta", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.1-beta.zip" } +openzeppelin = { version = "4.9.3", url = "https://github.com/OpenZeppelin/openzeppelin-contracts/archive/refs/tags/v4.9.3.zip" } +pyth-sdk-solidity = { version = "2.2.0", url = "https://github.com/pyth-network/pyth-sdk-solidity/archive/refs/tags/v2.2.0.zip" } + + +[soldeer] +# whether soldeer manages remappings +remappings_generate = false + +# whether soldeer re-generates all remappings when installing, updating or uninstalling deps +remappings_regenerate = false + +# whether to suffix the remapping with the version: `name-a.b.c` +remappings_version = true + +# a prefix to add to the remappings ("@" would give `@name`) +remappings_prefix = "@" + +# where to store the remappings ("txt" for `remappings.txt` or "config" for `foundry.toml`) +# ignored when `soldeer.toml` is used as config (uses `remappings.txt`) +remappings_location = "txt" + +# whether to install sub-dependencies or not. If true this wil install the dependencies of dependencies 1 level down. +recursive_deps = true diff --git a/remappings.txt b/remappings.txt index 3bc9792..2d2ee1d 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,10 +1,8 @@ @rns-contracts/=src/ -ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=dependencies/@fdk-0.3.0-beta/dependencies/forge-std-1.8.2/src/ -@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-4.9.3/ -contract-template/=lib/contract-template/src/ -@solady/=dependencies/@fdk-0.3.0-beta/dependencies/solady-0.0.206/src/ +forge-std/=dependencies/fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/ +@openzeppelin/=dependencies/openzeppelin-4.9.3/ +@solady/=dependencies/fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/ @ensdomains/ens-contracts/=lib/ens-contracts/contracts/ @ensdomains/buffer/=lib/buffer/ -@pythnetwork/=dependencies/@pythnetwork-pyth-sdk-solidity-2.2.0/ -@fdk/=dependencies/@fdk-0.3.0-beta/script \ No newline at end of file +@pythnetwork/=dependencies/pyth-sdk-solidity-2.2.0/ +@fdk/=dependencies/fdk-0.3.1-beta/script \ No newline at end of file diff --git a/run.sh b/run.sh index d99f730..04afed5 100755 --- a/run.sh +++ b/run.sh @@ -1 +1 @@ -source dependencies/@fdk-0.3.0-beta/run.sh +source dependencies/fdk-0.3.1-beta/run.sh diff --git a/script/20240516-revoke-roles/02_GrantAdminRoleForMultisig_Mainnet.s.sol b/script/20240516-revoke-roles/02_GrantAdminRoleForMultisig_Mainnet.s.sol index 89194b0..7ca5e1f 100644 --- a/script/20240516-revoke-roles/02_GrantAdminRoleForMultisig_Mainnet.s.sol +++ b/script/20240516-revoke-roles/02_GrantAdminRoleForMultisig_Mainnet.s.sol @@ -109,6 +109,18 @@ contract Migration__02_GrantAdminRoleForMultisig_Mainnet is Migration { // Remove another admin roles: https://sky-mavis.slack.com/archives/C06C3HW1HS7/p1712812933009569 AccessControlEnumerable(address(_domainPrice)).revokeRole(0x0, 0xAdc6a8fEB5C53303323A1D0280c0a0d5F2e1a14D); + // Remove operator role for RNS Unified + AccessControlEnumerable(address(_rns)).revokeRole(_rns.PAUSER_ROLE(), duke); + AccessControlEnumerable(address(_rns)).revokeRole(_rns.PROTECTED_SETTLER_ROLE(), duke); + + // Remove operator role for RNS Auction + AccessControlEnumerable(address(_auction)).revokeRole(_auction.OPERATOR_ROLE(), duke); + // Remove operator role for RNS Domain Price + AccessControlEnumerable(address(_domainPrice)).revokeRole(_domainPrice.OVERRIDER_ROLE(), duke); + // Remove operator role for RNS Registrar Controller + AccessControlEnumerable(address(_ronController)).revokeRole(_ronController.OPERATOR_ROLE(), duke); + AccessControlEnumerable(address(_ronController)).revokeRole(_ronController.PAUSER_ROLE(), duke); + // Duke will do this manually // Ownable(loadContract(Contract.RNSReverseRegistrar.key())).transferOwnership(multisig); console.log( diff --git a/soldeer.lock b/soldeer.lock index 026df44..4838b97 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -1,17 +1,20 @@ [[dependencies]] -name = "@fdk" -version = "0.3.0-beta" -source = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.0-beta.zip" -checksum = "aabeda6cc1fe02227d26f3edd86d4af6c91e2167e8b9f1971cc1ea7ce33d34f9" +name = "fdk" +version = "0.3.1-beta" +source = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.1-beta.zip" +checksum = "53cb5bf15abdc909d177c64e78070387af24ef39b2a4b408651836ac9de059c4" +integrity = "967cb0aee7c770a82c4708ff50b2b6ffc529aaa1c800bca250cb96eeb98f806b" [[dependencies]] -name = "@pythnetwork-pyth-sdk-solidity" -version = "2.2.0" -source = "https://soldeer-revisions.s3.amazonaws.com/@pythnetwork-pyth-sdk-solidity/2_2_0_15-04-2024_18:50:54_pyth-sdk-solidity.zip" -checksum = "54e3bda3b27467f84c1605722f58e1d2b5a19d6ca3c24840550f1d6cf3bc2231" +name = "openzeppelin" +version = "4.9.3" +source = "https://github.com/OpenZeppelin/openzeppelin-contracts/archive/refs/tags/v4.9.3.zip" +checksum = "94270990c32ff2d00c06a9dabaf5b7a8e36773e017254acbb39d13733eb82960" +integrity = "5cca086987dbce97760f8a337c0d29e6383fcafaffa9662897695f17566756d0" [[dependencies]] -name = "@openzeppelin-contracts" -version = "4.9.3" -source = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/4_9_3_22-01-2024_13:13:53_contracts.zip" -checksum = "95886307069cf73310b41396c49df51801a73f31f18f62e7d05adfc2031e7725" +name = "pyth-sdk-solidity" +version = "2.2.0" +source = "https://github.com/pyth-network/pyth-sdk-solidity/archive/refs/tags/v2.2.0.zip" +checksum = "71431ac3fe4e61ce2b8abd649d3e741277ca4dba287c2a4291d040190b8fb8da" +integrity = "845f9e662935eb347e9189da9b156f0062bcab1d372c7397777dbda609776a5c"