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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v7_0_0
package embedded

import (
"encoding/hex"
Expand Down Expand Up @@ -60,3 +60,29 @@ func TestUpgradeOPChainInput_UpgradeInput(t *testing.T) {

require.Equal(t, expected, hex.EncodeToString(data))
}

func TestUpgradeOPChainInput_OpChainConfigs(t *testing.T) {
input := &UpgradeOPChainInput{
Prank: common.Address{0xaa},
Opcm: common.Address{0xbb},
ChainConfigs: []OPChainConfig{
{
SystemConfigProxy: common.Address{0x01},
CannonPrestate: common.Hash{0xaa},
CannonKonaPrestate: common.Hash{0xbb},
},
},
}
data, err := input.EncodedOpChainConfigs()

require.NoError(t, err)
require.NotEmpty(t, data)

expected := "0000000000000000000000000000000000000000000000000000000000000020" + // offset to array
"0000000000000000000000000000000000000000000000000000000000000001" + // array.length
"0000000000000000000000000100000000000000000000000000000000000000" + // systemConfigProxy
"aa00000000000000000000000000000000000000000000000000000000000000" + // cannonPrestate
"bb00000000000000000000000000000000000000000000000000000000000000" // cannonKonaPrestate

require.Equal(t, expected, hex.EncodeToString(data))
}
135 changes: 0 additions & 135 deletions op-deployer/pkg/deployer/upgrade/v7_0_0/upgrade.go

This file was deleted.