Skip to content

Commit

Permalink
fix loading logic for nil pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Aug 27, 2024
1 parent 12442ab commit ee35946
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions params/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) {
}

optimism := OptimismConfig{
EIP1559Elasticity: chConfig.Optimism.EIP1559Elasticity,
EIP1559DenominatorCanyon: uint64ptr(*chConfig.Optimism.EIP1559DenominatorCanyon),
EIP1559Denominator: chConfig.Optimism.EIP1559Denominator,
EIP1559Elasticity: chConfig.Optimism.EIP1559Elasticity,
EIP1559Denominator: chConfig.Optimism.EIP1559Denominator,
}
if chConfig.Optimism.EIP1559DenominatorCanyon != nil {
optimism.EIP1559DenominatorCanyon = uint64ptr(*chConfig.Optimism.EIP1559DenominatorCanyon)
}

genesisActivation := uint64(0)
out := &ChainConfig{
ChainID: new(big.Int).SetUint64(chainID),
Expand Down

0 comments on commit ee35946

Please sign in to comment.