Exemplo n.º 1
0
        public async Task GetEthSendGasLimit()
        {
            string     address  = "0xb332Feee826BF44a431Ea3d65819e31578f30446";
            BigInteger gasLimit = await GasUtils.EstimateEthGasLimit(address, SolidityUtils.ConvertToUInt(0.04055123, 18));

            Assert.IsTrue(gasLimit > 0);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Estimates the gas limit of transfering eth from one address to another.
 /// </summary>
 /// <param name="receivingAddress"> The address to receive the ether. </param>
 /// <param name="amount"> The amount of ether that is requesting to be sent. </param>
 /// <param name="onLimitReceived"> The action to execute when the gas limit has been received. </param>
 public override void GetTransferGasLimit(string receivingAddress, dynamic amount, Action <BigInteger> onLimitReceived)
 {
     GasUtils.EstimateEthGasLimit(receivingAddress, SolidityUtils.ConvertToUInt(amount, 18)).OnSuccess(onLimitReceived);
 }