These are chat archives for Nethereum/Nethereum

30th
May 2018
Kirankumar
@kiranbasvaraj
May 30 2018 06:35

Hi all,
i have a smart contract function which is returning uint256 array .but I have a problem in consuming that in client side .i am calling the function by marking output type as list<int>

ex:  Var res=function.call<list<int>>(input parameters);.                                                         
       But i am getting res as 0.                                               

Thanks in advance!

Juan Blanco
@juanfranblanco
May 30 2018 10:06
@WilcoBakker yes I have done a quick spike, but needs a good refactoring
I just haven't had time to get around it.
Marek Javůrek
@MarekJavurek
May 30 2018 10:20
Hi, how to get min,max,avg gas price from blockchain? Cand find any function in nethereum. Thx EDIT: should I use this? web3.Eth.GasPrice.SendRequestAsync()
Juan Blanco
@juanfranblanco
May 30 2018 10:20
@kiranbasvaraj that should be ok
@MarekJavurek gas price changes depending on load
Marek Javůrek
@MarekJavurek
May 30 2018 10:23
@juanfranblanco yep, I know...
Juan Blanco
@juanfranblanco
May 30 2018 10:23
You can calculate the average gas price based on previous blocks
There is not yet a generic function for this
Marek Javůrek
@MarekJavurek
May 30 2018 10:25
Ok, thx ;)
Marek Javůrek
@MarekJavurek
May 30 2018 10:44
Thanks again, this would be the sollution... var minGasprice = eth.web3.Eth.Blocks.GetBlockWithTransactionsByNumber.SendRequestAsync(blockNumber).Result.Transactions.Min(t => t.Value.Value); but I dont know if is that smart to chose lowest price... hmmm
Kirankumar
@kiranbasvaraj
May 30 2018 13:10
Thanks @juanfranblanco .I could able retrieve values from the smart contract function which is deployed in kovan network but same contract which is deployed in private network is not returning the values as expected may I know what is the issue with private network
Juan Blanco
@juanfranblanco
May 30 2018 13:58
@MarekJavurek get an average from previous blocks, I guess is best
Also set some threshold, if you have a service you might want to queue the requests until some "traffic jam" is over
@kiranbasvaraj it should not be any differences
the only issue I can think of is the data itself. Mainly it has not been set in a previous transaction hence your array returns 0 items
Enigmatic
@EnigmaticUnreal_twitter
May 30 2018 15:09
@MarekJavurek - Checked https://ethgasstation.info/ yet? :) They have a JSON feed which you can read (https://ethgasstation.info/json/ethgasAPI.json) to get some pretty accurate gas price estimates.
You can work with a few figures. An average/standard figure, a safe low (before your tx gets stucked), or a "fast" estimate which should confirm at most within a couple blocks.
Marek Javůrek
@MarekJavurek
May 30 2018 15:37
Thx... I have smartcontract and it consumes 0,8$ with current gas price cca 10 gwei... so I want to determine lowest posibble fee (confirmation time is not crucial to me) but I dont want to be "kicked" from mempool...
but thanks for help gyus
Adam Kagy
@ajkagy
May 30 2018 18:05
I can't seem to find anything on this, but what is the best way in Nethereum to decode input data on a transaction to a contract given an ABI?