Add MaxFeePerGas and MaxPriorityFeePerGas to TransferView

This commit is contained in:
Roman Volosovskyi 2021-08-12 19:41:42 +03:00
parent 9f9f00b7a2
commit c78eac8d94
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 23 additions and 19 deletions

View File

@ -1 +1 @@
0.83.7
0.83.8

View File

@ -26,6 +26,8 @@ func castToTransferView(t Transfer) TransferView {
view.BlockHash = t.BlockHash
view.Timestamp = hexutil.Uint64(t.Timestamp)
view.GasPrice = (*hexutil.Big)(t.Transaction.GasPrice())
view.MaxFeePerGas = (*hexutil.Big)(t.Transaction.GasFeeCap())
view.MaxPriorityFeePerGas = (*hexutil.Big)(t.Transaction.GasTipCap())
view.GasLimit = hexutil.Uint64(t.Transaction.Gas())
view.GasUsed = hexutil.Uint64(t.Receipt.GasUsed)
view.Nonce = hexutil.Uint64(t.Transaction.Nonce())
@ -87,6 +89,8 @@ type TransferView struct {
BlockHash common.Hash `json:"blockhash"`
Timestamp hexutil.Uint64 `json:"timestamp"`
GasPrice *hexutil.Big `json:"gasPrice"`
MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"`
MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"`
GasLimit hexutil.Uint64 `json:"gasLimit"`
GasUsed hexutil.Uint64 `json:"gasUsed"`
Nonce hexutil.Uint64 `json:"nonce"`