These are chat archives for Nethereum/Nethereum

Apr 2018
Apr 23 2018 07:00
@juanfranblanco , plz help ,i'm trying to transfer token but getting method not allowed code given below
var contract = web3.Eth.GetContract(abi, contractAddress);
var transferFunction = contract.GetFunction("transfer");
var gas = await transferFunction.EstimateGasAsync(fromAddress, null, null, addressTo, amountToSend);
var receiptFirstAmountSend = await transferFunction.SendTransactionAsync(fromAddress, gas, null, null, addressTo, amountToSend);
Apr 23 2018 07:16
@Vahid1Ali You need to use the instance of the account you want to use in sending the tokens when instantiating the Web3 object
Account account = new Account("privateKey")
Web3 web3 = new Web3("{infura}/{rpc endpoint}", acount)
Apr 23 2018 07:26
@chukwuemekanweke , Account account = new Account(privateKey);
//unlock account
var web3 = new Web3(account,""); after added above line of code getting Method 'SendTransactionAsync' in type 'Nethereum.Web3.Accounts.AccountSignerTransactionManager' from assembly 'Nethereum.Accounts, Version=, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Apr 23 2018 07:58
Account account = new Account(privateKey,Chain.Ropsten);
var web3 = new Web3 (account,"");
Contract contract = web3.Eth.GetContract (ContractABI, ContractAddress);
var transferFn = contract.GetFunction ("transfer");
var gasPrice = new HexBigInteger (UnitConversion.Convert.ToWei (selectedGWei, EthUnit.Gwei));
            var tokensTransfered = UnitConversion.Convert.ToWei (details.AmountExchanged, contractDecimals);
            var gasLimit = new HexBigInteger (transactionEstimate.EstimatedGasLimit);
            string transactionHash = await transferFn.SendTransactionAsync (senderAddress, gasLimit, gasPrice, null, receiverAddress, tokensTransfered);
Apr 23 2018 10:12
@chukwuemekanweke ,after using above code getting Method Not Found:Nethereum.Web3.Accounts.Account..ctor(System.String, Nethereum.Signer.Chain)
@chukwuemekanweke , Account account = new Account(privateKey, Chain.Ropsten);
var web3 = new Web3(account, "");
Contract contract = web3.Eth.GetContract(ContractABI, ContractAddress);
var transferFn = contract.GetFunction("transfer");
Salazar, F. 🎖
Apr 23 2018 17:31
How can I unlock accounts using the function "web3.Eth.DeployContract.SendRequestAsync"? I've been getting the error "Nethereum.JsonRpc.Client.RpcResponseException: 'Method not found" when I try to use it.
Apr 23 2018 18:51
how to send token in contract ? we need send bulk transfer token to airdrop address from csv
Apr 23 2018 22:28
error gas required exceeds allowance or always failing transaction