These are chat archives for Nethereum/Nethereum

May 2018
May 20 2018 13:23
is there a solidity plugin that works with visual studio 2017?
Juan Blanco
May 20 2018 14:10
@CH3mistry I know that they are working on the revamp version of the old one, but I don't know what is the release date
Lee Haisen
May 20 2018 14:34
        public async Task<string> TransferStandardToken(string privateKey, string toAddr, decimal tokenAmount, ulong? gastLimit, ulong? gasPrice) {
            var account = new Account(privateKey);
            var w3 = new Web3(account, _rpcUrl);
            var transferFunction = new TransferFunction {
                TokenAmount = Web3.Convert.ToWei(tokenAmount),
                To = toAddr,
                FromAddress = account.Address
            transferFunction.Gas = (gastLimit != null) ? new HexBigInteger(gastLimit.Value) : new HexBigInteger((ulong)Nethereum.Signer.Transaction.DEFAULT_GAS_LIMIT);
            transferFunction.GasPrice = (gasPrice != null) ? new HexBigInteger(gasPrice.Value) : new HexBigInteger((ulong)Nethereum.Signer.Transaction.DEFAULT_GAS_PRICE);

            var handler = w3.Eth.GetContractHandler(account.Address);
            var transactionhash = await handler.SendRequestAsync(transferFunction);

            return transactionhash;
This is my code that i'm trying to use to transfer some Tokens from one account to another. i don't get where is the error ?
Do we also have to provide it the contract address ?
I didn't see any option to do that, maybe i've missed something, can anyone tell what's worng with this code.?
Or Doest i transfer all kinds of token for instance in my case i'm trying Binance tokens
or EO tokens
Lee Haisen
May 20 2018 14:47
@juanfranblanco can you help out on this one sir ?
Juan Blanco
May 20 2018 19:15
@leehaisen01_gitlab You are using the account address instead of the contract address ( I guess based on the names). Also the default values for the gas amounts are set for you already for you so there is no need if they are null already.
Hopefully I am right with my guess
Let me know how it goes
May 20 2018 22:06
Hi Juan - you were right. The link.xml was missing. After adding it to the assets folder and building for WebGL all works great.
Many thanks for help and for the Nethereum package - really good job!