These are chat archives for Nethereum/Nethereum
I've tried using Nethereum.StandardTokenEIP20.Functions as well as manually calling for the contract transfer function then using SendAsync, both with no issues so far. Gas price 5gwei with 80,000 gas limit. All on mainnet, using both Infura V3 and the previous URL.
Might be something small I am overlooking. Will continue this later this afternoon with a fresher pair of eyes.
Let me know if you might stumble on anything @p0isoNz_twitter; I did a check around Github to see if anyone else was complaining about the same issue, so far no luck.
Something like this:
sentValue = value.Value Dim nonce = Await iweb3.Eth.Transactions.GetTransactionCount.SendRequestAsync("0x00000000000000000000000000000000000000000") Dim param1 = sentValue.ToString("X16").PadLeft(64, "0") Dim param2 = SomeBigNumber.ToString("X16").Substring(1) 'remove unsigned byte indicator Dim data = functionSig & param1 & param2 Dim encoded = Web3.OfflineTransactionSigner.SignTransaction(privateKey.GetPrivateKey, tokenContractAddress, sentValue, nonce.Value, gasPrice, gas, data) transactionHash = Await iweb3.Eth.Transactions.SendRawTransaction.SendRequestAsync("0x" + encoded) receipt = Await iweb3.Eth.Transactions.GetTransactionReceipt.SendRequestAsync(transactionHash)
Here I was manually signing the transaction and deploying it raw, the function accepts two parameters, and I needed to find out the function signature (basically 4 bytes of the keccak256 of the function, e.g.
RemovePrefix(Web3.Sha3("transfer(address,uint256)").Substring(0, 8))) before being able to construct the data variable.
Do take note of the data encoding: https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#formal-specification-of-the-encoding
You should be able to reuse web3 without issues. Let us know if you see anything weird. :)