From a979e0dc4276aa0479731c525d78b0d237b8decf Mon Sep 17 00:00:00 2001 From: Awbrey Hughlett Date: Fri, 12 Apr 2024 10:29:55 -0600 Subject: [PATCH] remove address from remappings --- core/chains/evm/logpoller/mapper.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/core/chains/evm/logpoller/mapper.go b/core/chains/evm/logpoller/mapper.go index e2ad70ae785..18dfd13642e 100644 --- a/core/chains/evm/logpoller/mapper.go +++ b/core/chains/evm/logpoller/mapper.go @@ -44,7 +44,7 @@ func (m *EventFilterMapper) remap(filter query.KeyFilter) (query.KeyFilter, erro } if addEventSigFilter { - remapped.Expressions = append(remapped.Expressions, NewEventBySigFilter(m.Address, m.Hash)) + remapped.Expressions = append(remapped.Expressions, NewEventBySigFilter(m.Hash)) } return remapped, nil @@ -86,23 +86,21 @@ func (m *EventFilterMapper) remapPrimitive(key string, expression query.Expressi return remapped, false, err case *query.ComparerPrimitive: if val, ok := m.EventDataWords[primitive.Name]; ok { - return NewEventByWordFilter(m.Address, m.Hash, val, primitive.ValueComparers), true, nil + return NewEventByWordFilter(m.Hash, val, primitive.ValueComparers), true, nil } - return NewEventByTopicFilter(m.Address, m.Hash, m.Topics[key].Index, primitive.ValueComparers), true, nil + return NewEventByTopicFilter(m.Hash, m.Topics[key].Index, primitive.ValueComparers), true, nil default: return expression, false, nil } } type EventBySigFilter struct { - Address common.Address EventSig common.Hash } -func NewEventBySigFilter(address common.Address, eventSig common.Hash) query.Expression { +func NewEventBySigFilter(eventSig common.Hash) query.Expression { return query.Expression{Primitive: &EventBySigFilter{ - Address: address, EventSig: eventSig, }} } @@ -137,15 +135,13 @@ func (f *FinalityFilter) Accept(visitor query.Visitor) { } type EventByWordFilter struct { - Address common.Address EventSig common.Hash WordIndex uint8 ValueComparers []query.ValueComparer } -func NewEventByWordFilter(address common.Address, eventSig common.Hash, wordIndex uint8, valueComparers []query.ValueComparer) query.Expression { +func NewEventByWordFilter(eventSig common.Hash, wordIndex uint8, valueComparers []query.ValueComparer) query.Expression { return query.Expression{Primitive: &EventByWordFilter{ - Address: address, EventSig: eventSig, WordIndex: wordIndex, ValueComparers: valueComparers, @@ -160,15 +156,13 @@ func (f *EventByWordFilter) Accept(visitor query.Visitor) { } type EventByTopicFilter struct { - Address common.Address EventSig common.Hash Topic uint64 ValueComparers []query.ValueComparer } -func NewEventByTopicFilter(address common.Address, eventSig common.Hash, topicIndex uint64, valueComparers []query.ValueComparer) query.Expression { +func NewEventByTopicFilter(eventSig common.Hash, topicIndex uint64, valueComparers []query.ValueComparer) query.Expression { return query.Expression{Primitive: &EventByTopicFilter{ - Address: address, EventSig: eventSig, Topic: topicIndex, ValueComparers: valueComparers,