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);
 }
Пример #2
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);
 }
Пример #3
0
        public async Task <object> ExecuteTestAsync(IClient client)
        {
            var ethGetBlockTransactionCountByNumber = new EthGetBlockTransactionCountByNumber(client);

            return(await ethGetBlockTransactionCountByNumber.SendRequestAsync(BlockParameter.CreateLatest()));
        }
Пример #4
0
        public override async Task <HexBigInteger> ExecuteAsync(IClient client)
        {
            var ethGetBlockTransactionCountByNumber = new EthGetBlockTransactionCountByNumber(client);

            return(await ethGetBlockTransactionCountByNumber.SendRequestAsync(new BlockParameter(Settings.GetBlockNumber())));
        }
 public async Task<dynamic> ExecuteTestAsync(RpcClient client)
 {
     var ethGetBlockTransactionCountByNumber = new EthGetBlockTransactionCountByNumber(client);
     return await ethGetBlockTransactionCountByNumber.SendRequestAsync( BlockParameter.CreateLatest());
 }