|
|
@ -16,11 +16,11 @@ var _ = (*stEnvMarshaling)(nil) |
|
|
|
// MarshalJSON marshals as JSON.
|
|
|
|
// MarshalJSON marshals as JSON.
|
|
|
|
func (s stEnv) MarshalJSON() ([]byte, error) { |
|
|
|
func (s stEnv) MarshalJSON() ([]byte, error) { |
|
|
|
type stEnv struct { |
|
|
|
type stEnv struct { |
|
|
|
Coinbase common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"` |
|
|
|
Coinbase common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"` |
|
|
|
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"` |
|
|
|
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"` |
|
|
|
GasLimit math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"` |
|
|
|
GasLimit math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"` |
|
|
|
Number math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Number math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Timestamp math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
Timestamp math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"` |
|
|
|
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"` |
|
|
|
Ommers []ommer `json:"ommers,omitempty"` |
|
|
|
Ommers []ommer `json:"ommers,omitempty"` |
|
|
|
BaseFee *math.HexOrDecimal256 `json:"currentBaseFee,omitempty"` |
|
|
|
BaseFee *math.HexOrDecimal256 `json:"currentBaseFee,omitempty"` |
|
|
@ -40,11 +40,11 @@ func (s stEnv) MarshalJSON() ([]byte, error) { |
|
|
|
// UnmarshalJSON unmarshals from JSON.
|
|
|
|
// UnmarshalJSON unmarshals from JSON.
|
|
|
|
func (s *stEnv) UnmarshalJSON(input []byte) error { |
|
|
|
func (s *stEnv) UnmarshalJSON(input []byte) error { |
|
|
|
type stEnv struct { |
|
|
|
type stEnv struct { |
|
|
|
Coinbase *common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"` |
|
|
|
Coinbase *common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"` |
|
|
|
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"` |
|
|
|
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"` |
|
|
|
GasLimit *math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"` |
|
|
|
GasLimit *math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"` |
|
|
|
Number *math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Number *math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"` |
|
|
|
Timestamp *math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
Timestamp *math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"` |
|
|
|
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"` |
|
|
|
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"` |
|
|
|
Ommers []ommer `json:"ommers,omitempty"` |
|
|
|
Ommers []ommer `json:"ommers,omitempty"` |
|
|
|
BaseFee *math.HexOrDecimal256 `json:"currentBaseFee,omitempty"` |
|
|
|
BaseFee *math.HexOrDecimal256 `json:"currentBaseFee,omitempty"` |
|
|
|