diff --git a/core/types/gen_receipt_json.go b/core/types/gen_receipt_json.go index 1f10aadfc0..d83be14477 100644 --- a/core/types/gen_receipt_json.go +++ b/core/types/gen_receipt_json.go @@ -25,7 +25,7 @@ func (r Receipt) MarshalJSON() ([]byte, error) { TxHash common.Hash `json:"transactionHash" gencodec:"required"` ContractAddress common.Address `json:"contractAddress"` GasUsed hexutil.Uint64 `json:"gasUsed" gencodec:"required"` - EffectiveGasPrice *big.Int `json:"effectiveGasPrice"` + EffectiveGasPrice *hexutil.Big `json:"effectiveGasPrice"` BlockHash common.Hash `json:"blockHash,omitempty"` BlockNumber *hexutil.Big `json:"blockNumber,omitempty"` TransactionIndex hexutil.Uint `json:"transactionIndex"` @@ -40,7 +40,7 @@ func (r Receipt) MarshalJSON() ([]byte, error) { enc.TxHash = r.TxHash enc.ContractAddress = r.ContractAddress enc.GasUsed = hexutil.Uint64(r.GasUsed) - enc.EffectiveGasPrice = r.EffectiveGasPrice + enc.EffectiveGasPrice = (*hexutil.Big)(r.EffectiveGasPrice) enc.BlockHash = r.BlockHash enc.BlockNumber = (*hexutil.Big)(r.BlockNumber) enc.TransactionIndex = hexutil.Uint(r.TransactionIndex) @@ -59,7 +59,7 @@ func (r *Receipt) UnmarshalJSON(input []byte) error { TxHash *common.Hash `json:"transactionHash" gencodec:"required"` ContractAddress *common.Address `json:"contractAddress"` GasUsed *hexutil.Uint64 `json:"gasUsed" gencodec:"required"` - EffectiveGasPrice *big.Int `json:"effectiveGasPrice"` + EffectiveGasPrice *hexutil.Big `json:"effectiveGasPrice"` BlockHash *common.Hash `json:"blockHash,omitempty"` BlockNumber *hexutil.Big `json:"blockNumber,omitempty"` TransactionIndex *hexutil.Uint `json:"transactionIndex"` @@ -101,7 +101,7 @@ func (r *Receipt) UnmarshalJSON(input []byte) error { } r.GasUsed = uint64(*dec.GasUsed) if dec.EffectiveGasPrice != nil { - r.EffectiveGasPrice = dec.EffectiveGasPrice + r.EffectiveGasPrice = (*big.Int)(dec.EffectiveGasPrice) } if dec.BlockHash != nil { r.BlockHash = *dec.BlockHash diff --git a/core/types/receipt.go b/core/types/receipt.go index 4f8a660cc3..687d25ccab 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -76,6 +76,7 @@ type receiptMarshaling struct { PostState hexutil.Bytes Status hexutil.Uint64 CumulativeGasUsed hexutil.Uint64 + EffectiveGasPrice *hexutil.Big GasUsed hexutil.Uint64 BlockNumber *hexutil.Big TransactionIndex hexutil.Uint