示例#1
0
        public async Task <int> GetDecimals(string tokenScriptHash)
        {
            var result = await GetTokenDecimals.SendRequestAsync(tokenScriptHash);

            if (result.State == "FAULT, BREAK")
            {
                throw new RpcResponseException(new RpcError(0, "RPC state response: FAULT, BREAK "));
            }

            return(int.Parse(result.Stack[0].Value.ToString()));
        }
示例#2
0
        public async Task <string> GetDecimals()
        {
            string decimals = string.Empty;

            var result = await GetTokenDecimals.SendRequestAsync();

            if (result != null)
            {
                decimals = result.Stack[0].Value.ToString();
            }
            return(decimals);
        }
示例#3
0
        public async Task <string> GetDecimals()
        {
            var result = await GetTokenDecimals.SendRequestAsync().ConfigureAwait(false);

            return(result.Stack[0].Value.ToString());
        }