These are chat archives for Nethereum/Nethereum

8th
Feb 2019
Ronald Lino
@RonLino
Feb 08 10:26
Hi again, I have developed some smart contracts (solidity) and I am working on Nethereum to intereact with the smart contracts, I am using Infura API. Almost all the functionality works fine, however I have a problem with Events, when I try to create a filter on Nethereum, I get the error: “the method eth_newFilter does not exists”.
I have googled, and I think the problem is Infura, that does not support “eth_newfilter” and similar methods. Is there a workaround to listen the events of a smart contract from Nethereum+ Infura?
EgorovOleg
@EgorovOleg
Feb 08 13:13
Hi, how to get all the address transactions using the public key?
Juan Blanco
@juanfranblanco
Feb 08 13:33
@RonLino Infura does not suppot event filters you need to use GetLogs
Ronald Lino
@RonLino
Feb 08 16:04
Thank you Juan. I am googling an example of GetLogs + Nethereum, but all the doc is related to event filters. Are there any link to do this?
Sorry GetAllChanges
"Contract Filters and Event Logs
Another way to access the event logs of a smart contract is to either get all changes of the logs (providing a filter message) or create filters and retrieve changes which apply to our filter message periodically.\ \ To access the logs, first of all, we need to create a transfer event handler for our contract address, and Evend definition.(TransferEventDTO)."
Check the example in the doc
@EgorovOleg You need to index those transactions, or you can use parity trace_filter
index = process the blockchain to get the data, check the blockchain processor for that
Inuka Gunawardana
@inuka_g_gitlab
Feb 08 16:17
@juanfranblanco for the proxy issue I tried to compare eth_sendTransaction data with that of netherium (I used an ManagedAccount) I used though eht_sendTransaction transaction bytecode is equivalent to personal_sendTransaction. The two were different for the same address.
@juanfranblanco Is there a way for me to get the transction byte code generated from a contract wrapper? I tried going throug the source couldnt figure it out. Was thinking of grabging it and passing it to the proxy contract directly through the contract handler as eth_sendTransaction call. Thanks
Ronald Lino
@RonLino
Feb 08 16:26
Thank you very much Juan, This works. I had already seen this example, but I believed that the method CreateFilterInput were also not supported by Infura.
Juan Blanco
@juanfranblanco
Feb 08 16:45
CreateFilterInput creates the message to GetAllChanges
@inuka_g_gitlab have you tried this with Geth or Parity?
Ganache when started it gives you a private key try using that instead, that might be the cause of the issue
as I don't know how Ganache manages the personal_sendTransaction
and apologies I have not had much time to look into it ill have a look now again :)
Inuka Gunawardana
@inuka_g_gitlab
Feb 08 16:49
@juanfranblanco Thanks I will try it out. I have not tried Geth or Partiy let me try it out as well. I assumed that since it works with truffle through ganache it should work with netherium. I am actually using that private key at account[0] to as the account. Will give it a shot and keep you updated. Thanks again for your help.
Juan Blanco
@juanfranblanco
Feb 08 16:49
oh that should be the same then
but always worth a try
when i checked your code i did not see the proxy there, (in the .net part) is it already deployed?
and you are connecting through the proxy?
Juan Blanco
@juanfranblanco
Feb 08 16:57
@inuka_g_gitlab mainly where is the proxy address is configured?
Inuka Gunawardana
@inuka_g_gitlab
Feb 08 16:59
Its set in Model\Contract.cs. I deploy everything and then se the address of DAOVation to the address of the proxy. I assume this should just work as it did in truffle. Am I doing it wrong here?
Juan Blanco
@juanfranblanco
Feb 08 17:07
nothing that should be fine
Let me knock out a simple sample using the proxy
Juan Blanco
@juanfranblanco
Feb 08 19:46
@inuka_g_gitlab ok reproduced now in a simple sample, it does not seem to fallback to the proxy. This should not be an issue with Nethereum