Skip to content

Commit

Permalink
chore: extract FilterName to a const
Browse files Browse the repository at this point in the history
  • Loading branch information
agparadiso committed Feb 20, 2024
1 parent 2c47244 commit 6ace734
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/services/relay/evm/functions/coordinator_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types"
)

const logPollerWrapperV1 = "FunctionsLogPollerWrapperV1"

type CoordinatorV1 struct {
address common.Address
abiArgs abi.Arguments
Expand Down Expand Up @@ -43,7 +45,7 @@ func (c *CoordinatorV1) RegisterFilters() error {

return c.logPoller.RegisterFilter(
logpoller.Filter{
Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "1"),
Name: logpoller.FilterName(logPollerWrapperV1, c.address.String()),
EventSigs: []common.Hash{
functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(),
functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(),
Expand Down
4 changes: 3 additions & 1 deletion core/services/relay/evm/functions/coordinator_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types"
)

const logPollerWrapperV2 = "FunctionsLogPollerWrapperV2"

type CoordinatorV2 struct {
address common.Address
abiArgs abi.Arguments
Expand Down Expand Up @@ -43,7 +45,7 @@ func (c *CoordinatorV2) RegisterFilters() error {

return c.logPoller.RegisterFilter(
logpoller.Filter{
Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "2"),
Name: logpoller.FilterName(logPollerWrapperV2, c.address.String()),
EventSigs: []common.Hash{
functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(),
functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(),
Expand Down

0 comments on commit 6ace734

Please sign in to comment.