Skip to content

Commit

Permalink
remove address curve check and add event config
Browse files Browse the repository at this point in the history
  • Loading branch information
EasterTheBunny committed Feb 25, 2025
1 parent 6d5a081 commit c31c4a2
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions integration-tests/relayinterface/chain_components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit c31c4a2

Please sign in to comment.