These are chat archives for Nethereum/Nethereum

21st
Dec 2017
Ganesh Prasad Kumble
@0zAND1z
Dec 21 2017 06:20
@juanfranblanco Is there a workbook for fetching the key pair of a geth account? Also, wondering if the solution is scalable to Infura environment. :) :+1:
Juan Blanco
@juanfranblanco
Dec 21 2017 07:43
yes works from Infura
needs to be indexed
@kggp1995
l-vitall
@l-vitall
Dec 21 2017 09:45
@juanfranblanco nor qlique or ganache works well with test contract from EventFilterWith2Topics.cs v2.2.3. Both shows 'Error: Number can only safely store up to 53 bits' when trying to call 'multiply event. As far as I understood it is because of 'string indexed hello' argument of MultipliedLog event. Looks like string arguments cannot be indexed (it works if I delete 'indexed' word)
Juan Blanco
@juanfranblanco
Dec 21 2017 09:51
yes
strings cannot be indexed
as they are dynamic
you get a hash of the string as the result
so if you want to filter for a string, you need use the hash of it
if you don't need to filter it don't index it
SORRY I meant strings can be indexed but not decoded as a utf8 string
that runs ok on clique just tripple checked now (i do run all the tests anyway all the time ;) )
@l-vitall ^^
l-vitall
@l-vitall
Dec 21 2017 10:05
@juanfranblanco yes, sorry, c# works. Method call of 'multiply' fails if it is called from truffle console both for clique and ganache. Now checking c# with ganache
Juan Blanco
@juanfranblanco
Dec 21 2017 10:06
ahh
Ill let Tim know
well actually if you can let me know what happens with Ganache it will be a complete report
actually I will test it myself too
l-vitall
@l-vitall
Dec 21 2017 10:10
currently I see ''Unable to convert the result to type Nethereum.RPC.Eth.DTOs.TransactionReceipt' error on GetTransactionReceipt.SendRequestAsync(transaction7)
checking that it is not my mistake )
Details: Unable to cast object of type 'System.Int64' to type 'System.String'.
Juan Blanco
@juanfranblanco
Dec 21 2017 10:15
yes same error
let me debug
l-vitall
@l-vitall
Dec 21 2017 10:16
ok, let me know the result please
Juan Blanco
@juanfranblanco
Dec 21 2017 10:16
the issue is on the status field
it is treated in the receipt as a string as opposed to an int
it has not even got to the point of the event
l-vitall
@l-vitall
Dec 21 2017 10:18
looks like I saw the same issue with testRPC
in geth it is an int
ill let them know
l-vitall
@l-vitall
Dec 21 2017 10:25
ok, thanks! Please write the ticket number here if you will have any. It would be good to use Ganache for development
Juan Blanco
@juanfranblanco
Dec 21 2017 10:25
yeah let me do further investigation
ah.. yes they are returning the status as a number as opposed to a HexValue
l-vitall
@l-vitall
Dec 21 2017 10:28
so nethereum patch is needed?
Juan Blanco
@juanfranblanco
Dec 21 2017 10:28
no it shouldnt
the standard is that everything in eth core rpc should be a hex
l-vitall
@l-vitall
Dec 21 2017 10:29
I see. Waiting for fix from them : )
Juan Blanco
@juanfranblanco
Dec 21 2017 10:30
i am validating if for some reason the world has gone mad and this field is an integer
Juan Blanco
@juanfranblanco
Dec 21 2017 10:40
trufflesuite/ganache-cli#451
Ok submitted, yes simpler to keep track as opposed to mention it.
l-vitall
@l-vitall
Dec 21 2017 10:43
ok, thanks!
Juan Blanco
@juanfranblanco
Dec 21 2017 10:45
when that is fixed we can move to the next bug, the events
and report it
(it will be easier to decode it whilst debugging)
l-vitall
@l-vitall
Dec 21 2017 11:00
isn't it the truffle issue? Clique has it also when used by truffle
Juan Blanco
@juanfranblanco
Dec 21 2017 11:01
oh yes the event may be a truffle issue and a ganache issue too
if events are not handled correctly in one side
most probably arent in the other side
although I don't know what you are using truffle for in this scenerio
as it might be just web3js
l-vitall
@l-vitall
Dec 21 2017 11:03
just with same contract from EventFilterWith2Topics.cs v2.2.3. Migrate it and call the 'multiply' method
Juan Blanco
@juanfranblanco
Dec 21 2017 11:04
so how does it fail in both ways with truffle?
Are you decoding the event there?
Are you integrating testing the event in javascript?
l-vitall
@l-vitall
Dec 21 2017 11:08
no, it fails on the method call from truffle console.
Steps:
  1. truffle(ganache)> migrate
  2. truffle(ganache)> var c = test.at(test.address)
    truffle(ganache)> c.address
    '0x345ca3e014aaf5dca488057592ee47305d9b3e10'
    truffle(ganache)> c.multiply(18)
    Error: Number can only safely store up to 53 bits
