These are chat archives for Nethereum/Nethereum

19th
Nov 2018
skosara
@skosara1_twitter
Nov 19 2018 10:40
@juanfranblanco I'm having project where we can possibly have a lot of pending smart contracts transactions (all types, contract deployment, read only txs, regular state change txs) on one account, but sometimes when we try to have multiple at the same time we receive "gas required exceeds allowance". We are using one instance of web3 and we are maintaining nonce in memory in order to have always correct nonce of next transaction (can this have downsides if there are a lot of pending transactions and some of them fails and is not mined?) Also we are using Nethereum 2.5.1, did something change in RC regarding this things? Cheers
Juan Blanco
@juanfranblanco
Nov 19 2018 13:14
@skosara1_twitter hmm what client are you using? geth / parity..
skosara
@skosara1_twitter
Nov 19 2018 13:44
@juanfranblanco i assume Nethereum uses geth by default?
i use default one
Juan Blanco
@juanfranblanco
Nov 19 2018 13:47
@skosara1_twitter you will have to install it / execute it
or are you pointing to infura
RJ Catalano
@VoR0220
Nov 19 2018 17:37
Hi @juanfranblanco , I'm used to the web3.js version of the RPC but due to work am exploring the Nethereum stack. I just had a couple questions. First, does this currently have support for websockets? Second, if it does, or does not, is it possible for Nethereum contract wrappers to fire on an event and for me to read the event in real time?
Juan Blanco
@juanfranblanco
Nov 19 2018 17:41
hey @VoR0220
RJ Catalano
@VoR0220
Nov 19 2018 17:41
Hi hi hi
Juan Blanco
@juanfranblanco
Nov 19 2018 17:41
no there are no subscriptions for geth implemented yet
on the long TODO
RJ Catalano
@VoR0220
Nov 19 2018 17:42
Okay. That's good to know. How would one go about implementing it?
Juan Blanco
@juanfranblanco
Nov 19 2018 17:43
the simplest thing is to use filters
RJ Catalano
@VoR0220
Nov 19 2018 17:44
Right I know how to use filters but the problem is I'm trying to build an event watcher that simply looks at the chain and then reacts to events fired from the chain to interact with external objects
Juan Blanco
@juanfranblanco
Nov 19 2018 17:44
ok..
RJ Catalano
@VoR0220
Nov 19 2018 17:44
what would be the best way to implement this for Nethereum? (I'm asking because if it's doable I'll work on this and send a PR up)
this is a wip
RJ Catalano
@VoR0220
Nov 19 2018 17:46
cool. Let me take a look through it and see what you got cooking :)
thanks for your time.
Juan Blanco
@juanfranblanco
Nov 19 2018 17:47
it may not be exactly what you want, as this mainly loops the chain blocks / transactions / transactions receipts
and from there you can get the logs
and publish them
other than that yeah adding subscriptions to geth (if you are only interested in a couple of contracts, or filters) might be simpler with an observable on top
i have to port one I did for Ujo too
failing all that :D
get a PR going
RJ Catalano
@VoR0220
Nov 19 2018 17:51
good to know. I'll see what I can do. I'm a noob in C# land so we'll see what I can get done.
Dave Whiffin
@Dave-Whiffin
Nov 19 2018 17:53
@VoR0220 I am doing a POC for event enumeration / processing at the moment. It’s on the block chain processing project Juan mentioned above. The use case is almost exactly as you describe. I’ll be pushing to the master branch tomorrow. It’ll be easy to inject your own handlers for the events.
RJ Catalano
@VoR0220
Nov 19 2018 17:53
That is awesome @Dave-Whiffin . I eagerly await your PR.
Dave Whiffin
@Dave-Whiffin
Nov 19 2018 17:55
It is the start of the Ujo port Juan mentioned.
RJ Catalano
@VoR0220
Nov 19 2018 17:55
Should be interesting. I'm doing this for a Hotpotato game I have in my inventory. Works in JS, want to prove that it can work as I want in C#.
Juan Blanco
@juanfranblanco
Nov 19 2018 18:01
also if you are just interested in a couple of events
if you do a polling with observables and timer for your filters
or just get logs for a block range (which is what Dave is porting)
that could do the trick
this is how events are handled here
RJ Catalano
@VoR0220
Nov 19 2018 18:02
Oh wow. Thank you. You guys have been awesome.
you can actually execute that documentation using workbooks
all our tests use these testchains
(with a preconfigured account)
RJ Catalano
@VoR0220
Nov 19 2018 18:06
my coworker is sitting across from me with some Xamarin experience and is excited. Good stuff.
^^