@boostxyz/sdk 0.0.0-alpha.17 → 0.0.0-alpha.19
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/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +13 -13
- package/dist/Actions/ContractAction.d.ts +9 -9
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +12 -12
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +32 -49
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +13 -962
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +5 -5
- package/dist/AllowLists/SimpleAllowList.js +24 -24
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +6 -6
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +18 -0
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs +3 -0
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
- package/dist/BoostCore-kwoUw7YE.js +1477 -0
- package/dist/BoostCore-kwoUw7YE.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +86 -36
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1273
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +25 -19
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +30 -29
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +18 -18
- package/dist/Budgets/ManagedBudget.js +48 -48
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +23 -23
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +4 -5
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.js +1 -1
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +5 -5
- package/dist/Deployable/DeployableTarget.js +6 -6
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +15 -15
- package/dist/Deployable/DeployableTargetWithRBAC.js +33 -33
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/EventAction-D5tnm00s.js +1355 -0
- package/dist/EventAction-D5tnm00s.js.map +1 -0
- package/dist/EventAction-DBDRaG4A.cjs +2 -0
- package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
- package/dist/{Incentive-DJf-vdyL.js → Incentive-Bp8Sez7M.js} +61 -62
- package/dist/Incentive-Bp8Sez7M.js.map +1 -0
- package/dist/{Incentive-DNwROd1r.cjs → Incentive-Djnzseoj.cjs} +2 -2
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +12 -12
- package/dist/Incentives/AllowListIncentive.js +19 -19
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +15 -15
- package/dist/Incentives/CGDAIncentive.js +18 -18
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +23 -23
- package/dist/Incentives/ERC20Incentive.js +25 -25
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +14 -14
- package/dist/Incentives/PointsIncentive.js +21 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-DMlUkmAn.cjs → SimpleDenyList-BwfNjRsg.cjs} +2 -2
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/{SimpleDenyList-DvUvmOeE.js → SimpleDenyList-Cn5WpNn0.js} +9 -9
- package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +14 -14
- package/dist/Validators/SignerValidator.js +19 -19
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
- package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
- package/dist/componentInterfaces-RXBMI5yH.js +14 -0
- package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
- package/dist/deployments-BM42vImE.js +43 -0
- package/dist/deployments-BM42vImE.js.map +1 -0
- package/dist/deployments-CMdF5uEC.cjs +2 -0
- package/dist/deployments-CMdF5uEC.cjs.map +1 -0
- package/dist/deployments.json +15 -12
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +132 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +122 -36
- package/dist/errors.js.map +1 -1
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-C_7Jx3YG.js → generated-B7VaSah4.js} +631 -343
- package/dist/generated-B7VaSah4.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -126
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +45 -54
- package/src/Actions/EventAction.ts +100 -100
- package/src/AllowLists/SimpleAllowList.ts +5 -5
- package/src/AllowLists/SimpleDenyList.ts +6 -6
- package/src/Boost.ts +19 -0
- package/src/BoostCore.test.ts +117 -1
- package/src/BoostCore.ts +121 -57
- package/src/BoostRegistry.ts +29 -21
- package/src/Budgets/ManagedBudget.ts +18 -18
- package/src/Budgets/VestingBudget.ts +23 -23
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +5 -5
- package/src/Deployable/DeployableTargetWithRBAC.ts +15 -15
- package/src/Incentives/AllowListIncentive.ts +12 -12
- package/src/Incentives/CGDAIncentive.ts +15 -15
- package/src/Incentives/ERC1155Incentive.ts +26 -26
- package/src/Incentives/ERC20Incentive.ts +23 -23
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.ts +19 -19
- package/src/Incentives/Incentive.ts +6 -5
- package/src/Incentives/PointsIncentive.test.ts +21 -21
- package/src/Incentives/PointsIncentive.ts +14 -14
- package/src/Validators/SignerValidator.ts +14 -14
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +165 -0
- package/src/index.test.ts +117 -33
- package/src/index.ts +1 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Incentive-DJf-vdyL.js.map +0 -1
- package/dist/Incentive-DNwROd1r.cjs.map +0 -1
- package/dist/SimpleDenyList-DMlUkmAn.cjs.map +0 -1
- package/dist/SimpleDenyList-DvUvmOeE.js.map +0 -1
- package/dist/componentInterfaces-BPVR_Ykd.js +0 -13
- package/dist/componentInterfaces-BPVR_Ykd.js.map +0 -1
- package/dist/componentInterfaces-BfppSIl4.cjs +0 -2
- package/dist/componentInterfaces-BfppSIl4.cjs.map +0 -1
- package/dist/deployments-BvFcK_eR.js +0 -40
- package/dist/deployments-BvFcK_eR.js.map +0 -1
- package/dist/deployments-Ho4PnGCS.cjs +0 -2
- package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
- package/dist/generated-CMQ6ZC2_.cjs +0 -3
- package/dist/generated-CMQ6ZC2_.cjs.map +0 -1
- package/dist/generated-C_7Jx3YG.js.map +0 -1
package/dist/errors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { zeroHash as
|
|
2
|
-
class
|
|
1
|
+
import { zeroHash as a } from "viem";
|
|
2
|
+
class c extends Error {
|
|
3
3
|
/**
|
|
4
4
|
* Creates an instance of BoostCoreNoIdentifierEmitted.
|
|
5
5
|
*
|
|
@@ -9,7 +9,7 @@ class d extends Error {
|
|
|
9
9
|
super('No "BoostCreated" log was emitted from which to extract boostId');
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class d extends Error {
|
|
13
13
|
/**
|
|
14
14
|
* Creates an instance of ContractAddressRequiredError.
|
|
15
15
|
*
|
|
@@ -80,7 +80,7 @@ class h extends Error {
|
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
class
|
|
83
|
+
class g extends Error {
|
|
84
84
|
/**
|
|
85
85
|
* Creates an instance of NoContractAddressUponReceiptError.
|
|
86
86
|
*
|
|
@@ -93,7 +93,7 @@ class m extends Error {
|
|
|
93
93
|
}), this.receipt = r;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
class
|
|
96
|
+
class m extends Error {
|
|
97
97
|
/**
|
|
98
98
|
* Creates an instance of InvalidComponentInterfaceError.
|
|
99
99
|
*
|
|
@@ -104,10 +104,10 @@ class x extends Error {
|
|
|
104
104
|
constructor(r, o) {
|
|
105
105
|
super("Address provided does not match any expected protocol interface", {
|
|
106
106
|
cause: { expected: r, received: o }
|
|
107
|
-
}), this.expected = [], this.received =
|
|
107
|
+
}), this.expected = [], this.received = a, this.expected = r, this.received = o;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
class
|
|
110
|
+
class x extends Error {
|
|
111
111
|
/**
|
|
112
112
|
* Creates an instance of UnknownTransferPayloadSupplied.
|
|
113
113
|
*
|
|
@@ -122,7 +122,7 @@ class g extends Error {
|
|
|
122
122
|
), this.event = o, this.input_param_idx = r;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
class
|
|
125
|
+
class v extends Error {
|
|
126
126
|
/**
|
|
127
127
|
* Creates an instance of UnknownTransferPayloadSupplied.
|
|
128
128
|
*
|
|
@@ -136,7 +136,7 @@ class y extends Error {
|
|
|
136
136
|
), this.received = r;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
class
|
|
139
|
+
class y extends Error {
|
|
140
140
|
/**
|
|
141
141
|
* Creates an instance of BudgetMustAuthorizeBoostCore.
|
|
142
142
|
*
|
|
@@ -168,7 +168,7 @@ class f extends Error {
|
|
|
168
168
|
super(`Incentive not cloneable: ${r.constructor.name}`);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
class
|
|
171
|
+
class I extends Error {
|
|
172
172
|
/**
|
|
173
173
|
* Creates an instance of NoEventActionStepsProvidedError.
|
|
174
174
|
*
|
|
@@ -190,6 +190,27 @@ class C extends Error {
|
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
class A extends Error {
|
|
194
|
+
/**
|
|
195
|
+
* Creates an instance of ValidationAbiMissingError.
|
|
196
|
+
*
|
|
197
|
+
* @constructor
|
|
198
|
+
* @param {Hex} signature
|
|
199
|
+
*/
|
|
200
|
+
constructor(r) {
|
|
201
|
+
super(`No known ABI for given signature: ${r}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
class w extends Error {
|
|
205
|
+
/**
|
|
206
|
+
* Creates an instance of ValidationLogsMissingError.
|
|
207
|
+
*
|
|
208
|
+
* @constructor
|
|
209
|
+
*/
|
|
210
|
+
constructor() {
|
|
211
|
+
super("Logs are required for validation");
|
|
212
|
+
}
|
|
213
|
+
}
|
|
193
214
|
class t extends Error {
|
|
194
215
|
/**
|
|
195
216
|
* Creates an instance of FieldActionValidationError.
|
|
@@ -203,10 +224,10 @@ class t extends Error {
|
|
|
203
224
|
*/
|
|
204
225
|
constructor(r, {
|
|
205
226
|
fieldValue: o,
|
|
206
|
-
criteria:
|
|
227
|
+
criteria: n,
|
|
207
228
|
...s
|
|
208
229
|
}) {
|
|
209
|
-
switch (super(r), this.fieldValue = o, this.criteria =
|
|
230
|
+
switch (super(r), this.fieldValue = o, this.criteria = n, !0) {
|
|
210
231
|
case "log" in s:
|
|
211
232
|
this.log = s.log;
|
|
212
233
|
break;
|
|
@@ -215,7 +236,7 @@ class t extends Error {
|
|
|
215
236
|
}
|
|
216
237
|
}
|
|
217
238
|
}
|
|
218
|
-
class
|
|
239
|
+
class D extends t {
|
|
219
240
|
/**
|
|
220
241
|
* Creates an instance of DecodedArgsUndefinedError.
|
|
221
242
|
*
|
|
@@ -229,7 +250,7 @@ class A extends t {
|
|
|
229
250
|
);
|
|
230
251
|
}
|
|
231
252
|
}
|
|
232
|
-
class
|
|
253
|
+
class N extends t {
|
|
233
254
|
/**
|
|
234
255
|
* Creates an instance of FieldValueUndefinedError.
|
|
235
256
|
*
|
|
@@ -240,7 +261,7 @@ class D extends t {
|
|
|
240
261
|
super("Field value is undefined", r);
|
|
241
262
|
}
|
|
242
263
|
}
|
|
243
|
-
class
|
|
264
|
+
class P extends t {
|
|
244
265
|
/**
|
|
245
266
|
* Creates an instance of InvalidNumericalCriteria.
|
|
246
267
|
*
|
|
@@ -254,7 +275,7 @@ class I extends t {
|
|
|
254
275
|
);
|
|
255
276
|
}
|
|
256
277
|
}
|
|
257
|
-
class
|
|
278
|
+
class F extends Error {
|
|
258
279
|
/**
|
|
259
280
|
* Creates an instance of FunctionDataDecodeError.
|
|
260
281
|
*
|
|
@@ -266,7 +287,7 @@ class P extends Error {
|
|
|
266
287
|
super(`Failed to decode function data: ${o.message}`), this.name = "FunctionDataDecodeError", this.abi = r, this.originalError = o;
|
|
267
288
|
}
|
|
268
289
|
}
|
|
269
|
-
class
|
|
290
|
+
class B extends t {
|
|
270
291
|
/**
|
|
271
292
|
* Creates an instance of FieldValueNotComparableError.
|
|
272
293
|
*
|
|
@@ -277,7 +298,7 @@ class F extends t {
|
|
|
277
298
|
super("Filter can only be used with bytes or string field type", r);
|
|
278
299
|
}
|
|
279
300
|
}
|
|
280
|
-
class
|
|
301
|
+
class $ extends t {
|
|
281
302
|
/**
|
|
282
303
|
* Creates an instance of UnrecognizedFilterTypeError.
|
|
283
304
|
*
|
|
@@ -288,45 +309,110 @@ class B extends t {
|
|
|
288
309
|
super("Invalid FilterType provided", r);
|
|
289
310
|
}
|
|
290
311
|
}
|
|
291
|
-
class
|
|
312
|
+
class M extends Error {
|
|
313
|
+
/**
|
|
314
|
+
* Creates an instance of NoConnectedChainIdError.
|
|
315
|
+
*
|
|
316
|
+
* @constructor
|
|
317
|
+
*/
|
|
292
318
|
constructor() {
|
|
293
319
|
super(
|
|
294
320
|
"Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"
|
|
295
|
-
);
|
|
321
|
+
), this.name = "NoConnectedChainIdError";
|
|
296
322
|
}
|
|
297
323
|
}
|
|
298
324
|
class U extends Error {
|
|
325
|
+
/**
|
|
326
|
+
* Creates an instance of InvalidProtocolChainIdError.
|
|
327
|
+
*
|
|
328
|
+
* @constructor
|
|
329
|
+
* @param {number} chainId - The chain ID provided in the configuration.
|
|
330
|
+
* @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.
|
|
331
|
+
*/
|
|
299
332
|
constructor(r, o) {
|
|
300
333
|
super(
|
|
301
334
|
`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`
|
|
302
|
-
);
|
|
335
|
+
), this.name = "InvalidProtocolChainIdError";
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
class T extends Error {
|
|
339
|
+
/**
|
|
340
|
+
* Creates an instance of IncentiveCriteriaNotFoundError.
|
|
341
|
+
*
|
|
342
|
+
* @constructor
|
|
343
|
+
* @param {Error} [e] - Optional error object for further context.
|
|
344
|
+
* @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.
|
|
345
|
+
*/
|
|
346
|
+
constructor(r, o = "Unable to fetch Incentive Criteria from contract") {
|
|
347
|
+
super(o + (r ? `: ${r.message}` : "")), this.name = "IncentiveCriteriaNotFoundError";
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
class k extends Error {
|
|
351
|
+
/**
|
|
352
|
+
* Creates an instance of NoMatchingLogsError.
|
|
353
|
+
*
|
|
354
|
+
* @constructor
|
|
355
|
+
* @param {string} signature - The event signature for which logs are being searched.
|
|
356
|
+
* @param {string} [message] - Optional custom error message.
|
|
357
|
+
*/
|
|
358
|
+
constructor(r, o = `No logs found for event signature ${r}`) {
|
|
359
|
+
super(o), this.name = "NoMatchingLogsError";
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
class z extends Error {
|
|
363
|
+
/**
|
|
364
|
+
* Creates an instance of InvalidCriteriaTypeError.
|
|
365
|
+
*
|
|
366
|
+
* @constructor
|
|
367
|
+
* @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.
|
|
368
|
+
* @param {string} [message] - Optional custom error message.
|
|
369
|
+
*/
|
|
370
|
+
constructor(r = "unknown", o = `Invalid criteria type ${r}`) {
|
|
371
|
+
super(o), this.name = "InvalidCriteriaTypeError";
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
class V extends Error {
|
|
375
|
+
/**
|
|
376
|
+
* Creates an instance of DecodedArgsError.
|
|
377
|
+
*
|
|
378
|
+
* @constructor
|
|
379
|
+
* @param {string} [message='Issue decoding args'] - Custom error message.
|
|
380
|
+
*/
|
|
381
|
+
constructor(r = "Issue decoding args") {
|
|
382
|
+
super(r), this.name = "DecodedArgsError";
|
|
303
383
|
}
|
|
304
384
|
}
|
|
305
385
|
export {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
386
|
+
c as BoostCoreNoIdentifierEmitted,
|
|
387
|
+
y as BudgetMustAuthorizeBoostCore,
|
|
388
|
+
d as ContractAddressRequiredError,
|
|
389
|
+
V as DecodedArgsError,
|
|
390
|
+
D as DecodedArgsMalformedError,
|
|
310
391
|
l as DeployableAlreadyDeployedError,
|
|
311
392
|
u as DeployableBuildParametersUnspecifiedError,
|
|
312
393
|
h as DeployableMissingPayloadError,
|
|
313
394
|
p as DeployableUnknownOwnerProvidedError,
|
|
314
395
|
E as DeployableWagmiConfigurationRequiredError,
|
|
315
396
|
t as FieldActionValidationError,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
397
|
+
B as FieldValueNotComparableError,
|
|
398
|
+
N as FieldValueUndefinedError,
|
|
399
|
+
F as FunctionDataDecodeError,
|
|
400
|
+
T as IncentiveCriteriaNotFoundError,
|
|
319
401
|
f as IncentiveNotCloneableError,
|
|
320
|
-
|
|
321
|
-
|
|
402
|
+
m as InvalidComponentInterfaceError,
|
|
403
|
+
z as InvalidCriteriaTypeError,
|
|
404
|
+
P as InvalidNumericalCriteriaError,
|
|
322
405
|
U as InvalidProtocolChainIdError,
|
|
323
406
|
b as MustInitializeBudgetError,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
407
|
+
M as NoConnectedChainIdError,
|
|
408
|
+
g as NoContractAddressUponReceiptError,
|
|
409
|
+
I as NoEventActionStepsProvidedError,
|
|
410
|
+
k as NoMatchingLogsError,
|
|
327
411
|
C as TooManyEventActionStepsProvidedError,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
412
|
+
v as UnknownTransferPayloadSupplied,
|
|
413
|
+
x as UnparseableAbiParamError,
|
|
414
|
+
$ as UnrecognizedFilterTypeError,
|
|
415
|
+
A as ValidationAbiMissingError,
|
|
416
|
+
w as ValidationLogsMissingError
|
|
331
417
|
};
|
|
332
418
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../src/errors.ts"],"sourcesContent":["import {\n type AbiEvent,\n type AbiFunction,\n type Hex,\n type Log,\n type WaitForTransactionReceiptReturnType,\n zeroHash,\n} from 'viem';\nimport type { Criteria } from './Actions/EventAction';\nimport type { EventLogs } from './Actions/EventAction';\nimport type { BoostRegistry } from './BoostRegistry';\nimport type { Incentive } from './Incentives/Incentive';\n\n/**\n * This error is thrown during Boost creation if no `BoostCreated` event was emitted.\n *\n * @export\n * @class BoostCoreNoIdentifierEmitted\n * @typedef {BoostCoreNoIdentifierEmitted}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * await boostCore.createBoost(...)\n * } catch(e) {\n * if(e instanceof BoostCoreNoIdentifierEmitted) {}\n * }\n * ```\n */\nexport class BoostCoreNoIdentifierEmitted extends Error {\n /**\n * Creates an instance of BoostCoreNoIdentifierEmitted.\n *\n * @constructor\n */\n constructor() {\n super(`No \"BoostCreated\" log was emitted from which to extract boostId`);\n }\n}\n\n/**\n * This error is thrown when `assertValidAddress` is called, usually because a contract call expects the class to have a valid address attached.\n *\n * @export\n * @class ContractAddressRequiredError\n * @typedef {ContractAddressRequiredError}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * target.assertValidAddress()\n * } catch(e) {\n * if(e instanceof ContractAddressRequiredError) {}\n * }\n */\nexport class ContractAddressRequiredError extends Error {\n /**\n * Creates an instance of ContractAddressRequiredError.\n *\n * @constructor\n */\n constructor() {\n super('Attempted to call contract method without providing an address');\n }\n}\n\n/**\n * This error is thrown when attempting to deploy a contract that has already been deployed, or has an address attached.\n *\n * @export\n * @class DeployableAlreadyDeployedError\n * @typedef {DeployableAlreadyDeployedError}\n * @extends {Error}\n */\nexport class DeployableAlreadyDeployedError extends Error {\n /**\n * The address already attached to the target.\n *\n * @type {string}\n */\n address: string;\n /**\n * Creates an instance of DeployableAlreadyDeployedError.\n *\n * @constructor\n * @param {string} address\n */\n constructor(address: string) {\n super(\n 'Attempted to deploy a contract that already has an address configured',\n );\n this.address = address;\n }\n}\n\n/**\n * You should never see this error if we did our jobs and every target overrides the `buildParameters` method.\n *\n * @export\n * @class DeployableBuildParametersUnspecifiedError\n * @typedef {DeployableBuildParametersUnspecifiedError}\n * @extends {Error}\n */\nexport class DeployableBuildParametersUnspecifiedError extends Error {\n /**\n * Creates an instance of DeployableBuildParametersUnspecifiedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Implementing class did not properly override the `buildParameters` method',\n );\n }\n}\n\n/**\n * This error is thrown when attempting to deploy an `ownable` contract and the owner cannot be ascertained from the initialization payload or configured account.\n *\n * @export\n * @class DeployableUnknownOwnerProvidedError\n * @typedef {DeployableUnknownOwnerProvidedError}\n * @extends {Error}\n */\nexport class DeployableUnknownOwnerProvidedError extends Error {\n /**\n * Creates an instance of DeployableUnknownOwnerProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected an an owner to be provided in configuration or an account to exist on Wagmi config.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid Wagmi configuration on the instance.\n *\n * @export\n * @class DeployableWagmiConfigurationRequiredError\n * @typedef {DeployableWagmiConfigurationRequiredError}\n * @extends {Error}\n */\nexport class DeployableWagmiConfigurationRequiredError extends Error {\n /**\n * Creates an instance of DeployableWagmiConfigurationRequiredError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid initialization payload.\n *\n * @export\n * @class DeployableMissingPayloadError\n * @typedef {DeployableMissingPayloadError}\n * @extends {Error}\n */\nexport class DeployableMissingPayloadError extends Error {\n /**\n * Creates an instance of DeployableMissingPayloadError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid payload to be available either on Deployable or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when we receive a transaction receipt for a contract deployment without a contract address on it.\n *\n * @export\n * @class NoContractAddressUponReceiptError\n * @typedef {NoContractAddressUponReceiptError}\n * @extends {Error}\n */\nexport class NoContractAddressUponReceiptError extends Error {\n /**\n * The raw receipt we receive from [waitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)\n *\n * @public\n * @readonly\n * @type {WaitForTransactionReceiptReturnType}\n */\n public readonly receipt: WaitForTransactionReceiptReturnType;\n /**\n * Creates an instance of NoContractAddressUponReceiptError.\n *\n * @constructor\n * @param {WaitForTransactionReceiptReturnType} receipt\n */\n constructor(receipt: WaitForTransactionReceiptReturnType) {\n super(`Expected a contract address to exist on receipt.`, {\n cause: receipt,\n });\n this.receipt = receipt;\n }\n}\n\n/**\n * This error is thrown when a target address was provided that doesn't match any supported interface for the given registry type.\n * For example, if you try to do `incentiveFromAddress()` with the address of a deployed `SimpleBudget`\n *\n * @export\n * @class InvalidComponentInterfaceError\n * @typedef {InvalidComponentInterfaceError}\n * @extends {Error}\n */\nexport class InvalidComponentInterfaceError extends Error {\n /**\n * Expected interface hashes.\n *\n * @public\n * @readonly\n * @type {Hex[]}\n */\n public readonly expected: Hex[] = [];\n /**\n * The actual interface hash.\n *\n * @public\n * @readonly\n * @type {Hex}\n */\n public readonly received: Hex = zeroHash;\n\n /**\n * Creates an instance of InvalidComponentInterfaceError.\n *\n * @constructor\n * @param {Hex[]} expected\n * @param {Hex} received\n */\n constructor(expected: Hex[], received: Hex) {\n super(`Address provided does not match any expected protocol interface`, {\n cause: { expected, received },\n });\n this.expected = expected;\n this.received = received;\n }\n}\n\n/**\n * This error is thrown when a param is not transparently stored onchain\n *\n * @export\n * @class UnparseableAbiParamError\n * @typedef {UnparseableAbiParamError}\n * @extends {Error}\n */\nexport class UnparseableAbiParamError extends Error {\n /**\n * the param index that is unparseable\n *\n * @type {number}\n */\n input_param_idx: number;\n /**\n * The given event that contains the unparseable param\n *\n * @type {AbiEvent}\n */\n event: AbiEvent;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {number} input_param_idx\n * @param {AbiEvent} event\n */\n constructor(input_param_idx: number, event: AbiEvent) {\n super(\n `Parameter is not transparently stored onchain. Parameter ${input_param_idx} in event ${event.name} cannot be used in an action`,\n { cause: event },\n );\n this.event = event;\n this.input_param_idx = input_param_idx;\n }\n}\n\n/**\n * This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`\n *\n * @see {@link FungibleTransferPayload}\n * @see {@link ERC1155TransferPayload}\n * @export\n * @class UnknownTransferPayloadSupplied\n * @typedef {UnknownTransferPayloadSupplied}\n * @extends {Error}\n */\nexport class UnknownTransferPayloadSupplied extends Error {\n /**\n * The given payload that does not conform to the correct payload shape.\n *\n * @type {unknown}\n */\n received: unknown;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {unknown} received\n */\n constructor(received: unknown) {\n super(\n `Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.`,\n { cause: received },\n );\n this.received = received;\n }\n}\n\n/**\n * This error is thrown during Boost creation when the budget doesn't authorize the Boost Core address.\n *\n * @export\n * @class BudgetMustAuthorizeBoostCore\n * @typedef {BudgetMustAuthorizeBoostCore}\n * @extends {Error}\n */\nexport class BudgetMustAuthorizeBoostCore extends Error {\n /**\n * Creates an instance of BudgetMustAuthorizeBoostCore.\n *\n * @constructor\n * @param {string} boostCoreAddress\n */\n constructor(boostCoreAddress: string) {\n super(\n `Budget needs to explicitly authorize ${boostCoreAddress}. You can retrieve this value from BoostCore.address`,\n );\n }\n}\n\n/**\n * Because this contract is a base implementation, it should not be initialized through the constructor. Instead, it should be cloned and initialized using the {@link BoostRegistry}\n *\n * @export\n * @class MustInitializeBudgetError\n * @typedef {MustInitializeBudgetError}\n * @extends {Error}\n */\nexport class MustInitializeBudgetError extends Error {\n /**\n * Creates an instance of MustInitializeBudgetError.\n */\n constructor() {\n super(`Budgets must be preinitialized before being used with a new Boost`);\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n * The protocol doesn't allow this.\n *\n * @export\n * @class IncentiveNotCloneableError\n * @typedef {IncentiveNotCloneableError}\n * @extends {Error}\n */\nexport class IncentiveNotCloneableError extends Error {\n /**\n * Creates an instance of IncentiveNotCloneableError.\n *\n * @constructor\n * @param {Incentive} incentive\n */\n constructor(incentive: Incentive) {\n super(`Incentive not cloneable: ${incentive.constructor.name}`);\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and no action steps are provided\n *\n * @export\n * @class NoEventActionStepsProvidedError\n * @typedef {NoEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class NoEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of NoEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super('Must supply at least one action step');\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and > 4 steps are provided\n *\n * @export\n * @class TooManyEventActionStepsProvidedError\n * @typedef {TooManyEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class TooManyEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of TooManyEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Cannot supply more than 4 action steps with current protocol version',\n );\n }\n}\n\n/**\n * Function action validation context to help debug other validation errors\n *\n * @interface FunctionActionValidationMeta\n * @typedef {FunctionActionValidationMeta}\n */\ninterface FunctionActionValidationMeta {\n decodedArgs: readonly (string | bigint)[];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n/**\n * Event action validation context to help debug other validation errors\n *\n * @interface EventActionValidationMeta\n * @typedef {EventActionValidationMeta}\n */\ninterface EventActionValidationMeta {\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n\n/**\n * The base error thrown during event action validation extended by more specific validation errors.\n * Instantiated with relevent context data for more in depth debugging.\n *\n * @export\n * @class FieldActionValidationError\n * @typedef {FieldActionValidationError}\n * @extends {Error}\n */\nexport class FieldActionValidationError extends Error {\n /**\n * The function input arguments being validated against\n *\n * @type {decodedArgs}\n */\n decodedArgs?: readonly (string | bigint)[];\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n /**\n * Creates an instance of FieldActionValidationError.\n *\n * @constructor\n * @param {string} message\n * @param {EventActionValidationMeta} param0\n * @param {*} param0.fieldValue\n * @param {Criteria} param0.criteria\n * @param {Log} param0.log\n */\n constructor(\n message: string,\n {\n fieldValue,\n criteria,\n ...args\n }: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(message);\n this.fieldValue = fieldValue;\n this.criteria = criteria;\n\n switch (true) {\n case 'log' in args:\n this.log = args.log;\n break;\n case 'decodedArgs' in args:\n this.decodedArgs = args.decodedArgs;\n }\n }\n}\n\n/**\n * Thrown when abi-decoded args on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class DecodedArgsMalformedError extends FieldActionValidationError {\n /**\n * Creates an instance of DecodedArgsUndefinedError.\n *\n * @constructor\n * @param {DecodedArgsMalformedError} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Decoded Args are malformed; Check which params are indexed',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when field value on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueUndefinedError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueUndefinedError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Field value is undefined', metadata);\n }\n}\n\n/**\n * Thrown when a filter type is using a numerical operator but field type is not numerical\n *\n * @export\n * @class InvalidNumericalCriteriaError\n * @typedef {InvalidNumericalCriteriaError}\n * @extends {FieldActionValidationError}\n */\nexport class InvalidNumericalCriteriaError extends FieldActionValidationError {\n /**\n * Creates an instance of InvalidNumericalCriteria.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Numerical comparisons cannot be used with non-numerical criteria',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when decoding function data fails.\n *\n * @export\n * @class FunctionDataDecodeError\n * @typedef {FunctionDataDecodeError}\n * @extends {Error}\n */\nexport class FunctionDataDecodeError extends Error {\n public abi: AbiFunction[];\n public originalError: Error;\n\n /**\n * Creates an instance of FunctionDataDecodeError.\n *\n * @constructor\n * @param {AbiFunction[]} abi - The ABI of the function.\n * @param {Error} originalError - The original error that was thrown.\n */\n constructor(abi: AbiFunction[], originalError: Error) {\n super(`Failed to decode function data: ${originalError.message}`);\n this.name = 'FunctionDataDecodeError';\n this.abi = abi;\n this.originalError = originalError;\n }\n}\n\n/**\n * Thrown when an the log's field value is being compared a field type that isn't bytes or string during event action validation\n *\n * @export\n * @class FieldValueNotComparableError\n * @typedef {FieldValueNotComparableError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueNotComparableError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueNotComparableError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Filter can only be used with bytes or string field type', metadata);\n }\n}\n\n/**\n * Thrown when an invalid filter type enum was provided event action validation.\n *\n * @export\n * @class UnrecognizedFilterTypeError\n * @typedef {UnrecognizedFilterTypeError}\n * @extends {FieldActionValidationError}\n */\nexport class UnrecognizedFilterTypeError extends FieldActionValidationError {\n /**\n * Creates an instance of UnrecognizedFilterTypeError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Invalid FilterType provided', metadata);\n }\n}\n\nexport class NoConnectedChainIdError extends Error {\n constructor() {\n super(\n 'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',\n );\n }\n}\n\nexport class InvalidProtocolChainIdError extends Error {\n constructor(chainId: number, validChainIds: number[]) {\n super(\n `Provided Wagmi configuration supplied a \"chainId\" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,\n );\n }\n}\n"],"names":["BoostCoreNoIdentifierEmitted","ContractAddressRequiredError","DeployableAlreadyDeployedError","address","DeployableBuildParametersUnspecifiedError","DeployableUnknownOwnerProvidedError","DeployableWagmiConfigurationRequiredError","DeployableMissingPayloadError","NoContractAddressUponReceiptError","receipt","InvalidComponentInterfaceError","expected","received","zeroHash","UnparseableAbiParamError","input_param_idx","event","UnknownTransferPayloadSupplied","BudgetMustAuthorizeBoostCore","boostCoreAddress","MustInitializeBudgetError","IncentiveNotCloneableError","incentive","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","FieldActionValidationError","message","fieldValue","criteria","args","DecodedArgsMalformedError","metadata","FieldValueUndefinedError","InvalidNumericalCriteriaError","FunctionDataDecodeError","abi","originalError","FieldValueNotComparableError","UnrecognizedFilterTypeError","NoConnectedChainIdError","InvalidProtocolChainIdError","chainId","validChainIds"],"mappings":";AA6BO,MAAMA,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,iEAAiE;AAAA,EACzE;AACF;AAiBO,MAAMC,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,gEAAgE;AAAA,EACxE;AACF;AAUO,MAAMC,UAAuC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaxD,YAAYC,GAAiB;AAC3B;AAAA,MACE;AAAA,IAAA,GAEF,KAAK,UAAUA;AAAA,EACjB;AACF;AAUO,MAAMC,UAAkD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnE,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAA4C,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7D,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAAkD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnE,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAAsC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvD,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAA0C,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAO,EAAE,GAChE,KAAK,OAAO,2BACZ,KAAK,MAAMD,GACX,KAAK,gBAAgBC;AAAA,EACvB;AACF;AAUO,MAAMC,UAAqCZ,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO3E,YACEM,GACA;AACA,UAAM,2DAA2DA,CAAQ;AAAA,EAC3E;AACF;AAUO,MAAMO,UAAoCb,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1E,YACEM,GACA;AACA,UAAM,+BAA+BA,CAAQ;AAAA,EAC/C;AACF;AAEO,MAAMQ,UAAgC,MAAM;AAAA,EACjD,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAEO,MAAMC,UAAoC,MAAM;AAAA,EACrD,YAAYC,GAAiBC,GAAyB;AACpD;AAAA,MACE,+FAA+FD,CAAO,2BAA2BC,CAAa;AAAA,IAAA;AAAA,EAElJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../src/errors.ts"],"sourcesContent":["import {\n type AbiEvent,\n type AbiFunction,\n type Hex,\n type Log,\n type WaitForTransactionReceiptReturnType,\n zeroHash,\n} from 'viem';\nimport type { Criteria } from './Actions/EventAction';\nimport type { EventLogs } from './Actions/EventAction';\nimport type { BoostRegistry } from './BoostRegistry';\nimport type { Incentive } from './Incentives/Incentive';\n\n/**\n * This error is thrown during Boost creation if no `BoostCreated` event was emitted.\n *\n * @export\n * @class BoostCoreNoIdentifierEmitted\n * @typedef {BoostCoreNoIdentifierEmitted}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * await boostCore.createBoost(...)\n * } catch(e) {\n * if(e instanceof BoostCoreNoIdentifierEmitted) {}\n * }\n * ```\n */\nexport class BoostCoreNoIdentifierEmitted extends Error {\n /**\n * Creates an instance of BoostCoreNoIdentifierEmitted.\n *\n * @constructor\n */\n constructor() {\n super(`No \"BoostCreated\" log was emitted from which to extract boostId`);\n }\n}\n\n/**\n * This error is thrown when `assertValidAddress` is called, usually because a contract call expects the class to have a valid address attached.\n *\n * @export\n * @class ContractAddressRequiredError\n * @typedef {ContractAddressRequiredError}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * target.assertValidAddress()\n * } catch(e) {\n * if(e instanceof ContractAddressRequiredError) {}\n * }\n */\nexport class ContractAddressRequiredError extends Error {\n /**\n * Creates an instance of ContractAddressRequiredError.\n *\n * @constructor\n */\n constructor() {\n super('Attempted to call contract method without providing an address');\n }\n}\n\n/**\n * This error is thrown when attempting to deploy a contract that has already been deployed, or has an address attached.\n *\n * @export\n * @class DeployableAlreadyDeployedError\n * @typedef {DeployableAlreadyDeployedError}\n * @extends {Error}\n */\nexport class DeployableAlreadyDeployedError extends Error {\n /**\n * The address already attached to the target.\n *\n * @type {string}\n */\n address: string;\n /**\n * Creates an instance of DeployableAlreadyDeployedError.\n *\n * @constructor\n * @param {string} address\n */\n constructor(address: string) {\n super(\n 'Attempted to deploy a contract that already has an address configured',\n );\n this.address = address;\n }\n}\n\n/**\n * You should never see this error if we did our jobs and every target overrides the `buildParameters` method.\n *\n * @export\n * @class DeployableBuildParametersUnspecifiedError\n * @typedef {DeployableBuildParametersUnspecifiedError}\n * @extends {Error}\n */\nexport class DeployableBuildParametersUnspecifiedError extends Error {\n /**\n * Creates an instance of DeployableBuildParametersUnspecifiedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Implementing class did not properly override the `buildParameters` method',\n );\n }\n}\n\n/**\n * This error is thrown when attempting to deploy an `ownable` contract and the owner cannot be ascertained from the initialization payload or configured account.\n *\n * @export\n * @class DeployableUnknownOwnerProvidedError\n * @typedef {DeployableUnknownOwnerProvidedError}\n * @extends {Error}\n */\nexport class DeployableUnknownOwnerProvidedError extends Error {\n /**\n * Creates an instance of DeployableUnknownOwnerProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected an an owner to be provided in configuration or an account to exist on Wagmi config.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid Wagmi configuration on the instance.\n *\n * @export\n * @class DeployableWagmiConfigurationRequiredError\n * @typedef {DeployableWagmiConfigurationRequiredError}\n * @extends {Error}\n */\nexport class DeployableWagmiConfigurationRequiredError extends Error {\n /**\n * Creates an instance of DeployableWagmiConfigurationRequiredError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid initialization payload.\n *\n * @export\n * @class DeployableMissingPayloadError\n * @typedef {DeployableMissingPayloadError}\n * @extends {Error}\n */\nexport class DeployableMissingPayloadError extends Error {\n /**\n * Creates an instance of DeployableMissingPayloadError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid payload to be available either on Deployable or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when we receive a transaction receipt for a contract deployment without a contract address on it.\n *\n * @export\n * @class NoContractAddressUponReceiptError\n * @typedef {NoContractAddressUponReceiptError}\n * @extends {Error}\n */\nexport class NoContractAddressUponReceiptError extends Error {\n /**\n * The raw receipt we receive from [waitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)\n *\n * @public\n * @readonly\n * @type {WaitForTransactionReceiptReturnType}\n */\n public readonly receipt: WaitForTransactionReceiptReturnType;\n /**\n * Creates an instance of NoContractAddressUponReceiptError.\n *\n * @constructor\n * @param {WaitForTransactionReceiptReturnType} receipt\n */\n constructor(receipt: WaitForTransactionReceiptReturnType) {\n super(`Expected a contract address to exist on receipt.`, {\n cause: receipt,\n });\n this.receipt = receipt;\n }\n}\n\n/**\n * This error is thrown when a target address was provided that doesn't match any supported interface for the given registry type.\n * For example, if you try to do `incentiveFromAddress()` with the address of a deployed `SimpleBudget`\n *\n * @export\n * @class InvalidComponentInterfaceError\n * @typedef {InvalidComponentInterfaceError}\n * @extends {Error}\n */\nexport class InvalidComponentInterfaceError extends Error {\n /**\n * Expected interface hashes.\n *\n * @public\n * @readonly\n * @type {Hex[]}\n */\n public readonly expected: Hex[] = [];\n /**\n * The actual interface hash.\n *\n * @public\n * @readonly\n * @type {Hex}\n */\n public readonly received: Hex = zeroHash;\n\n /**\n * Creates an instance of InvalidComponentInterfaceError.\n *\n * @constructor\n * @param {Hex[]} expected\n * @param {Hex} received\n */\n constructor(expected: Hex[], received: Hex) {\n super(`Address provided does not match any expected protocol interface`, {\n cause: { expected, received },\n });\n this.expected = expected;\n this.received = received;\n }\n}\n\n/**\n * This error is thrown when a param is not transparently stored onchain\n *\n * @export\n * @class UnparseableAbiParamError\n * @typedef {UnparseableAbiParamError}\n * @extends {Error}\n */\nexport class UnparseableAbiParamError extends Error {\n /**\n * the param index that is unparseable\n *\n * @type {number}\n */\n input_param_idx: number;\n /**\n * The given event that contains the unparseable param\n *\n * @type {AbiEvent}\n */\n event: AbiEvent;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {number} input_param_idx\n * @param {AbiEvent} event\n */\n constructor(input_param_idx: number, event: AbiEvent) {\n super(\n `Parameter is not transparently stored onchain. Parameter ${input_param_idx} in event ${event.name} cannot be used in an action`,\n { cause: event },\n );\n this.event = event;\n this.input_param_idx = input_param_idx;\n }\n}\n\n/**\n * This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`\n *\n * @see {@link FungibleTransferPayload}\n * @see {@link ERC1155TransferPayload}\n * @export\n * @class UnknownTransferPayloadSupplied\n * @typedef {UnknownTransferPayloadSupplied}\n * @extends {Error}\n */\nexport class UnknownTransferPayloadSupplied extends Error {\n /**\n * The given payload that does not conform to the correct payload shape.\n *\n * @type {unknown}\n */\n received: unknown;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {unknown} received\n */\n constructor(received: unknown) {\n super(\n `Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.`,\n { cause: received },\n );\n this.received = received;\n }\n}\n\n/**\n * This error is thrown during Boost creation when the budget doesn't authorize the Boost Core address.\n *\n * @export\n * @class BudgetMustAuthorizeBoostCore\n * @typedef {BudgetMustAuthorizeBoostCore}\n * @extends {Error}\n */\nexport class BudgetMustAuthorizeBoostCore extends Error {\n /**\n * Creates an instance of BudgetMustAuthorizeBoostCore.\n *\n * @constructor\n * @param {string} boostCoreAddress\n */\n constructor(boostCoreAddress: string) {\n super(\n `Budget needs to explicitly authorize ${boostCoreAddress}. You can retrieve this value from BoostCore.address`,\n );\n }\n}\n\n/**\n * Because this contract is a base implementation, it should not be initialized through the constructor. Instead, it should be cloned and initialized using the {@link BoostRegistry}\n *\n * @export\n * @class MustInitializeBudgetError\n * @typedef {MustInitializeBudgetError}\n * @extends {Error}\n */\nexport class MustInitializeBudgetError extends Error {\n /**\n * Creates an instance of MustInitializeBudgetError.\n */\n constructor() {\n super(`Budgets must be preinitialized before being used with a new Boost`);\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n * The protocol doesn't allow this.\n *\n * @export\n * @class IncentiveNotCloneableError\n * @typedef {IncentiveNotCloneableError}\n * @extends {Error}\n */\nexport class IncentiveNotCloneableError extends Error {\n /**\n * Creates an instance of IncentiveNotCloneableError.\n *\n * @constructor\n * @param {Incentive} incentive\n */\n constructor(incentive: Incentive) {\n super(`Incentive not cloneable: ${incentive.constructor.name}`);\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and no action steps are provided\n *\n * @export\n * @class NoEventActionStepsProvidedError\n * @typedef {NoEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class NoEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of NoEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super('Must supply at least one action step');\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and > 4 steps are provided\n *\n * @export\n * @class TooManyEventActionStepsProvidedError\n * @typedef {TooManyEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class TooManyEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of TooManyEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Cannot supply more than 4 action steps with current protocol version',\n );\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n *\n * @export\n * @class ValidationAbiMissingError\n * @typedef {ValidationAbiMissingError}\n * @extends {Error}\n */\nexport class ValidationAbiMissingError extends Error {\n /**\n * Creates an instance of ValidationAbiMissingError.\n *\n * @constructor\n * @param {Hex} signature\n */\n constructor(signature: Hex) {\n super(`No known ABI for given signature: ${signature}`);\n }\n}\n\n/**\n * Thrown when missing logs for validating action steps.\n *\n * @export\n * @class ValidationLogsMissingError\n * @typedef {ValidationLogsMissingError}\n * @extends {Error}\n */\nexport class ValidationLogsMissingError extends Error {\n /**\n * Creates an instance of ValidationLogsMissingError.\n *\n * @constructor\n */\n constructor() {\n super('Logs are required for validation');\n }\n}\n\n/**\n * Function action validation context to help debug other validation errors\n *\n * @interface FunctionActionValidationMeta\n * @typedef {FunctionActionValidationMeta}\n */\ninterface FunctionActionValidationMeta {\n decodedArgs: readonly (string | bigint)[];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n/**\n * Event action validation context to help debug other validation errors\n *\n * @interface EventActionValidationMeta\n * @typedef {EventActionValidationMeta}\n */\ninterface EventActionValidationMeta {\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n\n/**\n * The base error thrown during event action validation extended by more specific validation errors.\n * Instantiated with relevent context data for more in depth debugging.\n *\n * @export\n * @class FieldActionValidationError\n * @typedef {FieldActionValidationError}\n * @extends {Error}\n */\nexport class FieldActionValidationError extends Error {\n /**\n * The function input arguments being validated against\n *\n * @type {decodedArgs}\n */\n decodedArgs?: readonly (string | bigint)[];\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n /**\n * Creates an instance of FieldActionValidationError.\n *\n * @constructor\n * @param {string} message\n * @param {EventActionValidationMeta} param0\n * @param {*} param0.fieldValue\n * @param {Criteria} param0.criteria\n * @param {Log} param0.log\n */\n constructor(\n message: string,\n {\n fieldValue,\n criteria,\n ...args\n }: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(message);\n this.fieldValue = fieldValue;\n this.criteria = criteria;\n\n switch (true) {\n case 'log' in args:\n this.log = args.log;\n break;\n case 'decodedArgs' in args:\n this.decodedArgs = args.decodedArgs;\n }\n }\n}\n\n/**\n * Thrown when abi-decoded args on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class DecodedArgsMalformedError extends FieldActionValidationError {\n /**\n * Creates an instance of DecodedArgsUndefinedError.\n *\n * @constructor\n * @param {DecodedArgsMalformedError} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Decoded Args are malformed; Check which params are indexed',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when field value on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueUndefinedError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueUndefinedError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Field value is undefined', metadata);\n }\n}\n\n/**\n * Thrown when a filter type is using a numerical operator but field type is not numerical\n *\n * @export\n * @class InvalidNumericalCriteriaError\n * @typedef {InvalidNumericalCriteriaError}\n * @extends {FieldActionValidationError}\n */\nexport class InvalidNumericalCriteriaError extends FieldActionValidationError {\n /**\n * Creates an instance of InvalidNumericalCriteria.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Numerical comparisons cannot be used with non-numerical criteria',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when decoding function data fails.\n *\n * @export\n * @class FunctionDataDecodeError\n * @typedef {FunctionDataDecodeError}\n * @extends {Error}\n */\nexport class FunctionDataDecodeError extends Error {\n public abi: AbiFunction[];\n public originalError: Error;\n\n /**\n * Creates an instance of FunctionDataDecodeError.\n *\n * @constructor\n * @param {AbiFunction[]} abi - The ABI of the function.\n * @param {Error} originalError - The original error that was thrown.\n */\n constructor(abi: AbiFunction[], originalError: Error) {\n super(`Failed to decode function data: ${originalError.message}`);\n this.name = 'FunctionDataDecodeError';\n this.abi = abi;\n this.originalError = originalError;\n }\n}\n\n/**\n * Thrown when an the log's field value is being compared a field type that isn't bytes or string during event action validation\n *\n * @export\n * @class FieldValueNotComparableError\n * @typedef {FieldValueNotComparableError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueNotComparableError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueNotComparableError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Filter can only be used with bytes or string field type', metadata);\n }\n}\n\n/**\n * Thrown when an invalid filter type enum was provided event action validation.\n *\n * @export\n * @class UnrecognizedFilterTypeError\n * @typedef {UnrecognizedFilterTypeError}\n * @extends {FieldActionValidationError}\n */\nexport class UnrecognizedFilterTypeError extends FieldActionValidationError {\n /**\n * Creates an instance of UnrecognizedFilterTypeError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Invalid FilterType provided', metadata);\n }\n}\n\n/**\n * Thrown when no chain ID is provided in the Wagmi configuration.\n *\n * @export\n * @class NoConnectedChainIdError\n * @typedef {NoConnectedChainIdError}\n * @extends {Error}\n */\nexport class NoConnectedChainIdError extends Error {\n /**\n * Creates an instance of NoConnectedChainIdError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',\n );\n this.name = 'NoConnectedChainIdError';\n }\n}\n\n/**\n * Thrown when an invalid chain ID is provided that doesn't match any deployed protocol.\n *\n * @export\n * @class InvalidProtocolChainIdError\n * @typedef {InvalidProtocolChainIdError}\n * @extends {Error}\n */\nexport class InvalidProtocolChainIdError extends Error {\n /**\n * Creates an instance of InvalidProtocolChainIdError.\n *\n * @constructor\n * @param {number} chainId - The chain ID provided in the configuration.\n * @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.\n */\n constructor(chainId: number, validChainIds: number[]) {\n super(\n `Provided Wagmi configuration supplied a \"chainId\" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,\n );\n this.name = 'InvalidProtocolChainIdError';\n }\n}\n\n/**\n * Thrown when the incentive criteria cannot be fetched from the contract.\n *\n * @export\n * @class IncentiveCriteriaNotFoundError\n * @typedef {IncentiveCriteriaNotFoundError}\n * @extends {Error}\n */\nexport class IncentiveCriteriaNotFoundError extends Error {\n /**\n * Creates an instance of IncentiveCriteriaNotFoundError.\n *\n * @constructor\n * @param {Error} [e] - Optional error object for further context.\n * @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.\n */\n constructor(\n e?: Error,\n message = 'Unable to fetch Incentive Criteria from contract',\n ) {\n super(message + (e ? `: ${e.message}` : ''));\n this.name = 'IncentiveCriteriaNotFoundError';\n }\n}\n\n/**\n * Thrown when no matching logs are found for a given event signature.\n *\n * @export\n * @class NoMatchingLogsError\n * @typedef {NoMatchingLogsError}\n * @extends {Error}\n */\nexport class NoMatchingLogsError extends Error {\n /**\n * Creates an instance of NoMatchingLogsError.\n *\n * @constructor\n * @param {string} signature - The event signature for which logs are being searched.\n * @param {string} [message] - Optional custom error message.\n */\n constructor(\n signature: string,\n message = `No logs found for event signature ${signature}`,\n ) {\n super(message);\n this.name = 'NoMatchingLogsError';\n }\n}\n\n/**\n * Thrown when an invalid criteria type is provided.\n *\n * @export\n * @class InvalidCriteriaTypeError\n * @typedef {InvalidCriteriaTypeError}\n * @extends {Error}\n */\nexport class InvalidCriteriaTypeError extends Error {\n /**\n * Creates an instance of InvalidCriteriaTypeError.\n *\n * @constructor\n * @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.\n * @param {string} [message] - Optional custom error message.\n */\n constructor(\n criteriaType = 'unknown',\n message = `Invalid criteria type ${criteriaType}`,\n ) {\n super(message);\n this.name = 'InvalidCriteriaTypeError';\n }\n}\n\n/**\n * Thrown when decoding function arguments fails.\n *\n * @export\n * @class DecodedArgsError\n * @typedef {DecodedArgsError}\n * @extends {Error}\n */\nexport class DecodedArgsError extends Error {\n /**\n * Creates an instance of DecodedArgsError.\n *\n * @constructor\n * @param {string} [message='Issue decoding args'] - Custom error message.\n */\n constructor(message = 'Issue decoding args') {\n super(message);\n this.name = 'DecodedArgsError';\n }\n}\n"],"names":["BoostCoreNoIdentifierEmitted","ContractAddressRequiredError","DeployableAlreadyDeployedError","address","DeployableBuildParametersUnspecifiedError","DeployableUnknownOwnerProvidedError","DeployableWagmiConfigurationRequiredError","DeployableMissingPayloadError","NoContractAddressUponReceiptError","receipt","InvalidComponentInterfaceError","expected","received","zeroHash","UnparseableAbiParamError","input_param_idx","event","UnknownTransferPayloadSupplied","BudgetMustAuthorizeBoostCore","boostCoreAddress","MustInitializeBudgetError","IncentiveNotCloneableError","incentive","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","ValidationAbiMissingError","signature","ValidationLogsMissingError","FieldActionValidationError","message","fieldValue","criteria","args","DecodedArgsMalformedError","metadata","FieldValueUndefinedError","InvalidNumericalCriteriaError","FunctionDataDecodeError","abi","originalError","FieldValueNotComparableError","UnrecognizedFilterTypeError","NoConnectedChainIdError","InvalidProtocolChainIdError","chainId","validChainIds","IncentiveCriteriaNotFoundError","e","NoMatchingLogsError","InvalidCriteriaTypeError","criteriaType","DecodedArgsError"],"mappings":";AA6BO,MAAMA,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,iEAAiE;AAAA,EACzE;AACF;AAiBO,MAAMC,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,gEAAgE;AAAA,EACxE;AACF;AAUO,MAAMC,UAAuC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaxD,YAAYC,GAAiB;AAC3B;AAAA,MACE;AAAA,IAAA,GAEF,KAAK,UAAUA;AAAA,EACjB;AACF;AAUO,MAAMC,UAAkD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnE,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAA4C,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7D,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAAkD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnE,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAAsC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvD,cAAc;AACZ;AAAA,MACE;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO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