From c6e97d47f54d54adfa70974a8172b6f12bce0e78 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Mon, 18 Dec 2023 11:10:38 -0500 Subject: [PATCH] Update addresses on receipts and TX info Signed-off-by: Nicko Guyer --- pkg/ethereum/ethereum.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/ethereum/ethereum.go b/pkg/ethereum/ethereum.go index cd561884..2144730e 100644 --- a/pkg/ethereum/ethereum.go +++ b/pkg/ethereum/ethereum.go @@ -25,17 +25,17 @@ import ( // txReceiptJSONRPC is the receipt obtained over JSON/RPC from the ethereum client, with gas used, logs and contract address type TXReceiptJSONRPC struct { - BlockHash ethtypes.HexBytes0xPrefix `json:"blockHash"` - BlockNumber *ethtypes.HexInteger `json:"blockNumber"` - ContractAddress *ethtypes.Address0xHex `json:"contractAddress"` - CumulativeGasUsed *ethtypes.HexInteger `json:"cumulativeGasUsed"` - From *ethtypes.AddressWithChecksum `json:"from"` - GasUsed *ethtypes.HexInteger `json:"gasUsed"` - Logs []*LogJSONRPC `json:"logs"` - Status *ethtypes.HexInteger `json:"status"` - To *ethtypes.AddressWithChecksum `json:"to"` - TransactionHash ethtypes.HexBytes0xPrefix `json:"transactionHash"` - TransactionIndex *ethtypes.HexInteger `json:"transactionIndex"` + BlockHash ethtypes.HexBytes0xPrefix `json:"blockHash"` + BlockNumber *ethtypes.HexInteger `json:"blockNumber"` + ContractAddress *ethtypes.Address0xHex `json:"contractAddress"` + CumulativeGasUsed *ethtypes.HexInteger `json:"cumulativeGasUsed"` + From *ethtypes.Address0xHex `json:"from"` + GasUsed *ethtypes.HexInteger `json:"gasUsed"` + Logs []*LogJSONRPC `json:"logs"` + Status *ethtypes.HexInteger `json:"status"` + To *ethtypes.Address0xHex `json:"to"` + TransactionHash ethtypes.HexBytes0xPrefix `json:"transactionHash"` + TransactionIndex *ethtypes.HexInteger `json:"transactionIndex"` } // receiptExtraInfo is the version of the receipt we store under the TX. @@ -43,13 +43,13 @@ type TXReceiptJSONRPC struct { // - We omit fields already in the standardized cross-blockchain section // - We format numbers as decimals type ReceiptExtraInfo struct { - ContractAddress *ethtypes.AddressWithChecksum `json:"contractAddress"` - CumulativeGasUsed *fftypes.FFBigInt `json:"cumulativeGasUsed"` - From *ethtypes.AddressWithChecksum `json:"from"` - To *ethtypes.AddressWithChecksum `json:"to"` - GasUsed *fftypes.FFBigInt `json:"gasUsed"` - Status *fftypes.FFBigInt `json:"status"` - ErrorMessage *string `json:"errorMessage"` + ContractAddress *ethtypes.Address0xHex `json:"contractAddress"` + CumulativeGasUsed *fftypes.FFBigInt `json:"cumulativeGasUsed"` + From *ethtypes.Address0xHex `json:"from"` + To *ethtypes.Address0xHex `json:"to"` + GasUsed *fftypes.FFBigInt `json:"gasUsed"` + Status *fftypes.FFBigInt `json:"status"` + ErrorMessage *string `json:"errorMessage"` } // txInfoJSONRPC is the transaction info obtained over JSON/RPC from the ethereum client, with input data