public Task HandleAsync(TransactionLogWrapper transactionLog) { var eventValues = transactionLog.Decode <TransferEvent>(); EventsHandled.Add((transactionLog, eventValues)); return(Task.CompletedTask); }
public async Task HandleAsync(TransactionLogWrapper transactionLog) { try { if (!transactionLog.IsForEvent <TEvent>()) { return; } var eventValues = transactionLog.Decode <TEvent>(); if (eventValues == null) { return; } _currentBatch.Enqueue(eventValues); if (_currentBatch.Count == _logsPerIndexBatch) { await _indexer.IndexAsync(_currentBatch); _currentBatch.Clear(); } } catch (Exception) { //Error whilst handling transaction log //expected event signature may differ from the expected event. } }
public Task HandleAsync(TransactionLogWrapper transactionLog) { try { if (!transactionLog.IsForEvent <TransferEvent>()) { return(Task.CompletedTask); } var eventValues = transactionLog.Decode <TransferEvent>(); TransferEventsHandled.Add((transactionLog, eventValues)); } catch (Exception) { //Error whilst handling transaction log //expected event signature may differ from the expected event. TransferEventsWithDifferentSignature.Add(transactionLog); } return(Task.CompletedTask); }
public Task HandleAsync(TransactionLogWrapper transactionLog) { if (!transactionLog.IsForEvent <TEvent>()) { return(Task.CompletedTask); } var eventValues = transactionLog.Decode <TEvent>(); if (eventValues == null || eventValues.Event == null) { return(Task.CompletedTask); } System.Console.WriteLine($"[EVENT]"); System.Console.WriteLine($"\t[{_eventName}]"); foreach (var prop in eventValues.Event.GetType().GetProperties()) { System.Console.WriteLine($"\t\t[{prop.Name}:{prop.GetValue(eventValues.Event) ?? "null"}]"); } return(Task.CompletedTask); }
public Task HandleAsync(TransactionLogWrapper transactionLog) { Log($"[TransactionLog] Hash:{transactionLog.Transaction.TransactionHash}, Index:{transactionLog.LogIndex}, Address:{transactionLog.Log.Address}"); return(Task.CompletedTask); }
public async Task HandleAsync(TransactionLogWrapper txLog) { await _transactionLogRepository.UpsertAsync( txLog.Log); }
public Task HandleAsync(TransactionLogWrapper transactionLog) { EventsHandled.Add(transactionLog); return(Task.CompletedTask); }
public async Task HandleAsync(TransactionLogWrapper txLog) { await TransactionLogRepository.UpsertAsync( txLog.Log).ConfigureAwait(false); }