@boostxyz/sdk 0.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/Actions/Action.cjs +1 -0
  4. package/dist/Actions/Action.d.ts +31 -0
  5. package/dist/Actions/Action.d.ts.map +1 -0
  6. package/dist/Actions/Action.js +27 -0
  7. package/dist/Actions/ContractAction.d.ts +327 -0
  8. package/dist/Actions/ContractAction.d.ts.map +1 -0
  9. package/dist/Actions/ERC721MintAction.d.ts +486 -0
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
  11. package/dist/Actions/EventAction.cjs +1 -0
  12. package/dist/Actions/EventAction.d.ts +433 -0
  13. package/dist/Actions/EventAction.d.ts.map +1 -0
  14. package/dist/Actions/EventAction.js +211 -0
  15. package/dist/AllowLists/AllowList.cjs +1 -0
  16. package/dist/AllowLists/AllowList.d.ts +33 -0
  17. package/dist/AllowLists/AllowList.d.ts.map +1 -0
  18. package/dist/AllowLists/AllowList.js +28 -0
  19. package/dist/AllowLists/SimpleAllowList.cjs +1 -0
  20. package/dist/AllowLists/SimpleAllowList.d.ts +452 -0
  21. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
  22. package/dist/AllowLists/SimpleAllowList.js +138 -0
  23. package/dist/AllowLists/SimpleDenyList.cjs +1 -0
  24. package/dist/AllowLists/SimpleDenyList.d.ts +306 -0
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
  26. package/dist/AllowLists/SimpleDenyList.js +202 -0
  27. package/dist/Auth/Auth.cjs +1 -0
  28. package/dist/Auth/Auth.d.ts +10 -0
  29. package/dist/Auth/Auth.d.ts.map +1 -0
  30. package/dist/Auth/Auth.js +4 -0
  31. package/dist/Auth/PassthroughAuth.cjs +1 -0
  32. package/dist/Auth/PassthroughAuth.d.ts +51 -0
  33. package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
  34. package/dist/Auth/PassthroughAuth.js +38 -0
  35. package/dist/Boost.cjs +1 -0
  36. package/dist/Boost.d.ts +142 -0
  37. package/dist/Boost.d.ts.map +1 -0
  38. package/dist/Boost.js +15 -0
  39. package/dist/BoostCore.cjs +2 -0
  40. package/dist/BoostCore.d.ts +460 -0
  41. package/dist/BoostCore.d.ts.map +1 -0
  42. package/dist/BoostCore.js +1105 -0
  43. package/dist/BoostRegistry.cjs +1 -0
  44. package/dist/BoostRegistry.d.ts +229 -0
  45. package/dist/BoostRegistry.d.ts.map +1 -0
  46. package/dist/BoostRegistry.js +250 -0
  47. package/dist/Budgets/Budget.cjs +1 -0
  48. package/dist/Budgets/Budget.d.ts +31 -0
  49. package/dist/Budgets/Budget.d.ts.map +1 -0
  50. package/dist/Budgets/Budget.js +27 -0
  51. package/dist/Budgets/ManagedBudget.cjs +1 -0
  52. package/dist/Budgets/ManagedBudget.d.ts +1065 -0
  53. package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
  54. package/dist/Budgets/ManagedBudget.js +498 -0
  55. package/dist/Budgets/SimpleBudget.d.ts +793 -0
  56. package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
  57. package/dist/Budgets/VestingBudget.d.ts +726 -0
  58. package/dist/Budgets/VestingBudget.d.ts.map +1 -0
  59. package/dist/Deployable/Contract.cjs +1 -0
  60. package/dist/Deployable/Contract.d.ts +125 -0
  61. package/dist/Deployable/Contract.d.ts.map +1 -0
  62. package/dist/Deployable/Contract.js +149 -0
  63. package/dist/Deployable/Deployable.cjs +1 -0
  64. package/dist/Deployable/Deployable.d.ts +155 -0
  65. package/dist/Deployable/Deployable.d.ts.map +1 -0
  66. package/dist/Deployable/Deployable.js +124 -0
  67. package/dist/Deployable/DeployableTarget.cjs +1 -0
  68. package/dist/Deployable/DeployableTarget.d.ts +115 -0
  69. package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
  70. package/dist/Deployable/DeployableTarget.js +128 -0
  71. package/dist/Incentives/AllowListIncentive.cjs +1 -0
  72. package/dist/Incentives/AllowListIncentive.d.ts +483 -0
  73. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
  74. package/dist/Incentives/AllowListIncentive.js +188 -0
  75. package/dist/Incentives/CGDAIncentive.cjs +1 -0
  76. package/dist/Incentives/CGDAIncentive.d.ts +560 -0
  77. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
  78. package/dist/Incentives/CGDAIncentive.js +249 -0
  79. package/dist/Incentives/ERC1155Incentive.d.ts +652 -0
  80. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
  81. package/dist/Incentives/ERC20Incentive.cjs +1 -0
  82. package/dist/Incentives/ERC20Incentive.d.ts +622 -0
  83. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
  84. package/dist/Incentives/ERC20Incentive.js +292 -0
  85. package/dist/Incentives/ERC20VariableIncentive.d.ts +545 -0
  86. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
  87. package/dist/Incentives/Incentive.cjs +1 -0
  88. package/dist/Incentives/Incentive.d.ts +39 -0
  89. package/dist/Incentives/Incentive.d.ts.map +1 -0
  90. package/dist/Incentives/Incentive.js +280 -0
  91. package/dist/Incentives/PointsIncentive.cjs +1 -0
  92. package/dist/Incentives/PointsIncentive.d.ts +615 -0
  93. package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
  94. package/dist/Incentives/PointsIncentive.js +197 -0
  95. package/dist/Validators/SignerValidator.cjs +1 -0
  96. package/dist/Validators/SignerValidator.d.ts +452 -0
  97. package/dist/Validators/SignerValidator.d.ts.map +1 -0
  98. package/dist/Validators/SignerValidator.js +167 -0
  99. package/dist/Validators/Validator.cjs +1 -0
  100. package/dist/Validators/Validator.d.ts +31 -0
  101. package/dist/Validators/Validator.d.ts.map +1 -0
  102. package/dist/Validators/Validator.js +25 -0
  103. package/dist/errors.cjs +1 -0
  104. package/dist/errors.d.ts +257 -0
  105. package/dist/errors.d.ts.map +1 -0
  106. package/dist/errors.js +161 -0
  107. package/dist/generated-BaaleHW-.cjs +2 -0
  108. package/dist/generated-x_abr3Yv.js +6228 -0
  109. package/dist/index.cjs +1 -0
  110. package/dist/index.d.ts +29 -0
  111. package/dist/index.d.ts.map +1 -0
  112. package/dist/index.js +1355 -0
  113. package/dist/utils.cjs +1 -0
  114. package/dist/utils.d.ts +1454 -0
  115. package/dist/utils.d.ts.map +1 -0
  116. package/dist/utils.js +643 -0
  117. package/package.json +197 -0
