From b516acfef0c06e36f41f742b25122ff96c77afc3 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Fri, 17 Aug 2018 23:51:05 +0100 Subject: [PATCH] Add receipt object --- nimbus/rpc/rpc_types.nim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nimbus/rpc/rpc_types.nim b/nimbus/rpc/rpc_types.nim index b32d2cb61..665081b0e 100644 --- a/nimbus/rpc/rpc_types.nim +++ b/nimbus/rpc/rpc_types.nim @@ -88,3 +88,20 @@ type topics*: array[4, Hash256] # array of 0 to 4 32 Bytes DATA of indexed log arguments. # (In solidity: The first topic is the hash of the signature of the event. # (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.) + + ReceiptObject* = object + # A transaction receipt object, or null when no receipt was found: + transactionHash*: UInt256 # hash of the transaction. + transactionIndex*: int # integer of the transactions index position in the block. + blockHash*: UInt256 # hash of the block where this transaction was in. + blockNumber*: int # block number where this transaction was in. + sender*: EthAddress # address of the sender. + to*: ref EthAddress # address of the receiver. null when its a contract creation transaction. + cumulativeGasUsed*: int # the total amount of gas used when this transaction was executed in the block. + gasUsed*: int # the amount of gas used by this specific transaction alone. + contractAddress*: EthAddress # the contract address created, if the transaction was a contract creation, otherwise null. + logs*: seq[LogObject] # TODO: See Wiki for details. list of log objects, which this transaction generated. + logsBloom*: BloomFilter # bloom filter for light clients to quickly retrieve related logs. + root*: UInt256 # post-transaction stateroot (pre Byzantium). + status*: int # 1 = success, 0 = failure. +