Add MaxFeePerGas and MaxPriorityFeePerGas to TransferView
This commit is contained in:
parent
9f9f00b7a2
commit
c78eac8d94
|
@ -26,6 +26,8 @@ func castToTransferView(t Transfer) TransferView {
|
||||||
view.BlockHash = t.BlockHash
|
view.BlockHash = t.BlockHash
|
||||||
view.Timestamp = hexutil.Uint64(t.Timestamp)
|
view.Timestamp = hexutil.Uint64(t.Timestamp)
|
||||||
view.GasPrice = (*hexutil.Big)(t.Transaction.GasPrice())
|
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.GasLimit = hexutil.Uint64(t.Transaction.Gas())
|
||||||
view.GasUsed = hexutil.Uint64(t.Receipt.GasUsed)
|
view.GasUsed = hexutil.Uint64(t.Receipt.GasUsed)
|
||||||
view.Nonce = hexutil.Uint64(t.Transaction.Nonce())
|
view.Nonce = hexutil.Uint64(t.Transaction.Nonce())
|
||||||
|
@ -80,22 +82,24 @@ func parseLog(ethlog *types.Log) (from, to common.Address, amount *big.Int) {
|
||||||
// TransferView stores only fields used by a client and ensures that all relevant fields are
|
// TransferView stores only fields used by a client and ensures that all relevant fields are
|
||||||
// encoded in hex.
|
// encoded in hex.
|
||||||
type TransferView struct {
|
type TransferView struct {
|
||||||
ID common.Hash `json:"id"`
|
ID common.Hash `json:"id"`
|
||||||
Type TransferType `json:"type"`
|
Type TransferType `json:"type"`
|
||||||
Address common.Address `json:"address"`
|
Address common.Address `json:"address"`
|
||||||
BlockNumber *hexutil.Big `json:"blockNumber"`
|
BlockNumber *hexutil.Big `json:"blockNumber"`
|
||||||
BlockHash common.Hash `json:"blockhash"`
|
BlockHash common.Hash `json:"blockhash"`
|
||||||
Timestamp hexutil.Uint64 `json:"timestamp"`
|
Timestamp hexutil.Uint64 `json:"timestamp"`
|
||||||
GasPrice *hexutil.Big `json:"gasPrice"`
|
GasPrice *hexutil.Big `json:"gasPrice"`
|
||||||
GasLimit hexutil.Uint64 `json:"gasLimit"`
|
MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"`
|
||||||
GasUsed hexutil.Uint64 `json:"gasUsed"`
|
MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"`
|
||||||
Nonce hexutil.Uint64 `json:"nonce"`
|
GasLimit hexutil.Uint64 `json:"gasLimit"`
|
||||||
TxStatus hexutil.Uint64 `json:"txStatus"`
|
GasUsed hexutil.Uint64 `json:"gasUsed"`
|
||||||
Input hexutil.Bytes `json:"input"`
|
Nonce hexutil.Uint64 `json:"nonce"`
|
||||||
TxHash common.Hash `json:"txHash"`
|
TxStatus hexutil.Uint64 `json:"txStatus"`
|
||||||
Value *hexutil.Big `json:"value"`
|
Input hexutil.Bytes `json:"input"`
|
||||||
From common.Address `json:"from"`
|
TxHash common.Hash `json:"txHash"`
|
||||||
To common.Address `json:"to"`
|
Value *hexutil.Big `json:"value"`
|
||||||
Contract common.Address `json:"contract"`
|
From common.Address `json:"from"`
|
||||||
NetworkID uint64
|
To common.Address `json:"to"`
|
||||||
|
Contract common.Address `json:"contract"`
|
||||||
|
NetworkID uint64
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue