public Task <string> TransferEtherAsync(string toAddress, decimal etherAmount, decimal?gasPriceGwei = null, BigInteger?gas = null) { var fromAddress = _transactionManager?.Account?.Address; var transactionInput = EtherTransferTransactionInputBuilder.CreateTransactionInput(fromAddress, toAddress, etherAmount, gasPriceGwei, gas); return(_transactionManager.SendTransactionAsync(transactionInput)); }
public Task <TransactionReceipt> TransferEtherAndWaitForReceiptAsync(string toAddress, decimal etherAmount, decimal?gasPriceGwei = null, BigInteger?gas = null, CancellationTokenSource tokenSource = null) { var fromAddress = _transactionManager?.Account?.Address; var transactionInput = EtherTransferTransactionInputBuilder.CreateTransactionInput(fromAddress, toAddress, etherAmount, gasPriceGwei, gas); return(_transactionManager.SendTransactionAndWaitForReceiptAsync(transactionInput, tokenSource)); }
public async Task <BigInteger> EstimateGasAsync(string toAddress, decimal etherAmount) { var fromAddress = _transactionManager?.Account?.Address; var callInput = (CallInput)EtherTransferTransactionInputBuilder.CreateTransactionInput(fromAddress, toAddress, etherAmount); var hexEstimate = await _transactionManager.EstimateGasAsync(callInput); return(hexEstimate.Value); }
public Task <string> TransferEtherAsync(string toAddress, decimal etherAmount, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger?gas = null, BigInteger?nonce = null) { //Make the the maxPriorityFee and maxFeePerGas var fromAddress = _transactionManager?.Account?.Address; var transactionInput = EtherTransferTransactionInputBuilder.CreateTransactionInput(fromAddress, toAddress, etherAmount, maxPriorityFeePerGas, maxFeePerGas, gas, nonce); return(_transactionManager.SendTransactionAsync(transactionInput)); }