Skip to content
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

Config: Add Isthmus to Hard fork config #692

Merged
merged 1 commit into from
Nov 18, 2024
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
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
Loading