Skip to content

Commit

Permalink
script: also remve operator roles
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Oct 2, 2024
1 parent 26eaabc commit d727fff
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 23 deletions.
27 changes: 24 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 5 additions & 7 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -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
@pythnetwork/=dependencies/pyth-sdk-solidity-2.2.0/
@fdk/=dependencies/fdk-0.3.1-beta/script
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
source dependencies/@fdk-0.3.0-beta/run.sh
source dependencies/fdk-0.3.1-beta/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
27 changes: 15 additions & 12 deletions soldeer.lock
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit d727fff

Please sign in to comment.