@nucypher/taco 0.7.0-alpha.10 → 0.7.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/conditions/const.d.ts +1 -0
- package/dist/cjs/conditions/const.js +2 -1
- package/dist/cjs/conditions/const.js.map +1 -1
- package/dist/cjs/conditions/context/context.js +2 -0
- package/dist/cjs/conditions/context/context.js.map +1 -1
- package/dist/cjs/conditions/schemas/context-variable.d.ts +93 -33
- package/dist/cjs/conditions/schemas/contract.d.ts +121 -49
- package/dist/cjs/conditions/schemas/json-api.d.ts +121 -49
- package/dist/cjs/conditions/schemas/json-rpc.d.ts +121 -49
- package/dist/cjs/conditions/schemas/json.d.ts +95 -35
- package/dist/cjs/conditions/schemas/return-value-test.d.ts +156 -60
- package/dist/cjs/conditions/schemas/rpc.d.ts +97 -37
- package/dist/cjs/conditions/schemas/signing.js +60 -31
- package/dist/cjs/conditions/schemas/signing.js.map +1 -1
- package/dist/cjs/conditions/schemas/time.d.ts +94 -34
- package/dist/cjs/conditions/schemas/variable-operation.d.ts +67 -19
- package/dist/cjs/conditions/schemas/variable-operation.js +27 -3
- package/dist/cjs/conditions/schemas/variable-operation.js.map +1 -1
- package/dist/es/conditions/const.d.ts +1 -0
- package/dist/es/conditions/const.js +1 -0
- package/dist/es/conditions/const.js.map +1 -1
- package/dist/es/conditions/context/context.js +3 -1
- package/dist/es/conditions/context/context.js.map +1 -1
- package/dist/es/conditions/schemas/context-variable.d.ts +95 -35
- package/dist/es/conditions/schemas/contract.d.ts +121 -49
- package/dist/es/conditions/schemas/json-api.d.ts +121 -49
- package/dist/es/conditions/schemas/json-rpc.d.ts +121 -49
- package/dist/es/conditions/schemas/json.d.ts +95 -35
- package/dist/es/conditions/schemas/return-value-test.d.ts +156 -60
- package/dist/es/conditions/schemas/rpc.d.ts +97 -37
- package/dist/es/conditions/schemas/signing.js +60 -31
- package/dist/es/conditions/schemas/signing.js.map +1 -1
- package/dist/es/conditions/schemas/time.d.ts +94 -34
- package/dist/es/conditions/schemas/variable-operation.d.ts +67 -19
- package/dist/es/conditions/schemas/variable-operation.js +28 -4
- package/dist/es/conditions/schemas/variable-operation.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.es.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -8,90 +8,150 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
8
8
|
returnValueTest: z.ZodEffects<z.ZodObject<{
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
11
|
-
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
12
|
-
operation: z.ZodEnum<[
|
|
11
|
+
operations: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{} & {
|
|
12
|
+
operation: z.ZodEnum<[string, ...string[]]>;
|
|
13
13
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
operation:
|
|
15
|
+
operation: string;
|
|
16
16
|
value?: any;
|
|
17
17
|
}, {
|
|
18
|
-
operation:
|
|
18
|
+
operation: string;
|
|
19
19
|
value?: any;
|
|
20
20
|
}>, {
|
|
21
|
-
operation:
|
|
21
|
+
operation: string;
|
|
22
22
|
value?: any;
|
|
23
23
|
}, {
|
|
24
|
-
operation:
|
|
24
|
+
operation: string;
|
|
25
25
|
value?: any;
|
|
26
26
|
}>, {
|
|
27
|
-
operation:
|
|
27
|
+
operation: string;
|
|
28
28
|
value?: any;
|
|
29
29
|
}, {
|
|
30
|
-
operation:
|
|
30
|
+
operation: string;
|
|
31
31
|
value?: any;
|
|
32
|
-
}>,
|
|
32
|
+
}>, z.ZodObject<{} & {
|
|
33
|
+
operation: z.ZodLiteral<"create2">;
|
|
34
|
+
value: z.ZodObject<{
|
|
35
|
+
deployerAddress: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
36
|
+
bytecodeHash: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
deployerAddress: string;
|
|
39
|
+
bytecodeHash: string;
|
|
40
|
+
}, {
|
|
41
|
+
deployerAddress: string;
|
|
42
|
+
bytecodeHash: string;
|
|
43
|
+
}>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
value: {
|
|
46
|
+
deployerAddress: string;
|
|
47
|
+
bytecodeHash: string;
|
|
48
|
+
};
|
|
49
|
+
operation: "create2";
|
|
50
|
+
}, {
|
|
51
|
+
value: {
|
|
52
|
+
deployerAddress: string;
|
|
53
|
+
bytecodeHash: string;
|
|
54
|
+
};
|
|
55
|
+
operation: "create2";
|
|
56
|
+
}>]>, "many">>;
|
|
33
57
|
} & {
|
|
34
58
|
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
35
59
|
}, "strip", z.ZodTypeAny, {
|
|
36
60
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
37
|
-
index?: number | undefined;
|
|
38
61
|
value?: any;
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
index?: number | undefined;
|
|
63
|
+
operations?: ({
|
|
64
|
+
operation: string;
|
|
41
65
|
value?: any;
|
|
42
|
-
}
|
|
66
|
+
} | {
|
|
67
|
+
value: {
|
|
68
|
+
deployerAddress: string;
|
|
69
|
+
bytecodeHash: string;
|
|
70
|
+
};
|
|
71
|
+
operation: "create2";
|
|
72
|
+
})[] | undefined;
|
|
43
73
|
}, {
|
|
44
74
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
45
|
-
index?: number | undefined;
|
|
46
75
|
value?: any;
|
|
47
|
-
|
|
48
|
-
|
|
76
|
+
index?: number | undefined;
|
|
77
|
+
operations?: ({
|
|
78
|
+
operation: string;
|
|
49
79
|
value?: any;
|
|
50
|
-
}
|
|
80
|
+
} | {
|
|
81
|
+
value: {
|
|
82
|
+
deployerAddress: string;
|
|
83
|
+
bytecodeHash: string;
|
|
84
|
+
};
|
|
85
|
+
operation: "create2";
|
|
86
|
+
})[] | undefined;
|
|
51
87
|
}>, {
|
|
52
88
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
53
|
-
index?: number | undefined;
|
|
54
89
|
value?: any;
|
|
55
|
-
|
|
56
|
-
|
|
90
|
+
index?: number | undefined;
|
|
91
|
+
operations?: ({
|
|
92
|
+
operation: string;
|
|
57
93
|
value?: any;
|
|
58
|
-
}
|
|
94
|
+
} | {
|
|
95
|
+
value: {
|
|
96
|
+
deployerAddress: string;
|
|
97
|
+
bytecodeHash: string;
|
|
98
|
+
};
|
|
99
|
+
operation: "create2";
|
|
100
|
+
})[] | undefined;
|
|
59
101
|
}, {
|
|
60
102
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
61
|
-
index?: number | undefined;
|
|
62
103
|
value?: any;
|
|
63
|
-
|
|
64
|
-
|
|
104
|
+
index?: number | undefined;
|
|
105
|
+
operations?: ({
|
|
106
|
+
operation: string;
|
|
65
107
|
value?: any;
|
|
66
|
-
}
|
|
108
|
+
} | {
|
|
109
|
+
value: {
|
|
110
|
+
deployerAddress: string;
|
|
111
|
+
bytecodeHash: string;
|
|
112
|
+
};
|
|
113
|
+
operation: "create2";
|
|
114
|
+
})[] | undefined;
|
|
67
115
|
}>;
|
|
68
116
|
}, "strip", z.ZodTypeAny, {
|
|
69
117
|
conditionType: "rpc";
|
|
70
|
-
method: "eth_getBalance";
|
|
71
118
|
returnValueTest: {
|
|
72
119
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
73
|
-
index?: number | undefined;
|
|
74
120
|
value?: any;
|
|
75
|
-
|
|
76
|
-
|
|
121
|
+
index?: number | undefined;
|
|
122
|
+
operations?: ({
|
|
123
|
+
operation: string;
|
|
77
124
|
value?: any;
|
|
78
|
-
}
|
|
125
|
+
} | {
|
|
126
|
+
value: {
|
|
127
|
+
deployerAddress: string;
|
|
128
|
+
bytecodeHash: string;
|
|
129
|
+
};
|
|
130
|
+
operation: "create2";
|
|
131
|
+
})[] | undefined;
|
|
79
132
|
};
|
|
80
|
-
parameters: [string] | [string, string | number];
|
|
81
133
|
chain: number;
|
|
82
|
-
}, {
|
|
83
134
|
method: "eth_getBalance";
|
|
135
|
+
parameters: [string] | [string, string | number];
|
|
136
|
+
}, {
|
|
84
137
|
returnValueTest: {
|
|
85
138
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
86
|
-
index?: number | undefined;
|
|
87
139
|
value?: any;
|
|
88
|
-
|
|
89
|
-
|
|
140
|
+
index?: number | undefined;
|
|
141
|
+
operations?: ({
|
|
142
|
+
operation: string;
|
|
90
143
|
value?: any;
|
|
91
|
-
}
|
|
144
|
+
} | {
|
|
145
|
+
value: {
|
|
146
|
+
deployerAddress: string;
|
|
147
|
+
bytecodeHash: string;
|
|
148
|
+
};
|
|
149
|
+
operation: "create2";
|
|
150
|
+
})[] | undefined;
|
|
92
151
|
};
|
|
93
|
-
parameters: [string] | [string, string | number];
|
|
94
152
|
chain: number;
|
|
153
|
+
method: "eth_getBalance";
|
|
154
|
+
parameters: [string] | [string, string | number];
|
|
95
155
|
conditionType?: "rpc" | undefined;
|
|
96
156
|
}>;
|
|
97
157
|
export type RpcConditionProps = z.infer<typeof rpcConditionSchema>;
|
|
@@ -32,12 +32,12 @@ exports.abiParameterValidationSchema = zod_1.z
|
|
|
32
32
|
.int()
|
|
33
33
|
.nonnegative()
|
|
34
34
|
.describe('Index of parameter to check within abi calldata.'),
|
|
35
|
-
|
|
36
|
-
.number()
|
|
37
|
-
.int()
|
|
38
|
-
.nonnegative()
|
|
35
|
+
subIndices: zod_1.z
|
|
36
|
+
.array(zod_1.z.number().int().nonnegative())
|
|
39
37
|
.optional()
|
|
40
|
-
.describe('
|
|
38
|
+
.describe('Sequential indices for navigating nested structures (arrays and tuples). ' +
|
|
39
|
+
'The ABI type determines interpretation at each step: array types consume an index ' +
|
|
40
|
+
'and access that element, tuple types consume an index and access that field.'),
|
|
41
41
|
returnValueTest: return_value_test_1.blockchainReturnValueTestSchema
|
|
42
42
|
.optional()
|
|
43
43
|
.describe('Comparison check for value within calldata'),
|
|
@@ -119,6 +119,49 @@ const humanAbiCallSignatureSchema = zod_1.z
|
|
|
119
119
|
message: 'Invalid human readable ABI signature provided',
|
|
120
120
|
})
|
|
121
121
|
.describe('A human readable ABI signature, e.g. "transfer(address,uint256)"');
|
|
122
|
+
/**
|
|
123
|
+
* Resolves the final ParamType after applying subIndices navigation.
|
|
124
|
+
* Returns the resolved type or undefined if navigation fails (with errors added to ctx).
|
|
125
|
+
*
|
|
126
|
+
* @param ctx - The Zod refinement context.
|
|
127
|
+
* @param paramType - The starting ParamType to navigate from.
|
|
128
|
+
* @param subIndices - The array of indices to navigate through.
|
|
129
|
+
* @param signature - The ABI signature (for error messages).
|
|
130
|
+
* @param validationIndex - The index of the validation (for error paths).
|
|
131
|
+
* @returns The resolved ParamType or undefined if validation failed.
|
|
132
|
+
*/
|
|
133
|
+
function resolveTypeWithSubIndices(ctx, paramType, subIndices, signature, validationIndex) {
|
|
134
|
+
let currentType = paramType;
|
|
135
|
+
for (let i = 0; i < subIndices.length; i++) {
|
|
136
|
+
const idx = subIndices[i];
|
|
137
|
+
if (currentType.baseType === 'array') {
|
|
138
|
+
// Array type - navigate to element type (cannot validate bounds at schema time)
|
|
139
|
+
currentType = currentType.arrayChildren;
|
|
140
|
+
}
|
|
141
|
+
else if (currentType.baseType === 'tuple') {
|
|
142
|
+
// Tuple type - navigate to component at index
|
|
143
|
+
if (idx >= currentType.components.length) {
|
|
144
|
+
ctx.addIssue({
|
|
145
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
146
|
+
message: `Index ${idx} at subIndices position ${i} is out of range for tuple with ${currentType.components.length} fields`,
|
|
147
|
+
path: ['allowedAbiCalls', signature, validationIndex, 'subIndices'],
|
|
148
|
+
});
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
currentType = currentType.components[idx];
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// Not an indexable type
|
|
155
|
+
ctx.addIssue({
|
|
156
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
157
|
+
message: `Cannot apply index at subIndices position ${i}: type "${currentType.baseType}" is not indexable (not an array or tuple)`,
|
|
158
|
+
path: ['allowedAbiCalls', signature, validationIndex, 'subIndices'],
|
|
159
|
+
});
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return currentType;
|
|
164
|
+
}
|
|
122
165
|
/**
|
|
123
166
|
* Validates the allowed ABI calls against the provided signature and validations.
|
|
124
167
|
* This function is used in the superRefine method of the abiCallValidationSchema.
|
|
@@ -138,37 +181,23 @@ function validateAllowedAbiCall(ctx, signature, validations) {
|
|
|
138
181
|
message: `Parameter index, "${validation.parameterIndex}", is out of range`,
|
|
139
182
|
path: ['allowedAbiCalls', signature, index, 'parameterIndex'],
|
|
140
183
|
});
|
|
184
|
+
continue;
|
|
141
185
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
message: `Type at parameter index, "${validation.parameterIndex}", is not a tuple`,
|
|
149
|
-
path: ['allowedAbiCalls', signature, index, 'parameterIndex'],
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
else if (validation.indexWithinTuple >= paramType.components.length) {
|
|
153
|
-
// invalid index within tuple
|
|
154
|
-
ctx.addIssue({
|
|
155
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
156
|
-
message: `Index within tuple, "${validation.indexWithinTuple}", is out of range`,
|
|
157
|
-
path: ['allowedAbiCalls', signature, index, 'indexWithinTuple'],
|
|
158
|
-
});
|
|
186
|
+
let finalType = fragment.inputs[validation.parameterIndex];
|
|
187
|
+
// Validate and resolve subIndices if present
|
|
188
|
+
if (validation.subIndices && validation.subIndices.length > 0) {
|
|
189
|
+
const resolvedType = resolveTypeWithSubIndices(ctx, finalType, validation.subIndices, signature, index);
|
|
190
|
+
if (resolvedType === undefined) {
|
|
191
|
+
continue; // Validation failed, errors already added
|
|
159
192
|
}
|
|
193
|
+
finalType = resolvedType;
|
|
160
194
|
}
|
|
161
195
|
if (validation.nestedAbiValidation) {
|
|
162
|
-
// if there is nested ABI validation, the type must be bytes
|
|
163
|
-
|
|
164
|
-
if (validation.indexWithinTuple !== undefined) {
|
|
165
|
-
// if there is an index within tuple, get the type of the component at that index
|
|
166
|
-
paramType = paramType.components[validation.indexWithinTuple];
|
|
167
|
-
}
|
|
168
|
-
if (paramType.baseType !== 'bytes') {
|
|
196
|
+
// if there is nested ABI validation, the final type must be bytes
|
|
197
|
+
if (finalType.baseType !== 'bytes') {
|
|
169
198
|
ctx.addIssue({
|
|
170
199
|
code: zod_1.z.ZodIssueCode.custom,
|
|
171
|
-
message: `Invalid type for nested ABI validation, "${
|
|
200
|
+
message: `Invalid type for nested ABI validation, "${finalType.baseType}"; expected bytes`,
|
|
172
201
|
path: ['allowedAbiCalls', signature, index],
|
|
173
202
|
});
|
|
174
203
|
}
|
|
@@ -176,7 +205,7 @@ function validateAllowedAbiCall(ctx, signature, validations) {
|
|
|
176
205
|
}
|
|
177
206
|
}
|
|
178
207
|
catch {
|
|
179
|
-
// even though abi signatures are already validated by nested schema - zod uses
|
|
208
|
+
// even though abi signatures are already validated by nested schema - zod uses "greedy" (continuable) validation so all validations are run
|
|
180
209
|
// ignore invalid ABI signature
|
|
181
210
|
}
|
|
182
211
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signing.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/signing.ts"],"names":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ject<{
|
|
|
8
8
|
returnValueTest: z.ZodEffects<z.ZodObject<{
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
11
|
-
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
12
|
-
operation: z.ZodEnum<[
|
|
11
|
+
operations: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{} & {
|
|
12
|
+
operation: z.ZodEnum<[string, ...string[]]>;
|
|
13
13
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
operation:
|
|
15
|
+
operation: string;
|
|
16
16
|
value?: any;
|
|
17
17
|
}, {
|
|
18
|
-
operation:
|
|
18
|
+
operation: string;
|
|
19
19
|
value?: any;
|
|
20
20
|
}>, {
|
|
21
|
-
operation:
|
|
21
|
+
operation: string;
|
|
22
22
|
value?: any;
|
|
23
23
|
}, {
|
|
24
|
-
operation:
|
|
24
|
+
operation: string;
|
|
25
25
|
value?: any;
|
|
26
26
|
}>, {
|
|
27
|
-
operation:
|
|
27
|
+
operation: string;
|
|
28
28
|
value?: any;
|
|
29
29
|
}, {
|
|
30
|
-
operation:
|
|
30
|
+
operation: string;
|
|
31
31
|
value?: any;
|
|
32
|
-
}>,
|
|
32
|
+
}>, z.ZodObject<{} & {
|
|
33
|
+
operation: z.ZodLiteral<"create2">;
|
|
34
|
+
value: z.ZodObject<{
|
|
35
|
+
deployerAddress: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
36
|
+
bytecodeHash: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
deployerAddress: string;
|
|
39
|
+
bytecodeHash: string;
|
|
40
|
+
}, {
|
|
41
|
+
deployerAddress: string;
|
|
42
|
+
bytecodeHash: string;
|
|
43
|
+
}>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
value: {
|
|
46
|
+
deployerAddress: string;
|
|
47
|
+
bytecodeHash: string;
|
|
48
|
+
};
|
|
49
|
+
operation: "create2";
|
|
50
|
+
}, {
|
|
51
|
+
value: {
|
|
52
|
+
deployerAddress: string;
|
|
53
|
+
bytecodeHash: string;
|
|
54
|
+
};
|
|
55
|
+
operation: "create2";
|
|
56
|
+
}>]>, "many">>;
|
|
33
57
|
} & {
|
|
34
58
|
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
35
59
|
}, "strip", z.ZodTypeAny, {
|
|
36
60
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
37
|
-
index?: number | undefined;
|
|
38
61
|
value?: any;
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
index?: number | undefined;
|
|
63
|
+
operations?: ({
|
|
64
|
+
operation: string;
|
|
41
65
|
value?: any;
|
|
42
|
-
}
|
|
66
|
+
} | {
|
|
67
|
+
value: {
|
|
68
|
+
deployerAddress: string;
|
|
69
|
+
bytecodeHash: string;
|
|
70
|
+
};
|
|
71
|
+
operation: "create2";
|
|
72
|
+
})[] | undefined;
|
|
43
73
|
}, {
|
|
44
74
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
45
|
-
index?: number | undefined;
|
|
46
75
|
value?: any;
|
|
47
|
-
|
|
48
|
-
|
|
76
|
+
index?: number | undefined;
|
|
77
|
+
operations?: ({
|
|
78
|
+
operation: string;
|
|
49
79
|
value?: any;
|
|
50
|
-
}
|
|
80
|
+
} | {
|
|
81
|
+
value: {
|
|
82
|
+
deployerAddress: string;
|
|
83
|
+
bytecodeHash: string;
|
|
84
|
+
};
|
|
85
|
+
operation: "create2";
|
|
86
|
+
})[] | undefined;
|
|
51
87
|
}>, {
|
|
52
88
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
53
|
-
index?: number | undefined;
|
|
54
89
|
value?: any;
|
|
55
|
-
|
|
56
|
-
|
|
90
|
+
index?: number | undefined;
|
|
91
|
+
operations?: ({
|
|
92
|
+
operation: string;
|
|
57
93
|
value?: any;
|
|
58
|
-
}
|
|
94
|
+
} | {
|
|
95
|
+
value: {
|
|
96
|
+
deployerAddress: string;
|
|
97
|
+
bytecodeHash: string;
|
|
98
|
+
};
|
|
99
|
+
operation: "create2";
|
|
100
|
+
})[] | undefined;
|
|
59
101
|
}, {
|
|
60
102
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
61
|
-
index?: number | undefined;
|
|
62
103
|
value?: any;
|
|
63
|
-
|
|
64
|
-
|
|
104
|
+
index?: number | undefined;
|
|
105
|
+
operations?: ({
|
|
106
|
+
operation: string;
|
|
65
107
|
value?: any;
|
|
66
|
-
}
|
|
108
|
+
} | {
|
|
109
|
+
value: {
|
|
110
|
+
deployerAddress: string;
|
|
111
|
+
bytecodeHash: string;
|
|
112
|
+
};
|
|
113
|
+
operation: "create2";
|
|
114
|
+
})[] | undefined;
|
|
67
115
|
}>;
|
|
68
116
|
}, "strip", z.ZodTypeAny, {
|
|
69
117
|
conditionType: "time";
|
|
70
|
-
method: "blocktime";
|
|
71
118
|
returnValueTest: {
|
|
72
119
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
73
|
-
index?: number | undefined;
|
|
74
120
|
value?: any;
|
|
75
|
-
|
|
76
|
-
|
|
121
|
+
index?: number | undefined;
|
|
122
|
+
operations?: ({
|
|
123
|
+
operation: string;
|
|
77
124
|
value?: any;
|
|
78
|
-
}
|
|
125
|
+
} | {
|
|
126
|
+
value: {
|
|
127
|
+
deployerAddress: string;
|
|
128
|
+
bytecodeHash: string;
|
|
129
|
+
};
|
|
130
|
+
operation: "create2";
|
|
131
|
+
})[] | undefined;
|
|
79
132
|
};
|
|
80
133
|
chain: number;
|
|
134
|
+
method: "blocktime";
|
|
81
135
|
}, {
|
|
82
136
|
returnValueTest: {
|
|
83
137
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
84
|
-
index?: number | undefined;
|
|
85
138
|
value?: any;
|
|
86
|
-
|
|
87
|
-
|
|
139
|
+
index?: number | undefined;
|
|
140
|
+
operations?: ({
|
|
141
|
+
operation: string;
|
|
88
142
|
value?: any;
|
|
89
|
-
}
|
|
143
|
+
} | {
|
|
144
|
+
value: {
|
|
145
|
+
deployerAddress: string;
|
|
146
|
+
bytecodeHash: string;
|
|
147
|
+
};
|
|
148
|
+
operation: "create2";
|
|
149
|
+
})[] | undefined;
|
|
90
150
|
};
|
|
91
151
|
chain: number;
|
|
92
152
|
conditionType?: "time" | undefined;
|