Beispiel #1
0
        public async Task <(object result, bool done)> CheckForFinishAsync(object input, CancellationToken token = default(CancellationToken))
        {
            OracleServer <T, S> c      = (OracleServer <T, S>)input;
            RegisteredOracle    oracle = await c.Account.Client.GetRegisteredOracleAsync(c.OracleId, token).ConfigureAwait(false);

            c.AbiVersion     = oracle.AbiVersion;
            c.QueryFee       = oracle.QueryFee;
            c.QueryFormat    = oracle.QueryFormat;
            c.ResponseFormat = oracle.ResponseFormat;
            c.Ttl            = oracle.Ttl;
            return(c, true);
        }
Beispiel #2
0
        public async Task <OracleServer <T, S> > GetOwnOracleAsync <T, S>(CancellationToken token = default(CancellationToken))
        {
            ValidatePrivateKey();
            OracleServer <T, S> c      = new OracleServer <T, S>(this);
            RegisteredOracle    oracle = await Client.GetRegisteredOracleAsync(c.OracleId, token).ConfigureAwait(false);

            c.AbiVersion     = oracle.AbiVersion;
            c.QueryFee       = oracle.QueryFee;
            c.QueryFormat    = oracle.QueryFormat;
            c.ResponseFormat = oracle.ResponseFormat;
            c.Ttl            = oracle.Ttl;
            return(c);
        }
Beispiel #3
0
        public async Task <OracleClient <T, S> > GetOracleAsync <T, S>(string oraclepubkey, CancellationToken token = default(CancellationToken))
        {
            RegisteredOracle oracle = await Client.GetRegisteredOracleAsync(oraclepubkey, token).ConfigureAwait(false);

            OracleClient <T, S> re = new OracleClient <T, S>(this);

            re.AbiVersion     = oracle.AbiVersion;
            re.Id             = oracle.Id;
            re.QueryFee       = oracle.QueryFee;
            re.QueryFormat    = oracle.QueryFormat;
            re.ResponseFormat = oracle.ResponseFormat;
            re.Ttl            = oracle.Ttl;
            return(re);
        }