File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,23 @@ func TestGetCustomL1ChainConfig_Missing(t *testing.T) {
5151 require .ErrorIs (t , err , ErrMissingChainConfig )
5252}
5353
54+ func TestGetCustomL1ChainConfig_KnownChainID (t * testing.T ) {
55+ knownChainIds := []eth.ChainID {
56+ eth .ChainIDFromUInt64 (1 ), // Mainnet
57+ eth .ChainIDFromUInt64 (11155111 ), // Sepolia
58+ eth .ChainIDFromUInt64 (17000 ), // Holesky
59+ eth .ChainIDFromUInt64 (560048 ), // Hoodi
60+ }
61+ for _ , chainID := range knownChainIds {
62+ cfg , err := L1ChainConfigByChainID (chainID )
63+ require .NoError (t , err )
64+ require .True (t , chainID .Cmp (eth .ChainIDFromBig (cfg .ChainID )) == 0 )
65+ }
66+ unknownChainId := eth .ChainIDFromUInt64 (11111 )
67+ _ , err := L1ChainConfigByChainID (unknownChainId )
68+ require .ErrorIs (t , err , ErrMissingChainConfig )
69+ }
70+
5471func TestGetCustomDependencySetConfig (t * testing.T ) {
5572 depSet , err := dependencySetByChainID (eth .ChainIDFromUInt64 (901 ), test .TestCustomChainConfigFS )
5673 require .NoError (t , err )
You can’t perform that action at this time.
0 commit comments