These are chat archives for Nethereum/Nethereum

14th
Aug 2018
Levin
@levin9
Aug 14 2018 03:38
@juanfranblanco ,thanks,The address has a space that causes the query balance to fail
Thank you for your CQS demo.
Enigmatic
@EnigmaticUnreal_twitter
Aug 14 2018 06:09

@spied001 - Hmm. Do you have a code snippet? EstimateGasAsync should work fine normally.

(was using EstimateGasAsync to deploy a contract with zero constructors)

Dim gas As HexBigInteger = Await iweb3.Eth.DeployContract.EstimateGasAsync(abi, bytecode, account.Address, Nothing)
Pavel D
@paveldz
Aug 14 2018 07:28
@EnigmaticUnreal_twitter Looks like this works. Thank you. But I hope the issue with strings will be fixed. I'll duplicate your temporary solution to created GitHub Issue
Juan Blanco
@juanfranblanco
Aug 14 2018 07:29
@levin9 glad you are sorted.. might be something to add to the validator
well more the formatter
Enigmatic
@EnigmaticUnreal_twitter
Aug 14 2018 07:33

@paveldz @juanfranblanco

I am thinking whether it is a bug or not to be fair. Seems to be taking the input as a string (as since bytes32 is limited to a single word of 32 chars). Unless we want to implicitly check if a string is a hex.

Juan Blanco
@juanfranblanco
Aug 14 2018 07:33
@spied001 you cannot pass a hex value
you have an unsigned byte
you need to use a byte or a uint
next thing bytes32 are treated as strings
so you need to use a byte array
you can use the extension HexToByteArray()
Michael Ilchuk
@Ilchuk-Mihail
Aug 14 2018 07:36

Hi.

Do you need create single rpc connection via Singleton ?
or need close connection after operation ?

Juan Blanco
@juanfranblanco
Aug 14 2018 07:36
This is historical (and might change in later versions) as strings originally where not supported in Ethereum / solidity and the only thing available was bytes32
@Ilchuk-Mihail The connections are managed by the client
rpc client (if using rpc)
Michael Ilchuk
@Ilchuk-Mihail
Aug 14 2018 07:38
I mean _web3 = new Web3(_config.RpcDaemonUrl);
Juan Blanco
@juanfranblanco
Aug 14 2018 07:38
yeah.. underneath you have this
an http client is kept in memory to avoid the issues with http
and later on the disposing cycle will take care of that
(well 2 httpclients are kept in memory an cycled to avoid DNS changes issues) for .net core
Michael Ilchuk
@Ilchuk-Mihail
Aug 14 2018 07:42
So , I can create one instance _web3 , and Nethereum manage it?
Juan Blanco
@juanfranblanco
Aug 14 2018 07:52
yeah that's about it
also if instantiated with an Account the NonceManager will be the same
I am thinking whether it is a bug or not to be fair. Seems to be taking the input as a string (as since bytes32 is limited to a single word of 32 chars). Unless we want to implicitly check if a string is a hex.
So sure that will be a big change,, accept hex for everything BUT strings :)
so no for 3.0.0 and more for 3.1.0..
Juan Blanco
@juanfranblanco
Aug 14 2018 07:58
Big change for users using bytes32 as a string..
Other fun areas are complex types and arrays
carlo perconti
@cryptoFT_gitlab
Aug 14 2018 13:00
Hello, is there any known issue using Netherum with Infura.io ? I am trying the simple sample to check the balance of an account but I am getting an RPC error exception using myweb3 = new Nethereum.Geth.Web3Geth("https://mainnet.infura.io/v3/xxxxxxxxxxxxx"); var balance = myweb3.Eth.GetBalance.SendRequestAsync("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"); balance.Wait(); InnerException = {"Error occurred when trying to send rpc requests(s)"} ? Can someone advise ?
Enigmatic
@EnigmaticUnreal_twitter
Aug 14 2018 14:20
Hmm. Which .NET Framework are you on? I tried your code using the Infura V3 standard and it seems to be fine...
Wondering if this could be due to targeting .NET Framework < 4.6 since Infura upgraded to TLS2
@cryptoFT_gitlab
carlo perconti
@cryptoFT_gitlab
Aug 14 2018 14:27
@EnigmaticUnreal_twitter i am currently compiling under 4.5.2
@EnigmaticUnreal_twitter thank you, you are right, it was the problem, by adding the following code I can skip the exception.
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3
| System.Net.SecurityProtocolType.Tls
| System.Net.SecurityProtocolType.Tls11
| System.Net.SecurityProtocolType.Tls12;
Pavel D
@paveldz
Aug 14 2018 14:31

Hi everyone
May be have a sense to mark this method as 'public'?
https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Signer/MessageSigner.cs#L60

I already saw situation when guys just copied code of this method into own solution and I'm doing this again

Or add such method to EthECDSASignature class
Juan Blanco
@juanfranblanco
Aug 14 2018 15:09
yes it does fit more on the Eth sig class
Pavel D
@paveldz
Aug 14 2018 15:11
I can submit a github issue and attach PR to this
Juan Blanco
@juanfranblanco
Aug 14 2018 15:12
Sure :)