public EthBlockCrawler(Logger logger, string[] addresses, uint blockConfirmations, EthAPI api) { this.addressesToWatch = addresses; this.web3 = api.GetWeb3Client(); this.logger = logger; processor = web3.Processing.Blocks.CreateBlockProcessor(steps => { steps.TransactionStep.SetMatchCriteria(t => t.Transaction.IsToAny(addressesToWatch)); steps.TransactionReceiptStep.AddSynchronousProcessorHandler(tx => AddTxrVO(tx)); }, blockConfirmations // block confirmations count ); cancellationToken = new CancellationToken(); }
public BlockIterator(EthAPI api) { this.currentBlock = api.GetBlockHeight(); this.currentTransaction = 0; }
public EvmBlockCrawler(Logger logger, string[] addresses, uint blockConfirmations, EthAPI api, Func <string, Address> encodeHandler, Func <Nethereum.RPC.Eth.DTOs.Transaction, Address> extractor, string platform) { this.addressesToWatch = addresses; this.web3 = api.GetWeb3Client(); this.logger = logger; this.encodeHandler = encodeHandler; this.platform = platform; this.addressExtractor = extractor; processor = web3.Processing.Blocks.CreateBlockProcessor(steps => { steps.TransactionStep.SetMatchCriteria(t => t.Transaction.IsToAny(addressesToWatch)); steps.TransactionReceiptStep.AddSynchronousProcessorHandler(tx => AddTxrVO(tx)); }, blockConfirmations // block confirmations count ); cancellationToken = new CancellationToken(); }