-
Notifications
You must be signed in to change notification settings - Fork 318
feat: Add Task Template for Switching Base to a Permissioned Game and Retiring Existing Dispute Games #434
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
base: main
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
jackchuma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the root readme with instructions on using this template similar to how the other templates are introduced?
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
setup-templates/template-switch-to-permissioned-game/script/SwitchToPermissionedGame.sol
Outdated
Show resolved
Hide resolved
|
It'd be ideal if this could integrate with the task signer tool as well. Can see an example here: https://github.com/base/contract-deployments/tree/jack/task-signer-tool-demo/mainnet/2025-11-03-test-upgrade |
|
|
||
| .PHONY: run-script | ||
| run-script: | ||
| cd $(SIGNER_TOOL_PATH); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be an empty validations/ directory added to the root of this task sub-directory, otherwise this error occurs when running make gen-validation:
119 | const sdc = new StateDiffClient();
120 | const { result } = await sdc.simulate(opts.rpcUrl, forgeCmdParts, workdir);
121 |
122 | if (opts.out) {
123 | const outPath = path.resolve(process.cwd(), opts.out);
124 | writeFileSync(outPath, JSON.stringify(result, null, 2) + '\n');
^
ENOENT: no such file or directory, open '/Users/user/contract-deployments/mainnet/2025-11-07-switch-to-permissioned-game/validations/op-signer.json'
path: "/Users/user/contract-deployments/mainnet/2025-11-07-switch-to-permissioned-game/validations/op-signer.json",
syscall: "open",
errno: -2,
code: "ENOENT"
at main (/Users/user/contract-deployments/mainnet/2025-11-07-switch-to-permissioned-game/signer-tool/scripts/genValidationFile.ts:124:5)
| cd $(SIGNER_TOOL_PATH); \ | |
| mkdir validations; \ | |
| cd $(SIGNER_TOOL_PATH); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 19 and 20 need to switch order (as in my example above), since the validations/ sub-directory must exist at the task's root.
Approved review 3428335944 from jackchuma is now dismissed due to new commit. Re-request for approval.
| This template is used to switch Base to a Permissioned Game. | ||
|
|
||
| 1. Ensure you have followed the instructions above in `setup`. | ||
| 1. Run `mmake setup-switch-to-permissioned-game network=<network>` and go to the folder that was created by this command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Run `mmake setup-switch-to-permissioned-game network=<network>` and go to the folder that was created by this command. | |
| 1. Run `make setup-switch-to-permissioned-game network=<network>` and go to the folder that was created by this command. |
|
|
||
| ### 3. Open the UI at [http://localhost:3000](http://localhost:3000) | ||
|
|
||
| ### 4. Send signature to facilitator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### 4. Send signature to facilitator | |
| ### 4. Send signature to facilitator | |
| You may now kill the Signer Tool process in your terminal window by running `Ctrl + C`. |
|
|
||
| .PHONY: run-script | ||
| run-script: | ||
| cd $(SIGNER_TOOL_PATH); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 19 and 20 need to switch order (as in my example above), since the validations/ sub-directory must exist at the task's root.
| bun run scripts/genValidationFile.ts --rpc-url $(L1_RPC_URL) \ | ||
| --workdir .. --forge-cmd 'forge script --rpc-url $(L1_RPC_URL) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we already created the RPC_URL variable in this file:
| bun run scripts/genValidationFile.ts --rpc-url $(L1_RPC_URL) \ | |
| --workdir .. --forge-cmd 'forge script --rpc-url $(L1_RPC_URL) \ | |
| bun run scripts/genValidationFile.ts --rpc-url $(RPC_URL) \ | |
| --workdir .. --forge-cmd 'forge script --rpc-url $(RPC_URL) \ |
| /// @notice This script updates the respectedGameType and retires existing games in the AnchorStateRegistry. | ||
| contract SwitchToPermissionedGame is MultisigScript { | ||
| // TODO: Confirm expected version | ||
| string public constant EXPECTED_VERSION = "1.4.1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this EXPECTED_VERSION variable used?
This PR introduces a way for us to switch base to a permissioned game and retire existing dispute games.
This will require signatures from the OP security council