@boostxyz/sdk 0.0.0-alpha.9 → 1.1.0-alpha.22

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 (257) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.cjs.map +1 -1
  3. package/dist/Actions/Action.js +7 -7
  4. package/dist/Actions/ContractAction.d.ts +11 -11
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +14 -14
  7. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.cjs +1 -1
  9. package/dist/Actions/EventAction.cjs.map +1 -1
  10. package/dist/Actions/EventAction.d.ts +171 -41
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +15 -392
  13. package/dist/Actions/EventAction.js.map +1 -1
  14. package/dist/AllowLists/AllowList.cjs +1 -1
  15. package/dist/AllowLists/AllowList.cjs.map +1 -1
  16. package/dist/AllowLists/AllowList.d.ts +6 -4
  17. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  18. package/dist/AllowLists/AllowList.js +45 -23
  19. package/dist/AllowLists/AllowList.js.map +1 -1
  20. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  21. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  22. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  23. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleAllowList.d.ts +92 -37
  25. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleAllowList.js +55 -71
  27. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  28. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  29. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  30. package/dist/AllowLists/SimpleDenyList.d.ts +203 -11
  31. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  32. package/dist/AllowLists/SimpleDenyList.js +11 -112
  33. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  34. package/dist/Auth/PassthroughAuth.cjs +1 -1
  35. package/dist/Auth/PassthroughAuth.js +1 -1
  36. package/dist/Boost.cjs +1 -1
  37. package/dist/Boost.cjs.map +1 -1
  38. package/dist/Boost.d.ts +20 -21
  39. package/dist/Boost.d.ts.map +1 -1
  40. package/dist/Boost.js +43 -57
  41. package/dist/Boost.js.map +1 -1
  42. package/dist/BoostCore-BVZExPPu.js +1462 -0
  43. package/dist/BoostCore-BVZExPPu.js.map +1 -0
  44. package/dist/BoostCore-D-E-cnGI.cjs +3 -0
  45. package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
  46. package/dist/BoostCore.cjs +1 -2
  47. package/dist/BoostCore.cjs.map +1 -1
  48. package/dist/BoostCore.d.ts +748 -77
  49. package/dist/BoostCore.d.ts.map +1 -1
  50. package/dist/BoostCore.js +29 -1150
  51. package/dist/BoostCore.js.map +1 -1
  52. package/dist/BoostRegistry.cjs +1 -1
  53. package/dist/BoostRegistry.cjs.map +1 -1
  54. package/dist/BoostRegistry.d.ts +80 -25
  55. package/dist/BoostRegistry.d.ts.map +1 -1
  56. package/dist/BoostRegistry.js +165 -83
  57. package/dist/BoostRegistry.js.map +1 -1
  58. package/dist/Budgets/Budget.cjs +1 -1
  59. package/dist/Budgets/Budget.cjs.map +1 -1
  60. package/dist/Budgets/Budget.d.ts.map +1 -1
  61. package/dist/Budgets/Budget.js +2 -2
  62. package/dist/Budgets/Budget.js.map +1 -1
  63. package/dist/Budgets/ManagedBudget.cjs +1 -1
  64. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  65. package/dist/Budgets/ManagedBudget.d.ts +75 -193
  66. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  67. package/dist/Budgets/ManagedBudget.js +80 -298
  68. package/dist/Budgets/ManagedBudget.js.map +1 -1
  69. package/dist/Budgets/VestingBudget.d.ts +223 -89
  70. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  71. package/dist/Deployable/Contract.cjs +1 -1
  72. package/dist/Deployable/Contract.cjs.map +1 -1
  73. package/dist/Deployable/Contract.d.ts +4 -5
  74. package/dist/Deployable/Contract.d.ts.map +1 -1
  75. package/dist/Deployable/Contract.js +5 -7
  76. package/dist/Deployable/Contract.js.map +1 -1
  77. package/dist/Deployable/Deployable.cjs.map +1 -1
  78. package/dist/Deployable/Deployable.d.ts +1 -1
  79. package/dist/Deployable/Deployable.d.ts.map +1 -1
  80. package/dist/Deployable/Deployable.js +3 -5
  81. package/dist/Deployable/Deployable.js.map +1 -1
  82. package/dist/Deployable/DeployableTarget.cjs +1 -1
  83. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  84. package/dist/Deployable/DeployableTarget.d.ts +13 -13
  85. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  86. package/dist/Deployable/DeployableTarget.js +28 -25
  87. package/dist/Deployable/DeployableTarget.js.map +1 -1
  88. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  89. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  90. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  91. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  92. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  93. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  94. package/dist/EventAction-BZt5cjbe.cjs +2 -0
  95. package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
  96. package/dist/EventAction-C_-hJXWm.js +1541 -0
  97. package/dist/EventAction-C_-hJXWm.js.map +1 -0
  98. package/dist/Incentive-BhHaK3PZ.cjs +2 -0
  99. package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
  100. package/dist/Incentive-Cqg1w6wD.js +312 -0
  101. package/dist/Incentive-Cqg1w6wD.js.map +1 -0
  102. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  103. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  104. package/dist/Incentives/AllowListIncentive.d.ts +38 -16
  105. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  106. package/dist/Incentives/AllowListIncentive.js +42 -29
  107. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  108. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  109. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  110. package/dist/Incentives/CGDAIncentive.d.ts +234 -21
  111. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  112. package/dist/Incentives/CGDAIncentive.js +45 -32
  113. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  114. package/dist/Incentives/ERC1155Incentive.d.ts +224 -37
  115. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  116. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  117. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  118. package/dist/Incentives/ERC20Incentive.d.ts +230 -29
  119. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  120. package/dist/Incentives/ERC20Incentive.js +56 -43
  121. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  122. package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +335 -440
  123. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  124. package/dist/Incentives/ERC20VariableIncentive.d.ts +231 -29
  125. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  126. package/dist/Incentives/Incentive.cjs +1 -1
  127. package/dist/Incentives/Incentive.cjs.map +1 -1
  128. package/dist/Incentives/Incentive.d.ts +4 -4
  129. package/dist/Incentives/Incentive.d.ts.map +1 -1
  130. package/dist/Incentives/Incentive.js +16 -296
  131. package/dist/Incentives/Incentive.js.map +1 -1
  132. package/dist/Incentives/PointsIncentive.cjs +1 -1
  133. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  134. package/dist/Incentives/PointsIncentive.d.ts +40 -18
  135. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  136. package/dist/Incentives/PointsIncentive.js +37 -24
  137. package/dist/Incentives/PointsIncentive.js.map +1 -1
  138. package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
  139. package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
  140. package/dist/SimpleDenyList-CGaWjuld.js +132 -0
  141. package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
  142. package/dist/Validators/SignerValidator.cjs +1 -1
  143. package/dist/Validators/SignerValidator.cjs.map +1 -1
  144. package/dist/Validators/SignerValidator.d.ts +16 -16
  145. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  146. package/dist/Validators/SignerValidator.js +30 -27
  147. package/dist/Validators/SignerValidator.js.map +1 -1
  148. package/dist/Validators/Validator.cjs +1 -1
  149. package/dist/Validators/Validator.cjs.map +1 -1
  150. package/dist/Validators/Validator.d.ts +1 -1
  151. package/dist/Validators/Validator.js +2 -2
  152. package/dist/Validators/Validator.js.map +1 -1
  153. package/dist/claiming.cjs.map +1 -1
  154. package/dist/claiming.d.ts +1 -1
  155. package/dist/claiming.js.map +1 -1
  156. package/dist/componentInterfaces-BBCFkrZv.js +14 -0
  157. package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
  158. package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
  159. package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
  160. package/dist/deployments-DVXioW2i.cjs +2 -0
  161. package/dist/deployments-DVXioW2i.cjs.map +1 -0
  162. package/dist/deployments-oykLv3_Z.js +43 -0
  163. package/dist/deployments-oykLv3_Z.js.map +1 -0
  164. package/dist/deployments.json +44 -0
  165. package/dist/errors.cjs +1 -1
  166. package/dist/errors.cjs.map +1 -1
  167. package/dist/errors.d.ts +256 -20
  168. package/dist/errors.d.ts.map +1 -1
  169. package/dist/errors.js +183 -26
  170. package/dist/errors.js.map +1 -1
  171. package/dist/{generated-57_Kffpz.js → generated-CKt2yCQd.js} +3613 -1869
  172. package/dist/generated-CKt2yCQd.js.map +1 -0
  173. package/dist/generated-CyTNlOwM.cjs +3 -0
  174. package/dist/generated-CyTNlOwM.cjs.map +1 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.d.ts +5 -0
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +142 -108
  179. package/dist/index.js.map +1 -1
  180. package/dist/transfers.cjs.map +1 -1
  181. package/dist/transfers.d.ts +1 -1
  182. package/dist/transfers.js.map +1 -1
  183. package/dist/utils.cjs +1 -1
  184. package/dist/utils.cjs.map +1 -1
  185. package/dist/utils.d.ts +26 -12
  186. package/dist/utils.d.ts.map +1 -1
  187. package/dist/utils.js +38 -23
  188. package/dist/utils.js.map +1 -1
  189. package/package.json +20 -10
  190. package/src/Actions/Action.test.ts +14 -13
  191. package/src/Actions/ContractAction.test.ts +10 -10
  192. package/src/Actions/ContractAction.ts +11 -12
  193. package/src/Actions/ERC721MintAction.test.ts +6 -6
  194. package/src/Actions/ERC721MintAction.ts +14 -15
  195. package/src/Actions/EventAction.test.ts +729 -109
  196. package/src/Actions/EventAction.ts +542 -84
  197. package/src/AllowLists/AllowList.test.ts +7 -7
  198. package/src/AllowLists/AllowList.ts +5 -3
  199. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  200. package/src/AllowLists/OpenAllowList.ts +45 -0
  201. package/src/AllowLists/SimpleAllowList.test.ts +4 -4
  202. package/src/AllowLists/SimpleAllowList.ts +39 -61
  203. package/src/AllowLists/SimpleDenyList.test.ts +4 -4
  204. package/src/AllowLists/SimpleDenyList.ts +40 -17
  205. package/src/Auth/PassthroughAuth.test.ts +1 -1
  206. package/src/Boost.ts +21 -24
  207. package/src/BoostCore.test.ts +323 -268
  208. package/src/BoostCore.ts +396 -219
  209. package/src/BoostRegistry.test.ts +53 -0
  210. package/src/BoostRegistry.ts +161 -40
  211. package/src/Budgets/Budget.test.ts +2 -2
  212. package/src/Budgets/Budget.ts +1 -2
  213. package/src/Budgets/ManagedBudget.test.ts +82 -19
  214. package/src/Budgets/ManagedBudget.ts +48 -310
  215. package/src/Budgets/VestingBudget.test.ts +7 -7
  216. package/src/Budgets/VestingBudget.ts +34 -106
  217. package/src/Deployable/Contract.ts +4 -5
  218. package/src/Deployable/Deployable.ts +1 -1
  219. package/src/Deployable/DeployableTarget.ts +30 -19
  220. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  221. package/src/Incentives/AllowListIncentive.test.ts +5 -5
  222. package/src/Incentives/AllowListIncentive.ts +29 -15
  223. package/src/Incentives/CGDAIncentive.test.ts +9 -6
  224. package/src/Incentives/CGDAIncentive.ts +38 -18
  225. package/src/Incentives/ERC1155Incentive.test.ts +3 -3
  226. package/src/Incentives/ERC1155Incentive.ts +28 -29
  227. package/src/Incentives/ERC20Incentive.test.ts +9 -6
  228. package/src/Incentives/ERC20Incentive.ts +46 -26
  229. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  230. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
  231. package/src/Incentives/ERC20VariableIncentive.test.ts +8 -11
  232. package/src/Incentives/ERC20VariableIncentive.ts +49 -26
  233. package/src/Incentives/Incentive.test.ts +4 -1
  234. package/src/Incentives/Incentive.ts +7 -6
  235. package/src/Incentives/PointsIncentive.test.ts +24 -25
  236. package/src/Incentives/PointsIncentive.ts +31 -17
  237. package/src/Validators/SignerValidator.test.ts +6 -6
  238. package/src/Validators/SignerValidator.ts +19 -17
  239. package/src/Validators/Validator.test.ts +2 -2
  240. package/src/Validators/Validator.ts +1 -1
  241. package/src/claiming.ts +1 -1
  242. package/src/errors.ts +345 -21
  243. package/src/index.test.ts +118 -36
  244. package/src/index.ts +5 -0
  245. package/src/transfers.ts +1 -1
  246. package/src/utils.test.ts +2 -2
  247. package/src/utils.ts +61 -12
  248. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  249. package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
  250. package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
  251. package/dist/componentInterfaces-DYkaxBda.js +0 -13
  252. package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
  253. package/dist/generated-57_Kffpz.js.map +0 -1
  254. package/dist/generated-wKBNvm48.cjs +0 -3
  255. package/dist/generated-wKBNvm48.cjs.map +0 -1
  256. package/src/Budgets/SimpleBudget.test.ts +0 -152
  257. package/src/Budgets/SimpleBudget.ts +0 -564
