These are chat archives for Nethereum/Nethereum

25th
Oct 2017
Juan Blanco
@juanfranblanco
Oct 25 2017 10:39
if you are using geth
you can check on the console and vaidate if is syncing
just type eth
and you will have a method / function "syncing"
true / false
ChinhP
@Chinh-P
Oct 25 2017 11:01
currently, I'm facing a weird bug on deploy my contract
Juan Blanco
@juanfranblanco
Oct 25 2017 11:01
yep
ChinhP
@Chinh-P
Oct 25 2017 11:01
into my private chain
  1. if I use truffle to deploy, it's success
and all functions can be called
then I use Nethereum and using web3.Eth.DeployContract.SendRequestAsync, it return deployed address without exception
Juan Blanco
@juanfranblanco
Oct 25 2017 11:03
have you use
ChinhP
@Chinh-P
Oct 25 2017 11:03
but can not use any functions inside
Juan Blanco
@juanfranblanco
Oct 25 2017 11:03
getCode
ChinhP
@Chinh-P
Oct 25 2017 11:03
like
var getOneFunction = contract.GetFunction("getOne");
var one = await getOneFunction.CallAsync<int>();
Juan Blanco
@juanfranblanco
Oct 25 2017 11:03
to validate if the deployment was succesful?
Eth.GetCode.SendRequestAsync("Address")
top of my head
if it returns 0x it might have failed
probably not enough gas
ChinhP
@Chinh-P
Oct 25 2017 11:04
I use 900000 gas
var trx = await web3.Eth.DeployContract.SendRequestAsync(JackpotAbi, JackpotByteCode, Constant.SenderAdd, new HexBigInteger(900000), new HexBigInteger(Web3.Convert.ToWei(10)));
Juan Blanco
@juanfranblanco
Oct 25 2017 11:05
well use Eth.GetCode
and validate that
ChinhP
@Chinh-P
Oct 25 2017 11:05
yes, let me check
probably not enough gas
It makes sense, because when I comment out some functions, it becomes success again :)
Juan Blanco
@juanfranblanco
Oct 25 2017 11:06
yes that is normally the case
the storage size
ChinhP
@Chinh-P
Oct 25 2017 11:08
if it returns 0x it might have failed
yes
it returns 0x
Juan Blanco
@juanfranblanco
Oct 25 2017 11:08
ok so had happened is that the transaction was succesful
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:08
@juanfranblanco
eth.syncing - false (it was lauched for many hours, so sync had enough time)
Juan Blanco
@juanfranblanco
Oct 25 2017 11:08
you got an address
but the deployment failed
ChinhP
@Chinh-P
Oct 25 2017 11:09
Ic
Juan Blanco
@juanfranblanco
Oct 25 2017 11:09
like you said add more gas
@usernameisalreadytaken1236428934
ok
so it is synced :)
if you have remove the sync fast, then you should in theory get historical data
ChinhP
@Chinh-P
Oct 25 2017 11:09
event if the deployment failed, they also created an address?
Juan Blanco
@juanfranblanco
Oct 25 2017 11:10
yes
correct
which is a good way to verify if it failed by getting the code
afterwards
but yes very confusing
ChinhP
@Chinh-P
Oct 25 2017 11:10
noted.
previously, I also faced the not enough gas, but that time it throw an exception
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:11
and this confusing me, Mist - everything works fine, events in a right format and my solution through Nethereum - empty logs or "low level" events
Juan Blanco
@juanfranblanco
Oct 25 2017 11:12
well if you are getting something through Mist
then you should get something
can you post a snippet
actually you did :D
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:13
I can try to listen network traffic via Wireshark but it takes much time and Wireshark is pretty uncomfartable to read or copy json
Juan Blanco
@juanfranblanco
Oct 25 2017 11:14
one thing to note you are not going to get all the changes in the whole blockchain through filters
have you tried a smaller range?
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:15
no, only whole blockchain
Juan Blanco
@juanfranblanco
Oct 25 2017 11:15
well try a range you know
that you will get results
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:16
but when I using range, I'm getting events with fileds like here https://rinkeby.etherscan.io/tx/0x32d1728aad555e71ed4b5b1917506c158184cfe707bb925f7e53932d26ddb3aa
when I'm using CreateFilterAsync and GetAllChanges or GetFilterChanges I can't set range
Juan Blanco
@juanfranblanco
Oct 25 2017 11:18
you have already above, on your filter input
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 11:20
I write down 2 ways which I try, I using range only in first
look all the overloads
have a go, and let me know how it goes
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 25 2017 12:41
finally! problem was in range, you was right! from 0 - 0 results, from 1,000,000 - 7 results and correctly parsed
it's weird
Juan Blanco
@juanfranblanco
Oct 25 2017 13:32
@usernameisalreadytaken1236428934 awesome :)