From e032f1082e19dcf9e3b11755b009d73eb3ddaeff Mon Sep 17 00:00:00 2001 From: Ian Norden Date: Mon, 18 Nov 2019 14:18:38 -0600 Subject: [PATCH] add fields to RPCTransaction --- internal/ethapi/api.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 8f3a431e4..522bff511 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1181,6 +1181,8 @@ type RPCTransaction struct { To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` Value *hexutil.Big `json:"value"` + GasPremium *hexutil.Big `json:"gasPremium"` + FeeCap *hexutil.Big `json:"feeCap"` V *hexutil.Big `json:"v"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` @@ -1197,17 +1199,19 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber v, r, s := tx.RawSignatureValues() result := &RPCTransaction{ - From: from, - Gas: hexutil.Uint64(tx.Gas()), - GasPrice: (*hexutil.Big)(tx.GasPrice()), - Hash: tx.Hash(), - Input: hexutil.Bytes(tx.Data()), - Nonce: hexutil.Uint64(tx.Nonce()), - To: tx.To(), - Value: (*hexutil.Big)(tx.Value()), - V: (*hexutil.Big)(v), - R: (*hexutil.Big)(r), - S: (*hexutil.Big)(s), + From: from, + Gas: hexutil.Uint64(tx.Gas()), + GasPrice: (*hexutil.Big)(tx.GasPrice()), + Hash: tx.Hash(), + Input: hexutil.Bytes(tx.Data()), + Nonce: hexutil.Uint64(tx.Nonce()), + To: tx.To(), + Value: (*hexutil.Big)(tx.Value()), + GasPremium: (*hexutil.Big)(tx.GasPremium()), + FeeCap: (*hexutil.Big)(tx.FeeCap()), + V: (*hexutil.Big)(v), + R: (*hexutil.Big)(r), + S: (*hexutil.Big)(s), } if blockHash != (common.Hash{}) { result.BlockHash = &blockHash