public async void totalSupplyAsync() { Kether.ERC20 eth = new Kether.ERC20((string)config.contractAddress, ethAbi, (string)config.ownerAddress, (string)config.ownerPK, (string)config.node ); var totalSupply = await eth.totalSupplyAsync(); output.WriteLine("Ethereum response:"); output.WriteLine($"totalSupply: {totalSupply}"); Assert.True(!String.IsNullOrEmpty(totalSupply)); Assert.True(totalSupply == "5000000"); }
public async void balanceOfAsync() { Kether.ERC20 eth = new Kether.ERC20((string)config.contractAddress, ethAbi, (string)config.userAddress, (string)config.userPK, (string)config.node ); string holder = "0xd7c2c73a5c36bb61cbbf7c02a9bee6bf8df8a129"; var balanceOf = long.Parse(await eth.balanceOfAsync(holder)); Assert.True(balanceOf >= 0); output.WriteLine($"balanceOf: {balanceOf}"); var totalSupply = long.Parse(await eth.totalSupplyAsync()); Assert.True(totalSupply > 0); Assert.True(balanceOf <= totalSupply); }