diff --git a/Makefile b/Makefile index c7bf6646..c29394d4 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,8 @@ SAFE_MANAGEMENT_DIR = $(network)/$(shell date +'%Y-%m-%d')-safe-management FUNDING_DIR = $(network)/$(shell date +'%Y-%m-%d')-funding SET_BASE_BRIDGE_PARTNER_THRESHOLD_DIR = $(network)/$(shell date +'%Y-%m-%d')-pause-bridge-base PAUSE_BRIDGE_BASE_DIR = $(network)/$(shell date +'%Y-%m-%d')-pause-bridge-base -SWITCH_TO_PERMISSIONED_GAME_DIR=$(network)/$(shell date +'%Y-%m-%d')-switch-to-permissioned-game +SWITCH_TO_PERMISSIONED_GAME_RETIRE_DIR=$(network)/$(shell date +'%Y-%m-%d')-switch-to-permissioned-game-retire +SWITCH_TO_PERMISSIONED_GAME_BLACKLIST_DIR=$(network)/$(shell date +'%Y-%m-%d')-switch-to-permissioned-game-blacklist TEMPLATE_GENERIC = setup-templates/template-generic TEMPLATE_GAS_INCREASE = setup-templates/template-gas-increase @@ -18,7 +19,8 @@ TEMPLATE_SAFE_MANAGEMENT = setup-templates/template-safe-management TEMPLATE_FUNDING = setup-templates/template-funding TEMPLATE_SET_BASE_BRIDGE_PARTNER_THRESHOLD = setup-templates/template-set-bridge-partner-threshold TEMPLATE_PAUSE_BRIDGE_BASE = setup-templates/template-pause-bridge-base -TEMPLATE_SWITCH_TO_PERMISSIONED_GAME = setup-templates/template-switch-to-permissioned-game +TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_RETIRE = setup-templates/template-switch-to-permissioned-game-retire +TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_BLACKLIST = setup-templates/template-switch-to-permissioned-game-blacklist ifndef $(GOPATH) GOPATH=$(shell go env GOPATH) @@ -72,9 +74,13 @@ setup-bridge-pause: rm -rf $(TEMPLATE_PAUSE_BRIDGE_BASE)/cache $(TEMPLATE_PAUSE_BRIDGE_BASE)/lib $(TEMPLATE_PAUSE_BRIDGE_BASE)/out cp -r $(TEMPLATE_PAUSE_BRIDGE_BASE) $(PAUSE_BRIDGE_BASE_DIR) -setup-switch-to-permissioned-game: - rm -rf $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME)/cache $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME)/lib $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME)/out - cp -r $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME) $(SWITCH_TO_PERMISSIONED_GAME_DIR) +setup-switch-to-permissioned-game-retire: + rm -rf $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_RETIRE)/cache $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_RETIRE)/lib $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_RETIRE)/out + cp -r $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_RETIRE) $(SWITCH_TO_PERMISSIONED_GAME_RETIRE_DIR) + +setup-switch-to-permissioned-game-blacklist: + rm -rf $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_BLACKLIST)/cache $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_BLACKLIST)/lib $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_BLACKLIST)/out + cp -r $(TEMPLATE_SWITCH_TO_PERMISSIONED_GAME_BLACKLIST) $(SWITCH_TO_PERMISSIONED_GAME_BLACKLIST_DIR) ## # Solidity Setup diff --git a/README.md b/README.md index 46cae10e..39d14bd2 100644 --- a/README.md +++ b/README.md @@ -194,13 +194,31 @@ This template is used to pause or un-pause [Base Bridge](https://github.com/base 1. Check in the task when it's ready to sign and request the facilitators to collect signatures from signers. 1. Once executed, check in the records files and mark the task `EXECUTED` in the README. -## Using the Switch to Permissioned Game template +## Using the Switch to Permissioned Game Retire template -This template is used to switch Base to a Permissioned Game. +This template is used to switch Base to a Permissioned Game and retire existing games. 1. Ensure you have followed the instructions above in `setup`. -1. Run `make setup-switch-to-permissioned-game network=` and go to the folder that was created by this command. +1. Run `make setup-switch-to-permissioned-game-retire network=` and go to the folder that was created by this command. 1. Specify the commit of [Optimism code](https://github.com/ethereum-optimism/optimism) and [Base contracts code](https://github.com/base/contracts) you intend to use in the `.env` file. +1. Set the `L2_DIVERGENCE_BLOCK_NUMBER` to the blocknumber that the chain has diverged at. +1. Run `make deps`. +1. Ensure only the Sepolia or Mainnet variables are in the `.env` file depending on what network this task is for. +1. Build the contracts with `forge build`. +1. Generate the validation file for signers with `make gen-validation`. +1. Check in the task when it's ready to sign and request the facilitators to collect signatures from signers. +1. Once executed, check in the records files and mark the task `EXECUTED` in the README. + +## Using the Switch to Permissioned Game Blacklist template + +This template is used to switch Base to a Permissioned Game and blacklist existing games. + +1. Ensure you have followed the instructions above in `setup`. +1. Run `make setup-switch-to-permissioned-game-blacklist network=` and go to the folder that was created by this command. +1. Specify the commit of [Optimism code](https://github.com/ethereum-optimism/optimism) and [Base contracts code](https://github.com/base/contracts) you intend to use in the `.env` file. +1. Set the `L2_DIVERGENCE_BLOCK_NUMBER` to the blocknumber that the chain has diverged at. +1. The `ADDRESSES_TO_BLACKLIST` can be left blank, in which case the addresses to blacklist will be searched for onchain. This may take some time. Alternatively, +you may run `make find-dispute-games-offchain` which will search for the addresses off-chain and `ADDRESSES_TO_BLACKLIST` can be set to the output. 1. Run `make deps`. 1. Ensure only the Sepolia or Mainnet variables are in the `.env` file depending on what network this task is for. 1. Build the contracts with `forge build`. diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/.env b/setup-templates/template-switch-to-permissioned-game-blacklist/.env new file mode 100644 index 00000000..631c25c4 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/.env @@ -0,0 +1,30 @@ +OP_COMMIT= +BASE_CONTRACTS_COMMIT= + +RECORD_STATE_DIFF=true + +# The block number at which the divergence occurred +L2_DIVERGENCE_BLOCK_NUMBER= +# Comma seperated array of addresses to blacklist +ADDRESSES_TO_BLACKLIST= + +# Mainnet Config +SYSTEM_CONFIG=0x73a79Fab69143498Ed3712e519A88a918e1f4072 + +# Optimism Guardian Multisig (controls Anchor State Registry) +OWNER_SAFE=0x09f7150D8c019BeF34450d6920f6B3608ceFdAf2 +# Owner of Optimism Guardian Multisig +OP_SECURITY_COUNCIL_SAFE=0xc2819DC788505Aac350142A7A707BF9D03E3Bd03 +DISPUTE_GAME_FACTORY=0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e +SENDER=0x1822b35B09f5ce1C78ecbC06AC0A4e17885b925e + +# # Sepolia Config +# SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194 + +# # Optimism Guardian Multisig (controls Anchor State Registry) +# OWNER_SAFE=0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E +# # Owner of Optimism Guardian Multisig +# OP_SECURITY_COUNCIL_SAFE=0xf64bc17485f0B4Ea5F06A96514182FC4cB561977 +# DISPUTE_GAME_FACTORY=0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1 +# # used to simulate +# SENDER=0x1084092Ac2f04c866806CF3d4a385Afa4F6A6C97 diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/Makefile b/setup-templates/template-switch-to-permissioned-game-blacklist/Makefile new file mode 100644 index 00000000..419d1c4c --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/Makefile @@ -0,0 +1,43 @@ +include ../../Makefile +include ../../Multisig.mk + +include ../.env +include .env + +ifndef LEDGER_ACCOUNT +override LEDGER_ACCOUNT = 0 +endif + +RPC_URL = $(L1_RPC_URL) +SCRIPT_NAME = SwitchToPermissionedGame + +.PHONY: gen-validation +gen-validation: checkout-signer-tool run-script + +.PHONY: run-script +run-script: + mkdir validations; \ + cd $(SIGNER_TOOL_PATH); \ + npm ci; \ + bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ + --workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \ + $(SCRIPT_NAME) --sig "sign(address[])" ["$(OP_SECURITY_COUNCIL_SAFE)"] --sender $(SENDER)' --out ../validations/op-signer.json; + +.PHONY: approve-op +approve-op: + $(call MULTISIG_APPROVE,$(OP_SECURITY_COUNCIL_SAFE),$(SIGNATURES)) + +# Execute +.PHONY: execute +execute: + $(call MULTISIG_EXECUTE,0x) + + +.PHONY: find-dispute-games-offchain +find-dispute-games-offchain: pip-install + RPC_URL=$(RPC_URL) DISPUTE_GAME_FACTORY=$(DISPUTE_GAME_FACTORY) L2_DIVERGENCE_BLOCK_NUMBER=$(L2_DIVERGENCE_BLOCK_NUMBER) \ + python3 script/fetch_dispute_games.py + +.PHONY: pip-install +pip-install: + pip3 install -r script/requirements.txt diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/README.md b/setup-templates/template-switch-to-permissioned-game-blacklist/README.md new file mode 100644 index 00000000..b211a674 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/README.md @@ -0,0 +1,65 @@ +# Switch to Permissioned Game and Blacklist Addresses + +Status: PENDING + +## Description + +This task contains scripts that will blacklist fault dispute games after a provided L2 block number in the AnchorStateRegistry. +This can only be done by the "Optimism Guardian Multisig" which is a single-nested multisig controlled by the OP Security Council. + +Because this requires searching through all dispute games, the time required for the task to execute may take some time. There are +two options: + +1. If the `ADDRESSES_TO_BLACKLIST` environment variable is NOT set, the forge script will attempt to search for dispute games + Note: this may take 10+ minutes + +2. If the `ADDRESSES_TO_BLACKLIST` environment variable IS set, the forge script will NOT search and will just blacklist the addresses + provided. + + There is a python script provided that can be run with `make find-dispute-games-offchain` that will use the provided + RPC_URL to search for the list of games to blacklist _offchain_. This typically takes a minute or two. The output + is the comma-separated `ADDRESSES_TO_BLACKLIST` environment variable that can be copied over to the `.env` file, so that + the forge script can directly blacklist just those addresses. + +## Install dependencies + +### 1. Update foundry + +```bash +foundryup +``` + +### 2. Install Node.js if needed + +First, check if you have node installed + +```bash +node --version +``` + +If you see a version output from the above command, you can move on. Otherwise, install node + +```bash +brew install node +``` + +## Sign Task + +### 1. Update repo: + +```bash +cd contract-deployments +git pull +``` + +### 2. Run the signing tool (NOTE: do not enter the task directory. Run this command from the project's root). + +```bash +make sign-task +``` + +### 3. Open the UI at [http://localhost:3000](http://localhost:3000) + +### 4. Send signature to facilitator + +You may now kill the Signer Tool process in your terminal window by running `Ctrl + C`. diff --git a/setup-templates/template-switch-to-permissioned-game/foundry.toml b/setup-templates/template-switch-to-permissioned-game-blacklist/foundry.toml similarity index 100% rename from setup-templates/template-switch-to-permissioned-game/foundry.toml rename to setup-templates/template-switch-to-permissioned-game-blacklist/foundry.toml diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/script/SwitchToPermissionedGame.sol b/setup-templates/template-switch-to-permissioned-game-blacklist/script/SwitchToPermissionedGame.sol new file mode 100644 index 00000000..08174b15 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/script/SwitchToPermissionedGame.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.15; + +import {Vm} from "forge-std/Vm.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol"; +import {console} from "forge-std/console.sol"; +import {IAnchorStateRegistry} from "@eth-optimism-bedrock/src/dispute/FaultDisputeGame.sol"; +import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol"; +import {IDisputeGame, GameStatus} from "@eth-optimism-bedrock/src/dispute/AnchorStateRegistry.sol"; +import {IDisputeGameFactory} from "@eth-optimism-bedrock/interfaces/dispute/IDisputeGameFactory.sol"; +import {FaultDisputeGame} from "@eth-optimism-bedrock/src/dispute/PermissionedDisputeGame.sol"; +import {GameTypes, GameType} from "@eth-optimism-bedrock/src/dispute/lib/Types.sol"; +import {MultisigScript} from "@base-contracts/script/universal/MultisigScript.sol"; +import {Simulation} from "@base-contracts/script/universal/Simulation.sol"; + +/// @notice This script updates the FaultDisputeGame and PermissionedDisputeGame implementations in the +/// DisputeGameFactory contract. +contract SwitchToPermissionedGame is MultisigScript { + using stdJson for string; + + // TODO: Confirm expected version + string public constant EXPECTED_VERSION = "1.4.1"; + + address public immutable OWNER_SAFE; + uint64 public immutable L2_DIVERGENCE_BLOCK_NUMBER; + string public RAW_ADDRESSES_TO_BLACKLIST; + + SystemConfig internal _SYSTEM_CONFIG = SystemConfig(vm.envAddress("SYSTEM_CONFIG")); + + IAnchorStateRegistry anchorStateRegistry; + IDisputeGame[] gamesToBlacklist; + + constructor() { + OWNER_SAFE = vm.envAddress("OWNER_SAFE"); + RAW_ADDRESSES_TO_BLACKLIST = vm.envString("ADDRESSES_TO_BLACKLIST"); + L2_DIVERGENCE_BLOCK_NUMBER = uint64(vm.envUint("L2_DIVERGENCE_BLOCK_NUMBER")); + } + + function setUp() public { + IDisputeGameFactory dgfProxy = IDisputeGameFactory(_SYSTEM_CONFIG.disputeGameFactory()); + FaultDisputeGame currentFdg = FaultDisputeGame(address(dgfProxy.gameImpls(GameTypes.CANNON))); + anchorStateRegistry = currentFdg.anchorStateRegistry(); + + // Split by commas + string[] memory parts = vm.split(RAW_ADDRESSES_TO_BLACKLIST, ","); + + // vm.split("", ",") return [""] with size 1 + if (parts.length == 0 || (parts.length == 1 && bytes(parts[0]).length == 0)) { + console.log("searching for addresses to blacklist"); + getGamesToBlacklist(dgfProxy); + } else { + console.log("using provided address_to_blacklist list"); + for (uint256 i; i < parts.length; i++) { + address address_to_blacklist = vm.parseAddress(parts[i]); + gamesToBlacklist.push(IDisputeGame(address_to_blacklist)); + } + } + + console.log("total games to blacklist", gamesToBlacklist.length); + } + + function getGamesToBlacklist(IDisputeGameFactory dgfProxy) internal { + uint256 totalNumGames = dgfProxy.gameCount(); + console.log("total games to search", totalNumGames); + + for (uint256 i = 0; i < totalNumGames; i = i + 1) { + (,, IDisputeGame game) = dgfProxy.gameAtIndex(i); + if (game.status() == GameStatus.IN_PROGRESS && game.l2SequenceNumber() >= L2_DIVERGENCE_BLOCK_NUMBER) { + // this game is in progress and challenges a block at or after the divergence block + gamesToBlacklist.push(game); + } + } + } + + // Confirm the CURRENT_RETIREMENT_TIMESTAMP is updated to the block time. + function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override { + for (uint256 i = 0; i < gamesToBlacklist.length; i = i + 1) { + require(anchorStateRegistry.isGameBlacklisted(gamesToBlacklist[i]), "post-110"); + } + require( + GameType.unwrap(anchorStateRegistry.respectedGameType()) == GameType.unwrap(GameTypes.PERMISSIONED_CANNON), + "post-111" + ); + } + + function _buildCalls() internal view override returns (IMulticall3.Call3Value[] memory) { + IMulticall3.Call3Value[] memory calls = new IMulticall3.Call3Value[](gamesToBlacklist.length + 1); + + calls[0] = IMulticall3.Call3Value({ + target: address(anchorStateRegistry), + allowFailure: false, + callData: abi.encodeCall(IAnchorStateRegistry.setRespectedGameType, (GameTypes.PERMISSIONED_CANNON)), + value: 0 + }); + + for (uint256 i = 0; i < gamesToBlacklist.length; i = i + 1) { + calls[i + 1] = IMulticall3.Call3Value({ + target: address(anchorStateRegistry), + allowFailure: false, + callData: abi.encodeCall(IAnchorStateRegistry.blacklistDisputeGame, (gamesToBlacklist[i])), + value: 0 + }); + } + + return calls; + } + + function _ownerSafe() internal view override returns (address) { + return OWNER_SAFE; + } +} diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/script/fetch_dispute_games.py b/setup-templates/template-switch-to-permissioned-game-blacklist/script/fetch_dispute_games.py new file mode 100644 index 00000000..47e82656 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/script/fetch_dispute_games.py @@ -0,0 +1,139 @@ +from web3 import Web3 +import sys +import os +from eth_hash.auto import keccak +from concurrent.futures import ThreadPoolExecutor, as_completed + +# ------------------------------- +# Configuration +# ------------------------------- + +try: + RPC_URL = os.environ['RPC_URL'] + print(f"RPC_URL environment variable: {RPC_URL}") +except KeyError: + print("RPC_URL environment variable not set.") + os.exit(1) + +try: + DISPUTE_GAME_FACTORY = os.environ['DISPUTE_GAME_FACTORY'] + print(f"DISPUTE_GAME_FACTORY environment variable: {DISPUTE_GAME_FACTORY}") +except KeyError: + print("DISPUTE_GAME_FACTORY environment variable not set.") + os.exit(1) + +try: + L2_DIVERGENCE_BLOCK_NUMBER = int(os.environ['L2_DIVERGENCE_BLOCK_NUMBER']) + print(f"L2_DIVERGENCE_BLOCK_NUMBER environment variable: {L2_DIVERGENCE_BLOCK_NUMBER}") +except KeyError: + print("L2_DIVERGENCE_BLOCK_NUMBER environment variable not set.") + os.exit(1) + +# The storage slot index where the array is stored (integer) +ARRAY_SLOT = 104 + +# Number of elements to fetch (optional limit if you don’t want to fetch all) +MAX_ELEMENTS = 100 + +abi = [ + { + "inputs": [], + "name": "l2BlockNumber", + "outputs": [{"internalType": "uint256", "name": "l2SequenceNumber_", "type": "uint256"}], + "stateMutability": "view", + "type": "function" + } +] + +# ------------------------------- +# Setup Web3 +# ------------------------------- + +w3 = Web3(Web3.HTTPProvider(RPC_URL)) + +if not w3.is_connected(): + print("Failed to connect to the Ethereum node.") + sys.exit(1) + +# ------------------------------- +# Helper functions +# ------------------------------- + +def keccak256(value: bytes) -> bytes: + """Compute keccak256 hash of given bytes.""" + return keccak(value) + +def get_storage_at(address, slot): + """Read raw 32-byte storage value from the given slot.""" + return w3.eth.get_storage_at(address, slot) + +def read_dispute_game_addresses(address, base_slot, max_elements=None, max_workers=10): + """ + Reads a dynamic array of addresses from storage in parallel threads. + """ + # 1️⃣ Read array length + length_data = get_storage_at(address, base_slot) + length = int.from_bytes(length_data, byteorder="big") + print(f"Total number of dispute games: {length}") + + if max_elements: + length = min(length, max_elements) + + # 2️⃣ Compute starting slot for elements: keccak256(p) + base_hash = keccak256(base_slot.to_bytes(32, byteorder="big")) + base_int = int.from_bytes(base_hash, byteorder="big") + + # 3️⃣ Prepare list of slots to read + slots = [base_int + i for i in range(length)] + + # 4️⃣ Worker function for fetching a single address + def fetch_address(i, slot): + value_bytes = get_storage_at(address, slot) + value_int = int.from_bytes(value_bytes, byteorder="big") + addr_hex = hex(value_int)[2:].rjust(64, "0")[-40:] + return i, Web3.to_checksum_address("0x" + addr_hex) + + # 5️⃣ Launch parallel reads + addresses = [None] * length + with ThreadPoolExecutor(max_workers=max_workers) as executor: + futures = [executor.submit(fetch_address, i, slot) for i, slot in enumerate(slots)] + for future in as_completed(futures): + i, addr = future.result() + addresses[i] = addr + print(f"Dispute Game Address [{i}]: {addr}") + + return addresses + +def filter_dispute_game_addresses_by_l2_divergence_block_number(addresses, l2_divergence_block_number, max_workers=10): + # 1️⃣ Worker function to fetch the l2 block number of a dispute game + def fetch_l2_block_number(i, DISPUTE_GAME_FACTORY): + contract = w3.eth.contract(address=DISPUTE_GAME_FACTORY, abi=abi) + l2_block_number = contract.functions.l2BlockNumber().call() + return i, DISPUTE_GAME_FACTORY, l2_block_number + + + # 2️⃣ Launch parallel reads + filtered_address = [None] * len(addresses) + with ThreadPoolExecutor(max_workers=max_workers) as executor: + futures = [executor.submit(fetch_l2_block_number, i, DISPUTE_GAME_FACTORY) for i, DISPUTE_GAME_FACTORY in enumerate(addresses)] + for future in as_completed(futures): + i, DISPUTE_GAME_FACTORY, l2_block_number = future.result() + filtered_address[i] = (DISPUTE_GAME_FACTORY, l2_block_number) + print(f"Dispute Game L2 Block Number: [{i}] {l2_block_number}") + + filtered_address = [x[0] for x in filtered_address if x is not None and x[1] >= l2_divergence_block_number] + return filtered_address + +def array_to_comma_seperated_string(array): + return ",".join(array) + +# ------------------------------- +# Run +# ------------------------------- +if __name__ == "__main__": + print(f"Reading array from contract {DISPUTE_GAME_FACTORY} at slot {ARRAY_SLOT}...") + addresses = read_dispute_game_addresses(DISPUTE_GAME_FACTORY, ARRAY_SLOT, max_elements=None) + addresses = filter_dispute_game_addresses_by_l2_divergence_block_number(addresses, L2_DIVERGENCE_BLOCK_NUMBER) + + print(f"\nFound {len(addresses)} dispute game addresses.") + print(f"\nADDRESSES_TO_BLACKLIST={array_to_comma_seperated_string(addresses)}") diff --git a/setup-templates/template-switch-to-permissioned-game-blacklist/script/requirements.txt b/setup-templates/template-switch-to-permissioned-game-blacklist/script/requirements.txt new file mode 100644 index 00000000..ca6f8ec0 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-blacklist/script/requirements.txt @@ -0,0 +1,2 @@ +web3>=6.0.0 +eth-hash>=0.5.2 diff --git a/setup-templates/template-switch-to-permissioned-game/.env b/setup-templates/template-switch-to-permissioned-game-retire/.env similarity index 91% rename from setup-templates/template-switch-to-permissioned-game/.env rename to setup-templates/template-switch-to-permissioned-game-retire/.env index 2c7d9882..a70fdcec 100644 --- a/setup-templates/template-switch-to-permissioned-game/.env +++ b/setup-templates/template-switch-to-permissioned-game-retire/.env @@ -11,7 +11,8 @@ OWNER_SAFE=0x09f7150D8c019BeF34450d6920f6B3608ceFdAf2 # Owner of Optimism Guardian Multisig OP_SECURITY_COUNCIL_SAFE=0xc2819DC788505Aac350142A7A707BF9D03E3Bd03 -SENDER=0x1822b35B09f5ce1C78ecbC06AC0A4e17885b925e # used to simulate +# used to simulate +SENDER=0x1822b35B09f5ce1C78ecbC06AC0A4e17885b925e # #Sepolia Config #SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194 diff --git a/setup-templates/template-switch-to-permissioned-game/Makefile b/setup-templates/template-switch-to-permissioned-game-retire/Makefile similarity index 100% rename from setup-templates/template-switch-to-permissioned-game/Makefile rename to setup-templates/template-switch-to-permissioned-game-retire/Makefile diff --git a/setup-templates/template-switch-to-permissioned-game/README.md b/setup-templates/template-switch-to-permissioned-game-retire/README.md similarity index 100% rename from setup-templates/template-switch-to-permissioned-game/README.md rename to setup-templates/template-switch-to-permissioned-game-retire/README.md diff --git a/setup-templates/template-switch-to-permissioned-game-retire/foundry.toml b/setup-templates/template-switch-to-permissioned-game-retire/foundry.toml new file mode 100644 index 00000000..7a443d45 --- /dev/null +++ b/setup-templates/template-switch-to-permissioned-game-retire/foundry.toml @@ -0,0 +1,20 @@ +[profile.default] +src = 'src' +out = 'out' +libs = ['lib'] +broadcast = 'records' +fs_permissions = [{ access = "read-write", path = "./" }] +optimizer = true +optimizer_runs = 200 +via-ir = false +remappings = [ + '@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/', + '@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', + '@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', + '@rari-capital/solmate/=lib/solmate/', + '@base-contracts/=lib/base-contracts', + 'solady/=lib/solady/src/', + '@lib-keccak/=lib/lib-keccak/contracts/lib', +] + +# See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol b/setup-templates/template-switch-to-permissioned-game-retire/script/SwitchToPermissionedGame.sol similarity index 100% rename from setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol rename to setup-templates/template-switch-to-permissioned-game-retire/script/SwitchToPermissionedGame.sol