@boostxyz/sdk 0.0.0-alpha.2
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/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +27 -0
- package/dist/Actions/ContractAction.d.ts +327 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +486 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +1 -0
- package/dist/Actions/EventAction.d.ts +433 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +211 -0
- package/dist/AllowLists/AllowList.cjs +1 -0
- package/dist/AllowLists/AllowList.d.ts +33 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +28 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +452 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +138 -0
- package/dist/AllowLists/SimpleDenyList.cjs +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +306 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +202 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +4 -0
- package/dist/Auth/PassthroughAuth.cjs +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +38 -0
- package/dist/Boost.cjs +1 -0
- package/dist/Boost.d.ts +142 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +15 -0
- package/dist/BoostCore.cjs +2 -0
- package/dist/BoostCore.d.ts +460 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1105 -0
- package/dist/BoostRegistry.cjs +1 -0
- package/dist/BoostRegistry.d.ts +229 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +250 -0
- package/dist/Budgets/Budget.cjs +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +27 -0
- package/dist/Budgets/ManagedBudget.cjs +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1065 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +498 -0
- package/dist/Budgets/SimpleBudget.d.ts +793 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +726 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +149 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.d.ts +155 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +124 -0
- package/dist/Deployable/DeployableTarget.cjs +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +115 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +128 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +483 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +188 -0
- package/dist/Incentives/CGDAIncentive.cjs +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +560 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +249 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +652 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +622 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +292 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +545 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +1 -0
- package/dist/Incentives/Incentive.d.ts +39 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +280 -0
- package/dist/Incentives/PointsIncentive.cjs +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +615 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +197 -0
- package/dist/Validators/SignerValidator.cjs +1 -0
- package/dist/Validators/SignerValidator.d.ts +452 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +167 -0
- package/dist/Validators/Validator.cjs +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +25 -0
- package/dist/errors.cjs +1 -0
- package/dist/errors.d.ts +257 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +161 -0
- package/dist/generated-BaaleHW-.cjs +2 -0
- package/dist/generated-x_abr3Yv.js +6228 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1355 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +1454 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +643 -0
- package/package.json +197 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { eventActionAbi } from '@boostxyz/evm';
|
|
2
|
+
import type { Abi, AbiEvent, Address, ContractEventName, Hex, Log } from 'viem';
|
|
3
|
+
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
|
+
import { DeployableTarget } from '../Deployable/DeployableTarget';
|
|
5
|
+
import { type ActionClaimant, type ActionStep, type Criteria, type EventActionPayload, type GetLogsParams, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
6
|
+
export type { EventActionPayload };
|
|
7
|
+
/**
|
|
8
|
+
* A generic event action
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @class EventAction
|
|
12
|
+
* @typedef {EventAction}
|
|
13
|
+
* @extends {DeployableTarget<EventActionPayload>}
|
|
14
|
+
*/
|
|
15
|
+
export declare class EventAction extends DeployableTarget<EventActionPayload, typeof eventActionAbi> {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritdoc
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
* @readonly
|
|
21
|
+
* @type {*}
|
|
22
|
+
*/
|
|
23
|
+
readonly abi: readonly [{
|
|
24
|
+
readonly type: "constructor";
|
|
25
|
+
readonly inputs: readonly [];
|
|
26
|
+
readonly stateMutability: "nonpayable";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "error";
|
|
29
|
+
readonly inputs: readonly [];
|
|
30
|
+
readonly name: "CloneAlreadyInitialized";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "error";
|
|
33
|
+
readonly inputs: readonly [];
|
|
34
|
+
readonly name: "InitializerNotImplemented";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "error";
|
|
37
|
+
readonly inputs: readonly [];
|
|
38
|
+
readonly name: "InvalidInitialization";
|
|
39
|
+
}, {
|
|
40
|
+
readonly type: "error";
|
|
41
|
+
readonly inputs: readonly [];
|
|
42
|
+
readonly name: "InvalidInitializationData";
|
|
43
|
+
}, {
|
|
44
|
+
readonly type: "error";
|
|
45
|
+
readonly inputs: readonly [];
|
|
46
|
+
readonly name: "NotImplemented";
|
|
47
|
+
}, {
|
|
48
|
+
readonly type: "error";
|
|
49
|
+
readonly inputs: readonly [];
|
|
50
|
+
readonly name: "NotInitializing";
|
|
51
|
+
}, {
|
|
52
|
+
readonly type: "event";
|
|
53
|
+
readonly anonymous: false;
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "executor";
|
|
56
|
+
readonly internalType: "address";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
readonly indexed: true;
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "caller";
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
readonly indexed: false;
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "success";
|
|
66
|
+
readonly internalType: "bool";
|
|
67
|
+
readonly type: "bool";
|
|
68
|
+
readonly indexed: false;
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "data";
|
|
71
|
+
readonly internalType: "bytes";
|
|
72
|
+
readonly type: "bytes";
|
|
73
|
+
readonly indexed: false;
|
|
74
|
+
}];
|
|
75
|
+
readonly name: "ActionExecuted";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "event";
|
|
78
|
+
readonly anonymous: false;
|
|
79
|
+
readonly inputs: readonly [{
|
|
80
|
+
readonly name: "user";
|
|
81
|
+
readonly internalType: "address";
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
readonly indexed: true;
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "isValidated";
|
|
86
|
+
readonly internalType: "bool";
|
|
87
|
+
readonly type: "bool";
|
|
88
|
+
readonly indexed: false;
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "data";
|
|
91
|
+
readonly internalType: "bytes";
|
|
92
|
+
readonly type: "bytes";
|
|
93
|
+
readonly indexed: false;
|
|
94
|
+
}];
|
|
95
|
+
readonly name: "ActionValidated";
|
|
96
|
+
}, {
|
|
97
|
+
readonly type: "event";
|
|
98
|
+
readonly anonymous: false;
|
|
99
|
+
readonly inputs: readonly [{
|
|
100
|
+
readonly name: "version";
|
|
101
|
+
readonly internalType: "uint64";
|
|
102
|
+
readonly type: "uint64";
|
|
103
|
+
readonly indexed: false;
|
|
104
|
+
}];
|
|
105
|
+
readonly name: "Initialized";
|
|
106
|
+
}, {
|
|
107
|
+
readonly type: "function";
|
|
108
|
+
readonly inputs: readonly [];
|
|
109
|
+
readonly name: "VALIDATOR";
|
|
110
|
+
readonly outputs: readonly [{
|
|
111
|
+
readonly name: "";
|
|
112
|
+
readonly internalType: "contract AValidator";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
}];
|
|
115
|
+
readonly stateMutability: "view";
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
readonly inputs: readonly [{
|
|
119
|
+
readonly name: "";
|
|
120
|
+
readonly internalType: "bytes";
|
|
121
|
+
readonly type: "bytes";
|
|
122
|
+
}];
|
|
123
|
+
readonly name: "execute";
|
|
124
|
+
readonly outputs: readonly [{
|
|
125
|
+
readonly name: "";
|
|
126
|
+
readonly internalType: "bool";
|
|
127
|
+
readonly type: "bool";
|
|
128
|
+
}, {
|
|
129
|
+
readonly name: "";
|
|
130
|
+
readonly internalType: "bytes";
|
|
131
|
+
readonly type: "bytes";
|
|
132
|
+
}];
|
|
133
|
+
readonly stateMutability: "payable";
|
|
134
|
+
}, {
|
|
135
|
+
readonly type: "function";
|
|
136
|
+
readonly inputs: readonly [];
|
|
137
|
+
readonly name: "getActionClaimant";
|
|
138
|
+
readonly outputs: readonly [{
|
|
139
|
+
readonly name: "";
|
|
140
|
+
readonly internalType: "struct AEventAction.ActionClaimant";
|
|
141
|
+
readonly type: "tuple";
|
|
142
|
+
readonly components: readonly [{
|
|
143
|
+
readonly name: "signatureType";
|
|
144
|
+
readonly internalType: "enum AEventAction.SignatureType";
|
|
145
|
+
readonly type: "uint8";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "signature";
|
|
148
|
+
readonly internalType: "bytes4";
|
|
149
|
+
readonly type: "bytes4";
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "fieldIndex";
|
|
152
|
+
readonly internalType: "uint8";
|
|
153
|
+
readonly type: "uint8";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "targetContract";
|
|
156
|
+
readonly internalType: "address";
|
|
157
|
+
readonly type: "address";
|
|
158
|
+
}];
|
|
159
|
+
}];
|
|
160
|
+
readonly stateMutability: "view";
|
|
161
|
+
}, {
|
|
162
|
+
readonly type: "function";
|
|
163
|
+
readonly inputs: readonly [{
|
|
164
|
+
readonly name: "index";
|
|
165
|
+
readonly internalType: "uint256";
|
|
166
|
+
readonly type: "uint256";
|
|
167
|
+
}];
|
|
168
|
+
readonly name: "getActionStep";
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly internalType: "struct AEventAction.ActionStep";
|
|
172
|
+
readonly type: "tuple";
|
|
173
|
+
readonly components: readonly [{
|
|
174
|
+
readonly name: "signature";
|
|
175
|
+
readonly internalType: "bytes4";
|
|
176
|
+
readonly type: "bytes4";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "signatureType";
|
|
179
|
+
readonly internalType: "enum AEventAction.SignatureType";
|
|
180
|
+
readonly type: "uint8";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "actionType";
|
|
183
|
+
readonly internalType: "uint8";
|
|
184
|
+
readonly type: "uint8";
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "targetContract";
|
|
187
|
+
readonly internalType: "address";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "actionParameter";
|
|
191
|
+
readonly internalType: "struct AEventAction.Criteria";
|
|
192
|
+
readonly type: "tuple";
|
|
193
|
+
readonly components: readonly [{
|
|
194
|
+
readonly name: "filterType";
|
|
195
|
+
readonly internalType: "enum AEventAction.FilterType";
|
|
196
|
+
readonly type: "uint8";
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "fieldType";
|
|
199
|
+
readonly internalType: "enum AEventAction.PrimitiveType";
|
|
200
|
+
readonly type: "uint8";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "fieldIndex";
|
|
203
|
+
readonly internalType: "uint8";
|
|
204
|
+
readonly type: "uint8";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "filterData";
|
|
207
|
+
readonly internalType: "bytes";
|
|
208
|
+
readonly type: "bytes";
|
|
209
|
+
}];
|
|
210
|
+
}];
|
|
211
|
+
}];
|
|
212
|
+
readonly stateMutability: "view";
|
|
213
|
+
}, {
|
|
214
|
+
readonly type: "function";
|
|
215
|
+
readonly inputs: readonly [];
|
|
216
|
+
readonly name: "getActionSteps";
|
|
217
|
+
readonly outputs: readonly [{
|
|
218
|
+
readonly name: "";
|
|
219
|
+
readonly internalType: "struct AEventAction.ActionStep[]";
|
|
220
|
+
readonly type: "tuple[]";
|
|
221
|
+
readonly components: readonly [{
|
|
222
|
+
readonly name: "signature";
|
|
223
|
+
readonly internalType: "bytes4";
|
|
224
|
+
readonly type: "bytes4";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "signatureType";
|
|
227
|
+
readonly internalType: "enum AEventAction.SignatureType";
|
|
228
|
+
readonly type: "uint8";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "actionType";
|
|
231
|
+
readonly internalType: "uint8";
|
|
232
|
+
readonly type: "uint8";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "targetContract";
|
|
235
|
+
readonly internalType: "address";
|
|
236
|
+
readonly type: "address";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "actionParameter";
|
|
239
|
+
readonly internalType: "struct AEventAction.Criteria";
|
|
240
|
+
readonly type: "tuple";
|
|
241
|
+
readonly components: readonly [{
|
|
242
|
+
readonly name: "filterType";
|
|
243
|
+
readonly internalType: "enum AEventAction.FilterType";
|
|
244
|
+
readonly type: "uint8";
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "fieldType";
|
|
247
|
+
readonly internalType: "enum AEventAction.PrimitiveType";
|
|
248
|
+
readonly type: "uint8";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "fieldIndex";
|
|
251
|
+
readonly internalType: "uint8";
|
|
252
|
+
readonly type: "uint8";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "filterData";
|
|
255
|
+
readonly internalType: "bytes";
|
|
256
|
+
readonly type: "bytes";
|
|
257
|
+
}];
|
|
258
|
+
}];
|
|
259
|
+
}];
|
|
260
|
+
readonly stateMutability: "view";
|
|
261
|
+
}, {
|
|
262
|
+
readonly type: "function";
|
|
263
|
+
readonly inputs: readonly [];
|
|
264
|
+
readonly name: "getActionStepsCount";
|
|
265
|
+
readonly outputs: readonly [{
|
|
266
|
+
readonly name: "";
|
|
267
|
+
readonly internalType: "uint256";
|
|
268
|
+
readonly type: "uint256";
|
|
269
|
+
}];
|
|
270
|
+
readonly stateMutability: "view";
|
|
271
|
+
}, {
|
|
272
|
+
readonly type: "function";
|
|
273
|
+
readonly inputs: readonly [];
|
|
274
|
+
readonly name: "getComponentInterface";
|
|
275
|
+
readonly outputs: readonly [{
|
|
276
|
+
readonly name: "";
|
|
277
|
+
readonly internalType: "bytes4";
|
|
278
|
+
readonly type: "bytes4";
|
|
279
|
+
}];
|
|
280
|
+
readonly stateMutability: "pure";
|
|
281
|
+
}, {
|
|
282
|
+
readonly type: "function";
|
|
283
|
+
readonly inputs: readonly [{
|
|
284
|
+
readonly name: "data_";
|
|
285
|
+
readonly internalType: "bytes";
|
|
286
|
+
readonly type: "bytes";
|
|
287
|
+
}];
|
|
288
|
+
readonly name: "initialize";
|
|
289
|
+
readonly outputs: readonly [];
|
|
290
|
+
readonly stateMutability: "nonpayable";
|
|
291
|
+
}, {
|
|
292
|
+
readonly type: "function";
|
|
293
|
+
readonly inputs: readonly [{
|
|
294
|
+
readonly name: "";
|
|
295
|
+
readonly internalType: "bytes";
|
|
296
|
+
readonly type: "bytes";
|
|
297
|
+
}];
|
|
298
|
+
readonly name: "prepare";
|
|
299
|
+
readonly outputs: readonly [{
|
|
300
|
+
readonly name: "";
|
|
301
|
+
readonly internalType: "bytes";
|
|
302
|
+
readonly type: "bytes";
|
|
303
|
+
}];
|
|
304
|
+
readonly stateMutability: "view";
|
|
305
|
+
}, {
|
|
306
|
+
readonly type: "function";
|
|
307
|
+
readonly inputs: readonly [{
|
|
308
|
+
readonly name: "interfaceId";
|
|
309
|
+
readonly internalType: "bytes4";
|
|
310
|
+
readonly type: "bytes4";
|
|
311
|
+
}];
|
|
312
|
+
readonly name: "supportsInterface";
|
|
313
|
+
readonly outputs: readonly [{
|
|
314
|
+
readonly name: "";
|
|
315
|
+
readonly internalType: "bool";
|
|
316
|
+
readonly type: "bool";
|
|
317
|
+
}];
|
|
318
|
+
readonly stateMutability: "view";
|
|
319
|
+
}];
|
|
320
|
+
/**
|
|
321
|
+
* @inheritdoc
|
|
322
|
+
*
|
|
323
|
+
* @public
|
|
324
|
+
* @static
|
|
325
|
+
* @type {Address}
|
|
326
|
+
*/
|
|
327
|
+
static base: Address;
|
|
328
|
+
/**
|
|
329
|
+
* @inheritdoc
|
|
330
|
+
*
|
|
331
|
+
* @public
|
|
332
|
+
* @static
|
|
333
|
+
* @type {RegistryType}
|
|
334
|
+
*/
|
|
335
|
+
static registryType: RegistryType;
|
|
336
|
+
/**
|
|
337
|
+
* Gets a specific action event by index
|
|
338
|
+
*
|
|
339
|
+
* @public
|
|
340
|
+
* @async
|
|
341
|
+
* @param {number} index The index of the action event to retrieve
|
|
342
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionStep'>} [params]
|
|
343
|
+
* @returns {Promise<ActionStep>}
|
|
344
|
+
*/
|
|
345
|
+
getActionStep(index: number, params?: ReadParams<typeof eventActionAbi, 'getActionStep'>): Promise<ActionStep>;
|
|
346
|
+
/**
|
|
347
|
+
* Gets all action events
|
|
348
|
+
*
|
|
349
|
+
* @public
|
|
350
|
+
* @async
|
|
351
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]
|
|
352
|
+
* @returns {Promise<ActionStep[]>}
|
|
353
|
+
*/
|
|
354
|
+
getActionSteps(params?: ReadParams<typeof eventActionAbi, 'getActionSteps'>): Promise<ActionStep[]>;
|
|
355
|
+
/**
|
|
356
|
+
* Gets the count of action events
|
|
357
|
+
*
|
|
358
|
+
* @public
|
|
359
|
+
* @async
|
|
360
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionStepsCount'>} [params]
|
|
361
|
+
* @returns {Promise<bigint>}
|
|
362
|
+
*/
|
|
363
|
+
getActionStepsCount(params?: ReadParams<typeof eventActionAbi, 'getActionStepsCount'>): Promise<bigint>;
|
|
364
|
+
/**
|
|
365
|
+
* Retrieves the payload describing how claimants can be identified from logs or function calls.
|
|
366
|
+
*
|
|
367
|
+
* @public
|
|
368
|
+
* @async
|
|
369
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionClaimant'>} [params]
|
|
370
|
+
* @returns {Promise<ActionClaimant>}
|
|
371
|
+
*/
|
|
372
|
+
getActionClaimant(params?: ReadParams<typeof eventActionAbi, 'getActionClaimant'>): Promise<ActionClaimant>;
|
|
373
|
+
/**
|
|
374
|
+
* Executes a prepared event action
|
|
375
|
+
*
|
|
376
|
+
* @public
|
|
377
|
+
* @async
|
|
378
|
+
* @param {Hex} data
|
|
379
|
+
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
380
|
+
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
381
|
+
*/
|
|
382
|
+
execute(data: Hex, params?: WriteParams<typeof eventActionAbi, 'execute'>): Promise<readonly [boolean, `0x${string}`]>;
|
|
383
|
+
/**
|
|
384
|
+
* Executes a prepared event action
|
|
385
|
+
*
|
|
386
|
+
* @public
|
|
387
|
+
* @async
|
|
388
|
+
* @param {Hex} data
|
|
389
|
+
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
390
|
+
* @returns {unknown}
|
|
391
|
+
*/
|
|
392
|
+
executeRaw(data: Hex, params?: WriteParams<typeof eventActionAbi, 'execute'>): Promise<{
|
|
393
|
+
hash: `0x${string}`;
|
|
394
|
+
result: readonly [boolean, `0x${string}`];
|
|
395
|
+
}>;
|
|
396
|
+
/** Validates all action events
|
|
397
|
+
* @public
|
|
398
|
+
* @async
|
|
399
|
+
* @returns {Promise<boolean>}
|
|
400
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]
|
|
401
|
+
*/
|
|
402
|
+
validateActionSteps(params?: ReadParams<typeof eventActionAbi, 'getActionSteps'> & GetLogsParams<Abi, ContractEventName<Abi>> & {
|
|
403
|
+
knownEvents?: Record<Hex, AbiEvent>;
|
|
404
|
+
}): Promise<boolean>;
|
|
405
|
+
/**
|
|
406
|
+
* Validates a single action event
|
|
407
|
+
* @public
|
|
408
|
+
* @async
|
|
409
|
+
* @param {ActionStep} actionStep
|
|
410
|
+
* @returns {boolean}
|
|
411
|
+
*/
|
|
412
|
+
isActionStepValid(actionStep: ActionStep, params?: GetLogsParams<Abi, ContractEventName<Abi>> & {
|
|
413
|
+
knownEvents?: Record<Hex, AbiEvent>;
|
|
414
|
+
}): Promise<boolean>;
|
|
415
|
+
/**
|
|
416
|
+
* Validates a Viem event log against a given criteria.
|
|
417
|
+
*
|
|
418
|
+
* @param {Criteria} criteria - The criteria to validate against.
|
|
419
|
+
* @param {any[]} log - The Viem event log array.
|
|
420
|
+
* @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
|
|
421
|
+
*/
|
|
422
|
+
validateLogAgainstCriteria(criteria: Criteria, log: Log): Promise<boolean>;
|
|
423
|
+
/**
|
|
424
|
+
* @inheritdoc
|
|
425
|
+
*
|
|
426
|
+
* @public
|
|
427
|
+
* @param {?EventActionPayload} [_payload]
|
|
428
|
+
* @param {?DeployableOptions} [_options]
|
|
429
|
+
* @returns {GenericDeployableParams}
|
|
430
|
+
*/
|
|
431
|
+
buildParameters(_payload?: EventActionPayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
432
|
+
}
|
|
433
|
+
//# sourceMappingURL=EventAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventAction.d.ts","sourceRoot":"","sources":["../../src/Actions/EventAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAOf,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EACV,GAAG,EACH,QAAQ,EAER,OAAO,EACP,iBAAiB,EACjB,GAAG,EACH,GAAG,EACJ,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EAEjB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;;GAOG;AACH,qBAAa,WAAY,SAAQ,gBAAgB,CAC/C,kBAAkB,EAClB,OAAO,cAAc,CACtB;IACC;;;;;;OAMG;IACH,SAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAkB;IAC9C;;;;;;OAMG;IACH,OAAuB,IAAI,EAAE,OAAO,CAA0C;IAC9E;;;;;;OAMG;IACH,OAAuB,YAAY,EAAE,YAAY,CAAuB;IAExE;;;;;;;;OAQG;IACU,aAAa,CACxB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,EAAE,eAAe,CAAC;IAW7D;;;;;;;OAOG;IACU,cAAc,CACzB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,EAAE,gBAAgB,CAAC;IAU9D;;;;;;;OAOG;IACU,mBAAmB,CAC9B,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,EAAE,qBAAqB,CAAC;IAUnE;;;;;;;OAOG;IACU,iBAAiB,CAC5B,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,EAAE,mBAAmB,CAAC;IAUjE;;;;;;;;OAQG;IACU,OAAO,CAClB,IAAI,EAAE,GAAG,EACT,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC;IAKxD;;;;;;;;OAQG;IACU,UAAU,CACrB,IAAI,EAAE,GAAG,EACT,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC;;;;IAaxD;;;;;OAKG;IACU,mBAAmB,CAC9B,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,cAAc,EAAE,gBAAgB,CAAC,GAC1D,aAAa,CAAC,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG;QAC3C,WAAW,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;KACrC;IAWL;;;;;;OAMG;IACU,iBAAiB,CAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,aAAa,CAAC,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG;QACpD,WAAW,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;KACrC;IAiCH;;;;;;OAMG;IACU,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG;IA6CpE;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,kBAAkB,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { W as i, Z as A, $ as l, j as T, G as _, t as I, g as u } from "../generated-x_abr3Yv.js";
|
|
2
|
+
import h from "@boostxyz/signatures/events";
|
|
3
|
+
import { getLogs as S } from "viem/actions";
|
|
4
|
+
import { DeployableTarget as g } from "../Deployable/DeployableTarget.js";
|
|
5
|
+
import { RegistryType as y, FilterType as d, PrimitiveType as t, prepareEventActionPayload as B } from "../utils.js";
|
|
6
|
+
const C = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161239f6100c85f395f61034a015261239f5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b5919061145c565b610273565b6040516100c791906114a1565b60405180910390f35b6100ea60048036038101906100e5919061151b565b6102ec565b6040516100f89291906115d6565b60405180910390f35b34801561010c575f80fd5b50610115610321565b6040516101229190611613565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c91906116a6565b60405180910390f35b348015610160575f80fd5b5061017b6004803603810190610176919061151b565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906119de565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611a31565b610686565b6040516101da9190611acf565b60405180910390f35b3480156101ee575f80fd5b506102096004803603810190610204919061151b565b6108f1565b6040516102169190611aef565b60405180910390f35b34801561022a575f80fd5b50610233610925565b6040516102409190611b62565b60405180910390f35b348015610254575f80fd5b5061025d610a3c565b60405161026a9190611b8a565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e482610a48565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610ac1565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190612035565b610aea565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606001805480602002602001604051908101604052809291908181526020015f905b8282101561067d578382905f5260205f2090600302016040518060a00160405290815f82015f9054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160049054906101000a900460ff1660018111156104b4576104b36116f7565b5b60018111156104c6576104c56116f7565b5b81526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182016040518060800160405290815f82015f9054906101000a900460ff16600481111561056e5761056d6116f7565b5b60048111156105805761057f6116f7565b5b81526020015f820160019054906101000a900460ff1660038111156105a8576105a76116f7565b5b60038111156105ba576105b96116f7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ea906120a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610616906120a9565b80156106615780601f1061063857610100808354040283529160200191610661565b820191905f5260205f20905b81548152906001019060200180831161064457829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b61068e6112c1565b600182815481106106a2576106a16120d9565b5b905f5260205f2090600302016040518060a00160405290815f82015f9054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160049054906101000a900460ff1660018111156107305761072f6116f7565b5b6001811115610742576107416116f7565b5b81526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182016040518060800160405290815f82015f9054906101000a900460ff1660048111156107ea576107e96116f7565b5b60048111156107fc576107fb6116f7565b5b81526020015f820160019054906101000a900460ff166003811115610824576108236116f7565b5b6003811115610836576108356116f7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff168152602001600182018054610866906120a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610892906120a9565b80156108dd5780601f106108b4576101008083540402835291602001916108dd565b820191905f5260205f20905b8154815290600101906020018083116108c057829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61092d61133c565b5f6040518060800160405290815f82015f9054906101000a900460ff16600181111561095c5761095b6116f7565b5b600181111561096e5761096d6116f7565b5b81526020015f820160019054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b5f600180549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610aba5750610ab9826111bb565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610af2611234565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610b1f57610b1e6116f7565b5b02179055506020820151815f0160016101000a81548163ffffffff021916908360e01c02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505060018160200151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610c2857610c276116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610cc457610cc36116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610cf357610cf26116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610d2d919061229a565b505050505060018160400151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610daa57610da96116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610e4657610e456116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610e7557610e746116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610eaf919061229a565b505050505060018160600151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610f2c57610f2b6116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610fc857610fc76116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610ff757610ff66116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081611031919061229a565b505050505060018160800151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff021916908360018111156110ae576110ad6116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff0219169083600481111561114a576111496116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115611179576111786116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816111b3919061229a565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061122d575061122c82611258565b5b9050919050565b5f61123d610ac1565b905080546001166112555763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060a001604052805f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f6001811115611304576113036116f7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020016113366113aa565b81525090565b60405180608001604052805f600181111561135a576113596116f7565b5b81526020015f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b60405180608001604052805f60048111156113c8576113c76116f7565b5b81526020015f60038111156113e0576113df6116f7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61143b81611407565b8114611445575f80fd5b50565b5f8135905061145681611432565b92915050565b5f60208284031215611471576114706113ff565b5b5f61147e84828501611448565b91505092915050565b5f8115159050919050565b61149b81611487565b82525050565b5f6020820190506114b45f830184611492565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126114db576114da6114ba565b5b8235905067ffffffffffffffff8111156114f8576114f76114be565b5b602083019150836001820283011115611514576115136114c2565b5b9250929050565b5f8060208385031215611531576115306113ff565b5b5f83013567ffffffffffffffff81111561154e5761154d611403565b5b61155a858286016114c6565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6115a882611566565b6115b28185611570565b93506115c2818560208601611580565b6115cb8161158e565b840191505092915050565b5f6040820190506115e95f830185611492565b81810360208301526115fb818461159e565b90509392505050565b61160d81611407565b82525050565b5f6020820190506116265f830184611604565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61166e6116696116648461162c565b61164b565b61162c565b9050919050565b5f61167f82611654565b9050919050565b5f61169082611675565b9050919050565b6116a081611686565b82525050565b5f6020820190506116b95f830184611697565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116f181611407565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611735576117346116f7565b5b50565b5f81905061174582611724565b919050565b5f61175482611738565b9050919050565b6117648161174a565b82525050565b5f60ff82169050919050565b61177f8161176a565b82525050565b5f61178f8261162c565b9050919050565b61179f81611785565b82525050565b600581106117b6576117b56116f7565b5b50565b5f8190506117c6826117a5565b919050565b5f6117d5826117b9565b9050919050565b6117e5816117cb565b82525050565b600481106117fc576117fb6116f7565b5b50565b5f81905061180c826117eb565b919050565b5f61181b826117ff565b9050919050565b61182b81611811565b82525050565b5f82825260208201905092915050565b5f61184b82611566565b6118558185611831565b9350611865818560208601611580565b61186e8161158e565b840191505092915050565b5f608083015f83015161188e5f8601826117dc565b5060208301516118a16020860182611822565b5060408301516118b46040860182611776565b50606083015184820360608601526118cc8282611841565b9150508091505092915050565b5f60a083015f8301516118ee5f8601826116e8565b506020830151611901602086018261175b565b5060408301516119146040860182611776565b5060608301516119276060860182611796565b506080830151848203608086015261193f8282611879565b9150508091505092915050565b5f61195783836118d9565b905092915050565b5f602082019050919050565b5f611975826116bf565b61197f81856116c9565b935083602082028501611991856116d9565b805f5b858110156119cc57848403895281516119ad858261194c565b94506119b88361195f565b925060208a01995050600181019050611994565b50829750879550505050505092915050565b5f6020820190508181035f8301526119f6818461196b565b905092915050565b5f819050919050565b611a10816119fe565b8114611a1a575f80fd5b50565b5f81359050611a2b81611a07565b92915050565b5f60208284031215611a4657611a456113ff565b5b5f611a5384828501611a1d565b91505092915050565b5f60a083015f830151611a715f8601826116e8565b506020830151611a84602086018261175b565b506040830151611a976040860182611776565b506060830151611aaa6060860182611796565b5060808301518482036080860152611ac28282611879565b9150508091505092915050565b5f6020820190508181035f830152611ae78184611a5c565b905092915050565b5f6020820190508181035f830152611b07818461159e565b905092915050565b608082015f820151611b235f85018261175b565b506020820151611b3660208501826116e8565b506040820151611b496040850182611776565b506060820151611b5c6060850182611796565b50505050565b5f608082019050611b755f830184611b0f565b92915050565b611b84816119fe565b82525050565b5f602082019050611b9d5f830184611b7b565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611bdd8261158e565b810181811067ffffffffffffffff82111715611bfc57611bfb611ba7565b5b80604052505050565b5f611c0e6113f6565b9050611c1a8282611bd4565b919050565b5f80fd5b60028110611c2f575f80fd5b50565b5f81359050611c4081611c23565b92915050565b611c4f8161176a565b8114611c59575f80fd5b50565b5f81359050611c6a81611c46565b92915050565b611c7981611785565b8114611c83575f80fd5b50565b5f81359050611c9481611c70565b92915050565b5f60808284031215611caf57611cae611ba3565b5b611cb96080611c05565b90505f611cc884828501611c32565b5f830152506020611cdb84828501611448565b6020830152506040611cef84828501611c5c565b6040830152506060611d0384828501611c86565b60608301525092915050565b60058110611d1b575f80fd5b50565b5f81359050611d2c81611d0f565b92915050565b60048110611d3e575f80fd5b50565b5f81359050611d4f81611d32565b92915050565b5f80fd5b5f67ffffffffffffffff821115611d7357611d72611ba7565b5b611d7c8261158e565b9050602081019050919050565b828183375f83830152505050565b5f611da9611da484611d59565b611c05565b905082815260208101848484011115611dc557611dc4611d55565b5b611dd0848285611d89565b509392505050565b5f82601f830112611dec57611deb6114ba565b5b8135611dfc848260208601611d97565b91505092915050565b5f60808284031215611e1a57611e19611ba3565b5b611e246080611c05565b90505f611e3384828501611d1e565b5f830152506020611e4684828501611d41565b6020830152506040611e5a84828501611c5c565b604083015250606082013567ffffffffffffffff811115611e7e57611e7d611c1f565b5b611e8a84828501611dd8565b60608301525092915050565b5f60a08284031215611eab57611eaa611ba3565b5b611eb560a0611c05565b90505f611ec484828501611448565b5f830152506020611ed784828501611c32565b6020830152506040611eeb84828501611c5c565b6040830152506060611eff84828501611c86565b606083015250608082013567ffffffffffffffff811115611f2357611f22611c1f565b5b611f2f84828501611e05565b60808301525092915050565b5f6101008284031215611f5157611f50611ba3565b5b611f5b60a0611c05565b90505f611f6a84828501611c9a565b5f83015250608082013567ffffffffffffffff811115611f8d57611f8c611c1f565b5b611f9984828501611e96565b60208301525060a082013567ffffffffffffffff811115611fbd57611fbc611c1f565b5b611fc984828501611e96565b60408301525060c082013567ffffffffffffffff811115611fed57611fec611c1f565b5b611ff984828501611e96565b60608301525060e082013567ffffffffffffffff81111561201d5761201c611c1f565b5b61202984828501611e96565b60808301525092915050565b5f6020828403121561204a576120496113ff565b5b5f82013567ffffffffffffffff81111561206757612066611403565b5b61207384828501611f3b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806120c057607f821691505b6020821081036120d3576120d261207c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026121627fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612127565b61216c8683612127565b95508019841693508086168417925050509392505050565b5f61219e612199612194846119fe565b61164b565b6119fe565b9050919050565b5f819050919050565b6121b783612184565b6121cb6121c3826121a5565b848454612133565b825550505050565b5f90565b6121df6121d3565b6121ea8184846121ae565b505050565b5b8181101561220d576122025f826121d7565b6001810190506121f0565b5050565b601f8211156122525761222381612106565b61222c84612118565b8101602085101561223b578190505b61224f61224785612118565b8301826121ef565b50505b505050565b5f82821c905092915050565b5f6122725f1984600802612257565b1980831691505092915050565b5f61228a8383612263565b9150826002028217905092915050565b6122a382611566565b67ffffffffffffffff8111156122bc576122bb611ba7565b5b6122c682546120a9565b6122d1828285612211565b5f60209050601f831160018114612302575f84156122f0578287015190505b6122fa858261227f565b865550612361565b601f19841661231086612106565b5f5b8281101561233757848901518255600182019150602085019450602081019050612312565b868310156123545784890151612350601f891682612263565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220232ad425d6a3fa9ff7de7b59ca0cdff9b09b560e5493bdfd8320e53da80c045964736f6c634300081a0033";
|
|
7
|
+
var D = { VITE_ALLOWLIST_INCENTIVE_BASE: "0x5Cd43Ea5541e1D6FF36962E6e6C11f0bf9d573d4", VITE_BOOST_REGISTRY_ADDRESS: "0x5cb8D869f2EE4e3D987Ac7bEB37D6812f5346DFC", VITE_CGDA_INCENTIVE_BASE: "0x147c3aBFF7Ab7867B206A8c652Cd59D3BE41Dc3E", VITE_ERC20_INCENTIVE_BASE: "0xDCfbb7767B281Fd2d39fc7c39A9f89dC61E81f0d", VITE_POINTS_INCENTIVE_BASE: "0x881c78Ba2d10894a8f4f6996C0FB5bA8AE627AAb", VITE_SIMPLE_DENYLIST_BASE: "0x41A7c1aCC75BEccD11B8F586510759883092460F", VITE_BOOST_CORE_ADDRESS: "0xF4905b327904E5797840fd8cD7F300001a34122f", VITE_SIMPLE_ALLOWLIST_BASE: "0x11556926AaA421e96e06a7A679C680813122db7D", VITE_ERC20_VARIABLE_INCENTIVE_BASE: "0xA7b6c33828693d431C64e59A27d985c4DfB19B95", VITE_MANAGED_BUDGET_BASE: "0x0b51f997fa15867134fA34366FCeA63Bee93C087", VITE_SIGNER_VALIDATOR_BASE: "0x749c6fDd62727E11e3200571de7CfBb61DFbA93b", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
8
|
+
const s = class s extends g {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.abi = i;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets a specific action event by index
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
* @async
|
|
17
|
+
* @param {number} index The index of the action event to retrieve
|
|
18
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionStep'>} [params]
|
|
19
|
+
* @returns {Promise<ActionStep>}
|
|
20
|
+
*/
|
|
21
|
+
async getActionStep(f, b) {
|
|
22
|
+
return A(this._config, {
|
|
23
|
+
address: this.assertValidAddress(),
|
|
24
|
+
...this.optionallyAttachAccount(),
|
|
25
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
26
|
+
...b,
|
|
27
|
+
args: [f]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets all action events
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
* @async
|
|
35
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]
|
|
36
|
+
* @returns {Promise<ActionStep[]>}
|
|
37
|
+
*/
|
|
38
|
+
async getActionSteps(f) {
|
|
39
|
+
return l(this._config, {
|
|
40
|
+
address: this.assertValidAddress(),
|
|
41
|
+
...this.optionallyAttachAccount(),
|
|
42
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
43
|
+
...f
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the count of action events
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
* @async
|
|
51
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionStepsCount'>} [params]
|
|
52
|
+
* @returns {Promise<bigint>}
|
|
53
|
+
*/
|
|
54
|
+
async getActionStepsCount(f) {
|
|
55
|
+
return T(this._config, {
|
|
56
|
+
address: this.assertValidAddress(),
|
|
57
|
+
...this.optionallyAttachAccount(),
|
|
58
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
59
|
+
...f
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the payload describing how claimants can be identified from logs or function calls.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
* @async
|
|
67
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionClaimant'>} [params]
|
|
68
|
+
* @returns {Promise<ActionClaimant>}
|
|
69
|
+
*/
|
|
70
|
+
async getActionClaimant(f) {
|
|
71
|
+
return _(this._config, {
|
|
72
|
+
address: this.assertValidAddress(),
|
|
73
|
+
...this.optionallyAttachAccount(),
|
|
74
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
75
|
+
...f
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Executes a prepared event action
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
* @async
|
|
83
|
+
* @param {Hex} data
|
|
84
|
+
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
85
|
+
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
86
|
+
*/
|
|
87
|
+
async execute(f, b) {
|
|
88
|
+
return this.awaitResult(this.executeRaw(f, b));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Executes a prepared event action
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
* @async
|
|
95
|
+
* @param {Hex} data
|
|
96
|
+
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
97
|
+
* @returns {unknown}
|
|
98
|
+
*/
|
|
99
|
+
async executeRaw(f, b) {
|
|
100
|
+
const { request: e, result: a } = await I(this._config, {
|
|
101
|
+
address: this.assertValidAddress(),
|
|
102
|
+
...this.optionallyAttachAccount(),
|
|
103
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
104
|
+
...b,
|
|
105
|
+
args: [f]
|
|
106
|
+
});
|
|
107
|
+
return { hash: await u(this._config, e), result: a };
|
|
108
|
+
}
|
|
109
|
+
/** Validates all action events
|
|
110
|
+
* @public
|
|
111
|
+
* @async
|
|
112
|
+
* @returns {Promise<boolean>}
|
|
113
|
+
* @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]
|
|
114
|
+
*/
|
|
115
|
+
async validateActionSteps(f) {
|
|
116
|
+
const b = await this.getActionSteps(f);
|
|
117
|
+
for (const e of b)
|
|
118
|
+
if (!this.isActionStepValid(e, f))
|
|
119
|
+
return !1;
|
|
120
|
+
return !0;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Validates a single action event
|
|
124
|
+
* @public
|
|
125
|
+
* @async
|
|
126
|
+
* @param {ActionStep} actionStep
|
|
127
|
+
* @returns {boolean}
|
|
128
|
+
*/
|
|
129
|
+
async isActionStepValid(f, b) {
|
|
130
|
+
const e = f.actionParameter, a = f.signature;
|
|
131
|
+
let c;
|
|
132
|
+
if (b != null && b.knownEvents ? c = b.knownEvents[a] : c = h.abi[a], !c)
|
|
133
|
+
throw new Error(`No known ABI for given event signature: ${a}`);
|
|
134
|
+
const r = f.targetContract, o = await S(
|
|
135
|
+
this._config.getClient({ chainId: b == null ? void 0 : b.chainId }),
|
|
136
|
+
{
|
|
137
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
138
|
+
...b,
|
|
139
|
+
address: r,
|
|
140
|
+
event: c
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
for (let E of o)
|
|
144
|
+
if (!this.validateLogAgainstCriteria(e, E))
|
|
145
|
+
return !1;
|
|
146
|
+
return !0;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Validates a Viem event log against a given criteria.
|
|
150
|
+
*
|
|
151
|
+
* @param {Criteria} criteria - The criteria to validate against.
|
|
152
|
+
* @param {any[]} log - The Viem event log array.
|
|
153
|
+
* @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
|
|
154
|
+
*/
|
|
155
|
+
async validateLogAgainstCriteria(f, b) {
|
|
156
|
+
const e = b.topics[f.fieldIndex];
|
|
157
|
+
if (e === void 0)
|
|
158
|
+
throw new Error("Field value is undefined");
|
|
159
|
+
switch (f.filterType) {
|
|
160
|
+
case d.EQUAL:
|
|
161
|
+
return e === f.filterData;
|
|
162
|
+
case d.NOT_EQUAL:
|
|
163
|
+
return e !== f.filterData;
|
|
164
|
+
case d.GREATER_THAN:
|
|
165
|
+
if (f.fieldType === t.UINT)
|
|
166
|
+
return BigInt(e) > BigInt(f.filterData);
|
|
167
|
+
throw new Error(
|
|
168
|
+
"GREATER_THAN filter can only be used with UINT fieldType"
|
|
169
|
+
);
|
|
170
|
+
case d.LESS_THAN:
|
|
171
|
+
if (f.fieldType === t.UINT)
|
|
172
|
+
return BigInt(e) < BigInt(f.filterData);
|
|
173
|
+
throw new Error(
|
|
174
|
+
"LESS_THAN filter can only be used with UINT fieldType"
|
|
175
|
+
);
|
|
176
|
+
case d.CONTAINS:
|
|
177
|
+
if (f.fieldType === t.BYTES || f.fieldType === t.STRING)
|
|
178
|
+
return e.includes(f.filterData);
|
|
179
|
+
throw new Error(
|
|
180
|
+
"CONTAINS filter can only be used with BYTES or STRING fieldType"
|
|
181
|
+
);
|
|
182
|
+
default:
|
|
183
|
+
throw new Error("Invalid FilterType provided");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* @inheritdoc
|
|
188
|
+
*
|
|
189
|
+
* @public
|
|
190
|
+
* @param {?EventActionPayload} [_payload]
|
|
191
|
+
* @param {?DeployableOptions} [_options]
|
|
192
|
+
* @returns {GenericDeployableParams}
|
|
193
|
+
*/
|
|
194
|
+
buildParameters(f, b) {
|
|
195
|
+
const [e, a] = this.validateDeploymentConfig(
|
|
196
|
+
f,
|
|
197
|
+
b
|
|
198
|
+
);
|
|
199
|
+
return {
|
|
200
|
+
abi: i,
|
|
201
|
+
bytecode: C,
|
|
202
|
+
args: [B(e)],
|
|
203
|
+
...this.optionallyAttachAccount(a.account)
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
s.base = D.VITE_EVENT_ACTION_BASE, s.registryType = y.ACTION;
|
|
208
|
+
let n = s;
|
|
209
|
+
export {
|
|
210
|
+
n as EventAction
|
|
211
|
+
};
|