コード例 #1
0
        public void TestRpcNep5Transfers()
        {
            JObject json = TestUtils.RpcTestCases.Find(p => p.Name == nameof(RpcClient.GetNep5TransfersAsync).ToLower()).Response.Result;
            var     item = RpcNep5Transfers.FromJson(json);

            Assert.AreEqual(json.ToString(), item.ToJson().ToString());
        }
コード例 #2
0
        /// <summary>
        /// Returns all the NEP-5 transaction information occurred in the specified address.
        /// This method is provided by the plugin RpcNep5Tracker.
        /// </summary>
        /// <param name="address">The address to query the transaction information.</param>
        /// <param name="startTimestamp">The start block Timestamp, default to seven days before UtcNow</param>
        /// <param name="endTimestamp">The end block Timestamp, default to UtcNow</param>
        public async Task <RpcNep5Transfers> GetNep5TransfersAsync(string address, ulong?startTimestamp = default, ulong?endTimestamp = default)
        {
            startTimestamp ??= 0;
            endTimestamp ??= DateTime.UtcNow.ToTimestampMS();
            var result = await RpcSendAsync(GetRpcName(), address.AsScriptHash(), startTimestamp, endTimestamp)
                         .ConfigureAwait(false);

            return(RpcNep5Transfers.FromJson(result));
        }
コード例 #3
0
 /// <summary>
 /// Returns all the NEP-5 transaction information occurred in the specified address.
 /// This method is provided by the plugin RpcNep5Tracker.
 /// </summary>
 /// <param name="address">The address to query the transaction information.</param>
 /// <param name="startTimestamp">The start block Timestamp, default to seven days before UtcNow</param>
 /// <param name="endTimestamp">The end block Timestamp, default to UtcNow</param>
 public RpcNep5Transfers GetNep5Transfers(string address, ulong?startTimestamp = default, ulong?endTimestamp = default)
 {
     startTimestamp ??= 0;
     endTimestamp ??= DateTime.UtcNow.ToTimestampMS();
     return(RpcNep5Transfers.FromJson(RpcSend("getnep5transfers", address, startTimestamp, endTimestamp)));
 }