These are chat archives for Nethereum/Nethereum

2nd
Oct 2017
этот товарищ
@etot_tovarisch_twitter
Oct 02 2017 04:40
@kaista82_twitter Is it enough to call contract functions? If yes how can I do that?
Juan Blanco
@juanfranblanco
Oct 02 2017 04:58
@etot_tovarisch_twitter just put the infura url instead of your local node
Juan Blanco
@juanfranblanco
Oct 02 2017 05:11
register here https://infura.io/ or look in the page which one you are interested into
@fergarrui yes all methods are the same, only thing is that you have to create your own transaction input instead of delegating to Functions to do the call, send transaction
@RinzeCats post a gist so we can help you
Juan Blanco
@juanfranblanco
Oct 02 2017 05:17
note console applications the main thread does not allow to start as async, so need to call Result, or start a new Thread like Task.Run()
этот товарищ
@etot_tovarisch_twitter
Oct 02 2017 05:25
@juanfranblanco Thank you very much! It works just after replacing the link. Am I have to create an account on infura?
Free Account
@viettienbk
Oct 02 2017 06:41
@juanfranblanco : I want to create raw data in Unity. Can you help me?
Juan Blanco
@juanfranblanco
Oct 02 2017 07:54
@etot_tovarisch_twitter not needed, but if you create one it will include a token that will allow you to track your app usage
and other stats
@viettienbk check the sample of creating a transaction input in Flappy bird / uni
look at the service
let me know if you cannot find it :)
этот товарищ
@etot_tovarisch_twitter
Oct 02 2017 08:05
Thanks! Sorry for the silly question, but how does Nethereum interacts with public node when I'm calling contract function (like in the example with multiplier)? Does it send transaction signed by my private key?
kai
@kaista82_twitter
Oct 02 2017 09:24
yes essentially
Alexander Yarushin
@aayarushin
Oct 02 2017 11:13
@juanfranblanco I was wondering why solc manages to find imported contracts, which solidity intellisense does not an hence marks an error . import is specified like this:
import 'zeppelin-solidity/contracts/ownership/Ownable.sol';
The real location of the zeppeling contracts would be import '../node_modules/zeppelin-solidity/contracts/ownership/Ownable.sol';
Matthew Starkey
@matt1610
Oct 02 2017 12:41
@juanfranblanco I am running in to an issue that throws the following exception when I try and call the CreateFilterAsync method: I've been unable to solve it, I'm using .net Core 2.0.
Could not load file or assembly 'crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942'. The system cannot find the file specified.
I have tried adding the Bouncy Castle package but this did not help me either.
kai
@kaista82_twitter
Oct 02 2017 12:42
do you have all the neth packages?
is this PCL verison of neth?
Matthew Starkey
@matt1610
Oct 02 2017 12:42
I just added Nethereum.Portable
What other packages do I need?
kai
@kaista82_twitter
Oct 02 2017 12:43
oh, so it is PCL version, hmm
Juan Blanco
@juanfranblanco
Oct 02 2017 13:18
@matt1610 add 1.8.1.1 first
Matthew Starkey
@matt1610
Oct 02 2017 13:18
of Bouncy Castle?
Juan Blanco
@juanfranblanco
Oct 02 2017 13:18
yes portable
Matthew Starkey
@matt1610
Oct 02 2017 13:19
Trying that now.
Juan Blanco
@juanfranblanco
Oct 02 2017 13:19
ok ill try it on my end too anyway
Matthew Starkey
@matt1610
Oct 02 2017 13:22
That seems to have solved it. I was using 1.8.1.3.
Juan Blanco
@juanfranblanco
Oct 02 2017 13:22
ok cool
Matthew Starkey
@matt1610
Oct 02 2017 13:22
Thanks for your help.
Juan Blanco
@juanfranblanco
Oct 02 2017 13:22
np
Chandra Sekhar
@tcsekhar
Oct 02 2017 16:47

I have one simple and basic question: For a given sender address, can there be more than one transaction state within one block? Meaning, for every state change, will it be in a separate block every time?

The reason I'm asking is, when I use:

code
public async Task getStoredStateName(HexBigInteger blockno, string blockhash)
{
myProjObj myContract = await initializeContract("0x12890d2cce102216644c59daE5baed380d84830c", "password");
BlockParameter bp = new BlockParameter(blockno);
var result = await myContract.contract.GetFunction("getName").CallAsync<string>(bp);
Console.WriteLine("Name:" + result);
}

Where the bp (blockparameter) has only the blockNumber and nothing else (couldn't find a way to pass the transaction hash). It does return me the correct state every time. But I need to make sure that this would work in all scenarios..

Juan Blanco
@juanfranblanco
Oct 02 2017 16:49
ah good question, and yes that will be the final state of the block
if you have 20 transactions for the same contract
each modifying the state
you won't see that
and yes there is not specific way to do this
Chandra Sekhar
@tcsekhar
Oct 02 2017 16:50
I see. Then my code won't work for what I'm looking for. Is there a way to get the state of the 5th out of 10 transactions which happened?
If its not possible, its still okay, I will modify my code logic to not look for intermediary states.
everything is based around the blockparameter
Chandra Sekhar
@tcsekhar
Oct 02 2017 16:53
Thank you Juan. Looks like I can get only one of these three: "latest", "earliest" or "pending"
Juan Blanco
@juanfranblanco
Oct 02 2017 16:53
yes or the blocknumber which is what you are using
Chandra Sekhar
@tcsekhar
Oct 02 2017 16:53
This is helpful. You are awesome!
Juan Blanco
@juanfranblanco
Oct 02 2017 16:53
on your function call, it using in the background the eth_call
Chandra Sekhar
@tcsekhar
Oct 02 2017 16:54
ok
hak
@hakart_twitter
Oct 02 2017 20:51
Hey guys,
Can anyone help me to figure out yo getting all transactions related account address ? do we have any method for that in the Nethereum ?
(I have setup azure consortium private blockchain, and seems there is no any helper UI for getting transactions)
Thanks in advance
Chandra Sekhar
@tcsekhar
Oct 02 2017 21:03

My code works locally but when I have Geth running on a server, I modify my code to point to the server, it fails. Can you please let me know if I am doing it correctly:

web3 = new Nethereum.Geth.Web3Geth(account, "http://10.20.11.28:8545");

For the standard Web3 - there is a setProvider to url: "ws://10.20.11.28:8546" - how do I set it for Web3Geth? May be that's the problem.

Chandra Sekhar
@tcsekhar
Oct 02 2017 21:09

The error I get is: SocketException: No connection could be made because the target machine actively refused it 10.20.11.28:8545

But, when I try psping, I do get a response - which means no firewall blocking, and also geth is running on that server.

Juan Blanco
@juanfranblanco
Oct 02 2017 21:14
ok you need to open your ip for connectivity
in the geth client
like --rpcaddr "0.0.0.0"
which will open to any address
Chandra Sekhar
@tcsekhar
Oct 02 2017 21:17
yes, that worked. Thank you very much