diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 06203d7a3f..bebb7b4aed 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -881,7 +881,7 @@ type CallError struct { // SimulateBlockResult represents the result of a simulated block. type SimulateBlockResult struct { - Number uint64 `json:"number"` + Number *big.Int `json:"number"` Hash common.Hash `json:"hash"` Timestamp uint64 `json:"timestamp"` GasLimit uint64 `json:"gasLimit"` @@ -892,7 +892,7 @@ type SimulateBlockResult struct { } type simulateBlockResultMarshaling struct { - Number hexutil.Uint64 + Number *hexutil.Big Timestamp hexutil.Uint64 GasLimit hexutil.Uint64 GasUsed hexutil.Uint64 diff --git a/ethclient/gen_simulate_block_result.go b/ethclient/gen_simulate_block_result.go index d3f712d102..b8cd6ebf2f 100644 --- a/ethclient/gen_simulate_block_result.go +++ b/ethclient/gen_simulate_block_result.go @@ -15,7 +15,7 @@ var _ = (*simulateBlockResultMarshaling)(nil) // MarshalJSON marshals as JSON. func (s SimulateBlockResult) MarshalJSON() ([]byte, error) { type SimulateBlockResult struct { - Number hexutil.Uint64 `json:"number"` + Number *hexutil.Big `json:"number"` Hash common.Hash `json:"hash"` Timestamp hexutil.Uint64 `json:"timestamp"` GasLimit hexutil.Uint64 `json:"gasLimit"` @@ -25,7 +25,7 @@ func (s SimulateBlockResult) MarshalJSON() ([]byte, error) { Calls []SimulateCallResult `json:"calls"` } var enc SimulateBlockResult - enc.Number = hexutil.Uint64(s.Number) + enc.Number = (*hexutil.Big)(s.Number) enc.Hash = s.Hash enc.Timestamp = hexutil.Uint64(s.Timestamp) enc.GasLimit = hexutil.Uint64(s.GasLimit) @@ -39,7 +39,7 @@ func (s SimulateBlockResult) MarshalJSON() ([]byte, error) { // UnmarshalJSON unmarshals from JSON. func (s *SimulateBlockResult) UnmarshalJSON(input []byte) error { type SimulateBlockResult struct { - Number *hexutil.Uint64 `json:"number"` + Number *hexutil.Big `json:"number"` Hash *common.Hash `json:"hash"` Timestamp *hexutil.Uint64 `json:"timestamp"` GasLimit *hexutil.Uint64 `json:"gasLimit"` @@ -53,7 +53,7 @@ func (s *SimulateBlockResult) UnmarshalJSON(input []byte) error { return err } if dec.Number != nil { - s.Number = uint64(*dec.Number) + s.Number = (*big.Int)(dec.Number) } if dec.Hash != nil { s.Hash = *dec.Hash