Esempio n. 1
0
        public void GetDetailsTest()
        {
            var address = "0xFB205BFAF7D129f35f37eA5556A118ED3EE5cBf9";
            var abi     = EtherscanClient.GetABIAsync(address).Result;
            var product = new InsuranceProduct(address, abi);

            var details = product.GetProductAsync().Result;

            Assert.IsNotNull(details.Title);
        }
 /// <summary>
 /// The instance constructor.
 /// </summary>
 /// <param name="nodeSettings">The <see cref="NodeSettings"/>.</param>
 /// <param name="asyncProvider">The <see cref="IAsyncProvider"/>.</param>
 /// <param name="nodeLifetime">The <see cref="INodeLifetime"/>.</param>
 /// <param name="externalApiSettings">The <see cref="ExternalApiSettings"/>.</param>
 public ExternalApiPoller(NodeSettings nodeSettings,
                          IAsyncProvider asyncProvider,
                          INodeLifetime nodeLifetime,
                          ExternalApiSettings externalApiSettings)
 {
     this.asyncProvider       = asyncProvider;
     this.nodeLifetime        = nodeLifetime;
     this.logger              = nodeSettings.LoggerFactory.CreateLogger(this.GetType().FullName);
     this.externalApiSettings = externalApiSettings;
     this.etherscanClient     = new EtherscanClient(this.externalApiSettings);
     this.coinGeckoClient     = new CoinGeckoClient(this.externalApiSettings);
 }
Esempio n. 3
0
 public void BalanceTest()
 {
     var etherscan = new EtherscanClient(APIKEY);
     var amount    = etherscan.GetAccountBalance(ADDRESS);
 }
Esempio n. 4
0
 public void TransactionTest()
 {
     var etherscan    = new EtherscanClient(APIKEY);
     var transactions = etherscan.GetTransactions(ADDRESS);
 }
Esempio n. 5
0
 public void Etherscan_Test()
 {
     var result = EtherscanClient.GetABIAsync("0x16ecc82b4E3e5Ff5A4dB8510ED191282A37639B0").Result;
 }