Exemple #1
0
 public BlockCrawlOrchestrator(IEthApiContractService ethApi, IEnumerable <BlockProcessingSteps> processingStepsCollection)
 {
     this.ProcessingStepsCollection = processingStepsCollection;
     EthApi           = ethApi;
     BlockCrawlerStep = new BlockCrawlerStep(ethApi);
     TransactionWithBlockCrawlerStep   = new TransactionCrawlerStep(ethApi);
     TransactionWithReceiptCrawlerStep = new TransactionReceiptCrawlerStep(ethApi);
     ContractCreatedCrawlerStep        = new ContractCreatedCrawlerStep(ethApi);
     FilterLogCrawlerStep = new FilterLogCrawlerStep(ethApi);
 }
Exemple #2
0
        protected virtual async Task CrawlTransactionReceipt(CrawlerStepCompleted <TransactionVO> completedStep)
        {
            var currentStepCompleted = await TransactionWithReceiptCrawlerStep.ExecuteStepAsync(completedStep.StepData,
                                                                                                completedStep.ExecutedStepsCollection);

            if (currentStepCompleted != null && currentStepCompleted.StepData.IsForContractCreation())
            {
                await ContractCreatedCrawlerStep.ExecuteStepAsync(currentStepCompleted.StepData, completedStep.ExecutedStepsCollection);
            }

            await CrawlFilterLogs(currentStepCompleted);
        }
Exemple #3
0
        protected virtual async Task CrawlTransactionReceiptAsync(CrawlerStepCompleted <TransactionVO> completedStep)
        {
            if (TransactionWithReceiptCrawlerStep.Enabled)
            {
                var currentStepCompleted = await TransactionWithReceiptCrawlerStep.ExecuteStepAsync(
                    completedStep.StepData,
                    completedStep.ExecutedStepsCollection).ConfigureAwait(false);

                if (currentStepCompleted != null && currentStepCompleted.StepData.IsForContractCreation() &&
                    ContractCreatedCrawlerStep.Enabled)
                {
                    await ContractCreatedCrawlerStep.ExecuteStepAsync(currentStepCompleted.StepData,
                                                                      completedStep.ExecutedStepsCollection).ConfigureAwait(false);
                }

                await CrawlFilterLogsAsync(currentStepCompleted).ConfigureAwait(false);
            }
        }