Beispiel #1
0
        public static decimal GetAccountBalance(this EtherscanClient etherscan, params String[] addresses)
        {
            var request = etherscan.GetRestRequest("account", addresses.Length > 1 ? "balancemulti" : "balance");

            request.AddQueryParameter("address", String.Join(',', addresses));
            request.AddQueryParameter("tag", "latest");

            return(etherscan.ExecuteAsGet <Decimal>(request));
        }
        public static List <EtherscanTransaction> GetTransactions(this EtherscanClient etherscan, params String[] addresses)
        {
            if (addresses.Length == 0)
            {
                return(new List <EtherscanTransaction>());
            }

            var request = etherscan.GetRestRequest("account", "txlist");

            request.AddQueryParameter("address", String.Join(',', addresses));
            request.AddQueryParameter("sort", "asc");

            return(etherscan.ExecuteAsGet <List <EtherscanTransaction> >(request));
        }