These are chat archives for Nethereum/Nethereum

23rd
Dec 2017
Juan Blanco
@juanfranblanco
Dec 23 2017 05:15
@SebastianGiro yes there is not a specific one for deploying a contract, i will be the same as other transaction
to create a TrasactionInput
@rboelen i assume that is a problem with infura Ill report it
Juan Blanco
@juanfranblanco
Dec 23 2017 05:30
@rboelen validated this is an issue with geth, it has been reported and will fix in the new year. The solution is to use the BlockParameter Latest, or Pending to get the result
"This is the output of looking up an ERC20 balance against a node that is out of sync. If you use pending or latest explicitly you are fine. If you try to call with a block param ahead of the current sync you end up with 0 until the node catches up and then it finally returns the correct value. We've reported this issue to geth but it is a low priority for them right now. Our recommendation is that for eth_call people use the "latest" or "pending" tag explicitly until either geth fixes this upstream and returns an error when calling against a block ahead of the current node's sync state"
rboelen
@rboelen
Dec 23 2017 08:08
Nice! thanks for checking in on this.
Alex-Gorbach
@Alex-Gorbach
Dec 23 2017 18:56

Hello! Can someone help me with the problem?
I deployed the contract to the clique testnet via Remix IDE and try to access its method but always get the value null for the variable "result".

'private string abi = @"[{""constant"":false,"...,....}]";

public async Task<string> SetFileHash( )
{
var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
var senderAddress = "0x12890d2cce102216644c59daE5baed380d84830c";
var account = new Account(privateKey);
var web3 = new Web3(account);
ulong totalSupply = 1000000;
var contract =web3.Eth.GetContract(abi, "0x8309318a0e080e564d5411ff9be7cab2d39dc86a");

        //Obtaining a function from a contract
    var setHash = contract.GetFunction("set");

    //Calling a function with two parameters
        var result = await setHash.CallAsync<string>(senderAddress, "859FA22CC3F7BDD3EFB4158FA2B47B33");
        return result;
    }

'