Esempio n. 1
0
        /// <summary>
        /// Returns the balance of all NEP-17 assets in the specified address.
        /// This method is provided by the plugin RpcNep17Tracker.
        /// </summary>
        public async Task <RpcNep17Balances> GetNep17BalancesAsync(string address)
        {
            var result = await RpcSendAsync(GetRpcName(), address.AsScriptHash())
                         .ConfigureAwait(false);

            return(RpcNep17Balances.FromJson(result, protocolSettings));
        }
Esempio n. 2
0
        public void TestRpcNep17Balances()
        {
            JObject json = TestUtils.RpcTestCases.Find(p => p.Name == nameof(RpcClient.GetNep17BalancesAsync).ToLower()).Response.Result;
            var     item = RpcNep17Balances.FromJson(json);

            Assert.AreEqual(json.ToString(), item.ToJson().ToString());
        }