Skip to content

Commit

Permalink
log struct packing
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Jul 5, 2023
1 parent 68f9526 commit f2c3e41
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (p *logEventsPacker) PackLogData(log logpoller.Log) ([]byte, error) {
for _, topic := range log.GetTopics() {
topics = append(topics, topic)
}
return p.abi.Pack("checkLog", &i_log_automation.Log{
b, err := p.abi.Pack("checkLog", &i_log_automation.Log{
Index: big.NewInt(log.LogIndex),
TxIndex: big.NewInt(0), // TODO
TxHash: log.TxHash,
Expand All @@ -36,4 +36,8 @@ func (p *logEventsPacker) PackLogData(log logpoller.Log) ([]byte, error) {
Topics: topics,
Data: log.Data,
})
if err != nil {
return nil, err
}
return b[4:], nil
}

0 comments on commit f2c3e41

Please sign in to comment.