Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ func TestEndToEndBootstrapApplyWithUpgrade(t *testing.T) {
devFeature common.Hash
}{
{"default", common.Hash{}},
{"deploy-v2-disputegames", deployer.DeployV2DisputeGamesDevFlag},
{"cannon-kona", deployer.EnableDevFeature(deployer.DeployV2DisputeGamesDevFlag, deployer.CannonKonaDevFlag)},
{"opcm-v2", deployer.OpcmV2DevFlag},
}
for _, tt := range tests {
Expand Down Expand Up @@ -916,26 +914,6 @@ func runEndToEndBootstrapAndApplyUpgradeTest(t *testing.T, afactsFS foundry.Stat
})
}

func mustEncodeGameArgs(absolutePrestate common.Hash, proposer, challenger common.Address) []byte {
// Use Ethereum ABI encoding for the game args
// In Solidity, abi.encode(MyStruct{...}) encodes the struct fields as a tuple
// For FaultDisputeGameConfig: abi.encode((bytes32)) = 32 bytes
// For PermissionedDisputeGameConfig: abi.encode((bytes32,address,address)) = 96 bytes (3 * 32)

if proposer == (common.Address{}) {
// FaultDisputeGameConfig: abi.encode((bytes32 absolutePrestate))
// This is just the raw bytes32 value (32 bytes)
return absolutePrestate[:]
}
// PermissionedDisputeGameConfig: abi.encode((bytes32,address,address))
// This is 96 bytes: bytes32 + address (left-padded to 32) + address (left-padded to 32)
result := make([]byte, 96)
copy(result[0:32], absolutePrestate[:])
copy(result[44:64], proposer[:]) // address at offset 32, left-padded (12 zero bytes + 20 address bytes)
copy(result[76:96], challenger[:]) // address at offset 64, left-padded (12 zero bytes + 20 address bytes)
return result
}

func needsSuperchainConfigUpgrade(
ctx context.Context,
client *ethclient.Client,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v6_0_0
package v7_0_0

import (
"encoding/json"
Expand Down Expand Up @@ -97,7 +97,7 @@ func Upgrade(host *script.Host, input UpgradeOPChainInput) error {
// We need to check which of the two versions of the input we are using.
var encodedUpgradeInput []byte
var encodedError error
if input.UpgradeInputV2 == nil && input.ChainConfigs == nil {
if input.UpgradeInputV2 == nil && len(input.ChainConfigs) == 0 {
return fmt.Errorf("failed to read either an upgrade input or config array")
} else if input.UpgradeInputV2 != nil {
encodedUpgradeInput, encodedError = input.EncodedUpgradeInputV2()
Expand Down Expand Up @@ -128,7 +128,7 @@ func (u *Upgrader) Upgrade(host *script.Host, input json.RawMessage) error {
}

func (u *Upgrader) ArtifactsURL() string {
// TODO: Add an actual resource locator that points to this set of artifacts.
// TODO(#18633): Add an actual resource locator that points to this set of artifacts.
return artifacts.CreateHttpLocator("")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v6_0_0
package v7_0_0

import (
"encoding/hex"
Expand Down