Example #1
0
        public NeoNep5Service(IClient client) : base(client)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            GetTokenBalance     = new TokenBalanceOf(client);
            GetTokenDecimals    = new TokenDecimals(client);
            GetTokenName        = new TokenName(client);
            GetTokenTotalSupply = new TokenTotalSupply(client);
            GetTokenSymbol      = new TokenSymbol(client);
        }
Example #2
0
        public NeoNep5Service(IClient client, string tokenScriptHash) : base(client)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }
            if (string.IsNullOrEmpty(tokenScriptHash))
            {
                throw new ArgumentNullException(nameof(tokenScriptHash));
            }

            GetTokenBalance     = new TokenBalanceOf(client, tokenScriptHash);
            GetTokenDecimals    = new TokenDecimals(client, tokenScriptHash);
            GetTokenName        = new TokenName(client, tokenScriptHash);
            GetTokenTotalSupply = new TokenTotalSupply(client, tokenScriptHash);
            GetTokenSymbol      = new TokenSymbol(client, tokenScriptHash);
        }
Example #3
0
        public override async Task <Invoke> ExecuteAsync(IClient client)
        {
            var totalSupply = new TokenTotalSupply(client, Settings.GetNep5TokenHash());

            return(await totalSupply.SendRequestAsync());
        }