@@ -0,0 +1,31 @@
1
+ import type { Address } from 'viem';
2
+ import type { DeployableOptions } from '../Deployable/Deployable';
3
+ import { SignerValidator } from './SignerValidator';
4
+ export { SignerValidator };
5
+ /**
6
+ * A union type representing all valid protocol Validator implementations
7
+ *
8
+ * @export
9
+ * @typedef {Validator}
10
+ */
11
+ export type Validator = SignerValidator;
12
+ /**
13
+ * A map of Validator component interfaces to their constructors.
14
+ *
15
+ * @type {{ "0xd8725ea2": typeof SignerValidator; }}
16
+ */
17
+ export declare const ValidatorByComponentInterface: {
18
+ "0xb8ce7b22": typeof SignerValidator;
19
+ };
20
+ /**
21
+ * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
22
+ *
23
+ * @export
24
+ * @async
25
+ * @param {DeployableOptions} options
26
+ * @param {Address} address
27
+ * @returns {unknown}
28
+ * @throws {@link InvalidComponentInterfaceError}
29
+ */
30
+ export declare function validatorFromAddress(options: DeployableOptions, address: Address): Promise<SignerValidator>;
31
+ //# sourceMappingURL=Validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../src/Validators/Validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,4BAejB"}
@@ -0,0 +1,25 @@
1
+ import { r as a } from "../generated-x_abr3Yv.js";
2
+ import { readContract as i } from "@wagmi/core";
3
+ import { InvalidComponentInterfaceError as c } from "../errors.js";
4
+ import { SignerValidator as m } from "./SignerValidator.js";
5
+ const e = {
6
+ "0xb8ce7b22": m
7
+ };
8
+ async function C(r, o) {
9
+ const t = await i(r.config, {
10
+ abi: a,
11
+ functionName: "getComponentInterface",
12
+ address: o
13
+ }), n = e[t];
14
+ if (!n)
15
+ throw new c(
16
+ Object.keys(e),
17
+ t
18
+ );
19
+ return new n(r, o);
20
+ }
21
+ export {
22
+ m as SignerValidator,
23
+ e as ValidatorByComponentInterface,
24
+ C as validatorFromAddress
25
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("viem");class s extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class a extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class n extends Error{constructor(e){super("Attempted to deploy a contract that already has an address configured"),this.address=e}}class d extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class i extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class c extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class l extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class p extends Error{constructor(e){super("Expected a contract address to exist on receipt.",{cause:e}),this.receipt=e}}class u extends Error{constructor(e,o){super("Address provided does not match any expected protocol interface",{cause:{expected:e,received:o}}),this.expected=[],this.received=t.zeroHash,this.expected=e,this.received=o}}class E extends Error{constructor(e){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:e}),this.received=e}}class y extends Error{constructor(e){super(`Budget needs to explicitly authorize ${e}. You can retrieve this value from BoostCore.address`)}}class m extends Error{constructor(e){super(`Incentive not cloneable: ${e.constructor.name}`)}}exports.BoostCoreNoIdentifierEmitted=s;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=a;exports.DeployableAlreadyDeployedError=n;exports.DeployableBuildParametersUnspecifiedError=d;exports.DeployableMissingPayloadError=l;exports.DeployableUnknownOwnerProvidedError=i;exports.DeployableWagmiConfigurationRequiredError=c;exports.IncentiveNotCloneableError=m;exports.InvalidComponentInterfaceError=u;exports.NoContractAddressUponReceiptError=p;exports.UnknownTransferPayloadSupplied=E;
@@ -0,0 +1,257 @@
1
+ import { type Hex, type WaitForTransactionReceiptReturnType } from 'viem';
2
+ import type { Incentive } from './Incentives/Incentive';
3
+ /**
4
+ * This error is thrown during Boost creation if no `BoostCreated` event was emitted.
5
+ *
6
+ * @export
7
+ * @class BoostCoreNoIdentifierEmitted
8
+ * @typedef {BoostCoreNoIdentifierEmitted}
9
+ * @extends {Error}
10
+ * @example
11
+ * ```ts
12
+ * try {
13
+ * await boostCore.createBoost(...)
14
+ * } catch(e) {
15
+ * if(e instanceof BoostCoreNoIdentifierEmitted) {}
16
+ * }
17
+ * ```
18
+ */
19
+ export declare class BoostCoreNoIdentifierEmitted extends Error {
20
+ /**
21
+ * Creates an instance of BoostCoreNoIdentifierEmitted.
22
+ *
23
+ * @constructor
24
+ */
25
+ constructor();
26
+ }
27
+ /**
28
+ * This error is thrown when `assertValidAddress` is called, usually because a contract call expects the class to have a valid address attached.
29
+ *
30
+ * @export
31
+ * @class ContractAddressRequiredError
32
+ * @typedef {ContractAddressRequiredError}
33
+ * @extends {Error}
34
+ * @example
35
+ * ```ts
36
+ * try {
37
+ * target.assertValidAddress()
38
+ * } catch(e) {
39
+ * if(e instanceof ContractAddressRequiredError) {}
40
+ * }
41
+ */
42
+ export declare class ContractAddressRequiredError extends Error {
43
+ /**
44
+ * Creates an instance of ContractAddressRequiredError.
45
+ *
46
+ * @constructor
47
+ */
48
+ constructor();
49
+ }
50
+ /**
51
+ * This error is thrown when attempting to deploy a contract that has already been deployed, or has an address attached.
52
+ *
53
+ * @export
54
+ * @class DeployableAlreadyDeployedError
55
+ * @typedef {DeployableAlreadyDeployedError}
56
+ * @extends {Error}
57
+ */
58
+ export declare class DeployableAlreadyDeployedError extends Error {
59
+ /**
60
+ * The address already attached to the target.
61
+ *
62
+ * @type {string}
63
+ */
64
+ address: string;
65
+ /**
66
+ * Creates an instance of DeployableAlreadyDeployedError.
67
+ *
68
+ * @constructor
69
+ * @param {string} address
70
+ */
71
+ constructor(address: string);
72
+ }
73
+ /**
74
+ * You should never see this error if we did our jobs and every target overrides the `buildParameters` method.
75
+ *
76
+ * @export
77
+ * @class DeployableBuildParametersUnspecifiedError
78
+ * @typedef {DeployableBuildParametersUnspecifiedError}
79
+ * @extends {Error}
80
+ */
81
+ export declare class DeployableBuildParametersUnspecifiedError extends Error {
82
+ /**
83
+ * Creates an instance of DeployableBuildParametersUnspecifiedError.
84
+ *
85
+ * @constructor
86
+ */
87
+ constructor();
88
+ }
89
+ /**
90
+ * This error is thrown when attempting to deploy an `ownable` contract and the owner cannot be ascertained from the initialization payload or configured account.
91
+ *
92
+ * @export
93
+ * @class DeployableUnknownOwnerProvidedError
94
+ * @typedef {DeployableUnknownOwnerProvidedError}
95
+ * @extends {Error}
96
+ */
97
+ export declare class DeployableUnknownOwnerProvidedError extends Error {
98
+ /**
99
+ * Creates an instance of DeployableUnknownOwnerProvidedError.
100
+ *
101
+ * @constructor
102
+ */
103
+ constructor();
104
+ }
105
+ /**
106
+ * This error is thrown when deploying a contract with no valid Wagmi configuration on the instance.
107
+ *
108
+ * @export
109
+ * @class DeployableWagmiConfigurationRequiredError
110
+ * @typedef {DeployableWagmiConfigurationRequiredError}
111
+ * @extends {Error}
112
+ */
113
+ export declare class DeployableWagmiConfigurationRequiredError extends Error {
114
+ /**
115
+ * Creates an instance of DeployableWagmiConfigurationRequiredError.
116
+ *
117
+ * @constructor
118
+ */
119
+ constructor();
120
+ }
121
+ /**
122
+ * This error is thrown when deploying a contract with no valid initialization payload.
123
+ *
124
+ * @export
125
+ * @class DeployableMissingPayloadError
126
+ * @typedef {DeployableMissingPayloadError}
127
+ * @extends {Error}
128
+ */
129
+ export declare class DeployableMissingPayloadError extends Error {
130
+ /**
131
+ * Creates an instance of DeployableMissingPayloadError.
132
+ *
133
+ * @constructor
134
+ */
135
+ constructor();
136
+ }
137
+ /**
138
+ * This error is thrown when we receive a transaction receipt for a contract deployment without a contract address on it.
139
+ *
140
+ * @export
141
+ * @class NoContractAddressUponReceiptError
142
+ * @typedef {NoContractAddressUponReceiptError}
143
+ * @extends {Error}
144
+ */
145
+ export declare class NoContractAddressUponReceiptError extends Error {
146
+ /**
147
+ * The raw receipt we receive from [waitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)
148
+ *
149
+ * @public
150
+ * @readonly
151
+ * @type {WaitForTransactionReceiptReturnType}
152
+ */
153
+ readonly receipt: WaitForTransactionReceiptReturnType;
154
+ /**
155
+ * Creates an instance of NoContractAddressUponReceiptError.
156
+ *
157
+ * @constructor
158
+ * @param {WaitForTransactionReceiptReturnType} receipt
159
+ */
160
+ constructor(receipt: WaitForTransactionReceiptReturnType);
161
+ }
162
+ /**
163
+ * This error is thrown when a target address was provided that doesn't match any supported interface for the given registry type.
164
+ * For example, if you try to do `incentiveFromAddress()` with the address of a deployed `SimpleBudget`
165
+ *
166
+ * @export
167
+ * @class InvalidComponentInterfaceError
168
+ * @typedef {InvalidComponentInterfaceError}
169
+ * @extends {Error}
170
+ */
171
+ export declare class InvalidComponentInterfaceError extends Error {
172
+ /**
173
+ * Expected interface hashes.
174
+ *
175
+ * @public
176
+ * @readonly
177
+ * @type {Hex[]}
178
+ */
179
+ readonly expected: Hex[];
180
+ /**
181
+ * The actual interface hash.
182
+ *
183
+ * @public
184
+ * @readonly
185
+ * @type {Hex}
186
+ */
187
+ readonly received: Hex;
188
+ /**
189
+ * Creates an instance of InvalidComponentInterfaceError.
190
+ *
191
+ * @constructor
192
+ * @param {Hex[]} expected
193
+ * @param {Hex} received
194
+ */
195
+ constructor(expected: Hex[], received: Hex);
196
+ }
197
+ /**
198
+ * This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`
199
+ *
200
+ * @see {@link FungibleTransferPayload}
201
+ * @see {@link ERC1155TransferPayload}
202
+ * @export
203
+ * @class UnknownTransferPayloadSupplied
204
+ * @typedef {UnknownTransferPayloadSupplied}
205
+ * @extends {Error}
206
+ */
207
+ export declare class UnknownTransferPayloadSupplied extends Error {
208
+ /**
209
+ * The given payload that does not conform to the correct payload shape.
210
+ *
211
+ * @type {unknown}
212
+ */
213
+ received: unknown;
214
+ /**
215
+ * Creates an instance of UnknownTransferPayloadSupplied.
216
+ *
217
+ * @constructor
218
+ * @param {unknown} received
219
+ */
220
+ constructor(received: unknown);
221
+ }
222
+ /**
223
+ * This error is thrown during Boost creation when the budget doesn't authorize the Boost Core address.
224
+ *
225
+ * @export
226
+ * @class BudgetMustAuthorizeBoostCore
227
+ * @typedef {BudgetMustAuthorizeBoostCore}
228
+ * @extends {Error}
229
+ */
230
+ export declare class BudgetMustAuthorizeBoostCore extends Error {
231
+ /**
232
+ * Creates an instance of BudgetMustAuthorizeBoostCore.
233
+ *
234
+ * @constructor
235
+ * @param {string} boostCoreAddress
236
+ */
237
+ constructor(boostCoreAddress: string);
238
+ }
239
+ /**
240
+ * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.
241
+ * The protocol doesn't allow this.
242
+ *
243
+ * @export
244
+ * @class IncentiveNotCloneableError
245
+ * @typedef {IncentiveNotCloneableError}
246
+ * @extends {Error}
247
+ */
248
+ export declare class IncentiveNotCloneableError extends Error {
249
+ /**
250
+ * Creates an instance of IncentiveNotCloneableError.
251
+ *
252
+ * @constructor
253
+ * @param {Incentive} incentive
254
+ */
255
+ constructor(incentive: Incentive);
256
+ }
257
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,mCAAmC,EAEzC,MAAM,MAAM,CAAC;AACd,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;IAChB;;;;;OAKG;gBACS,OAAO,EAAE,MAAM;CAM5B;AAED;;;;;;;GAOG;AACH,qBAAa,yCAA0C,SAAQ,KAAK;IAClE;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,mCAAoC,SAAQ,KAAK;IAC5D;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,yCAA0C,SAAQ,KAAK;IAClE;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;IACtD;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,iCAAkC,SAAQ,KAAK;IAC1D;;;;;;OAMG;IACH,SAAgB,OAAO,EAAE,mCAAmC,CAAC;IAC7D;;;;;OAKG;gBACS,OAAO,EAAE,mCAAmC;CAMzD;AAED;;;;;;;;GAQG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD;;;;;;OAMG;IACH,SAAgB,QAAQ,EAAE,GAAG,EAAE,CAAM;IACrC;;;;;;OAMG;IACH,SAAgB,QAAQ,EAAE,GAAG,CAAY;IAEzC;;;;;;OAMG;gBACS,QAAQ,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG;CAO3C;AAED;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;gBACS,QAAQ,EAAE,OAAO;CAO9B;AAED;;;;;;;GAOG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;;;OAKG;gBACS,gBAAgB,EAAE,MAAM;CAKrC;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD;;;;;OAKG;gBACS,SAAS,EAAE,SAAS;CAGjC"}
package/dist/errors.js ADDED
@@ -0,0 +1,161 @@
1
+ import { zeroHash as t } from "viem";
2
+ class a extends Error {
3
+ /**
4
+ * Creates an instance of BoostCoreNoIdentifierEmitted.
5
+ *
6
+ * @constructor
7
+ */
8
+ constructor() {
9
+ super('No "BoostCreated" log was emitted from which to extract boostId');
10
+ }
11
+ }
12
+ class n extends Error {
13
+ /**
14
+ * Creates an instance of ContractAddressRequiredError.
15
+ *
16
+ * @constructor
17
+ */
18
+ constructor() {
19
+ super("Attempted to call contract method without providing an address");
20
+ }
21
+ }
22
+ class d extends Error {
23
+ /**
24
+ * Creates an instance of DeployableAlreadyDeployedError.
25
+ *
26
+ * @constructor
27
+ * @param {string} address
28
+ */
29
+ constructor(e) {
30
+ super(
31
+ "Attempted to deploy a contract that already has an address configured"
32
+ ), this.address = e;
33
+ }
34
+ }
35
+ class c extends Error {
36
+ /**
37
+ * Creates an instance of DeployableBuildParametersUnspecifiedError.
38
+ *
39
+ * @constructor
40
+ */
41
+ constructor() {
42
+ super(
43
+ "Implementing class did not properly override the `buildParameters` method"
44
+ );
45
+ }
46
+ }
47
+ class i extends Error {
48
+ /**
49
+ * Creates an instance of DeployableUnknownOwnerProvidedError.
50
+ *
51
+ * @constructor
52
+ */
53
+ constructor() {
54
+ super(
55
+ "Expected an an owner to be provided in configuration or an account to exist on Wagmi config."
56
+ );
57
+ }
58
+ }
59
+ class l extends Error {
60
+ /**
61
+ * Creates an instance of DeployableWagmiConfigurationRequiredError.
62
+ *
63
+ * @constructor
64
+ */
65
+ constructor() {
66
+ super(
67
+ "Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy."
68
+ );
69
+ }
70
+ }
71
+ class p extends Error {
72
+ /**
73
+ * Creates an instance of DeployableMissingPayloadError.
74
+ *
75
+ * @constructor
76
+ */
77
+ constructor() {
78
+ super(
79
+ "Expected a valid payload to be available either on Deployable or as argument to deploy."
80
+ );
81
+ }
82
+ }
83
+ class u extends Error {
84
+ /**
85
+ * Creates an instance of NoContractAddressUponReceiptError.
86
+ *
87
+ * @constructor
88
+ * @param {WaitForTransactionReceiptReturnType} receipt
89
+ */
90
+ constructor(e) {
91
+ super("Expected a contract address to exist on receipt.", {
92
+ cause: e
93
+ }), this.receipt = e;
94
+ }
95
+ }
96
+ class E extends Error {
97
+ /**
98
+ * Creates an instance of InvalidComponentInterfaceError.
99
+ *
100
+ * @constructor
101
+ * @param {Hex[]} expected
102
+ * @param {Hex} received
103
+ */
104
+ constructor(e, o) {
105
+ super("Address provided does not match any expected protocol interface", {
106
+ cause: { expected: e, received: o }
107
+ }), this.expected = [], this.received = t, this.expected = e, this.received = o;
108
+ }
109
+ }
110
+ class x extends Error {
111
+ /**
112
+ * Creates an instance of UnknownTransferPayloadSupplied.
113
+ *
114
+ * @constructor
115
+ * @param {unknown} received
116
+ */
117
+ constructor(e) {
118
+ super(
119
+ "Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",
120
+ { cause: e }
121
+ ), this.received = e;
122
+ }
123
+ }
124
+ class h extends Error {
125
+ /**
126
+ * Creates an instance of BudgetMustAuthorizeBoostCore.
127
+ *
128
+ * @constructor
129
+ * @param {string} boostCoreAddress
130
+ */
131
+ constructor(e) {
132
+ super(
133
+ `Budget needs to explicitly authorize ${e}. You can retrieve this value from BoostCore.address`
134
+ );
135
+ }
136
+ }
137
+ class m extends Error {
138
+ /**
139
+ * Creates an instance of IncentiveNotCloneableError.
140
+ *
141
+ * @constructor
142
+ * @param {Incentive} incentive
143
+ */
144
+ constructor(e) {
145
+ super(`Incentive not cloneable: ${e.constructor.name}`);
146
+ }
147
+ }
148
+ export {
149
+ a as BoostCoreNoIdentifierEmitted,
150
+ h as BudgetMustAuthorizeBoostCore,
151
+ n as ContractAddressRequiredError,
152
+ d as DeployableAlreadyDeployedError,
153
+ c as DeployableBuildParametersUnspecifiedError,
154
+ p as DeployableMissingPayloadError,
155
+ i as DeployableUnknownOwnerProvidedError,
156
+ l as DeployableWagmiConfigurationRequiredError,
157
+ m as IncentiveNotCloneableError,
158
+ E as InvalidComponentInterfaceError,
159
+ u as NoContractAddressUponReceiptError,
160
+ x as UnknownTransferPayloadSupplied
161
+ };