@@ -31,7 +31,10 @@ type OperatorKey = keyof typeof operators
31
31
* @param filter - The set of filters to apply.
32
32
* @returns True if all filters pass, false otherwise.
33
33
*/
34
- export const handleAnd = ( context : TransactionEIP1559 | Record < string , unknown > , filter : Filter [ ] ) : boolean => {
34
+ export const handleAnd = (
35
+ context : TransactionEIP1559 | Record < string , unknown > ,
36
+ filter : Filter [ ] ,
37
+ ) : boolean => {
35
38
for ( let i = 0 ; i < filter . length ; i ++ ) {
36
39
if ( ! apply ( context , filter [ i ] as FilterObject ) ) {
37
40
return false
@@ -46,7 +49,10 @@ export const handleAnd = (context: TransactionEIP1559 | Record<string, unknown>,
46
49
* @param filter - The set of filters to apply.
47
50
* @returns True if any filter passes, false otherwise.
48
51
*/
49
- export const handleOr = ( context : TransactionEIP1559 | Record < string , unknown > , filter : Filter [ ] ) : boolean => {
52
+ export const handleOr = (
53
+ context : TransactionEIP1559 | Record < string , unknown > ,
54
+ filter : Filter [ ] ,
55
+ ) : boolean => {
50
56
for ( let i = 0 ; i < filter . length ; i ++ ) {
51
57
if ( apply ( context , filter [ i ] as FilterObject ) ) {
52
58
return true
@@ -169,7 +175,10 @@ export const handleLast = (
169
175
* @param filter - An object containing the index and the condition to check.
170
176
* @returns True if the value at the nth index meets the condition, false otherwise.
171
177
*/
172
- export const handleNth = ( context : Array < TransactionEIP1559 | Record < string , unknown > > , filter : NthFilter ) : boolean => {
178
+ export const handleNth = (
179
+ context : Array < TransactionEIP1559 | Record < string , unknown > > ,
180
+ filter : NthFilter ,
181
+ ) : boolean => {
173
182
const { index, value } = filter
174
183
175
184
if ( Number ( index ) < 0 || Number ( index ) >= context . length ) {
@@ -195,7 +204,10 @@ export const handleRegex = (context: string, filter: string): boolean => {
195
204
* @param filter - An object containing the bitmask and the value to compare against.
196
205
* @returns True if the masked context is equal to the value, false otherwise.
197
206
*/
198
- export const handleBitmask = ( context : bigint | boolean | number | string , filter : BitmaskFilter ) : boolean => {
207
+ export const handleBitmask = (
208
+ context : bigint | boolean | number | string ,
209
+ filter : BitmaskFilter ,
210
+ ) : boolean => {
199
211
const maskedContext = BigInt ( context ) & BigInt ( filter . bitmask )
200
212
if ( typeof filter . value === 'object' ) {
201
213
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -292,9 +304,14 @@ export const handleAbstractAbiDecode = (
292
304
* @param filter - The filter containing the ABI parameters.
293
305
* @returns The decoded ABI parameters.
294
306
*/
295
- export const handleAbiParamDecode = ( context : ByteArray | Hex , filter : AbiParamFilter ) => {
307
+ export const handleAbiParamDecode = (
308
+ context : ByteArray | Hex ,
309
+ filter : AbiParamFilter ,
310
+ ) => {
296
311
try {
297
- const params = parseAbiParameters ( filter . $abiParams . join ( ', ' ) ) as AbiParameter [ ]
312
+ const params = parseAbiParameters (
313
+ filter . $abiParams . join ( ', ' ) ,
314
+ ) as AbiParameter [ ]
298
315
const args = decodeAbiParameters ( params , context )
299
316
const namedArgs = params . reduce (
300
317
( acc : Record < string , unknown > , param : AbiParameter , index ) => {
0 commit comments