These are chat archives for Nethereum/Nethereum

4th
Jul 2018
Juan Blanco
@juanfranblanco
Jul 04 2018 04:15
yes I am using 2018, i guess is the reference to the latest Unity library
what a red herring
that is rather annoying too as I don't want to force the upgrade of any project
Cdpopham
@Cdpopham
Jul 04 2018 08:31
@juanfranblanco I am having a heck of a time getting a transaction to broadcast on infura - my post: https://ethereum.stackexchange.com/questions/52635/nethereum-infura-rpcclients
Juan Blanco
@juanfranblanco
Jul 04 2018 08:37
@Cdpopham
Cdpopham
@Cdpopham
Jul 04 2018 08:37
Hi
Juan Blanco
@juanfranblanco
Jul 04 2018 08:38
one thing at at time...
everything thing that you are doing is correct
but you may consider estimating your gas
before hand
Mohammad Rafey
@MohammadRafey
Jul 04 2018 08:40
Yes am doing that also.
Cdpopham
@Cdpopham
Jul 04 2018 08:40
@juanfranblanco Ya.. i thought so. Ive been using your, great lib for a while.. No issues ith a real geth node.. but im scramlbing to get it working cus of some issues with what was supposed to be my production geth node
Mohammad Rafey
@MohammadRafey
Jul 04 2018 08:40
its working for other scenarios but only this scenario is not generating event.
Juan Blanco
@juanfranblanco
Jul 04 2018 08:41
apologies @MohammadRafey but lets get the @Cdpopham sorted (where possible)
Mohammad Rafey
@MohammadRafey
Jul 04 2018 08:41
ah sure :)
Juan Blanco
@juanfranblanco
Jul 04 2018 08:41
and i can spend some time with you
Mohammad Rafey
@MohammadRafey
Jul 04 2018 08:43
sure
Juan Blanco
@juanfranblanco
Jul 04 2018 08:43
if you look at this example
Cdpopham
@Cdpopham
Jul 04 2018 08:44
?
i need to find it :)
ill explain in your issue
also i can see the price is too low
already
Cdpopham
@Cdpopham
Jul 04 2018 08:48
Really? i tried it all the way up to 120
Juan Blanco
@juanfranblanco
Jul 04 2018 08:48
it needs to be converted from gwei
check that sample
ill take you through it there
Cdpopham
@Cdpopham
Jul 04 2018 08:49
Yep.. digesting it. things i got it
kinda'
Ive used your lib in 3 MVPs now.. YOu have a ton of functionality hidden
Juan Blanco
@juanfranblanco
Jul 04 2018 08:52
Give me 5 min and Ill explain you there :)
Anthony Leong
@acidfreako
Jul 04 2018 08:57
hi guys just checking to see if anyone has problem reading event logs using nethereum from local ganache beofre ?
Cdpopham
@Cdpopham
Jul 04 2018 09:00
@juanfranblanco I could kiss you
Does your org that supports nethereum have a donation address?
Juan Blanco
@juanfranblanco
Jul 04 2018 09:14
@Cdpopham ha ha thanks, this is the answer https://ethereum.stackexchange.com/questions/52635/nethereum-infura-rpcclients/52652#52652, hopefully it makes sense
Consensys supports Nethereum so there is not a donation address :)
@acidfreako there is an issue at the moment and it seems to be related to that, I have not had time to test it myself with ganache
@MohammadRafey i am jumping to a meeting ill have a look at your stuff later on
Mohammad Rafey
@MohammadRafey
Jul 04 2018 09:16
@juanfranblanco sure thanks.
Anthony Leong
@acidfreako
Jul 04 2018 09:22
Thanks @juanfranblanco
Btw love your work . Like the GetData method with fuzzy logic of covering data types . Saves me a lot of time
Mohammad Rafey
@MohammadRafey
Jul 04 2018 09:48
@juanfranblanco - I think the got the issue in my code. Its working now. Thanks Juan for all the help.
AlexxanderLuthor
@AlexxanderLuthor
Jul 04 2018 10:41
silly question (maybe) - can we post jpegs here ? if so - quick "how" please.
@juanfranblanco brilliant thanks.
AlexxanderLuthor
@AlexxanderLuthor
Jul 04 2018 10:50
smartbox-screenshot.png
interacts with (multiple) smart contracts. create store access wallets (on device so wallets-not-secure).
pre-installed game "unlocks" if the user has x amount of y cryptocurrency. (erc20).
will be "beta-ready" two days.
Juan Blanco
@juanfranblanco
Jul 04 2018 11:42
@MohammadRafey Glad you are sorted :) Not that I did much
That is really cool @AlexxanderLuthor looking forward to see it, and very interesting concept
Thanks @acidfreako :)
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 12:00
@juanfranblanco Hi. What about IsValidEthereumAddress function ? You update it ?
Juan Blanco
@juanfranblanco
Jul 04 2018 12:47
Oh that conversation we had?
No as the original chat was not correct
The only thing that was
valid was the regex
Mainly the checksum is just a visual thing
I will actually put that now, and some gwei helper extension for pricing on the contract messages
Juan Blanco
@juanfranblanco
Jul 04 2018 12:52
Hopefully that might help
Juan Blanco
@juanfranblanco
Jul 04 2018 13:57
@acidfreako Ganache and Events .. @AlexxanderLuthor has checked and validated it is an issue with Ganache https://github.com/Nethereum/Nethereum/issues/364#issuecomment-402458137
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 13:59

