Example #1
0
        public async Task <bool?> QueryIsApprovedForAll(string ownerAddress, string operatorAddress)
        {
            var approved = await SimpleContractQueries.QueryBoolOutput(new Queries.IsApprovedForAll {
                Owner = ownerAddress, Operator = operatorAddress
            }, ContractAddress, null);

            return(approved?.Value);
        }
Example #2
0
        public EthCallPromise <bool> QueryIsApprovedForAll(string ownerAddress, string operatorAddress)
        {
            EthCallPromise <bool> promise = new EthCallPromise <bool>();

            SimpleContractQueries.QueryBoolOutput(new Queries.IsApprovedForAll {
                Owner = ownerAddress, Operator = operatorAddress
            }, ContractAddress, null)
            .OnSuccess(approved => promise.Build(() => approved.Value))
            .OnError(error => promise.Build(() => "error", () => error));

            return(promise);
        }