These are chat archives for Nethereum/Nethereum

4th
Oct 2016
Andres G. Aragoneses
@knocte
Oct 04 2016 07:48
hi guys, how to get the return value of a call to a contract function that is not readonly? e.g.: http://ethereum.stackexchange.com/questions/9005/how-can-i-verify-the-tx-was-transferred-the-tokens-successfully/9006#answer-9009 -> the return value in this example is in the output attribute, can NEthereum retreive that?
Juan Blanco
@juanfranblanco
Oct 04 2016 10:20
Hola Andrés, I would check the event or account balance of the account
Andres G. Aragoneses
@knocte
Oct 04 2016 10:40
but that is doing another call
I just want the return value of the transfer() call
Juan Blanco
@juanfranblanco
Oct 04 2016 10:41
you could try before hand using a call to validate it
but you will need to do another call afterwards to do the physical transaction
there is no way around that
you can get the event info from the transaction receipt log
(and yes is another call)
Rui Maximo
@maximo
Oct 04 2016 12:52
Juan, I'm using your Nethereum library for the first time. I'm getting a "Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object" when calling any of your APIs such as "var _unlockaccount = await cWeb3.Personal.UnlockAccount.SendRequestAsync(senderAddress, senderPassword, new HexBigInteger(600));". I'm in a time crunch to complete my demo for a hackaton. Any help would be great. thanks!
copy/paste pilot error. The error I'm getting is "Unhandled Exception: Nethereum.JsonRpc.Client.RpcResponseException: The method personal_unlockAccount does not exist/is not available"
Juan Blanco
@juanfranblanco
Oct 04 2016 12:58
you need in geth to include "personal" as one of the capabilities
as in geth --rpcapi "eth,web3,personal,net,miner,admin,debug"
Rui Maximo
@maximo
Oct 04 2016 13:04
thanks for the quick response, Juan. Now, I'm getting the following exception: "Unhandled Exception: EdjCase.JsonRpc.Client.RpcClientUnknownException: Error occurred when trying to send rpc requests(s
) ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpEx
ception: A connection with the server could not be established". here's how I start my geth client (x64 on Windows 2012 R2): '.\geth.exe -networkid 1912 -rpcapi "eth,web3,personal,net,miner,admin,debug" console'
I forgot the "-rpc" parameter to geth. It worked! :-)
Juan Blanco
@juanfranblanco
Oct 04 2016 13:42
:clap:
Rui Maximo
@maximo
Oct 04 2016 16:57
Juan, how do I call a smart contract function that doesn't return any value? CallAsync<>() doesn't work. thanks
Juan Blanco
@juanfranblanco
Oct 04 2016 18:09
Hi calls are different from sending transactions
calls allows you to retrieve data from the smart contract (state) or do a calculation (busines logic) that won't be part of a transaction on the blockchain
it does not make any sense to have a call withouth retrieving any data, as it won't affect the state of the contract (won't be backed by a transaction)
mainly in those scenarios you would use a transaction
anything that requires to have consensus, stored in the blockchain, requires a transaction