Esempio n. 1
0
 protected Task <TResult> CallWithSimpleResultAsync <TQuery, TResult>(
     CallDefinition <TQuery, TResult> callDefinition)
     where TQuery : CallDefinition <TQuery, TResult>, new()
 {
     return(CallWithSimpleResultAsync
            (
                callDefinition,
                ConfirmationLevel.Zero
            ));
 }
Esempio n. 2
0
 protected async Task <TResult> CallWithSimpleResultAsync <TQuery, TResult>(
     CallDefinition <TQuery, TResult> callDefinition,
     ConfirmationLevel minimalConfirmationLevel)
     where TQuery : CallDefinition <TQuery, TResult>, new()
 {
     return(await CallWithSimpleResultAsync
            (
                callDefinition,
                await Web3.GetBestTrustedBlockAsync(minimalConfirmationLevel)
            ));
 }
Esempio n. 3
0
 protected Task <TResult> CallWithComplexResultAsync <TQuery, TResult>(
     CallDefinition <TQuery, TResult> callDefinition)
     where TQuery : CallDefinition <TQuery, TResult>, new()
     where TResult : IFunctionOutputDTO, new()
 {
     return(CallWithComplexResultAsync
            (
                callDefinition,
                ConfirmationLevel.Zero
            ));
 }
Esempio n. 4
0
 protected Task <TResult> CallWithSimpleResultAsync <TQuery, TResult>(
     CallDefinition <TQuery, TResult> callDefinition,
     BlockParameter block)
     where TQuery : CallDefinition <TQuery, TResult>, new()
 {
     return(Web3.Eth
            .GetContractQueryHandler <TQuery>()
            .QueryAsync <TResult>
            (
                contractAddress: ContractAddress,
                functionMessage: (TQuery)callDefinition,
                block: block
            ));
 }
Esempio n. 5
0
 protected Task <TResult> CallWithComplexResultAsync <TQuery, TResult>(
     CallDefinition <TQuery, TResult> callDefinition,
     BlockParameter block)
     where TQuery : CallDefinition <TQuery, TResult>, new()
     where TResult : IFunctionOutputDTO, new()
 {
     return(Web3.Eth
            .GetContractQueryHandler <TQuery>()
            .QueryDeserializingToObjectAsync <TResult>
            (
                contractAddress: ContractAddress,
                functionMessage: (TQuery)callDefinition,
                block: block
            ));
 }