Example #1
0
        public async Task TestGetUnclaimedGas()
        {
            var test   = TestUtils.RpcTestCases.Find(p => p.Name == nameof(rpc.GetUnclaimedGasAsync).ToLower());
            var result = await rpc.GetUnclaimedGasAsync(test.Request.Params[0].AsString());

            Assert.AreEqual(result.ToJson().AsString(), RpcUnclaimedGas.FromJson(result.ToJson()).ToJson().AsString());
            Assert.AreEqual(test.Response.Result["unclaimed"].AsString(), result.Unclaimed.ToString());
        }
Example #2
0
        public async Task <RpcUnclaimedGas> GetUnclaimedGasAsync(string address)
        {
            var result = await RpcSendAsync(GetRpcName(), address.AsScriptHash()).ConfigureAwait(false);

            return(RpcUnclaimedGas.FromJson(result));
        }
Example #3
0
 public RpcUnclaimedGas GetUnclaimedGas(string address)
 {
     return(RpcUnclaimedGas.FromJson(RpcSend("getunclaimedgas", address)));
 }