Пример #1
0
        public async Task <string> QueryGetApproved(BigInteger tokenId)
        {
            var approved = await SimpleContractQueries.QueryAddressOutput(new Queries.GetApproved {
                TokenId = tokenId
            }, ContractAddress, null);

            return(approved?.Value);
        }
Пример #2
0
        public async Task <string> QueryOwnerOf(BigInteger tokenId)
        {
            var supply = await SimpleContractQueries.QueryAddressOutput(new Queries.OwnerOf {
                TokenId = tokenId
            }, ContractAddress, null);

            return(supply?.Value);
        }
Пример #3
0
        public EthCallPromise <string> QueryOwnerOf(BigInteger tokenId)
        {
            EthCallPromise <string> promise = new EthCallPromise <string>();

            SimpleContractQueries.QueryAddressOutput(new Queries.OwnerOf {
                TokenId = tokenId
            }, ContractAddress, null)
            .OnSuccess(owner => promise.Build(() => owner.Value))
            .OnError(error => promise.Build(() => "error", () => error));

            return(promise);
        }