Skip to content

Commit

Permalink
feat: consolidate to robust address on events logs parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Aug 2, 2024
1 parent e3ff7f6 commit f1e5cfd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion parser/v2/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,17 @@ func (p *Parser) ParseEthLogs(_ context.Context, eventsData types.EventsData) (*
cmp.Compare(a.LogIndex, b.LogIndex),
)
})
if err != nil {
p.logger.Errorf("error retrieving selector_sig for hash: %s err: %s", event.SelectorID, err)
}

for idx, ethLog := range eventsData.EthLogs {
event, err := eventTools.ParseEthLog(eventsData.Tipset, ethLog, p.helper, uint64(idx))
emitter, err := ethLog.Address.ToFilecoinAddress()
if err != nil {
zap.S().Errorf("error retrieving selector_sig for hash: %s err: %s", event.SelectorID, err)
if event.Emitter, err = actors.ConsolidateRobustAddress(emitter, p.helper.GetActorsCache(), p.logger, p.config); err != nil {
return nil, err
}
}

parsed = append(parsed, event)
Expand Down

0 comments on commit f1e5cfd

Please sign in to comment.