very simple scenario
it gets fixed if I remove 'indexed' of hello argument of MultipliedLog event
same for clique
Juan Blanco
@juanfranblanco
Dec 21 2017 11:12
ok that might be an issue from web3js
truffle generates a contract wrapper (same as when you code generate in c#)
but the underlying implementation is web3js
oh sorry just checked your code
you are testing
then it might be the inner code
l-vitall
@l-vitall
Dec 21 2017 11:16
Should I create an issue on this for truffle team?
Juan Blanco
@juanfranblanco
Dec 21 2017 11:16
yes i was going to suggest that
l-vitall
@l-vitall
Dec 21 2017 11:16
ok
CΔGIN
@cagindonmez_twitter
Dec 21 2017 13:42
hey everyone, I'm working on building a wallet-like functionality. Does anyone know the right way to track incoming pending transactions to my addresses? And possibly keep track of how many confirmations the transactions have? I did this in bitcoin using C# Nbitcoin but can't figure out how to do this for Ethereum. It's worth mentioning
that I'm also running a testnet full node for RPC and websockets.
l-vitall
@l-vitall
Dec 21 2017 13:54
@cagindonmez_twitter I used https://etherscan.io/apis for checking balances, it seems like it can also return transactions
CΔGIN
@cagindonmez_twitter
Dec 21 2017 13:54
@l-vitall yeah but I don't want to rely on a 3rd party, is there a better way to do it with my own copy of the blockchain?
Juan Blanco
@juanfranblanco
Dec 21 2017 14:04
@cagindonmez_twitter you can create a pending TransactionsFilter
and from there get the information
(an example)
CΔGIN
@cagindonmez_twitter
Dec 21 2017 14:07
@juanfranblanco So of if I want to constantly listen to pending transactions for my addresses, I basically have make calls for that filter and run it in a loop? That's sounds extremely inefficient.
Juan Blanco
@juanfranblanco
Dec 21 2017 14:08
well if you are sending a transaction you know it is pending
so you can wait for the receipt
at intervals
this is the simple thing i am doing for the wallet
CΔGIN
@cagindonmez_twitter
Dec 21 2017 14:09
@juanfranblanco I'm not the one sending, I'm looking for transactions that will come my addresses, and I don't know when this will occur
Juan Blanco
@juanfranblanco
Dec 21 2017 14:09
but if you want to know what pending transactions are all the time you have a filter
then yes
you will want to examine each block
or you can use parity filter
(if using parity)
CΔGIN
@cagindonmez_twitter
Dec 21 2017 14:13
allright, I'll look into that, thanks for all the help!
Michael Herman (Toronto)
@mwherman2000
Dec 21 2017 15:51
If I'm sending parameters to a method in a Contract, can I also send "extra data"? ...or do they both use the same Data member in TransactionInput?
Alex-Gorbach
@Alex-Gorbach
Dec 21 2017 16:38
Hello.
I have installed web3, geth and launched a private network clique. I'm trying to deploy a contract and call the "set" method from it. But the code execution is stopped by unlocking the account:
"var unlockAccountResult = await web3.Personal.UnlockAccount.SendRequestAsync (owner, password, 120);".
Does anyone know why this can happen?
Deployment: https://github.com/Alex-Gorbach/POE-DApp/blob/master/Proof-of-Existence/POE.WEB/Nethereum/ContractService.cs
Juan Blanco
@juanfranblanco
Dec 21 2017 16:40
@mwherman2000 they use the same
@Alex-Gorbach you don't need to unlock the account if using the clique (batch file) it is already unlocked
also you don't need to mine either it is setup to do it automatically (create blocks)
Alex-Gorbach
@Alex-Gorbach
Dec 21 2017 16:48
Thanks!
TarrahArshad
@TarrahArshad
Dec 21 2017 22:18
@juanfranblanco hi juan
i need generate ether wallet , can u help me