@@ -54,11 +54,12 @@ type IndexedField struct {
54
54
}
55
55
56
56
type filterConfig struct {
57
- idl string
58
- IndexedField0 * string
59
- IndexedField1 * string
60
- IndexedField2 * string
61
- IndexedField3 * string
57
+ idl string
58
+ includeReverted bool
59
+ indexedField0 * string
60
+ indexedField1 * string
61
+ indexedField2 * string
62
+ indexedField3 * string
62
63
}
63
64
64
65
var (
@@ -76,19 +77,22 @@ var (
76
77
// Map of relevant events and their metadata required to build the codec and bind program addresses
77
78
var eventFilterConfigMap = map [string ]filterConfig {
78
79
consts .EventNameCCIPMessageSent : {
79
- idl : ccipRouterIDL ,
80
- IndexedField0 : & msgSentSrcChainPath ,
81
- IndexedField1 : & msgSentDestChainPath ,
82
- IndexedField2 : & msgSentSeqNumPath ,
80
+ idl : ccipRouterIDL ,
81
+ includeReverted : false ,
82
+ indexedField0 : & msgSentSrcChainPath ,
83
+ indexedField1 : & msgSentDestChainPath ,
84
+ indexedField2 : & msgSentSeqNumPath ,
83
85
},
84
86
consts .EventNameCommitReportAccepted : {
85
- idl : ccipOffRampIDL ,
87
+ idl : ccipOffRampIDL ,
88
+ includeReverted : false ,
86
89
},
87
90
consts .EventNameExecutionStateChanged : {
88
- idl : ccipOffRampIDL ,
89
- IndexedField0 : & execStateChangedSrcChainPath ,
90
- IndexedField1 : & execStateChangedSeqNumPath ,
91
- IndexedField2 : & execStateChangedStatePath ,
91
+ idl : ccipOffRampIDL ,
92
+ includeReverted : true ,
93
+ indexedField0 : & execStateChangedSrcChainPath ,
94
+ indexedField1 : & execStateChangedSeqNumPath ,
95
+ indexedField2 : & execStateChangedStatePath ,
92
96
},
93
97
}
94
98
@@ -203,7 +207,7 @@ func (a *SolanaAccessor) registerFilterIfNotExists(
203
207
StartingBlock : conf .GetStartingBlock (),
204
208
Retention : conf .GetRetention (),
205
209
MaxLogsKept : conf .GetMaxLogsKept (),
206
- IncludeReverted : conf . GetIncludeReverted () ,
210
+ IncludeReverted : filterConfig . includeReverted ,
207
211
}
208
212
209
213
filterName := deriveName (filter )
@@ -303,17 +307,17 @@ func deriveName(filter logpollertypes.Filter) string {
303
307
func processSubKeyPaths (cfg filterConfig ) [][]string {
304
308
subKeyPaths := make ([][]string , 0 )
305
309
306
- if cfg .IndexedField0 != nil {
307
- subKeyPaths = append (subKeyPaths , strings .Split (* cfg .IndexedField0 , "." ))
310
+ if cfg .indexedField0 != nil {
311
+ subKeyPaths = append (subKeyPaths , strings .Split (* cfg .indexedField0 , "." ))
308
312
}
309
- if cfg .IndexedField1 != nil {
310
- subKeyPaths = append (subKeyPaths , strings .Split (* cfg .IndexedField1 , "." ))
313
+ if cfg .indexedField1 != nil {
314
+ subKeyPaths = append (subKeyPaths , strings .Split (* cfg .indexedField1 , "." ))
311
315
}
312
- if cfg .IndexedField2 != nil {
313
- subKeyPaths = append (subKeyPaths , strings .Split (* cfg .IndexedField2 , "." ))
316
+ if cfg .indexedField2 != nil {
317
+ subKeyPaths = append (subKeyPaths , strings .Split (* cfg .indexedField2 , "." ))
314
318
}
315
- if cfg .IndexedField3 != nil {
316
- subKeyPaths = append (subKeyPaths , strings .Split (* cfg .IndexedField3 , "." ))
319
+ if cfg .indexedField3 != nil {
320
+ subKeyPaths = append (subKeyPaths , strings .Split (* cfg .indexedField3 , "." ))
317
321
}
318
322
319
323
return subKeyPaths
0 commit comments