public Task <HexBigInteger> EstimateGasAsync(string contractAddress, TFunctionMessage functionMessage = null)
        {
            if (functionMessage == null)
            {
                functionMessage = new TFunctionMessage();
            }
            SetEncoderContractAddress(contractAddress);
            var callInput = FunctionMessageEncodingService.CreateCallInput(functionMessage);

            return(TransactionManager.EstimateGasAsync(callInput));
        }
Ejemplo n.º 2
0
        public async Task <string> QueryRawAsync(TContractMessage contractFunctionMessage,
                                                 string contractAddress,
                                                 BlockParameter block = null)
        {
            _functionMessageEncodingService.SetContractAddress(contractAddress);
            _functionMessageEncodingService.DefaultAddressFrom = GetAccountAddressFrom();
            await ExecutePreRequestHandlersAsync(contractFunctionMessage, contractAddress, block).ConfigureAwait(false);

            var callInput = _functionMessageEncodingService.CreateCallInput(contractFunctionMessage);

            return(await Eth.Transactions.Call.SendRequestAsync(callInput, block).ConfigureAwait(false));
        }
Ejemplo n.º 3
0
 private CallInput CreateCallInput(TContractMessage functionMessage)
 {
     return(_functionMessageEncodingService.CreateCallInput(functionMessage));
 }