protected async Task <TReturn> CallAsync <TReturn>(string encodedFunctionCall, CallInput callInput, BlockParameter block) { callInput.Data = encodedFunctionCall; var result = await ethCall.SendRequestAsync(callInput, block); return(FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>(GetFirstParameterOrNull(FunctionABI.OutputParameters), result)); }
protected async Task <TReturn> CallAsync <TReturn>(string encodedFunctionCall, CallInput callInput) { callInput.Data = encodedFunctionCall; var result = await EthCall.SendRequestAsync(callInput, DefaultBlock).ConfigureAwait(false); return (FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>( GetFirstParameterOrNull(FunctionABI.OutputParameters), result)); }
protected async Task <TReturn> CallAsync <TReturn>(string encodedFunctionCall) { var result = await ethCall.SendRequestAsync(new CallInput(encodedFunctionCall, ContractAddress), DefaultBlock) .ConfigureAwait(false); return (FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>( GetFirstParameterOrNull(FunctionABI.OutputParameters), result)); }
protected async Task <TReturn> CallAsync <TReturn>(string encodedFunctionCall, string from, HexBigInteger gas, HexBigInteger value, BlockParameter block) { var result = await EthCall.SendRequestAsync(new CallInput(encodedFunctionCall, ContractAddress, @from, gas, value), block).ConfigureAwait(false); return (FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>( GetFirstParameterOrNull(FunctionABI.OutputParameters), result)); }
public TReturn DecodeTypeOutput <TReturn>(string output) { var function = FunctionOutputAttribute.GetAttribute <TReturn>(); if (function != null) { var instance = Activator.CreateInstance(typeof(TReturn)); return(DecodeDTOTypeOutput <TReturn>((TReturn)instance, output)); } else { return(FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>( GetFirstParameterOrNull(FunctionABI.OutputParameters), output)); } }
public TReturn DecodeSimpleTypeOutput <TReturn>(string output) { return(FunctionCallDecoder.DecodeSimpleTypeOutput <TReturn>( GetFirstParameterOrNull(FunctionABI.OutputParameters), output)); }