feat: initial add-game-type-v2 command#770
feat: initial add-game-type-v2 command#7700xiamflux merged 19 commits intosc-feat/opcm2-add-gametypev2-commandfrom
Conversation
* feat: upgrade op chain wip * feat: add deployv2 wip * fix: deployerv2 wip * refactor: remove additional V2 version of scripts * refactor: adds OPCM v2 support for UpgradeOPChain.s.sol * refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol * fix: uses correct json key for upgradeInput * fix: uses correct feature flag for OPCM v2 in devfeatures.go * chore: add json tag to ExtraInstruction --------- Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>
* feat: adds intermediary struct for op-deployer upgrade * chore: moved upgrade scripts to v6_0_0 * chore: remove v2 go scripts * refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2 * feat: add support for both OPCM v1 and v2 on embedded upgrade * refactor: make v6_0_0 fall back to v2_0_0 * refactor: add extra instructions for upgrade superchain input * test: fix op-deployer tests * chore: remove deploy OP chain test step * test: use systemconfig proxy address * fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer * refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2 * feat: add v6_0_0 upgrade * fix: check for 0 len OPChainConfigs
Conflicts: - pkg/deployer/integration_test/apply_test.go - pkg/deployer/integration_test/cli/upgrade_test.go
chore: sync sc-feat/opcm2-upgrade-op-chain with develop
chore: sync sc-feat/opcm2-upgrade-op-chain with develop
…-comments fix: opcm2 upgradeopchain comments
…radeOPChain (#768) * test: add missing extra instructions for OPCM v2 input * fix: add correct game type for cannon kona
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 16
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
0xOneTony
left a comment
There was a problem hiding this comment.
Do you think its worth adding a comment on the AddGameType solidity script that the script is not supported for OPCMv2 or something like that?
op-deployer/pkg/deployer/integration_test/cli/manage_add_game_type_v2_test.go
Show resolved
Hide resolved
op-deployer/pkg/deployer/integration_test/cli/manage_add_game_type_v2_test.go
Outdated
Show resolved
Hide resolved
| // TODO(#????): Update this to use an actual deployed OPCM V2 contract | ||
| t.Skip("Skipping until we have a deployed OPCM V2 contract") |
There was a problem hiding this comment.
how do we know if this test works though?
…ddgametypev2-command Conflicts: op-deployer/pkg/deployer/devfeatures.go packages/contracts-bedrock/test/opcm/UpgradeOPChain.t.sol packages/contracts-bedrock/test/opcm/UpgradeSuperchainConfig.t.sol
c3a8fd6
into
sc-feat/opcm2-add-gametypev2-command
| "enabled": true, | ||
| "initBond": "0x0", | ||
| "gameType": 0, | ||
| "gameArgs": "0x" |
There was a problem hiding this comment.
Bug: Test data JSON uses incompatible hex format for big.Int
The test data file uses hex-formatted strings "0x0" for initBond and "0x" for gameArgs, but Go's standard JSON unmarshaling for *big.Int expects decimal strings (not hex), and []byte expects base64-encoded strings (not hex). If this config file is used with json.Unmarshal, parsing will fail. While this file isn't currently referenced in tests, it would cause runtime errors if used as example configuration.
…timism#18660) * feat: initial add-game-type-v2 command (#770) * WIP: opcmv2 upgrade op chain (#752) * feat: upgrade op chain wip * feat: add deployv2 wip * fix: deployerv2 wip * refactor: remove additional V2 version of scripts * refactor: adds OPCM v2 support for UpgradeOPChain.s.sol * refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol * fix: uses correct json key for upgradeInput * fix: uses correct feature flag for OPCM v2 in devfeatures.go * chore: add json tag to ExtraInstruction --------- Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com> * feat: adds intermediary struct for op-deployer upgrade (#759) * feat: adds intermediary struct for op-deployer upgrade * chore: moved upgrade scripts to v6_0_0 * chore: remove v2 go scripts * refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2 * feat: add support for both OPCM v1 and v2 on embedded upgrade * refactor: make v6_0_0 fall back to v2_0_0 * refactor: add extra instructions for upgrade superchain input * test: fix op-deployer tests * chore: remove deploy OP chain test step * test: use systemconfig proxy address * fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer * refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2 * feat: add v6_0_0 upgrade * fix: check for 0 len OPChainConfigs * chore: pre-pr ready * Merge pull request #764 from defi-wonderland/fix/opcm2-upgradeopchain-comments fix: opcm2 upgradeopchain comments * refactor: remove enshrined v7_0_0 upgrade in op-deployer (#766) * test: use correct game type and pass correct extra instruction to UpgradeOPChain (#768) * test: add missing extra instructions for OPCM v2 input * fix: add correct game type for cannon kona * feat: initial add-game-type-v2 command * test: add tests for ShouldAllowV1 flag * refactor: remove shouldAllowV1 flag * chore: remove unused private key flag from the add game type v2 command * chore: remove skipping upgrade test * chore: name changes and comments * chore: update usage description add-game-type-v2 * test: update add-game-type-opcm-v2 tests --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com> * chore: opcm2 addgametypev2 comments (#780) * chore: move ABI types to lib file * chore: move hardcoded values to constants file * refactor: make abi_types use MustType * test: deploys OPCM v2 for use during CLI testing (#784) * test: deploys OPCM v2 for use during CLI testing * chore: reference a github issue for TODO * test: add assertions on the output of add game type command * test: update cli tests (#792) * chore: Address review comments (#793) * refactor: remove re-declared flags from add-game-type v2 * chore: remove irrelevant TODO * refactor: rename "add-game-type-opcm-v2" command to "add-game-type-v2" * test: add cache dir check for add-game-type-v2 * test: removes cache dir files check on e2e test (#794) --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
Note
Adds OPCM v2-aware upgrade flow and scripts, introduces
manage add-game-type-opcm-v2CLI, and updates tests/e2e to support both v1 and v2 with extra instructions.manage add-game-type-opcm-v2(aliases embedded upgrader) with--config,--override-artifacts-url, and--outfileflags.UpgradeOPChainInputnow supports both v1chainConfigsand v2upgradeInput(withDisputeGameConfig,ExtraInstruction).UpgradeSuperchainConfigInput.extraInstructions.UpgradeOPChain.s.solandUpgradeSuperchainConfig.s.solnow auto-detect OPCM v1/v2 via dev feature flag and delegate to version-specific DummyCallers (V1/V2).AddGameType.s.solclarified as v1-only.EncodedChainConfigs→ChainConfigs).Written by Cursor Bugbot for commit e4da83a. This will update automatically on new commits. Configure here.