@@ -34,7 +34,7 @@ import type {
34
34
  DeployableOptions,
35
35
  GenericDeployableParams,
36
36
  } from '../Deployable/Deployable';
37
- import { DeployableTarget } from '../Deployable/DeployableTarget';
37
+ import { DeployableTargetWithRBAC } from '../Deployable/DeployableTargetWithRBAC';
38
38
  import { DeployableUnknownOwnerProvidedError } from '../errors';
39
39
  import {
40
40
  type FungibleTransferPayload,
@@ -115,9 +115,9 @@ export type VestingBudgetLog<
115
115
  * @export
116
116
  * @class VestingBudget
117
117
  * @typedef {VestingBudget}
118
- * @extends {DeployableTarget<VestingBudgetPayload>}
118
+ * @extends {DeployableTargetWithRBAC<VestingBudgetPayload>}
119
119
  */
120
- export class VestingBudget extends DeployableTarget<
120
+ export class VestingBudget extends DeployableTargetWithRBAC<
121
121
  VestingBudgetPayload,
122
122
  typeof vestingBudgetAbi
123
123
  > {
@@ -127,10 +127,9 @@ export class VestingBudget extends DeployableTarget<
127
127
  *
128
128
  * @public
129
129
  * @static
130
- * @type {Address}
130
+ * @type {Record<number, Address>}
131
131
  */
132
- public static override base: Address = import.meta.env
133
- .VITE_VESTING_BUDGET_BASE;
132
+ public static override bases: Record<number, Address> = {};
134
133
  /**
135
134
  * @inheritdoc
136
135
  *
@@ -144,7 +143,7 @@ export class VestingBudget extends DeployableTarget<
144
143
  * Get the owner of the budget
145
144
  *
146
145
  * @public
147
- * @param {?ReadParams<typeof vestingBudgetAbi, 'owner'>} [params]
146
+ * @param {?ReadParams} [params]
148
147
  * @returns {Promise<Address>}
149
148
  */
150
149
  public owner(params?: ReadParams<typeof vestingBudgetAbi, 'owner'>) {
@@ -160,8 +159,8 @@ export class VestingBudget extends DeployableTarget<
160
159
  * The timestamp at which the vesting schedule begins
161
160
  *
162
161
  * @public
163
- * @param {?ReadParams<typeof vestingBudgetAbi, 'start'>} [params]
164
- * @returns {*}
162
+ * @param {?ReadParams} [params]
163
+ * @returns {Promise<bigint>}
165
164
  */
166
165
  public start(params?: ReadParams<typeof vestingBudgetAbi, 'start'>) {
167
166
  return readVestingBudgetStart(this._config, {
@@ -176,8 +175,8 @@ export class VestingBudget extends DeployableTarget<
176
175
  * The duration of the vesting schedule (in seconds)
177
176
  *
178
177
  * @public
179
- * @param {?ReadParams<typeof vestingBudgetAbi, 'duration'>} [params]
180
- * @returns {*}
178
+ * @param {?ReadParams} [params]
179
+ * @returns {Promise<bigint>}
181
180
  */
182
181
  public duration(params?: ReadParams<typeof vestingBudgetAbi, 'duration'>) {
183
182
  return readVestingBudgetDuration(this._config, {
@@ -192,8 +191,8 @@ export class VestingBudget extends DeployableTarget<
192
191
  * The duration of the cliff period (in seconds)
193
192
  *
194
193
  * @public
195
- * @param {?ReadParams<typeof vestingBudgetAbi, 'cliff'>} [params]
196
- * @returns {*}
194
+ * @param {?ReadParams} [params]
195
+ * @returns {Promise<bigint>}
197
196
  */
198
197
  public cliff(params?: ReadParams<typeof vestingBudgetAbi, 'cliff'>) {
199
198
  return readVestingBudgetCliff(this._config, {
@@ -212,7 +211,7 @@ export class VestingBudget extends DeployableTarget<
212
211
  * @public
213
212
  * @async
214
213
  * @param {(FungibleTransferPayload)} transfer
215
- * @param {?WriteParams<typeof vestingBudgetAbi, 'allocate'>} [params]
214
+ * @param {?WriteParams} [params]
216
215
  * @returns {Promise<boolean>} - True if the allocation was successful
217
216
  */
218
217
  public async allocate(
@@ -230,8 +229,8 @@ export class VestingBudget extends DeployableTarget<
230
229
  * @public
231
230
  * @async
232
231
  * @param {(FungibleTransferPayload)} transfer
233
- * @param {?WriteParams<typeof vestingBudgetAbi, 'allocate'>} [params]
234
- * @returns {Promise<boolean>} - True if the allocation was successful
232
+ * @param {?WriteParams} [params]
233
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the allocation was successful
235
234
  */
236
235
  public async allocateRaw(
237
236
  transfer: FungibleTransferPayload,
@@ -260,7 +259,7 @@ export class VestingBudget extends DeployableTarget<
260
259
  * @public
261
260
  * @async
262
261
  * @param {(FungibleTransferPayload)} transfer
263
- * @param {?WriteParams<typeof vestingBudgetAbi, 'clawback'>} [params]
262
+ * @param {?WriteParams} [params]
264
263
  * @returns {Promise<boolean>} - True if the request was successful
265
264
  */
266
265
  public async clawback(
@@ -279,8 +278,8 @@ export class VestingBudget extends DeployableTarget<
279
278
  * @public
280
279
  * @async
281
280
  * @param {(FungibleTransferPayload)} transfer
282
- * @param {?WriteParams<typeof vestingBudgetAbi, 'clawback'>} [params]
283
- * @returns {Promise<boolean>} - True if the request was successful
281
+ * @param {?WriteParams} [params]
282
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the request was successful
284
283
  */
285
284
  public async clawbackRaw(
286
285
  transfer: FungibleTransferPayload,
@@ -307,7 +306,7 @@ export class VestingBudget extends DeployableTarget<
307
306
  * @public
308
307
  * @async
309
308
  * @param {(FungibleTransferPayload)} transfer
310
- * @param {?WriteParams<typeof vestingBudgetAbi, 'disburse'>} [params]
309
+ * @param {?WriteParams} [params]
311
310
  * @returns {Promise<boolean>} - True if the disbursement was successful
312
311
  */
313
312
  public async disburse(
@@ -324,8 +323,8 @@ export class VestingBudget extends DeployableTarget<
324
323
  * @public
325
324
  * @async
326
325
  * @param {(FungibleTransferPayload)} transfer
327
- * @param {?WriteParams<typeof vestingBudgetAbi, 'disburse'>} [params]
328
- * @returns {Promise<boolean>} - True if the disbursement was successful
326
+ * @param {?WriteParams} [params]
327
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the disbursement was successful
329
328
  */
330
329
  public async disburseRaw(
331
330
  transfer: FungibleTransferPayload,
@@ -351,7 +350,7 @@ export class VestingBudget extends DeployableTarget<
351
350
  * @public
352
351
  * @async
353
352
  * @param {Array<FungibleTransferPayload>} transfers
354
- * @param {?WriteParams<typeof vestingBudgetAbi, 'disburseBatch'>} [params]
353
+ * @param {?WriteParams} [params]
355
354
  * @returns {Promise<boolean>} - True if all disbursements were successful
356
355
  */
357
356
  public async disburseBatch(
@@ -367,8 +366,8 @@ export class VestingBudget extends DeployableTarget<
367
366
  * @public
368
367
  * @async
369
368
  * @param {Array<FungibleTransferPayload>} transfers
370
- * @param {?WriteParams<typeof vestingBudgetAbi, 'disburseBatch'>} [params]
371
- * @returns {Promise<boolean>} - True if all disbursements were successful
369
+ * @param {?WriteParams} [params]
370
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if all disbursements were successful
372
371
  */
373
372
  public async disburseBatchRaw(
374
373
  transfers: FungibleTransferPayload[],
@@ -388,82 +387,11 @@ export class VestingBudget extends DeployableTarget<
388
387
  return { hash, result };
389
388
  }
390
389
 
391
- /**
392
- * Set the authorized status of the given accounts
393
- * The mechanism for managing authorization is left to the implementing contract
394
- *
395
- * @public
396
- * @async
397
- * @param {Address[]} addresses - The accounts to authorize or deauthorize
398
- * @param {boolean[]} allowed - The authorization status for the given accounts
399
- * @param {?WriteParams<typeof vestingBudgetAbi, 'setAuthorized'>} [params]
400
- * @returns {Promise<void>}
401
- */
402
- public async setAuthorized(
403
- addresses: Address[],
404
- allowed: boolean[],
405
- params?: WriteParams<typeof vestingBudgetAbi, 'setAuthorized'>,
406
- ) {
407
- return await this.awaitResult(
408
- this.setAuthorizedRaw(addresses, allowed, params),
409
- );
410
- }
411
-
412
- /**
413
- * Set the authorized status of the given accounts
414
- * The mechanism for managing authorization is left to the implementing contract
415
- *
416
- * @public
417
- * @async
418
- * @param {Address[]} addresses - The accounts to authorize or deauthorize
419
- * @param {boolean[]} allowed - The authorization status for the given accounts
420
- * @param {?WriteParams<typeof vestingBudgetAbi, 'setAuthorized'>} [params]
421
- * @returns {Promise<void>}
422
- */
423
- public async setAuthorizedRaw(
424
- addresses: Address[],
425
- allowed: boolean[],
426
- params?: WriteParams<typeof vestingBudgetAbi, 'setAuthorized'>,
427
- ) {
428
- const { request, result } = await simulateVestingBudgetSetAuthorized(
429
- this._config,
430
- {
431
- address: this.assertValidAddress(),
432
- args: [addresses, allowed],
433
- ...this.optionallyAttachAccount(),
434
- // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
435
- ...(params as any),
436
- },
437
- );
438
- const hash = await writeVestingBudgetSetAuthorized(this._config, request);
439
- return { hash, result };
440
- }
441
-
442
- /**
443
- * Check if the given account is authorized to use the budget
444
- *
445
- * @public
446
- * @param {Address} account
447
- * @param {?ReadParams<typeof vestingBudgetAbi, 'isAuthorized'>} [params]
448
- * @returns {Promise<boolean>} - True if the account is authorized
449
- */
450
- public isAuthorized(
451
- account: Address,
452
- params?: ReadParams<typeof vestingBudgetAbi, 'isAuthorized'>,
453
- ) {
454
- return readVestingBudgetIsAuthorized(this._config, {
455
- address: this.assertValidAddress(),
456
- args: [account],
457
- // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
458
- ...(params as any),
459
- });
460
- }
461
-
462
390
  /**
463
391
  * Get the end time of the vesting schedule
464
392
  *
465
393
  * @public
466
- * @param {?ReadParams<typeof vestingBudgetAbi, 'end'>} [params]
394
+ * @param {?ReadParams} [params]
467
395
  * @returns {Promise<bigint>}
468
396
  */
469
397
  public end(params?: ReadParams<typeof vestingBudgetAbi, 'end'>) {
@@ -480,12 +408,12 @@ export class VestingBudget extends DeployableTarget<
480
408
  * This is equal to the sum of the total current balance and the total distributed amount
481
409
  *
482
410
  * @public
483
- * @param {Address} asset - The address of the asset (or the zero address for native assets)
484
- * @param {?ReadParams<typeof vestingBudgetAbi, 'total'>} [params]
411
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"] - The address of the asset (or the zero address for native assets)
412
+ * @param {?ReadParams} [params]
485
413
  * @returns {Promise<bigint>}
486
414
  */
487
415
  public total(
488
- asset: Address,
416
+ asset: Address = zeroAddress,
489
417
  params?: ReadParams<typeof vestingBudgetAbi, 'total'>,
490
418
  ) {
491
419
  return readVestingBudgetTotal(this._config, {
@@ -501,12 +429,12 @@ export class VestingBudget extends DeployableTarget<
501
429
  * This is equal to the total vested amount minus any already distributed
502
430
  *
503
431
  * @public
504
- * @param {Address} asset - The address of the asset (or the zero address for native assets)
505
- * @param {?ReadParams<typeof vestingBudgetAbi, 'available'>} [params]
432
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"] - The address of the asset (or the zero address for native assets)
433
+ * @param {?ReadParams} [params]
506
434
  * @returns {Promise<bigint>} - The amount of assets currently available for distribution
507
435
  */
508
436
  public available(
509
- asset: Address,
437
+ asset: Address = zeroAddress,
510
438
  params?: ReadParams<typeof vestingBudgetAbi, 'available'>,
511
439
  ) {
512
440
  return readVestingBudgetAvailable(this._config, {
@@ -521,12 +449,12 @@ export class VestingBudget extends DeployableTarget<
521
449
  * Get the amount of assets that have been distributed from the budget
522
450
  *
523
451
  * @public
524
- * @param {Address} asset
525
- * @param {?ReadParams<typeof vestingBudgetAbi, 'distributed'>} [params]
452
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
453
+ * @param {?ReadParams} [params]
526
454
  * @returns {Promise<bigint>} - The amount of assets distributed
527
455
  */
528
456
  public distributed(
529
- asset: Address,
457
+ asset: Address = zeroAddress,
530
458
  params?: ReadParams<typeof vestingBudgetAbi, 'distributed'>,
531
459
  ) {
532
460
  return readVestingBudgetDistributed(this._config, {
@@ -61,7 +61,7 @@ export class Contract<ContractAbi extends Abi> {
61
61
  *
62
62
  * @public
63
63
  * @readonly
64
- * @type {*}
64
+ * @type {Address | undefined}
65
65
  */
66
66
  public get address() {
67
67
  return this._address;
@@ -174,7 +174,6 @@ export class Contract<ContractAbi extends Abi> {
174
174
  * A typed wrapper for `wagmi.watchContractEvent`
175
175
  *
176
176
  * @public
177
- * @async
178
177
  * @template {ContractEvent} event
179
178
  * @param {(
180
179
  * log: WatchContractEventOnLogsParameter<ContractAbi, event, true>[number],
@@ -182,9 +181,9 @@ export class Contract<ContractAbi extends Abi> {
182
181
  * @param {?WatchParams<ContractAbi, event> & {
183
182
  * eventName?: event;
184
183
  * }} [params]
185
- * @returns {unknown, params?: any) => unknown}
184
+ * @returns {() => void}
186
185
  */
187
- public async subscribe<event extends ContractEventName<ContractAbi>>(
186
+ public subscribe<event extends ContractEventName<ContractAbi>>(
188
187
  cb: (
189
188
  log: WatchContractEventOnLogsParameter<ContractAbi, event, true>[number],
190
189
  ) => unknown,
@@ -218,7 +217,7 @@ export class Contract<ContractAbi extends Abi> {
218
217
  * @template [Result=unknown]
219
218
  * @param {Promise<HashAndSimulatedResult<Result>>} hashPromise
220
219
  * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]
221
- * @returns {unknown}
220
+ * @returns {Promise<Result>}
222
221
  */
223
222
  protected async awaitResult<Result = unknown>(
224
223
  hashPromise: Promise<HashAndSimulatedResult<Result>>,
@@ -149,7 +149,7 @@ export class Deployable<
149
149
  * @param {?Payload} [_payload]
150
150
  * @param {?DeployableOptions} [_options]
151
151
  * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams] - See [viem.WaitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)
152
- * @returns {unknown}
152
+ * @returns {Promise<this>}
153
153
  */
154
154
  protected async deploy(
155
155
  _payload?: Payload,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  type aCloneableAbi,
3
- readACloneableGetComponentInterface as readACloneableGetComponentInterface,
3
+ readACloneableGetComponentInterface,
4
4
  readACloneableSupportsInterface,
5
5
  } from '@boostxyz/evm';
6
6
  import { deployContract } from '@wagmi/core';
@@ -11,6 +11,7 @@ import {
11
11
  type Hex,
12
12
  type WaitForTransactionReceiptParameters,
13
13
  isAddress,
14
+ isAddressEqual,
14
15
  zeroAddress,
15
16
  } from 'viem';
16
17
  import {
@@ -38,13 +39,13 @@ export class DeployableTarget<
38
39
  ContractAbi extends Abi,
39
40
  > extends Deployable<Payload, ContractAbi> {
40
41
  /**
41
- * A static property representing the address of the base implementation on chain, used when cloning base contracts.
42
+ * A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.
42
43
  *
43
44
  * @static
44
45
  * @readonly
45
- * @type {Address}
46
+ * @type {Record<string, Address>}
46
47
  */
47
- static readonly base: Address = zeroAddress;
48
+ static readonly bases: Record<number, Address> = {};
48
49
  /**
49
50
  * The target's registry type.
50
51
  *
@@ -59,9 +60,16 @@ export class DeployableTarget<
59
60
  * @readonly
60
61
  * @type {boolean}
61
62
  */
62
- protected _isBase = true;
63
- get isBase() {
64
- if (!!this.address && this.address !== this.base) return false;
63
+ readonly _isBase: boolean = true;
64
+ public get isBase() {
65
+ if (
66
+ !!this.address &&
67
+ Object.values(this.bases).some((base) =>
68
+ // biome-ignore lint/style/noNonNullAssertion: won't evaluate this if address checked and defined above
69
+ isAddressEqual(this.address!, base),
70
+ )
71
+ )
72
+ return true;
65
73
  return this._isBase;
66
74
  }
67
75
 
@@ -75,7 +83,7 @@ export class DeployableTarget<
75
83
  */
76
84
  constructor(
77
85
  options: DeployableOptions,
78
- payload: DeployablePayloadOrAddress<Payload>,
86
+ payload?: DeployablePayloadOrAddress<Payload>,
79
87
  isBase?: boolean,
80
88
  ) {
81
89
  super(options, payload);
@@ -83,22 +91,25 @@ export class DeployableTarget<
83
91
  if (
84
92
  typeof payload === 'string' &&
85
93
  isAddress(payload) &&
86
- payload !== this.base &&
87
- payload !== zeroAddress
94
+ payload !== zeroAddress &&
95
+ !Object.values(this.bases).some((base) => {
96
+ if (!payload || !base) return false;
97
+ return isAddressEqual(payload, base);
98
+ })
88
99
  )
89
100
  isBase = false;
90
101
  if (isBase !== undefined) this._isBase = isBase;
91
102
  }
92
103
 
93
104
  /**
94
- * A getter that will return the base implementation's static address
105
+ * A getter that will return the base implementation's static addresses by numerical chain ID
95
106
  *
96
107
  * @public
97
108
  * @readonly
98
- * @type {Address}
109
+ * @type {Record<number, Address>}
99
110
  */
100
- public get base(): Address {
101
- return (this.constructor as typeof DeployableTarget).base;
111
+ public get bases(): Record<number, Address> {
112
+ return (this.constructor as typeof DeployableTarget).bases;
102
113
  }
103
114
 
104
115
  /**
@@ -120,7 +131,7 @@ export class DeployableTarget<
120
131
  * @param {?Payload} [payload]
121
132
  * @param {?DeployableOptions} [options]
122
133
  * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]
123
- * @returns {unknown}
134
+ * @returns {Promise<this>}
124
135
  */
125
136
  protected override async deploy(
126
137
  payload?: Payload,
@@ -163,8 +174,8 @@ export class DeployableTarget<
163
174
  * @public
164
175
  * @async
165
176
  * @param {Hex} interfaceId - The interface identifier
166
- * @param {?ReadParams<typeof contractActionAbi, 'supportsInterface'>} [params]
167
- * @returns {unknown} - True if the contract supports the interface
177
+ * @param {?ReadParams} [params]
178
+ * @returns {Promise<boolean>} - True if the contract supports the interface
168
179
  */
169
180
  public async supportsInterface(
170
181
  interfaceId: Hex,
@@ -185,8 +196,8 @@ export class DeployableTarget<
185
196
  *
186
197
  * @public
187
198
  * @async
188
- * @param {?ReadParams<typeof contractActionAbi, 'getComponentInterface'>} [params]
189
- * @returns {unknown}
199
+ * @param {?ReadParams} [params]
200
+ * @returns {Promise<Hex>}
190
201
  */
191
202
  public async getComponentInterface(
192
203
  params?: ReadParams<typeof aCloneableAbi, 'getComponentInterface'>,