From 3acb2c4297197772f600b239c45e2b4212625473 Mon Sep 17 00:00:00 2001 From: ilija Date: Thu, 13 Jun 2024 16:26:10 +0200 Subject: [PATCH] Resolve merge issues in chain_reader_interface_tester.go --- .../chain_reader_interface_tester.go | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go b/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go index a2c9180d3bf..61a45996ac2 100644 --- a/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go +++ b/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go @@ -83,6 +83,9 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { Contracts: map[string]types.ChainContractReader{ AnyContractName: { ContractABI: chain_reader_tester.ChainReaderTesterMetaData.ABI, + ContractPollingFilter: types.ContractPollingFilter{ + GenericEventNames: []string{EventName, EventWithFilterName}, + }, Configs: map[string]*types.ChainReaderDefinition{ MethodTakingLatestParamsReturningTestStruct: { ChainSpecificName: "getElementAtIndex", @@ -110,22 +113,30 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { EventWithFilterName: { ChainSpecificName: "Triggered", ReadType: types.Event, - EventInputFields: []string{"Field"}, + EventDefinitions: &types.EventDefinitions{InputFields: []string{"Field"}}, ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, triggerWithDynamicTopic: { ChainSpecificName: triggerWithDynamicTopic, ReadType: types.Event, - EventInputFields: []string{"fieldHash"}, + EventDefinitions: &types.EventDefinitions{ + InputFields: []string{"fieldHash"}, + // no specific reason for filter being defined here insted on contract level, + // this is just for test case variety + PollingFilter: &types.PollingFilter{}, + }, InputModifications: codec.ModifiersConfig{ &codec.RenameModifierConfig{Fields: map[string]string{"FieldHash": "Field"}}, }, ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, triggerWithAllTopics: { - ChainSpecificName: triggerWithAllTopics, - ReadType: types.Event, - EventInputFields: []string{"Field1", "Field2", "Field3"}, + ChainSpecificName: triggerWithAllTopics, + ReadType: types.Event, + EventDefinitions: &types.EventDefinitions{ + InputFields: []string{"Field1", "Field2", "Field3"}, + PollingFilter: &types.PollingFilter{}, + }, ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, MethodReturningSeenStruct: {