These are chat archives for Nethereum/Nethereum

28th
Apr 2018
abhishek
@triston_abhi_twitter
Apr 28 2018 07:26
await con.GetFunction("savevalue").SendTransactionAsync(account.Address,"hello", "0x405387556050656aa7ae2280c7cf55e32f0fd58ff705fb413992f11f9f3fa13a");
I am getting "Error occurred when trying to send rpc requests(s)"
Please help me to sort this issue
TarrahArshad
@TarrahArshad
Apr 28 2018 07:55
how to we can debug contract ? i deployed but when i send to payable i see error in contract but i unknow whicgh line have a problem
https://ropsten.etherscan.io/tx/0xe902b7f33a846560fe5d259d2b38dc091d27af0d346f8d75bae152e46f623bbc
EKostan
@EKostan
Apr 28 2018 08:52

hello, I have a question about gas price

  1. I connect to Rinkeby network
  2. if I use

    web3.Eth.GasPrice.SendRequestAsync()

    i get 1000000000 = 1 gwei

  3. if I use

    web3.Eth.GetContract(contractAbi, contractAddress).GetFunction(functionName).SendTransactionAsync(_apiSettings.OwnerAddress, gasLimit,  null, null, input)

    network set gas price = 20 gwei

how I can get correct gas price ?

Enigmatic
@EnigmaticUnreal_twitter
Apr 28 2018 13:13

@EKostan - There isn't a "correct" gas price per say, depends on the network, and I suspect EthGasPrice may not be accurate at all times. If you want something like ethgasstation gas price reporting you can get it: https://ethgasstation.info/json/ethgasAPI.json

@triston_abhi_twitter - What are you looking to do and what node are you connected to? Infura or a local geth/parity or ganache?

@TarrahArshad - You can debug via remix (https://remix.ethereum.org) by sending the values as a transaction on their Javascript VM and stepping through. It tends not to be easy though.

EKostan
@EKostan
Apr 28 2018 13:40
image.png
where is "Gas Price Std (Gwei)" in ttps://ethgasstation.info/json/ethgasAPI.json ? what field name ?
Enigmatic
@EnigmaticUnreal_twitter
Apr 28 2018 13:47

That's the one, "average". Just divide by 10 and the units are in gwei.

I recalled coming across their website files which does that too. Not sure why they multiply it by 10 though.

image.png
EKostan
@EKostan
Apr 28 2018 13:48
thx
TarrahArshad
@TarrahArshad
Apr 28 2018 14:37
@EnigmaticUnreal_twitter i sent test test but only showed me error i unknow line error . how to get line ?
Che4ter
@Che4ter
Apr 28 2018 15:36
Hello, is it possible to use arrays as function inputs in smart contracts with nethereum?
Enigmatic
@EnigmaticUnreal_twitter
Apr 28 2018 17:14
@Che4ter - If I caught you correctly, you meant something like getting an array of addresses into your smart contract? If yes, yea it is possible. Just pass in your array (while ensuring the types are compatible).
этот товарищ
@etot_tovarisch_twitter
Apr 28 2018 20:32
image.png
How can I deal with null in this case?
EKostan
@EKostan
Apr 28 2018 20:54
            var trx = await _web3Provider.Web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(
                "0xe989802b95e67ba1ab1976f9688d7ddbc5082741f696d2d9f2d429579e7cbc45");
            var bn = trx.BlockNumber;
EKostan
@EKostan
Apr 28 2018 20:59
any one know how fix error 'nonce too low' when I do this
for (int i = startIndex; i < lotteryLog.LogCollection.Logs.Count; i++)
{
    var log = lotteryLog.LogCollection.Logs[i];

    var newLotteryContract = Web3.Eth.GetContract(Abi, newLotteryAddress);
    var function = newLotteryContract.GetFunction("buy");
    var trxReciept = await function.SendTransactionAndWaitForReceiptAsync(_blockchainSettings.OwnerAddress, 
        new HexBigInteger(500000),
        new HexBigInteger(4000000000), 
        null,
        new CancellationTokenSource(),
        log.Sender, log.Numbers, 1);

    var trxHash = trxReciept.TransactionHash;

    Console.WriteLine(trxHash);
}
my first transaction send but second throw exception 'nonce too low'
I work in main network
if I run this code in rinkeby its ok
how I can run many transactions in main network?