From c31c4a2cec8c3fb172316e7c7d293e1c915b2b87 Mon Sep 17 00:00:00 2001 From: Awbrey Hughlett Date: Thu, 20 Feb 2025 12:37:07 -0600 Subject: [PATCH] remove address curve check and add event config --- .../relayinterface/chain_components_test.go | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/integration-tests/relayinterface/chain_components_test.go b/integration-tests/relayinterface/chain_components_test.go index 7ce37c213..b9a81887b 100644 --- a/integration-tests/relayinterface/chain_components_test.go +++ b/integration-tests/relayinterface/chain_components_test.go @@ -88,6 +88,8 @@ func DisableTests(it *SolanaChainComponentsInterfaceTester[*testing.T]) { it.DisableTests([]string{ // solana is a no-op on confidence level ContractReaderGetLatestValueBasedOnConfidenceLevel, + ContractReaderGetLatestValueBasedOnConfidenceLevelForEvent, + // disable failing tests ContractReaderBatchGetLatestValueSetsErrorsProperly, ContractReaderGetLatestValue, @@ -96,14 +98,6 @@ func DisableTests(it *SolanaChainComponentsInterfaceTester[*testing.T]) { ContractReaderBatchGetLatestValueDifferentParamsResultsRetainOrder, ContractReaderBatchGetLatestValueDifferentParamsResultsRetainOrderMultipleContracts, - // tests to enable - // ContractReaderQueryKeyNotFound, - // ContractReaderQueryKeyReturnsData, - // ContractReaderGetLatestValueGetsLatestForEvent, - ContractReaderGetLatestValueBasedOnConfidenceLevelForEvent, - ContractReaderGetLatestValueReturnsNotFoundWhenNotTriggeredForEvent, - ContractReaderGetLatestValueWithFilteringForEvent, - // QueryKeys not implemented ContractReaderQueryKeysReturnsDataTwoEventTypes, ContractReaderQueryKeysNotFound, @@ -1057,6 +1051,36 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, }, EventName: { + ChainSpecificName: "TestEvent", + ReadType: config.Event, + InputModifications: commoncodec.ModifiersConfig{ + &commoncodec.PropertyExtractorConfig{ + FieldName: "Data", + EnablePathTraverse: true, + }, + &commoncodec.AddressBytesToStringModifierConfig{ + Fields: []string{"AccountStruct.AccountStr"}, + EnablePathTraverse: true, + }, + &commoncodec.ConstrainedBytesToStringModifierConfig{ + Fields: []string{"DifferentField", "NestedDynamicStruct.Inner.S"}, + EnablePathTraverse: true, + MaxLen: 32, + }, + }, + OutputModifications: commoncodec.ModifiersConfig{ + &commoncodec.PropertyExtractorConfig{FieldName: "Data"}, + &commoncodec.AddressBytesToStringModifierConfig{ + Fields: []string{"AccountStruct.AccountStr"}, + }, + &commoncodec.ConstrainedBytesToStringModifierConfig{ + Fields: []string{"DifferentField", "NestedDynamicStruct.Inner.S"}, + MaxLen: 32, + }, + }, + EventDefinitions: &config.EventDefinitions{}, + }, + EventWithFilterName: { ChainSpecificName: "TestEvent", ReadType: config.Event, InputModifications: commoncodec.ModifiersConfig{