/// <inheritdoc />
        public async Task <BigInteger> GetBlockHeightAsync()
        {
            var           blockNumberHandler = new EthBlockNumber(this.web3.Client);
            HexBigInteger block = await blockNumberHandler.SendRequestAsync().ConfigureAwait(false);

            return(block.Value);
        }
 public EthApiBlockService(IClient client) : base(client)
 {
     GetBlockNumber = new EthBlockNumber(client);
     GetBlockTransactionCountByHash         = new EthGetBlockTransactionCountByHash(client);
     GetBlockTransactionCountByNumber       = new EthGetBlockTransactionCountByNumber(client);
     GetBlockWithTransactionsByHash         = new EthGetBlockWithTransactionsByHash(client);
     GetBlockWithTransactionsByNumber       = new EthGetBlockWithTransactionsByNumber(client);
     GetBlockWithTransactionsHashesByHash   = new EthGetBlockWithTransactionsHashesByHash(client);
     GetBlockWithTransactionsHashesByNumber = new EthGetBlockWithTransactionsHashesByNumber(client);
 }
Example #3
0
 public EthBlockService(RpcClient client) : base(client)
 {
     GetBlockNumber = new EthBlockNumber(client);
     GetBlockTransactionCountByHash = new EthGetBlockTransactionCountByHash(client);
     GetBlockTransactionCountByNumber = new EthGetBlockTransactionCountByNumber(client);
     GetBlockWithTransactionsByHash = new EthGetBlockWithTransactionsByHash(client);
     GetBlockWithTransactionsByNumber = new EthGetBlockWithTransactionsByNumber(client);
     GetBlockWithTransactionsHashesByHash = new EthGetBlockWithTransactionsHashesByHash(client);
     GetBlockWithTransactionsHashesByNumber = new EthGetBlockWithTransactionsHashesByNumber(client);
 }
Example #4
0
        public override async Task <HexBigInteger> ExecuteAsync(IClient client)
        {
            var ethBlockNumber = new EthBlockNumber(client);

            return(await ethBlockNumber.SendRequestAsync());
        }
Example #5
0
        public async Task <dynamic> ExecuteTestAsync(RpcClient client)
        {
            var ethBlockNumber = new EthBlockNumber(client);

            return(await ethBlockNumber.SendRequestAsync());
        }
 public async Task<dynamic> ExecuteTestAsync(RpcClient client)
 {
     var ethBlockNumber = new EthBlockNumber(client);
     return await ethBlockNumber.SendRequestAsync();
 }