These are chat archives for Nethereum/Nethereum

Nov 2018
Nov 16 2018 03:44

Ah @juanfranblanco - Regarding estimate not working, just sharing - Saw something similar on Ganache (6.1.8), under certain circumstances it underreports the number of gas it actually needs. Think it takes the GasUsed parameter from the receipt instead of the highest gas used excluding post transaction refunds.

So whenever I test that piece of code on Ganache I need to +500 gas. Works fine on geth/infura.

Offtopic though.

@Dwagga - harlow!
Nov 16 2018 07:15
Questions about yesterday request Infura node failure, through the protocol version (ServicePointManager. SecurityProtocol = SecurityProtocolType. Tls12;)Thank you ,How can we get the information of Token in the Nethereum through the contract address?By StandardTokenService?Each property value is then passed as a parameter and waits for the result
thanks!!! @juanfranblanco @EnigmaticUnreal_twitter
Nov 16 2018 07:36
@keepbreath - You can use StandardTokenService if it's a typical ERC20. All the properties of an ERC20 is defined already (
Alternatively, if you like pain like me, you can do something like (in VB):
Dim balanceOf = contract.GetFunction("balanceOf")
Dim myBalance As New HexBigInteger(Await balanceOf.CallAsync(Of BigInteger)(myAddress))
Nov 16 2018 07:44
hha,I am not familiar with VB(QAQ...) @EnigmaticUnreal_twitter
Nov 16 2018 07:47
I share the same pain in C#
                var web3 = new Web3(yourUrl);
                var contract = web3.Eth.GetContract(yourAbi, yourtokenAddress);
                var getSttFnc = contract.GetFunction("balanceOf");
                var balance = await getSttFnc.CallAsync<BigInteger>(queriedAddress);
Nov 16 2018 07:54
ahaha nice @Chinh-P
Juan Blanco
Nov 16 2018 09:31
@EnigmaticUnreal_twitter that is great info
re estimate and ganache thanks
maybe something to consider an auto up estimate by x amount
Nov 16 2018 10:57
I am trying to still pinpoint exactly where the issue happens, and once that's done I'll open an issue on Ganache's repo. :)