mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
parent
2f116b3bc5
commit
b5dee527c4
1 changed files with 34 additions and 28 deletions
|
|
@ -157,12 +157,15 @@ type TransactionData struct {
|
|||
TxHash string `json:"txHash"`
|
||||
Gas uint64 `json:"gas"`
|
||||
GasPrice *hexutil.Big `json:"gasPrice"`
|
||||
GasTipCap *hexutil.Big `json:"gasTipCap"`
|
||||
GasFeeCap *hexutil.Big `json:"gasFeeCap"`
|
||||
From common.Address `json:"from"`
|
||||
To *common.Address `json:"to"`
|
||||
ChainId *hexutil.Big `json:"chainId"`
|
||||
Value *hexutil.Big `json:"value"`
|
||||
Data string `json:"data"`
|
||||
IsCreate bool `json:"isCreate"`
|
||||
AccessList AccessList `json:"accessList"`
|
||||
V *hexutil.Big `json:"v"`
|
||||
R *hexutil.Big `json:"r"`
|
||||
S *hexutil.Big `json:"s"`
|
||||
|
|
@ -188,10 +191,13 @@ func NewTransactionData(tx *Transaction, blockNumber uint64, blockTime uint64, c
|
|||
From: from,
|
||||
Gas: tx.Gas(),
|
||||
GasPrice: (*hexutil.Big)(tx.GasPrice()),
|
||||
GasTipCap: (*hexutil.Big)(tx.GasTipCap()),
|
||||
GasFeeCap: (*hexutil.Big)(tx.GasFeeCap()),
|
||||
To: tx.To(),
|
||||
Value: (*hexutil.Big)(tx.Value()),
|
||||
Data: hexutil.Encode(tx.Data()),
|
||||
IsCreate: tx.To() == nil,
|
||||
AccessList: tx.AccessList(),
|
||||
V: (*hexutil.Big)(v),
|
||||
R: (*hexutil.Big)(r),
|
||||
S: (*hexutil.Big)(s),
|
||||
|
|
|
|||
Loading…
Reference in a new issue