@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.21
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 +2 -1
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +1 -1
- package/dist/Actions/Action.d.ts.map +1 -1
- package/dist/Actions/Action.js +14 -12
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +57 -14
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +50 -23
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +2 -1
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +405 -36
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -209
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +6 -5
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +46 -22
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +76 -76
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +12 -200
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.js +1 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.js +5 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -1
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +105 -14
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +138 -5
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore-DolmDuXW.cjs +3 -0
- package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
- package/dist/BoostCore-Z97KVu4V.js +1448 -0
- package/dist/BoostCore-Z97KVu4V.js.map +1 -0
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +788 -79
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +30 -1103
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -1
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +95 -26
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +183 -89
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -1
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +15 -13
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +112 -192
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +91 -291
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +277 -91
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +2 -1
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +7 -8
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +9 -3
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +10 -5
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +16 -15
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +49 -42
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-CBKzuNoN.cjs +2 -0
- package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
- package/dist/EventAction-DWuuc_Qy.js +1528 -0
- package/dist/EventAction-DWuuc_Qy.js.map +1 -0
- package/dist/Incentive-BxzEtN26.js +298 -0
- package/dist/Incentive-BxzEtN26.js.map +1 -0
- package/dist/Incentive-CrF3-ayL.cjs +2 -0
- package/dist/Incentive-CrF3-ayL.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +65 -21
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +52 -36
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +315 -26
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +64 -39
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +291 -43
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +2 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +270 -33
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +69 -46
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +338 -421
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +262 -32
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +2 -1
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +5 -8
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +17 -278
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +81 -23
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +57 -36
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
- package/dist/SimpleDenyList-CGaWjuld.js +132 -0
- package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +310 -17
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +165 -36
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -1
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +2 -2
- package/dist/Validators/Validator.d.ts.map +1 -1
- package/dist/Validators/Validator.js +10 -8
- package/dist/Validators/Validator.js.map +1 -0
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +44 -0
- package/dist/errors.cjs +2 -1
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +421 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +297 -39
- package/dist/errors.js.map +1 -0
- package/dist/{generated-x_abr3Yv.js → generated-CKt2yCQd.js} +3143 -3002
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +144 -1353
- package/dist/index.js.map +1 -0
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +2 -1
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +26 -1350
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -636
- package/dist/utils.js.map +1 -0
- package/package.json +37 -11
- package/src/Actions/Action.test.ts +79 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +300 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +291 -0
- package/src/Actions/EventAction.test.ts +787 -0
- package/src/Actions/EventAction.ts +1218 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +62 -0
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +262 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +250 -0
- package/src/Auth/Auth.ts +11 -0
- package/src/Auth/PassthroughAuth.test.ts +12 -0
- package/src/Auth/PassthroughAuth.ts +80 -0
- package/src/Boost.ts +287 -0
- package/src/BoostCore.test.ts +894 -0
- package/src/BoostCore.ts +1438 -0
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +588 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +60 -0
- package/src/Budgets/ManagedBudget.test.ts +217 -0
- package/src/Budgets/ManagedBudget.ts +534 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +530 -0
- package/src/Deployable/Contract.ts +228 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +234 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +336 -0
- package/src/Incentives/CGDAIncentive.test.ts +135 -0
- package/src/Incentives/CGDAIncentive.ts +476 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +465 -0
- package/src/Incentives/ERC20Incentive.test.ts +133 -0
- package/src/Incentives/ERC20Incentive.ts +490 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +139 -0
- package/src/Incentives/ERC20VariableIncentive.ts +428 -0
- package/src/Incentives/Incentive.test.ts +95 -0
- package/src/Incentives/Incentive.ts +86 -0
- package/src/Incentives/PointsIncentive.test.ts +138 -0
- package/src/Incentives/PointsIncentive.ts +367 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +683 -0
- package/src/Validators/Validator.test.ts +21 -0
- package/src/Validators/Validator.ts +55 -0
- package/src/claiming.ts +56 -0
- package/src/errors.ts +866 -0
- package/src/index.test.ts +122 -0
- package/src/index.ts +58 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +247 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/generated-BaaleHW-.cjs +0 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const c = {
|
|
2
|
+
11155111: "0x504F4710d6C4A4cf610F17782C9205E0e583e85f"
|
|
3
|
+
}, e = {
|
|
4
|
+
11155111: "0x7BB0f4D1EC236B6F7EDb5AB41Cff0956755Fc202"
|
|
5
|
+
}, a = {
|
|
6
|
+
11155111: "0xD32f03C033383E0B62Ff900038C1CA9788f76369"
|
|
7
|
+
}, s = {
|
|
8
|
+
11155111: "0x88DCc7Fc9dDA2081fF2Fa15E240D3B81dfCbbaF0"
|
|
9
|
+
}, t = {
|
|
10
|
+
11155111: "0xFc81D4702F836C68E47184f31878af192949658A"
|
|
11
|
+
}, n = {
|
|
12
|
+
11155111: "0x588C5f424A1a1BE2dC0991906DDe323754B918Ad"
|
|
13
|
+
}, C = {
|
|
14
|
+
11155111: "0xDb79d3803fC80E62c7E5A64f00DAD14721f2801c"
|
|
15
|
+
}, f = {
|
|
16
|
+
11155111: "0x59A4B235950e7BdfD185F447271CE045691d5156"
|
|
17
|
+
}, o = {
|
|
18
|
+
11155111: "0x22e48036b74d125da60246b8Fb677D6194a95291"
|
|
19
|
+
}, i = {
|
|
20
|
+
11155111: "0xc37d353c13F75F48bEDB1CaDAACa77F3594FB2B9"
|
|
21
|
+
}, E = {
|
|
22
|
+
11155111: "0x9e1ff146C96195c74a746756AEd748c92Ff81d6A"
|
|
23
|
+
}, d = {
|
|
24
|
+
11155111: "0x7b27cc50e96Fc2f714b9a11825702d33f44cCB49"
|
|
25
|
+
}, A = {
|
|
26
|
+
11155111: "0x5Be370C82769dfa3738041D672047E2048EE5e73"
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
c as A,
|
|
30
|
+
a as B,
|
|
31
|
+
s as C,
|
|
32
|
+
t as E,
|
|
33
|
+
o as M,
|
|
34
|
+
i as P,
|
|
35
|
+
d as S,
|
|
36
|
+
A as a,
|
|
37
|
+
E as b,
|
|
38
|
+
C as c,
|
|
39
|
+
f as d,
|
|
40
|
+
n as e,
|
|
41
|
+
e as f
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=deployments-oykLv3_Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments-oykLv3_Z.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AllowListIncentive": {
|
|
3
|
+
"11155111": "0x504F4710d6C4A4cf610F17782C9205E0e583e85f"
|
|
4
|
+
},
|
|
5
|
+
"BoostCore": {
|
|
6
|
+
"11155111": "0x7BB0f4D1EC236B6F7EDb5AB41Cff0956755Fc202"
|
|
7
|
+
},
|
|
8
|
+
"BoostRegistry": {
|
|
9
|
+
"11155111": "0xD32f03C033383E0B62Ff900038C1CA9788f76369"
|
|
10
|
+
},
|
|
11
|
+
"CGDAIncentive": {
|
|
12
|
+
"11155111": "0x88DCc7Fc9dDA2081fF2Fa15E240D3B81dfCbbaF0"
|
|
13
|
+
},
|
|
14
|
+
"ERC20Incentive": {
|
|
15
|
+
"11155111": "0xFc81D4702F836C68E47184f31878af192949658A"
|
|
16
|
+
},
|
|
17
|
+
"ERC20VariableCriteriaIncentive": {
|
|
18
|
+
"11155111": "0x588C5f424A1a1BE2dC0991906DDe323754B918Ad"
|
|
19
|
+
},
|
|
20
|
+
"ERC20VariableIncentive": {
|
|
21
|
+
"11155111": "0xDb79d3803fC80E62c7E5A64f00DAD14721f2801c"
|
|
22
|
+
},
|
|
23
|
+
"EventAction": {
|
|
24
|
+
"11155111": "0x59A4B235950e7BdfD185F447271CE045691d5156"
|
|
25
|
+
},
|
|
26
|
+
"ManagedBudget": {
|
|
27
|
+
"11155111": "0x22e48036b74d125da60246b8Fb677D6194a95291"
|
|
28
|
+
},
|
|
29
|
+
"OpenAllowList": {
|
|
30
|
+
"11155111": "0x192F4a185c76306C6F4fF22a8c412De414452330"
|
|
31
|
+
},
|
|
32
|
+
"PointsIncentive": {
|
|
33
|
+
"11155111": "0xc37d353c13F75F48bEDB1CaDAACa77F3594FB2B9"
|
|
34
|
+
},
|
|
35
|
+
"SignerValidator": {
|
|
36
|
+
"11155111": "0x9e1ff146C96195c74a746756AEd748c92Ff81d6A"
|
|
37
|
+
},
|
|
38
|
+
"SimpleAllowList": {
|
|
39
|
+
"11155111": "0x7b27cc50e96Fc2f714b9a11825702d33f44cCB49"
|
|
40
|
+
},
|
|
41
|
+
"SimpleDenyList": {
|
|
42
|
+
"11155111": "0x5Be370C82769dfa3738041D672047E2048EE5e73"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/dist/errors.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class h extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class g extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class m extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class v extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class y extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class f extends Error{constructor(){super("Must supply at least one action step")}}class C extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class I extends Error{constructor(r){super(`No known ABI for given signature: ${r}`)}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class A extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class D extends t{constructor(r){super("Field value is undefined",r)}}class N extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class w extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class P extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class F extends t{constructor(r){super("Invalid FilterType provided",r)}}class B extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"),this.name="NoConnectedChainIdError"}}class M extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`),this.name="InvalidProtocolChainIdError"}}class U extends Error{constructor(r,o="Unable to fetch Incentive Criteria from contract"){super(o+(r?`: ${r.message}`:"")),this.name="IncentiveCriteriaNotFoundError"}}class T extends Error{constructor(r,o=`No logs found for event signature ${r}`){super(o),this.name="NoMatchingLogsError"}}class $ extends Error{constructor(r="unknown",o=`Invalid criteria type ${r}`){super(o),this.name="InvalidCriteriaTypeError"}}class z extends Error{constructor(r="Issue decoding args"){super(r),this.name="DecodedArgsError"}}class V extends Error{constructor(r){super(`Boost with not found with id: ${r}`),this.id=r}}exports.BoostCoreNoIdentifierEmitted=i;exports.BoostNotFoundError=V;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=d;exports.DecodedArgsError=z;exports.DecodedArgsMalformedError=A;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=P;exports.FieldValueUndefinedError=D;exports.FunctionDataDecodeError=w;exports.IncentiveCriteriaNotFoundError=U;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=g;exports.InvalidCriteriaTypeError=$;exports.InvalidNumericalCriteriaError=N;exports.InvalidProtocolChainIdError=M;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=B;exports.NoContractAddressUponReceiptError=h;exports.NoEventActionStepsProvidedError=f;exports.NoMatchingLogsError=T;exports.TooManyEventActionStepsProvidedError=C;exports.UnknownTransferPayloadSupplied=v;exports.UnparseableAbiParamError=m;exports.UnrecognizedFilterTypeError=F;exports.ValidationAbiMissingError=I;
|
|
2
|
+
//# sourceMappingURL=errors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.cjs","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 * 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\n/**\n * Thrown when reading a Boost that does not exist\n *\n * @export\n * @class BoostNotFoundError\n * @typedef {BoostNotFoundError}\n * @extends {Error}\n */\nexport class BoostNotFoundError extends Error {\n public readonly id: string;\n /**\n * Creates an instance of BoostNotFoundError.\n *\n * @constructor\n * @param {string} [id] - stringified boost id that does not exist\n */\n constructor(id: string) {\n super(`Boost with not found with id: ${id}`);\n this.id = id;\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","FieldActionValidationError","message","fieldValue","criteria","args","DecodedArgsMalformedError","metadata","FieldValueUndefinedError","InvalidNumericalCriteriaError","FunctionDataDecodeError","abi","originalError","FieldValueNotComparableError","UnrecognizedFilterTypeError","NoConnectedChainIdError","InvalidProtocolChainIdError","chainId","validChainIds","IncentiveCriteriaNotFoundError","e","NoMatchingLogsError","InvalidCriteriaTypeError","criteriaType","DecodedArgsError","BoostNotFoundError","id"],"mappings":"wGA6BO,MAAMA,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,iEAAiE,CACzE,CACF,CAiBO,MAAMC,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,gEAAgE,CACxE,CACF,CAUO,MAAMC,UAAuC,KAAM,CAaxD,YAAYC,EAAiB,CAC3B,MACE,uEAAA,EAEF,KAAK,QAAUA,CACjB,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,2EAAA,CAEJ,CACF,CAUO,MAAMC,UAA4C,KAAM,CAM7D,aAAc,CACZ,MACE,8FAAA,CAEJ,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,sGAAA,CAEJ,CACF,CAUO,MAAMC,UAAsC,KAAM,CAMvD,aAAc,CACZ,MACE,yFAAA,CAEJ,CACF,CAUO,MAAMC,UAA0C,KAAM,CAe3D,YAAYC,EAA8C,CACxD,MAAM,mDAAoD,CACxD,MAAOA,CAAA,CACR,EACD,KAAK,QAAUA,CACjB,CACF,CAWO,MAAMC,UAAuC,KAAM,CAyBxD,YAAYC,EAAiBC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AK,KAAO,0BACd,CACF,CAUO,MAAMsB,UAAyB,KAAM,CAO1C,YAAYtB,EAAU,sBAAuB,CAC3C,MAAMA,CAAO,EACb,KAAK,KAAO,kBACd,CACF,CAUO,MAAMuB,UAA2B,KAAM,CAQ5C,YAAYC,EAAY,CAChB,MAAA,iCAAiCA,CAAE,EAAE,EAC3C,KAAK,GAAKA,CACZ,CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type Hex, type WaitForTransactionReceiptReturnType } from 'viem';
|
|
1
|
+
import { type AbiEvent, type AbiFunction, type Hex, type WaitForTransactionReceiptReturnType } from 'viem';
|
|
2
|
+
import type { Criteria } from './Actions/EventAction';
|
|
3
|
+
import type { EventLogs } from './Actions/EventAction';
|
|
2
4
|
import type { Incentive } from './Incentives/Incentive';
|
|
3
5
|
/**
|
|
4
6
|
* This error is thrown during Boost creation if no `BoostCreated` event was emitted.
|
|
@@ -194,6 +196,36 @@ export declare class InvalidComponentInterfaceError extends Error {
|
|
|
194
196
|
*/
|
|
195
197
|
constructor(expected: Hex[], received: Hex);
|
|
196
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* This error is thrown when a param is not transparently stored onchain
|
|
201
|
+
*
|
|
202
|
+
* @export
|
|
203
|
+
* @class UnparseableAbiParamError
|
|
204
|
+
* @typedef {UnparseableAbiParamError}
|
|
205
|
+
* @extends {Error}
|
|
206
|
+
*/
|
|
207
|
+
export declare class UnparseableAbiParamError extends Error {
|
|
208
|
+
/**
|
|
209
|
+
* the param index that is unparseable
|
|
210
|
+
*
|
|
211
|
+
* @type {number}
|
|
212
|
+
*/
|
|
213
|
+
input_param_idx: number;
|
|
214
|
+
/**
|
|
215
|
+
* The given event that contains the unparseable param
|
|
216
|
+
*
|
|
217
|
+
* @type {AbiEvent}
|
|
218
|
+
*/
|
|
219
|
+
event: AbiEvent;
|
|
220
|
+
/**
|
|
221
|
+
* Creates an instance of UnknownTransferPayloadSupplied.
|
|
222
|
+
*
|
|
223
|
+
* @constructor
|
|
224
|
+
* @param {number} input_param_idx
|
|
225
|
+
* @param {AbiEvent} event
|
|
226
|
+
*/
|
|
227
|
+
constructor(input_param_idx: number, event: AbiEvent);
|
|
228
|
+
}
|
|
197
229
|
/**
|
|
198
230
|
* This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`
|
|
199
231
|
*
|
|
@@ -236,6 +268,20 @@ export declare class BudgetMustAuthorizeBoostCore extends Error {
|
|
|
236
268
|
*/
|
|
237
269
|
constructor(boostCoreAddress: string);
|
|
238
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* 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}
|
|
273
|
+
*
|
|
274
|
+
* @export
|
|
275
|
+
* @class MustInitializeBudgetError
|
|
276
|
+
* @typedef {MustInitializeBudgetError}
|
|
277
|
+
* @extends {Error}
|
|
278
|
+
*/
|
|
279
|
+
export declare class MustInitializeBudgetError extends Error {
|
|
280
|
+
/**
|
|
281
|
+
* Creates an instance of MustInitializeBudgetError.
|
|
282
|
+
*/
|
|
283
|
+
constructor();
|
|
284
|
+
}
|
|
239
285
|
/**
|
|
240
286
|
* The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.
|
|
241
287
|
* The protocol doesn't allow this.
|
|
@@ -254,4 +300,378 @@ export declare class IncentiveNotCloneableError extends Error {
|
|
|
254
300
|
*/
|
|
255
301
|
constructor(incentive: Incentive);
|
|
256
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Thrown when encoding an EventAction payload and no action steps are provided
|
|
305
|
+
*
|
|
306
|
+
* @export
|
|
307
|
+
* @class NoEventActionStepsProvidedError
|
|
308
|
+
* @typedef {NoEventActionStepsProvidedError}
|
|
309
|
+
* @extends {Error}
|
|
310
|
+
*/
|
|
311
|
+
export declare class NoEventActionStepsProvidedError extends Error {
|
|
312
|
+
/**
|
|
313
|
+
* Creates an instance of NoEventActionStepsProvidedError.
|
|
314
|
+
*
|
|
315
|
+
* @constructor
|
|
316
|
+
*/
|
|
317
|
+
constructor();
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Thrown when encoding an EventAction payload and > 4 steps are provided
|
|
321
|
+
*
|
|
322
|
+
* @export
|
|
323
|
+
* @class TooManyEventActionStepsProvidedError
|
|
324
|
+
* @typedef {TooManyEventActionStepsProvidedError}
|
|
325
|
+
* @extends {Error}
|
|
326
|
+
*/
|
|
327
|
+
export declare class TooManyEventActionStepsProvidedError extends Error {
|
|
328
|
+
/**
|
|
329
|
+
* Creates an instance of TooManyEventActionStepsProvidedError.
|
|
330
|
+
*
|
|
331
|
+
* @constructor
|
|
332
|
+
*/
|
|
333
|
+
constructor();
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.
|
|
337
|
+
*
|
|
338
|
+
* @export
|
|
339
|
+
* @class ValidationAbiMissingError
|
|
340
|
+
* @typedef {ValidationAbiMissingError}
|
|
341
|
+
* @extends {Error}
|
|
342
|
+
*/
|
|
343
|
+
export declare class ValidationAbiMissingError extends Error {
|
|
344
|
+
/**
|
|
345
|
+
* Creates an instance of ValidationAbiMissingError.
|
|
346
|
+
*
|
|
347
|
+
* @constructor
|
|
348
|
+
* @param {Hex} signature
|
|
349
|
+
*/
|
|
350
|
+
constructor(signature: Hex);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Function action validation context to help debug other validation errors
|
|
354
|
+
*
|
|
355
|
+
* @interface FunctionActionValidationMeta
|
|
356
|
+
* @typedef {FunctionActionValidationMeta}
|
|
357
|
+
*/
|
|
358
|
+
interface FunctionActionValidationMeta {
|
|
359
|
+
decodedArgs: readonly (string | bigint)[];
|
|
360
|
+
/**
|
|
361
|
+
* The value pulled off the log being validated against
|
|
362
|
+
*
|
|
363
|
+
* @type {*}
|
|
364
|
+
* biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits
|
|
365
|
+
*/
|
|
366
|
+
fieldValue: any;
|
|
367
|
+
/**
|
|
368
|
+
* The criteria being used to compare during validation
|
|
369
|
+
*
|
|
370
|
+
* @type {Criteria}
|
|
371
|
+
*/
|
|
372
|
+
criteria: Criteria;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Event action validation context to help debug other validation errors
|
|
376
|
+
*
|
|
377
|
+
* @interface EventActionValidationMeta
|
|
378
|
+
* @typedef {EventActionValidationMeta}
|
|
379
|
+
*/
|
|
380
|
+
interface EventActionValidationMeta {
|
|
381
|
+
/**
|
|
382
|
+
* The viem log being validated against
|
|
383
|
+
*
|
|
384
|
+
* @type {Log}
|
|
385
|
+
*/
|
|
386
|
+
log?: EventLogs[0];
|
|
387
|
+
/**
|
|
388
|
+
* The value pulled off the log being validated against
|
|
389
|
+
*
|
|
390
|
+
* @type {*}
|
|
391
|
+
* biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits
|
|
392
|
+
*/
|
|
393
|
+
fieldValue: any;
|
|
394
|
+
/**
|
|
395
|
+
* The criteria being used to compare during validation
|
|
396
|
+
*
|
|
397
|
+
* @type {Criteria}
|
|
398
|
+
*/
|
|
399
|
+
criteria: Criteria;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* The base error thrown during event action validation extended by more specific validation errors.
|
|
403
|
+
* Instantiated with relevent context data for more in depth debugging.
|
|
404
|
+
*
|
|
405
|
+
* @export
|
|
406
|
+
* @class FieldActionValidationError
|
|
407
|
+
* @typedef {FieldActionValidationError}
|
|
408
|
+
* @extends {Error}
|
|
409
|
+
*/
|
|
410
|
+
export declare class FieldActionValidationError extends Error {
|
|
411
|
+
/**
|
|
412
|
+
* The function input arguments being validated against
|
|
413
|
+
*
|
|
414
|
+
* @type {decodedArgs}
|
|
415
|
+
*/
|
|
416
|
+
decodedArgs?: readonly (string | bigint)[];
|
|
417
|
+
/**
|
|
418
|
+
* The viem log being validated against
|
|
419
|
+
*
|
|
420
|
+
* @type {Log}
|
|
421
|
+
*/
|
|
422
|
+
log?: EventLogs[0];
|
|
423
|
+
/**
|
|
424
|
+
* The value pulled off the log being validated against
|
|
425
|
+
*
|
|
426
|
+
* @type {*}
|
|
427
|
+
* biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits
|
|
428
|
+
*/
|
|
429
|
+
fieldValue: any;
|
|
430
|
+
/**
|
|
431
|
+
* The criteria being used to compare during validation
|
|
432
|
+
*
|
|
433
|
+
* @type {Criteria}
|
|
434
|
+
*/
|
|
435
|
+
criteria: Criteria;
|
|
436
|
+
/**
|
|
437
|
+
* Creates an instance of FieldActionValidationError.
|
|
438
|
+
*
|
|
439
|
+
* @constructor
|
|
440
|
+
* @param {string} message
|
|
441
|
+
* @param {EventActionValidationMeta} param0
|
|
442
|
+
* @param {*} param0.fieldValue
|
|
443
|
+
* @param {Criteria} param0.criteria
|
|
444
|
+
* @param {Log} param0.log
|
|
445
|
+
*/
|
|
446
|
+
constructor(message: string, { fieldValue, criteria, ...args }: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Thrown when abi-decoded args on log is undefined
|
|
450
|
+
*
|
|
451
|
+
* @export
|
|
452
|
+
* @class FieldValueUndefinedError
|
|
453
|
+
* @typedef {FieldValueUndefinedError}
|
|
454
|
+
* @extends {FieldActionValidationError}
|
|
455
|
+
*/
|
|
456
|
+
export declare class DecodedArgsMalformedError extends FieldActionValidationError {
|
|
457
|
+
/**
|
|
458
|
+
* Creates an instance of DecodedArgsUndefinedError.
|
|
459
|
+
*
|
|
460
|
+
* @constructor
|
|
461
|
+
* @param {DecodedArgsMalformedError} metadata
|
|
462
|
+
*/
|
|
463
|
+
constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Thrown when field value on log is undefined
|
|
467
|
+
*
|
|
468
|
+
* @export
|
|
469
|
+
* @class FieldValueUndefinedError
|
|
470
|
+
* @typedef {FieldValueUndefinedError}
|
|
471
|
+
* @extends {FieldActionValidationError}
|
|
472
|
+
*/
|
|
473
|
+
export declare class FieldValueUndefinedError extends FieldActionValidationError {
|
|
474
|
+
/**
|
|
475
|
+
* Creates an instance of FieldValueUndefinedError.
|
|
476
|
+
*
|
|
477
|
+
* @constructor
|
|
478
|
+
* @param {EventActionValidationMeta} metadata
|
|
479
|
+
*/
|
|
480
|
+
constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Thrown when a filter type is using a numerical operator but field type is not numerical
|
|
484
|
+
*
|
|
485
|
+
* @export
|
|
486
|
+
* @class InvalidNumericalCriteriaError
|
|
487
|
+
* @typedef {InvalidNumericalCriteriaError}
|
|
488
|
+
* @extends {FieldActionValidationError}
|
|
489
|
+
*/
|
|
490
|
+
export declare class InvalidNumericalCriteriaError extends FieldActionValidationError {
|
|
491
|
+
/**
|
|
492
|
+
* Creates an instance of InvalidNumericalCriteria.
|
|
493
|
+
*
|
|
494
|
+
* @constructor
|
|
495
|
+
* @param {EventActionValidationMeta} metadata
|
|
496
|
+
*/
|
|
497
|
+
constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Thrown when decoding function data fails.
|
|
501
|
+
*
|
|
502
|
+
* @export
|
|
503
|
+
* @class FunctionDataDecodeError
|
|
504
|
+
* @typedef {FunctionDataDecodeError}
|
|
505
|
+
* @extends {Error}
|
|
506
|
+
*/
|
|
507
|
+
export declare class FunctionDataDecodeError extends Error {
|
|
508
|
+
abi: AbiFunction[];
|
|
509
|
+
originalError: Error;
|
|
510
|
+
/**
|
|
511
|
+
* Creates an instance of FunctionDataDecodeError.
|
|
512
|
+
*
|
|
513
|
+
* @constructor
|
|
514
|
+
* @param {AbiFunction[]} abi - The ABI of the function.
|
|
515
|
+
* @param {Error} originalError - The original error that was thrown.
|
|
516
|
+
*/
|
|
517
|
+
constructor(abi: AbiFunction[], originalError: Error);
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Thrown when an the log's field value is being compared a field type that isn't bytes or string during event action validation
|
|
521
|
+
*
|
|
522
|
+
* @export
|
|
523
|
+
* @class FieldValueNotComparableError
|
|
524
|
+
* @typedef {FieldValueNotComparableError}
|
|
525
|
+
* @extends {FieldActionValidationError}
|
|
526
|
+
*/
|
|
527
|
+
export declare class FieldValueNotComparableError extends FieldActionValidationError {
|
|
528
|
+
/**
|
|
529
|
+
* Creates an instance of FieldValueNotComparableError.
|
|
530
|
+
*
|
|
531
|
+
* @constructor
|
|
532
|
+
* @param {EventActionValidationMeta} metadata
|
|
533
|
+
*/
|
|
534
|
+
constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Thrown when an invalid filter type enum was provided event action validation.
|
|
538
|
+
*
|
|
539
|
+
* @export
|
|
540
|
+
* @class UnrecognizedFilterTypeError
|
|
541
|
+
* @typedef {UnrecognizedFilterTypeError}
|
|
542
|
+
* @extends {FieldActionValidationError}
|
|
543
|
+
*/
|
|
544
|
+
export declare class UnrecognizedFilterTypeError extends FieldActionValidationError {
|
|
545
|
+
/**
|
|
546
|
+
* Creates an instance of UnrecognizedFilterTypeError.
|
|
547
|
+
*
|
|
548
|
+
* @constructor
|
|
549
|
+
* @param {EventActionValidationMeta} metadata
|
|
550
|
+
*/
|
|
551
|
+
constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Thrown when no chain ID is provided in the Wagmi configuration.
|
|
555
|
+
*
|
|
556
|
+
* @export
|
|
557
|
+
* @class NoConnectedChainIdError
|
|
558
|
+
* @typedef {NoConnectedChainIdError}
|
|
559
|
+
* @extends {Error}
|
|
560
|
+
*/
|
|
561
|
+
export declare class NoConnectedChainIdError extends Error {
|
|
562
|
+
/**
|
|
563
|
+
* Creates an instance of NoConnectedChainIdError.
|
|
564
|
+
*
|
|
565
|
+
* @constructor
|
|
566
|
+
*/
|
|
567
|
+
constructor();
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Thrown when an invalid chain ID is provided that doesn't match any deployed protocol.
|
|
571
|
+
*
|
|
572
|
+
* @export
|
|
573
|
+
* @class InvalidProtocolChainIdError
|
|
574
|
+
* @typedef {InvalidProtocolChainIdError}
|
|
575
|
+
* @extends {Error}
|
|
576
|
+
*/
|
|
577
|
+
export declare class InvalidProtocolChainIdError extends Error {
|
|
578
|
+
/**
|
|
579
|
+
* Creates an instance of InvalidProtocolChainIdError.
|
|
580
|
+
*
|
|
581
|
+
* @constructor
|
|
582
|
+
* @param {number} chainId - The chain ID provided in the configuration.
|
|
583
|
+
* @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.
|
|
584
|
+
*/
|
|
585
|
+
constructor(chainId: number, validChainIds: number[]);
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Thrown when the incentive criteria cannot be fetched from the contract.
|
|
589
|
+
*
|
|
590
|
+
* @export
|
|
591
|
+
* @class IncentiveCriteriaNotFoundError
|
|
592
|
+
* @typedef {IncentiveCriteriaNotFoundError}
|
|
593
|
+
* @extends {Error}
|
|
594
|
+
*/
|
|
595
|
+
export declare class IncentiveCriteriaNotFoundError extends Error {
|
|
596
|
+
/**
|
|
597
|
+
* Creates an instance of IncentiveCriteriaNotFoundError.
|
|
598
|
+
*
|
|
599
|
+
* @constructor
|
|
600
|
+
* @param {Error} [e] - Optional error object for further context.
|
|
601
|
+
* @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.
|
|
602
|
+
*/
|
|
603
|
+
constructor(e?: Error, message?: string);
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Thrown when no matching logs are found for a given event signature.
|
|
607
|
+
*
|
|
608
|
+
* @export
|
|
609
|
+
* @class NoMatchingLogsError
|
|
610
|
+
* @typedef {NoMatchingLogsError}
|
|
611
|
+
* @extends {Error}
|
|
612
|
+
*/
|
|
613
|
+
export declare class NoMatchingLogsError extends Error {
|
|
614
|
+
/**
|
|
615
|
+
* Creates an instance of NoMatchingLogsError.
|
|
616
|
+
*
|
|
617
|
+
* @constructor
|
|
618
|
+
* @param {string} signature - The event signature for which logs are being searched.
|
|
619
|
+
* @param {string} [message] - Optional custom error message.
|
|
620
|
+
*/
|
|
621
|
+
constructor(signature: string, message?: string);
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Thrown when an invalid criteria type is provided.
|
|
625
|
+
*
|
|
626
|
+
* @export
|
|
627
|
+
* @class InvalidCriteriaTypeError
|
|
628
|
+
* @typedef {InvalidCriteriaTypeError}
|
|
629
|
+
* @extends {Error}
|
|
630
|
+
*/
|
|
631
|
+
export declare class InvalidCriteriaTypeError extends Error {
|
|
632
|
+
/**
|
|
633
|
+
* Creates an instance of InvalidCriteriaTypeError.
|
|
634
|
+
*
|
|
635
|
+
* @constructor
|
|
636
|
+
* @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.
|
|
637
|
+
* @param {string} [message] - Optional custom error message.
|
|
638
|
+
*/
|
|
639
|
+
constructor(criteriaType?: string, message?: string);
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Thrown when decoding function arguments fails.
|
|
643
|
+
*
|
|
644
|
+
* @export
|
|
645
|
+
* @class DecodedArgsError
|
|
646
|
+
* @typedef {DecodedArgsError}
|
|
647
|
+
* @extends {Error}
|
|
648
|
+
*/
|
|
649
|
+
export declare class DecodedArgsError extends Error {
|
|
650
|
+
/**
|
|
651
|
+
* Creates an instance of DecodedArgsError.
|
|
652
|
+
*
|
|
653
|
+
* @constructor
|
|
654
|
+
* @param {string} [message='Issue decoding args'] - Custom error message.
|
|
655
|
+
*/
|
|
656
|
+
constructor(message?: string);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Thrown when reading a Boost that does not exist
|
|
660
|
+
*
|
|
661
|
+
* @export
|
|
662
|
+
* @class BoostNotFoundError
|
|
663
|
+
* @typedef {BoostNotFoundError}
|
|
664
|
+
* @extends {Error}
|
|
665
|
+
*/
|
|
666
|
+
export declare class BoostNotFoundError extends Error {
|
|
667
|
+
readonly id: string;
|
|
668
|
+
/**
|
|
669
|
+
* Creates an instance of BoostNotFoundError.
|
|
670
|
+
*
|
|
671
|
+
* @constructor
|
|
672
|
+
* @param {string} [id] - stringified boost id that does not exist
|
|
673
|
+
*/
|
|
674
|
+
constructor(id: string);
|
|
675
|
+
}
|
|
676
|
+
export {};
|
|
257
677
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,GAAG,EAER,KAAK,mCAAmC,EAEzC,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;;OAIG;;CAIJ;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;;OAIG;;CAIJ;AAED;;;;;;;GAOG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC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