These are chat archives for Nethereum/Nethereum

6th
Jun 2018
MarkusGalant
@MarkusGalant
Jun 06 2018 08:55
@Trycoderi have a similar issue
because "Announcement: Chain Resynch in progress, indexing has temporarily been paused."
jandroalvarez
@jandroalvarez
Jun 06 2018 09:46
Hi everyone,
I'm trying to call a contract function
but i want to sign the transaction using an account from certain wallet
I've tried the following but it didn't work out
jandroalvarez
@jandroalvarez
Jun 06 2018 09:52
var accountAddress = wallet.GetAddresses().SingleOrDefault(a => a == publisher);
var account = wallet.GetAccount(accountAddress);
var account2 = new Account(account.PrivateKey, 38525);
var web3 = new Web3(account2, gethAddress);
var contract = web3.Eth.GetContract(Abi, Address);
Function myFunction = contract.GetFunction("myFunction");
TransactionReceipt txHash = await myFunction.SendTransactionAndWaitForReceiptAsync(publisher, null, param1, param2, new byte[0] { }, param3);
I'm getting an intrinsic gas too low
as exception
what does it mean
?
am i doing it correctly?
may be a problem with the account ethers?
abhishek
@triston_abhi_twitter
Jun 06 2018 10:06
Thank you @ChinhPLQ and @juanfranblanco
Enigmatic
@EnigmaticUnreal_twitter
Jun 06 2018 12:35

@jandroalvarez - Are you setting enough gas for your function call? Depending on your overload I believe it should be the second parameter. You could use contract.GetFunction("myFunction").EstimateGasAsync(params) to get a gas estimation, or manually assign some gas, e.g. var gas = new HexBigInteger(200000).

@yuwenbai - Creating a new account that way won't add it to your local test chain. You'll need to use something like web3.Personal.NewAccount.SendRequestAsync("password") to create a new account.

Example workbook: https://github.com/Nethereum/Nethereum.Workbooks/blob/master/docs/nethereum-creating-a-new-account-using-geth.workbook

@MarkusGalant - Oooooh I think Ropsten went down due to the parity bug.
Trycoder
@Trycoder
Jun 06 2018 13:03
@MarkusGalant Yeah.Thats the issue.Thanks:)