Skip to content

Commit

Permalink
Config: Add Isthmus to Hard fork config
Browse files Browse the repository at this point in the history
add the upcoming Isthmus hard fork to config
  • Loading branch information
Vinod Damle committed Nov 18, 2024
1 parent a560627 commit 1a82752
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions superchain/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type HardForkConfiguration struct {
FjordTime *uint64 `json:"fjord_time,omitempty" toml:"fjord_time,omitempty"`
GraniteTime *uint64 `json:"granite_time,omitempty" toml:"granite_time,omitempty"`
HoloceneTime *uint64 `json:"holocene_time,omitempty" toml:"holocene_time,omitempty"`
IsthmusTime *uint64 `json:"isthmus_time,omitempty" toml:"isthmus_time,omitempty"`
}

type SuperchainLevel uint
Expand Down Expand Up @@ -265,6 +266,7 @@ func (c *ChainConfig) GenerateTOMLComments(ctx context.Context) (map[string]stri
createTimestampComment("fjord_time", c.FjordTime, comments)
createTimestampComment("granite_time", c.GraniteTime, comments)
createTimestampComment("holocene_time", c.HoloceneTime, comments)
createTimestampComment("isthmus_time", c.IsthmusTime, comments)

if c.StandardChainCandidate {
comments["standard_chain_candidate"] = "# This is a temporary field which causes most of the standard validation checks to run on this chain"
Expand Down
9 changes: 8 additions & 1 deletion superchain/superchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ op_contracts_manager_proxy_addr = "0xF564eEA7960EA244bfEbCBbB17858748606147bf"
canyon_time = 1
delta_time = 2
ecotone_time = 3
fjord_time = 4
granite_time = 5
holocene_time = 6
isthmus_time = 7
[l1]
chain_id = 314
Expand All @@ -223,7 +227,10 @@ ecotone_time = 3
require.Equal(t, uint64Ptr(uint64(1)), s.hardForkDefaults.CanyonTime)
require.Equal(t, uint64Ptr(uint64(2)), s.hardForkDefaults.DeltaTime)
require.Equal(t, uint64Ptr(uint64(3)), s.hardForkDefaults.EcotoneTime)
require.Nil(t, s.hardForkDefaults.FjordTime)
require.Equal(t, uint64Ptr(uint64(4)), s.hardForkDefaults.FjordTime)
require.Equal(t, uint64Ptr(uint64(5)), s.hardForkDefaults.GraniteTime)
require.Equal(t, uint64Ptr(uint64(6)), s.hardForkDefaults.HoloceneTime)
require.Equal(t, uint64Ptr(uint64(7)), s.hardForkDefaults.IsthmusTime)
}

func TestHardForkOverridesAndDefaults(t *testing.T) {
Expand Down

0 comments on commit 1a82752

Please sign in to comment.