@juanfranblanco It's correct for now ?

```       
    private bool IsValidEthereumAddress(string address)
    {
        var addressUtil = new AddressUtil();

        return addressUtil.IsValidAddressLength(address) && addressUtil.IsChecksumAddress(address);
    }

```

Address is valid without 0x ?
Juan Blanco
@juanfranblanco
Jul 04 2018 14:34
i would remove the checksumaddress
the 0x depends
on the situation
better have it than don't
but when encoding obviously is removed anyway
when is used in rpc
nethereum ensures the prefix is present on hex strings
only thing is the alphanumeric part of the regex
which is not there
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 14:39
You mean only using regex?
Juan Blanco
@juanfranblanco
Jul 04 2018 14:47
give 2 minutes ill checkin something now
im running some tests for that
check the latest
Nethereum/Nethereum@1c03e0c
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 14:59
Looks good. I'm worry whether it's appropriate to use regex, and about the performance.
Juan Blanco
@juanfranblanco
Jul 04 2018 15:07
yes you could do a simple startswith("0x"), ValidateLength which is already there
and IsLetterOrDigit
for all chars
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 15:10
I think that will use what will be in NEthereum.Utils :)
You updated nuget package ?
Juan Blanco
@juanfranblanco
Jul 04 2018 15:36
no that will take a while
you can use the continuous integration packages
from myget
Michael Ilchuk
@Ilchuk-Mihail
Jul 04 2018 15:38
How to do it?
Juan Blanco
@juanfranblanco
Jul 04 2018 15:39
if you are only going to use this change I would not recommend it at the moment
as i am going through some changes
but.. mainly the feed is
just add it to visual studio nuget sources
also it is currently broken anyway the CI
build
you can check the status in the readme page
eximarus
@eximarus
Jul 04 2018 19:18
hello I am using Netherum with unity and Im always getting a socket exception when I try to call a contract function asynchronously(not using the unity rpc) on the main net. localhost works fine. has anyone had issues with this?
Juan Blanco
@juanfranblanco
Jul 04 2018 19:19
what is the error
are you connecting to infura?
are you using ssl?
  //code snippet for ssl connections
        ServicePointManager.ServerCertificateValidationCallback += delegate (object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
            if (sslPolicyErrors == SslPolicyErrors.RemoteCertificateChainErrors)
            {
                foreach (X509ChainStatus status in chain.ChainStatus)
                {
                    if (status.Status != X509ChainStatusFlags.PartialChain)
                    {
                        return false;
                    }
                }
                return true;
            }
            return false;
        };
you might need this if so
eximarus
@eximarus
Jul 04 2018 19:26
the exception said the socket is not connected and that there is no address or something. im tying to connect to "https://mainnet.infura.io" and I dont know if im using ssl tbh sorry^^
but ill try that snippet
Juan Blanco
@juanfranblanco
Jul 04 2018 19:27
yes it think that will be the issue
eximarus
@eximarus
Jul 04 2018 19:33
hmm that didnt seem to work. I made sure to add the delegate before i call the contractFunction
Juan Blanco
@juanfranblanco
Jul 04 2018 19:36
yes that should be set as a global setting (when the application starts)
what version of .net are you targetting?
eximarus
@eximarus
Jul 04 2018 19:36
4.x
Juan Blanco
@juanfranblanco
Jul 04 2018 19:36
it should be 4.61 so it should have support for tsl2
try this too ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
eximarus
@eximarus
Jul 04 2018 19:38
kk
didnt help either
Juan Blanco
@juanfranblanco
Jul 04 2018 19:41
hmm ran out of ideas
eximarus
@eximarus
Jul 04 2018 19:41
ill see if i can reproduce it in an empty project
eximarus
@eximarus
Jul 04 2018 19:51
ye same problem in the empty project
Juan Blanco
@juanfranblanco
Jul 04 2018 19:58
ok ill have a look at it tomorrow
eximarus
@eximarus
Jul 04 2018 20:00
i can make a repo with the setup im using if that helps
Juan Blanco
@juanfranblanco
Jul 04 2018 20:03
yes that will be great as it might be something different
what version are you using?
eximarus
@eximarus
Jul 04 2018 20:05
2.5.1
unity 2018.1