These are chat archives for Nethereum/Nethereum

23rd
Apr 2018
Vahid1Ali
@Vahid1Ali
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);
JEN
@chukwuemekanweke
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)
Vahid1Ali
@Vahid1Ali
Apr 23 2018 07:26
@chukwuemekanweke , Account account = new Account(privateKey);
//unlock account
var web3 = new Web3(account,"https://ropsten.infura.io/O0KO3A6R8LaY4g44nTlw"); after added above line of code getting Method 'SendTransactionAsync' in type 'Nethereum.Web3.Accounts.AccountSignerTransactionManager' from assembly 'Nethereum.Accounts, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
JEN
@chukwuemekanweke
Apr 23 2018 07:58
Account account = new Account(privateKey,Chain.Ropsten);
var web3 = new Web3 (account,"https://kovan.infura.io");
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);
Vahid1Ali
@Vahid1Ali
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, "https://ropsten.infura.io/O0KO3A6R8LaY4g44nTlw");
Contract contract = web3.Eth.GetContract(ContractABI, ContractAddress);
var transferFn = contract.GetFunction("transfer");
Salazar, F. 🎖
@_Salazar_F_twitter
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.
TarrahArshad
@TarrahArshad
Apr 23 2018 18:51
how to send token in contract ? we need send bulk transfer token to airdrop address from csv
TarrahArshad
@TarrahArshad
Apr 23 2018 22:28
error gas required exceeds allowance or always failing transaction