0

Refer to this link https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Tutorials/Nethereum.Tutorials.Account/AccountTransfer.cs

Line 55: It mentioned "The transaction receipt polling service is a simple utility service to poll for receipts until mined"

So, what can I do with the transactionReceipt received at line 61? I have checked almost every fields are null.

There is no mention about what to do if success or failed. Hope someone can help. Thanks in advance

2

You should get the transactionReceipt result that is something like this:

{
  "transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
  "transactionIndex": 0,
  "blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
  "blockNumber": 3,
  "contractAddress": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
  "cumulativeGasUsed": 314159,
  "gasUsed": 30234,
  "logs": [{
         // logs as returned by getFilterLogs, etc.
     }, ...],
  "status": "0x1"
}

What can you do with the receipt depends on your use case. For example here they used the receipt to get the contract address. The use case of the receipt is up to your needs, you can also check the gas used or calculate the transaction cost and so on. In other case you can just ignore the result or check if the status is not 0 (which indicate that the transaction is failed).

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.