public Task HandleAsync(Block block, TransactionResult transactionResult, LogEvent logEvent) { var eventData = new ContractDeployed(); eventData.MergeFrom(logEvent); _deployedContractAddressProvider.AddDeployedContractAddress(eventData.Address); Logger.LogTrace($"Added deployed contract address of {eventData}"); return(Task.CompletedTask); }
public async Task HandleEventAsync(BestChainFoundEventData eventData) { var chain = await _blockchainService.GetChainAsync(); var addresses = await _contractDeployDiscoveryService.GetDeployedContractAddresses(chain, eventData.ExecutedBlocks); foreach (var address in addresses) { _deployedContractAddressProvider.AddDeployedContractAddress(address); } }
public async Task HandleAsync(Block block, TransactionResult transactionResult, LogEvent logEvent) { var eventData = new ContractDeployed(); eventData.MergeFrom(logEvent); _deployedContractAddressProvider.AddDeployedContractAddress(eventData.Address, new BlockIndex { BlockHash = block.GetHash(), BlockHeight = block.Height }); Logger.LogDebug($"Added deployed contract address of {eventData}"); await _smartContractRegistrationService.AddSmartContractRegistrationAsync(eventData.Address, eventData.CodeHash, new BlockIndex { BlockHash = block.GetHash(), BlockHeight = block.Height }); }