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
|
|
@ -152,20 +152,23 @@ type StorageWrapper struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type TransactionData struct {
|
type TransactionData struct {
|
||||||
Type uint8 `json:"type"`
|
Type uint8 `json:"type"`
|
||||||
Nonce uint64 `json:"nonce"`
|
Nonce uint64 `json:"nonce"`
|
||||||
TxHash string `json:"txHash"`
|
TxHash string `json:"txHash"`
|
||||||
Gas uint64 `json:"gas"`
|
Gas uint64 `json:"gas"`
|
||||||
GasPrice *hexutil.Big `json:"gasPrice"`
|
GasPrice *hexutil.Big `json:"gasPrice"`
|
||||||
From common.Address `json:"from"`
|
GasTipCap *hexutil.Big `json:"gasTipCap"`
|
||||||
To *common.Address `json:"to"`
|
GasFeeCap *hexutil.Big `json:"gasFeeCap"`
|
||||||
ChainId *hexutil.Big `json:"chainId"`
|
From common.Address `json:"from"`
|
||||||
Value *hexutil.Big `json:"value"`
|
To *common.Address `json:"to"`
|
||||||
Data string `json:"data"`
|
ChainId *hexutil.Big `json:"chainId"`
|
||||||
IsCreate bool `json:"isCreate"`
|
Value *hexutil.Big `json:"value"`
|
||||||
V *hexutil.Big `json:"v"`
|
Data string `json:"data"`
|
||||||
R *hexutil.Big `json:"r"`
|
IsCreate bool `json:"isCreate"`
|
||||||
S *hexutil.Big `json:"s"`
|
AccessList AccessList `json:"accessList"`
|
||||||
|
V *hexutil.Big `json:"v"`
|
||||||
|
R *hexutil.Big `json:"r"`
|
||||||
|
S *hexutil.Big `json:"s"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewTransactionData returns a transaction that will serialize to the trace
|
// NewTransactionData returns a transaction that will serialize to the trace
|
||||||
|
|
@ -181,20 +184,23 @@ func NewTransactionData(tx *Transaction, blockNumber uint64, blockTime uint64, c
|
||||||
}
|
}
|
||||||
|
|
||||||
result := &TransactionData{
|
result := &TransactionData{
|
||||||
Type: tx.Type(),
|
Type: tx.Type(),
|
||||||
TxHash: tx.Hash().String(),
|
TxHash: tx.Hash().String(),
|
||||||
Nonce: nonce,
|
Nonce: nonce,
|
||||||
ChainId: (*hexutil.Big)(tx.ChainId()),
|
ChainId: (*hexutil.Big)(tx.ChainId()),
|
||||||
From: from,
|
From: from,
|
||||||
Gas: tx.Gas(),
|
Gas: tx.Gas(),
|
||||||
GasPrice: (*hexutil.Big)(tx.GasPrice()),
|
GasPrice: (*hexutil.Big)(tx.GasPrice()),
|
||||||
To: tx.To(),
|
GasTipCap: (*hexutil.Big)(tx.GasTipCap()),
|
||||||
Value: (*hexutil.Big)(tx.Value()),
|
GasFeeCap: (*hexutil.Big)(tx.GasFeeCap()),
|
||||||
Data: hexutil.Encode(tx.Data()),
|
To: tx.To(),
|
||||||
IsCreate: tx.To() == nil,
|
Value: (*hexutil.Big)(tx.Value()),
|
||||||
V: (*hexutil.Big)(v),
|
Data: hexutil.Encode(tx.Data()),
|
||||||
R: (*hexutil.Big)(r),
|
IsCreate: tx.To() == nil,
|
||||||
S: (*hexutil.Big)(s),
|
AccessList: tx.AccessList(),
|
||||||
|
V: (*hexutil.Big)(v),
|
||||||
|
R: (*hexutil.Big)(r),
|
||||||
|
S: (*hexutil.Big)(s),
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue