These are chat archives for Nethereum/Nethereum

24th
Jul 2017
Y. Mutlu
@ymutluu_twitter
Jul 24 2017 20:55
Hello all, I can try send ether from using the nethereum framework. I receive this error. do you have any idea what happened this? {"invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go struct field SendTxArgs.value of type *hexutil.Big"}
my code is : var unlockAccountResult = web3.Personal.UnlockAccount.SendRequestAsync(senderAddress, password, 600).Result;
var val = new HexBigInteger("0.5");
var txId = web3.Eth.Transactions.SendTransaction.SendRequestAsync(new TransactionInput()
{
From = senderAddress,
To = toAddress,
Value = val
}).Result;
Juan Blanco
@juanfranblanco
Jul 24 2017 23:20
You need to convert your value to Wei. Check the Convert in Web3. Assuming you are sending Ether.