These are chat archives for Nethereum/Nethereum

2nd
Aug 2018
Enigmatic
@EnigmaticUnreal_twitter
Aug 02 2018 04:15

@userid2018 - Hmm. Even with a separate service/process/application you should be able to traverse through the past couple of blocks to retrieve the event logs. E.g. you could specify on your service to "read blocks from blocknumber = (block which contract had been deployed) to latest block, and return event DTOs".

Let me mock up an example later today... Had been busy with work for the past 24 hours or so.

Sergio Piedrahita
@spied001
Aug 02 2018 18:48
hi everyone, I am currently having some confusion, I have been testing some contract code in 2 development chains(one using truffle and another one is through geth on a private chain), I am using Nethereum.Portable.2.5.1. So I have this function on the contract code that when the sender address is not in a list of addresses it reverts. I am using SendTransactionAndWaitForReceiptAsync when calling the solidity method. When I run the code in truffle the revert is thrown and the exception is caught on the calling c# code, but when the code is ran and the network is ran using geth the revert does not happen and the transaction is submitted and the block is mined and I was expecting the transaction to not be included
because of the revert. has anyone ran into some similar issues?
Juan Blanco
@juanfranblanco
Aug 02 2018 19:56
Your transaction will be mined regardless
That is the expected behaviour, it will not throw
Although you can check the transaction receipt status to validate it failed.
Testrpc / ganache is for testing so the fact that you can get the error thrown is great for testing
Sergio Piedrahita
@spied001
Aug 02 2018 20:08
oh ok, but I am still confused about the different results with the same code, with truffle the C# code catches the revert, but with geth that never happens
Sergio Piedrahita
@spied001
Aug 02 2018 20:14
I was checking the status on the receipt when using geth and is empty, I will do more testing and post here the results
userid2018
@userid2018
Aug 02 2018 20:20
I have tried to look into samples but could not find anything equivalent to https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-events . I need to continously monitor the events raised by the contact methods and do some post processing
Juan Blanco
@juanfranblanco
Aug 02 2018 21:04
@spied001 on the normal chain there are no exceptions thrown, your code is executed and the transaction stored (gas also expent etc)
Or..
Are good examples
Or some samples better :)