public void Transfer() { ERC20Service eRC20 = new ERC20Service( "https://coe01.blockchain.azure.com:3200/Yo9hBJ7LRpAXDwShDmiu38HR", applicationAccount); var result = eRC20.TransferAsync(LedgerClientTest.tokenContractAddress, user1Account, 1).GetAwaiter().GetResult(); var balance = eRC20.GetBalanceAsync(LedgerClientTest.tokenContractAddress, user1Account).GetAwaiter().GetResult(); Assert.IsTrue(balance > 0); Assert.IsNotNull(result); }
public async Task <ActionResult <bool> > Transfer(string tokenContractAddress, string loginAccountAddress, string recepientAddress, Decimal amount) { ERC20Service erc20Service = new ERC20Service(this.HTTPRPCEndpoint, loginAccountAddress); return(await erc20Service.TransferAsync(tokenContractAddress, recepientAddress, new BigInteger(amount))); }