diff --git a/core/gen_genesis.go b/core/gen_genesis.go index 1dcced1a8cb652fc2e0ddc4a7f11077888709d81..f5a3f5b4be7845e866a623050a1a33782ee66dbc 100644 --- a/core/gen_genesis.go +++ b/core/gen_genesis.go @@ -30,7 +30,7 @@ func (g Genesis) MarshalJSON() ([]byte, error) { Number math.HexOrDecimal64 `json:"number"` GasUsed math.HexOrDecimal64 `json:"gasUsed"` ParentHash common.Hash `json:"parentHash"` - BaseFee *big.Int `json:"baseFee"` + BaseFee *math.HexOrDecimal256 `json:"baseFee"` } var enc Genesis enc.Config = g.Config @@ -50,7 +50,7 @@ func (g Genesis) MarshalJSON() ([]byte, error) { enc.Number = math.HexOrDecimal64(g.Number) enc.GasUsed = math.HexOrDecimal64(g.GasUsed) enc.ParentHash = g.ParentHash - enc.BaseFee = g.BaseFee + enc.BaseFee = (*math.HexOrDecimal256)(g.BaseFee) return json.Marshal(&enc) } @@ -69,7 +69,7 @@ func (g *Genesis) UnmarshalJSON(input []byte) error { Number *math.HexOrDecimal64 `json:"number"` GasUsed *math.HexOrDecimal64 `json:"gasUsed"` ParentHash *common.Hash `json:"parentHash"` - BaseFee *big.Int `json:"baseFee"` + BaseFee *math.HexOrDecimal256 `json:"baseFee"` } var dec Genesis if err := json.Unmarshal(input, &dec); err != nil { @@ -118,7 +118,7 @@ func (g *Genesis) UnmarshalJSON(input []byte) error { g.ParentHash = *dec.ParentHash } if dec.BaseFee != nil { - g.BaseFee = dec.BaseFee + g.BaseFee = (*big.Int)(dec.BaseFee) } return nil } diff --git a/core/genesis.go b/core/genesis.go index d14b75da1771672600ac6dc8842d12a2039d0b59..f478df4230c6bb13dfd30f12480c85f596eaf8ad 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -98,6 +98,7 @@ type genesisSpecMarshaling struct { GasUsed math.HexOrDecimal64 Number math.HexOrDecimal64 Difficulty *math.HexOrDecimal256 + BaseFee *math.HexOrDecimal256 Alloc map[common.UnprefixedAddress]GenesisAccount }