@boostxyz/sdk 0.0.0-alpha.17 → 0.0.0-alpha.18

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 (203) 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 +13 -13
  4. package/dist/Actions/ContractAction.d.ts +9 -9
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +12 -12
  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 +32 -49
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +13 -962
  13. package/dist/Actions/EventAction.js.map +1 -1
  14. package/dist/AllowLists/AllowList.cjs +1 -1
  15. package/dist/AllowLists/AllowList.js +3 -3
  16. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  17. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  18. package/dist/AllowLists/SimpleAllowList.d.ts +5 -5
  19. package/dist/AllowLists/SimpleAllowList.js +24 -24
  20. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  22. package/dist/AllowLists/SimpleDenyList.d.ts +6 -6
  23. package/dist/AllowLists/SimpleDenyList.js +3 -3
  24. package/dist/Auth/PassthroughAuth.cjs +1 -1
  25. package/dist/Auth/PassthroughAuth.js +1 -1
  26. package/dist/Boost.cjs.map +1 -1
  27. package/dist/Boost.d.ts +18 -0
  28. package/dist/Boost.d.ts.map +1 -1
  29. package/dist/Boost.js.map +1 -1
  30. package/dist/BoostCore-BiPwp6SR.cjs +3 -0
  31. package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
  32. package/dist/BoostCore-C00iqvks.js +1477 -0
  33. package/dist/BoostCore-C00iqvks.js.map +1 -0
  34. package/dist/BoostCore.cjs +1 -2
  35. package/dist/BoostCore.cjs.map +1 -1
  36. package/dist/BoostCore.d.ts +80 -35
  37. package/dist/BoostCore.d.ts.map +1 -1
  38. package/dist/BoostCore.js +29 -1273
  39. package/dist/BoostCore.js.map +1 -1
  40. package/dist/BoostRegistry.cjs +1 -1
  41. package/dist/BoostRegistry.cjs.map +1 -1
  42. package/dist/BoostRegistry.d.ts +18 -18
  43. package/dist/BoostRegistry.js +28 -28
  44. package/dist/BoostRegistry.js.map +1 -1
  45. package/dist/Budgets/Budget.cjs +1 -1
  46. package/dist/Budgets/Budget.js +2 -2
  47. package/dist/Budgets/ManagedBudget.cjs +1 -1
  48. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  49. package/dist/Budgets/ManagedBudget.d.ts +18 -18
  50. package/dist/Budgets/ManagedBudget.js +48 -48
  51. package/dist/Budgets/ManagedBudget.js.map +1 -1
  52. package/dist/Budgets/VestingBudget.d.ts +23 -23
  53. package/dist/Deployable/Contract.cjs +1 -1
  54. package/dist/Deployable/Contract.cjs.map +1 -1
  55. package/dist/Deployable/Contract.d.ts +4 -5
  56. package/dist/Deployable/Contract.d.ts.map +1 -1
  57. package/dist/Deployable/Contract.js +4 -5
  58. package/dist/Deployable/Contract.js.map +1 -1
  59. package/dist/Deployable/Deployable.cjs.map +1 -1
  60. package/dist/Deployable/Deployable.d.ts +1 -1
  61. package/dist/Deployable/Deployable.js +1 -1
  62. package/dist/Deployable/Deployable.js.map +1 -1
  63. package/dist/Deployable/DeployableTarget.cjs +1 -1
  64. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  65. package/dist/Deployable/DeployableTarget.d.ts +5 -5
  66. package/dist/Deployable/DeployableTarget.js +10 -10
  67. package/dist/Deployable/DeployableTarget.js.map +1 -1
  68. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  69. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
  70. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +15 -15
  71. package/dist/Deployable/DeployableTargetWithRBAC.js +32 -32
  72. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
  73. package/dist/EventAction-BO5WI_5s.js +1355 -0
  74. package/dist/EventAction-BO5WI_5s.js.map +1 -0
  75. package/dist/EventAction-DBDRaG4A.cjs +2 -0
  76. package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
  77. package/dist/{Incentive-DJf-vdyL.js → Incentive-CF7kaz_9.js} +61 -62
  78. package/dist/Incentive-CF7kaz_9.js.map +1 -0
  79. package/dist/{Incentive-DNwROd1r.cjs → Incentive-Djnzseoj.cjs} +2 -2
  80. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  81. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  82. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  83. package/dist/Incentives/AllowListIncentive.d.ts +12 -12
  84. package/dist/Incentives/AllowListIncentive.js +19 -19
  85. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  86. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  87. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  88. package/dist/Incentives/CGDAIncentive.d.ts +15 -15
  89. package/dist/Incentives/CGDAIncentive.js +18 -18
  90. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  91. package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
  92. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  93. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  94. package/dist/Incentives/ERC20Incentive.d.ts +23 -23
  95. package/dist/Incentives/ERC20Incentive.js +25 -25
  96. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  97. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  98. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  99. package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
  100. package/dist/Incentives/Incentive.cjs +1 -1
  101. package/dist/Incentives/Incentive.d.ts +3 -3
  102. package/dist/Incentives/Incentive.d.ts.map +1 -1
  103. package/dist/Incentives/Incentive.js +3 -3
  104. package/dist/Incentives/PointsIncentive.cjs +1 -1
  105. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  106. package/dist/Incentives/PointsIncentive.d.ts +14 -14
  107. package/dist/Incentives/PointsIncentive.js +21 -21
  108. package/dist/Incentives/PointsIncentive.js.map +1 -1
  109. package/dist/{SimpleDenyList-DMlUkmAn.cjs → SimpleDenyList-BwfNjRsg.cjs} +2 -2
  110. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  111. package/dist/{SimpleDenyList-DvUvmOeE.js → SimpleDenyList-D9i4rw_F.js} +9 -9
  112. package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
  113. package/dist/Validators/SignerValidator.cjs +1 -1
  114. package/dist/Validators/SignerValidator.cjs.map +1 -1
  115. package/dist/Validators/SignerValidator.d.ts +14 -14
  116. package/dist/Validators/SignerValidator.js +19 -19
  117. package/dist/Validators/SignerValidator.js.map +1 -1
  118. package/dist/Validators/Validator.cjs +1 -1
  119. package/dist/Validators/Validator.cjs.map +1 -1
  120. package/dist/Validators/Validator.d.ts +1 -1
  121. package/dist/Validators/Validator.js +6 -6
  122. package/dist/Validators/Validator.js.map +1 -1
  123. package/dist/claiming.cjs.map +1 -1
  124. package/dist/claiming.d.ts +1 -1
  125. package/dist/claiming.js.map +1 -1
  126. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  127. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  128. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  129. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  130. package/dist/deployments-BM42vImE.js +43 -0
  131. package/dist/deployments-BM42vImE.js.map +1 -0
  132. package/dist/deployments-CMdF5uEC.cjs +2 -0
  133. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  134. package/dist/deployments.json +15 -12
  135. package/dist/errors.cjs +1 -1
  136. package/dist/errors.cjs.map +1 -1
  137. package/dist/errors.d.ts +132 -0
  138. package/dist/errors.d.ts.map +1 -1
  139. package/dist/errors.js +122 -36
  140. package/dist/errors.js.map +1 -1
  141. package/dist/generated-B0tk-c9b.cjs +3 -0
  142. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  143. package/dist/{generated-C_7Jx3YG.js → generated-B8VWObPa.js} +631 -343
  144. package/dist/generated-B8VWObPa.js.map +1 -0
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.d.ts +1 -0
  147. package/dist/index.d.ts.map +1 -1
  148. package/dist/index.js +133 -125
  149. package/dist/transfers.cjs.map +1 -1
  150. package/dist/transfers.d.ts +1 -1
  151. package/dist/transfers.js.map +1 -1
  152. package/dist/utils.cjs.map +1 -1
  153. package/dist/utils.d.ts +1 -1
  154. package/dist/utils.js.map +1 -1
  155. package/package.json +5 -5
  156. package/src/Actions/ContractAction.ts +9 -10
  157. package/src/Actions/ERC721MintAction.ts +12 -13
  158. package/src/Actions/EventAction.test.ts +45 -54
  159. package/src/Actions/EventAction.ts +100 -100
  160. package/src/AllowLists/SimpleAllowList.ts +5 -5
  161. package/src/AllowLists/SimpleDenyList.ts +6 -6
  162. package/src/Boost.ts +19 -0
  163. package/src/BoostCore.test.ts +117 -1
  164. package/src/BoostCore.ts +113 -54
  165. package/src/BoostRegistry.ts +18 -18
  166. package/src/Budgets/ManagedBudget.ts +18 -18
  167. package/src/Budgets/VestingBudget.ts +23 -23
  168. package/src/Deployable/Contract.ts +4 -5
  169. package/src/Deployable/Deployable.ts +1 -1
  170. package/src/Deployable/DeployableTarget.ts +5 -5
  171. package/src/Deployable/DeployableTargetWithRBAC.ts +15 -15
  172. package/src/Incentives/AllowListIncentive.ts +12 -12
  173. package/src/Incentives/CGDAIncentive.ts +15 -15
  174. package/src/Incentives/ERC1155Incentive.ts +26 -26
  175. package/src/Incentives/ERC20Incentive.ts +23 -23
  176. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  177. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  178. package/src/Incentives/ERC20VariableIncentive.ts +19 -19
  179. package/src/Incentives/Incentive.ts +6 -5
  180. package/src/Incentives/PointsIncentive.test.ts +21 -21
  181. package/src/Incentives/PointsIncentive.ts +14 -14
  182. package/src/Validators/SignerValidator.ts +14 -14
  183. package/src/Validators/Validator.ts +1 -1
  184. package/src/claiming.ts +1 -1
  185. package/src/errors.ts +165 -0
  186. package/src/index.ts +1 -0
  187. package/src/transfers.ts +1 -1
  188. package/src/utils.ts +1 -1
  189. package/dist/Incentive-DJf-vdyL.js.map +0 -1
  190. package/dist/Incentive-DNwROd1r.cjs.map +0 -1
  191. package/dist/SimpleDenyList-DMlUkmAn.cjs.map +0 -1
  192. package/dist/SimpleDenyList-DvUvmOeE.js.map +0 -1
  193. package/dist/componentInterfaces-BPVR_Ykd.js +0 -13
  194. package/dist/componentInterfaces-BPVR_Ykd.js.map +0 -1
  195. package/dist/componentInterfaces-BfppSIl4.cjs +0 -2
  196. package/dist/componentInterfaces-BfppSIl4.cjs.map +0 -1
  197. package/dist/deployments-BvFcK_eR.js +0 -40
  198. package/dist/deployments-BvFcK_eR.js.map +0 -1
  199. package/dist/deployments-Ho4PnGCS.cjs +0 -2
  200. package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
  201. package/dist/generated-CMQ6ZC2_.cjs +0 -3
  202. package/dist/generated-CMQ6ZC2_.cjs.map +0 -1
  203. package/dist/generated-C_7Jx3YG.js.map +0 -1
package/src/BoostCore.ts CHANGED
@@ -20,7 +20,12 @@ import {
20
20
  writeBoostCoreSetProtocolFeeReceiver,
21
21
  } from '@boostxyz/evm';
22
22
  import { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';
23
- import { getAccount, waitForTransactionReceipt } from '@wagmi/core';
23
+ import {
24
+ type GetTransactionReceiptParameters,
25
+ getAccount,
26
+ getTransactionReceipt,
27
+ waitForTransactionReceipt,
28
+ } from '@wagmi/core';
24
29
  import { createWriteContract } from '@wagmi/core/codegen';
25
30
  import {
26
31
  type Address,
@@ -74,6 +79,10 @@ import {
74
79
  ERC20Incentive,
75
80
  type ERC20IncentivePayload,
76
81
  } from './Incentives/ERC20Incentive';
82
+ import {
83
+ ERC20VariableCriteriaIncentive,
84
+ type ERC20VariableCriteriaIncentivePayload,
85
+ } from './Incentives/ERC20VariableCriteriaIncentive';
77
86
  import type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';
78
87
  import {
79
88
  ERC20VariableIncentive,
@@ -228,7 +237,7 @@ export type BoostCoreConfig =
228
237
  export type CreateBoostPayload = {
229
238
  budget: Budget;
230
239
  action: Action;
231
- validator: Validator;
240
+ validator?: Validator;
232
241
  allowList: AllowList;
233
242
  incentives: Array<Incentive>;
234
243
  protocolFee?: bigint;
@@ -303,7 +312,7 @@ export class BoostCore extends Deployable<
303
312
  * @async
304
313
  * @param {CreateBoostPayload} _boostPayload
305
314
  * @param {?DeployableOptions} [_options]
306
- * @returns {Boost}
315
+ * @returns {Promise<Boost>}
307
316
  */
308
317
  public async createBoost(
309
318
  _boostPayload: CreateBoostPayload,
@@ -347,6 +356,13 @@ export class BoostCore extends Deployable<
347
356
  }
348
357
  }
349
358
 
359
+ if (!validator) {
360
+ validator = this.SignerValidator({
361
+ signers: [owner],
362
+ validatorCaller: coreAddress,
363
+ });
364
+ }
365
+
350
366
  let budgetPayload: BoostPayload['budget'] = zeroAddress;
351
367
  if (budget.address) {
352
368
  budgetPayload = budget.address;
@@ -394,28 +410,12 @@ export class BoostCore extends Deployable<
394
410
  isBase: isBase,
395
411
  instance: validator.address,
396
412
  parameters: isBase
397
- ? validator
398
- .buildParameters(
399
- {
400
- signers: [owner],
401
- validatorCaller: coreAddress,
402
- },
403
- options,
404
- )
405
- .args.at(0) || zeroHash
413
+ ? validator.buildParameters(undefined, options).args.at(0) || zeroHash
406
414
  : zeroHash,
407
415
  };
408
416
  } else {
409
417
  validatorPayload.parameters =
410
- validator
411
- .buildParameters(
412
- {
413
- signers: [owner],
414
- validatorCaller: coreAddress,
415
- },
416
- options,
417
- )
418
- .args.at(0) || zeroHash;
418
+ validator.buildParameters(undefined, options).args.at(0) || zeroHash;
419
419
  validatorPayload.instance = assertValidAddressByChainId(
420
420
  options.config,
421
421
  validator.bases,
@@ -536,8 +536,8 @@ export class BoostCore extends Deployable<
536
536
  * @param {bigint} incentiveId
537
537
  * @param {Address} address
538
538
  * @param {Hex} data
539
- * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]
540
- * @returns {unknown}
539
+ * @param {?WriteParams} [params]
540
+ * @returns {Promise<void>}
541
541
  */
542
542
  public async claimIncentive(
543
543
  boostId: bigint,
@@ -560,8 +560,8 @@ export class BoostCore extends Deployable<
560
560
  * @param {bigint} incentiveId - The ID of the Incentive
561
561
  * @param {Address} referrer - The address of the referrer (if any)
562
562
  * @param {Hex} data- The data for the claim
563
- * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]
564
- * @returns {unknown}
563
+ * @param {?WriteParams} [params]
564
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
565
565
  */
566
566
  public async claimIncentiveRaw(
567
567
  boostId: bigint,
@@ -598,8 +598,8 @@ export class BoostCore extends Deployable<
598
598
  * @param {Address} referrer
599
599
  * @param {Hex} data
600
600
  * @param {Address} claimant
601
- * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]
602
- * @returns {unknown}
601
+ * @param {?WriteParams} [params]
602
+ * @returns {Promise<void>}
603
603
  */
604
604
  public async claimIncentiveFor(
605
605
  boostId: bigint,
@@ -631,8 +631,8 @@ export class BoostCore extends Deployable<
631
631
  * @param {Address} referrer - The address of the referrer (if any)
632
632
  * @param {Hex} data - The data for the claim
633
633
  * @param {Address} claimant - The address of the user eligible for the incentive payout
634
- * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]
635
- * @returns {unknown}
634
+ * @param {?WriteParams} [params]
635
+ * @returns {Promise<{ hash: Hex; result: void; }>}
636
636
  */
637
637
  public async claimIncentiveForRaw(
638
638
  boostId: bigint,
@@ -666,8 +666,8 @@ export class BoostCore extends Deployable<
666
666
  * @public
667
667
  * @async
668
668
  * @param {bigint} id
669
- * @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]
670
- * @returns {unknown}
669
+ * @param {?ReadParams} [params]
670
+ * @returns {Promise<RawBoost>}
671
671
  */
672
672
  public async readBoost(
673
673
  id: bigint,
@@ -688,8 +688,8 @@ export class BoostCore extends Deployable<
688
688
  * @public
689
689
  * @async
690
690
  * @param {(string | bigint)} _id
691
- * @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]
692
- * @returns {unknown}
691
+ * @param {?ReadParams} [params]
692
+ * @returns {Promise<Boost>}
693
693
  */
694
694
  public async getBoost(
695
695
  _id: string | bigint,
@@ -741,7 +741,7 @@ export class BoostCore extends Deployable<
741
741
  *
742
742
  * @public
743
743
  * @async
744
- * @param {?ReadParams<typeof boostCoreAbi, 'getBoostCount'>} [params]
744
+ * @param {?ReadParams} [params]
745
745
  * @returns {Promise<bigint>}
746
746
  */
747
747
  public async getBoostCount(
@@ -766,7 +766,7 @@ export class BoostCore extends Deployable<
766
766
  * @public
767
767
  * @async
768
768
  * @param {Address} address
769
- * @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &
769
+ * @param {?ReadParams &
770
770
  * ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
771
771
  * @returns {Promise<boolean>}
772
772
  */
@@ -790,8 +790,8 @@ export class BoostCore extends Deployable<
790
790
  *
791
791
  * @public
792
792
  * @async
793
- * @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'>} [params]
794
- * @returns {unknown}
793
+ * @param {?ReadParams} [params]
794
+ * @returns {Promise<Address>}
795
795
  */
796
796
  public async createBoostAuth(
797
797
  params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>,
@@ -815,8 +815,8 @@ export class BoostCore extends Deployable<
815
815
  * @public
816
816
  * @async
817
817
  * @param {Auth} auth
818
- * @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]
819
- * @returns {unknown}
818
+ * @param {?WriteParams} [params]
819
+ * @returns {Promise<void>}
820
820
  */
821
821
  public async setCreateBoostAuth(
822
822
  auth: Auth,
@@ -835,8 +835,8 @@ export class BoostCore extends Deployable<
835
835
  * @public
836
836
  * @async
837
837
  * @param {Address} address
838
- * @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]
839
- * @returns {unknown}
838
+ * @param {?WriteParams} [params]
839
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
840
840
  */
841
841
  public async setCreateBoostAuthRaw(
842
842
  address: Address,
@@ -865,7 +865,7 @@ export class BoostCore extends Deployable<
865
865
  *
866
866
  * @public
867
867
  * @async
868
- * @param {?ReadParams<typeof boostCoreAbi, 'protocolFee'>} [params]
868
+ * @param {?ReadParams} [params]
869
869
  * @returns {unknown}
870
870
  */
871
871
  public async protocolFee(
@@ -889,8 +889,8 @@ export class BoostCore extends Deployable<
889
889
  *
890
890
  * @public
891
891
  * @async
892
- * @param {?ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>} [params]
893
- * @returns {unknown}
892
+ * @param {?ReadParams} [params]
893
+ * @returns {Promise<Address>}
894
894
  */
895
895
  public async protocolFeeReceiver(
896
896
  params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>,
@@ -914,8 +914,8 @@ export class BoostCore extends Deployable<
914
914
  * @public
915
915
  * @async
916
916
  * @param {Address} address
917
- * @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]
918
- * @returns {unknown}
917
+ * @param {?WriteParams} [params]
918
+ * @returns {Promise<void>}
919
919
  */
920
920
  public async setProcolFeeReceiver(
921
921
  address: Address,
@@ -934,8 +934,8 @@ export class BoostCore extends Deployable<
934
934
  * @public
935
935
  * @async
936
936
  * @param {Address} address
937
- * @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]
938
- * @returns {unknown}
937
+ * @param {?WriteParams} [params]
938
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
939
939
  */
940
940
  public async setProcolFeeReceiverRaw(
941
941
  address: Address,
@@ -967,8 +967,8 @@ export class BoostCore extends Deployable<
967
967
  *
968
968
  * @public
969
969
  * @async
970
- * @param {?ReadParams<typeof boostCoreAbi, 'claimFee'>} [params]
971
- * @returns {unknown}
970
+ * @param {?ReadParams} [params]
971
+ * @returns {Promise<bigint>}
972
972
  */
973
973
  public async claimFee(params?: ReadParams<typeof boostCoreAbi, 'claimFee'>) {
974
974
  return await readBoostCoreClaimFee(this._config, {
@@ -990,8 +990,8 @@ export class BoostCore extends Deployable<
990
990
  * @public
991
991
  * @async
992
992
  * @param {bigint} claimFee
993
- * @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]
994
- * @returns {unknown}
993
+ * @param {?WriteParams} [params]
994
+ * @returns {Promise<void>}
995
995
  */
996
996
  public async setClaimFee(
997
997
  claimFee: bigint,
@@ -1006,8 +1006,8 @@ export class BoostCore extends Deployable<
1006
1006
  * @public
1007
1007
  * @async
1008
1008
  * @param {bigint} claimFee
1009
- * @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]
1010
- * @returns {unknown}
1009
+ * @param {?WriteParams} [params]
1010
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
1011
1011
  */
1012
1012
  public async setClaimFeeRaw(
1013
1013
  claimFee: bigint,
@@ -1031,6 +1031,41 @@ export class BoostCore extends Deployable<
1031
1031
  return { hash, result };
1032
1032
  }
1033
1033
 
1034
+ /**
1035
+ * Retrieves the claim information from a transaction receipt.
1036
+ *
1037
+ * @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.
1038
+ * @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.
1039
+ *
1040
+ * @description
1041
+ * This method retrieves the transaction receipt using the provided parameters,
1042
+ * then parses the logs to find the 'BoostClaimed' event.
1043
+ * If found, it returns the arguments of the event, which include the boost ID,
1044
+ * incentive ID, claimer address, and claimed amount.
1045
+ *
1046
+ * @example
1047
+ * ```ts
1048
+ * const claimInfo = await boostCore.getClaimFromTransaction({
1049
+ * hash: '0x...',
1050
+ * chainId: 1
1051
+ * });
1052
+ * if (claimInfo) {
1053
+ * console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);
1054
+ * }
1055
+ * ```
1056
+ */
1057
+ public async getClaimFromTransaction(
1058
+ params: GetTransactionReceiptParameters,
1059
+ ) {
1060
+ const receipt = await getTransactionReceipt(this._config, params);
1061
+ const logs = parseEventLogs({
1062
+ abi: boostCoreAbi,
1063
+ eventName: 'BoostClaimed',
1064
+ logs: receipt.logs,
1065
+ });
1066
+ return logs.at(0)?.args;
1067
+ }
1068
+
1034
1069
  /**
1035
1070
  * Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
1036
1071
  *
@@ -1334,6 +1369,30 @@ export class BoostCore extends Deployable<
1334
1369
  isBase,
1335
1370
  );
1336
1371
  }
1372
+
1373
+ /**
1374
+ * Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.
1375
+ *
1376
+ * @example
1377
+ * ```ts
1378
+ * const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to
1379
+ * const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })
1380
+ * ```
1381
+ * @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options
1382
+ * @param {?boolean} [isBase]
1383
+ * @returns {ERC20VariableCrtieriaIncentive}
1384
+ * */
1385
+ ERC20VariableCriteriaIncentive(
1386
+ options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>,
1387
+ isBase?: boolean,
1388
+ ) {
1389
+ return new ERC20VariableCriteriaIncentive(
1390
+ { config: this._config, account: this._account },
1391
+ options,
1392
+ isBase,
1393
+ );
1394
+ }
1395
+
1337
1396
  /**
1338
1397
  * Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
1339
1398
  *
@@ -214,8 +214,8 @@ export class BoostRegistry extends Deployable<
214
214
  * @param {RegistryType} registryType - The base type for the implementation
215
215
  * @param {string} name - A name for the implementation (must be unique within the given type)
216
216
  * @param {Address} implementation - The address of the implementation contract
217
- * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params] - Optional params to provide the underlying Viem contract call
218
- * @returns {unknown}
217
+ * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call
218
+ * @returns {Promise<void>}
219
219
  * @example
220
220
  * ```ts
221
221
  * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)
@@ -239,8 +239,8 @@ export class BoostRegistry extends Deployable<
239
239
  * @param {RegistryType} registryType
240
240
  * @param {string} name
241
241
  * @param {Address} implementation
242
- * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params]
243
- * @returns {unknown}
242
+ * @param {?WriteParams} [params]
243
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
244
244
  */
245
245
  public async registerRaw(
246
246
  registryType: RegistryType,
@@ -275,8 +275,8 @@ export class BoostRegistry extends Deployable<
275
275
  * @template {DeployableTarget} Target
276
276
  * @param {string} displayName - The display name for the clone
277
277
  * @param {Target} target - An instance of a target contract to clone and initialize
278
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
279
- * @returns {Target} - The provided instance, but with a new address attached.
278
+ * @param {?WriteParams} [params]
279
+ * @returns {Promise<Target>} - The provided instance, but with a new address attached.
280
280
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
281
281
  */
282
282
  public initialize<Target extends DeployableTarget<any, any>>(
@@ -295,8 +295,8 @@ export class BoostRegistry extends Deployable<
295
295
  * @template {DeployableTarget} Target
296
296
  * @param {string} displayName - The display name for the clone
297
297
  * @param {Target} target - An instance of a target contract to clone and initialize
298
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
299
- * @returns {Target} - The provided instance, but with a new address attached.
298
+ * @param {?WriteParams} [params]
299
+ * @returns {Promise<Target>} - The provided instance, but with a new address attached.
300
300
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
301
301
  */
302
302
  public async clone<Target extends DeployableTarget<any, any>>(
@@ -316,8 +316,8 @@ export class BoostRegistry extends Deployable<
316
316
  * @template {DeployableTarget} Target
317
317
  * @param {string} displayName
318
318
  * @param {Target} target
319
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
320
- * @returns {Target}
319
+ * @param {?WriteParams} [params]
320
+ * @returns {Promise<Address>}
321
321
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
322
322
  */
323
323
  public async deployClone<Target extends DeployableTarget<any, any>>(
@@ -336,8 +336,8 @@ export class BoostRegistry extends Deployable<
336
336
  * @async
337
337
  * @param {string} displayName
338
338
  * @param {DeployableTarget} target
339
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
340
- * @returns {unknown} - The transaction hash
339
+ * @param {?WriteParams} [params]
340
+ * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash
341
341
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
342
342
  */
343
343
  public async deployCloneRaw<Target extends DeployableTarget<any, any>>(
@@ -379,8 +379,8 @@ export class BoostRegistry extends Deployable<
379
379
  * @public
380
380
  * @async
381
381
  * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})
382
- * @param {?ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>} [params]
383
- * @returns {unknown} - The address of the implementation
382
+ * @param {?ReadParams} [params]
383
+ * @returns {Promise<Address>} - The address of the implementation
384
384
  */
385
385
  public async getBaseImplementation(
386
386
  identifier: Hex,
@@ -405,7 +405,7 @@ export class BoostRegistry extends Deployable<
405
405
  * @public
406
406
  * @async
407
407
  * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})
408
- * @param {?ReadParams<typeof boostRegistryAbi, 'getClone'>} [params]
408
+ * @param {?ReadParams} [params]
409
409
  * @returns {Promise<Address>} - The address of the deployed clone
410
410
  */
411
411
  public async getClone(
@@ -431,7 +431,7 @@ export class BoostRegistry extends Deployable<
431
431
  * @public
432
432
  * @async
433
433
  * @param {Address} deployer - The address of the deployer
434
- * @param {?ReadParams<typeof boostRegistryAbi, 'getClones'>} [params]
434
+ * @param {?ReadParams} [params]
435
435
  * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer
436
436
  */
437
437
  public async getClones(
@@ -460,7 +460,7 @@ export class BoostRegistry extends Deployable<
460
460
  * @param {Address} base - The address of the base implementation
461
461
  * @param {Address} deployer - The address of the deployer
462
462
  * @param {string} displayName - The display name of the clone
463
- * @param {?ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>} [params]
463
+ * @param {?ReadParams} [params]
464
464
  * @returns {Promise<Hex>} - The unique identifier for the clone
465
465
  */
466
466
  public async getCloneIdentifier(
@@ -490,7 +490,7 @@ export class BoostRegistry extends Deployable<
490
490
  * @async
491
491
  * @param {RegistryType} registryType - The base type for the implementation
492
492
  * @param {string} displayName - The name of the implementation
493
- * @param {?ReadParams<typeof boostRegistryAbi, 'getIdentifier'>} [params]
493
+ * @param {?ReadParams} [params]
494
494
  * @returns {Promise<Hex>} - The unique identifier for the implementation
495
495
  */
496
496
  public async getIdentifier(
@@ -149,7 +149,7 @@ export function isERC1155TransferPayload(
149
149
  *
150
150
  * @export
151
151
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
152
- * @returns {*}
152
+ * @returns {Hex}
153
153
  * @throws {@link UnknownTransferPayloadSupplied}
154
154
  */
155
155
  export function prepareTransfer(
@@ -212,7 +212,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
212
212
  * @public
213
213
  * @async
214
214
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
215
- * @param {?WriteParams<typeof managedBudgetAbi, 'allocate'>} [params]
215
+ * @param {?WriteParams} [params]
216
216
  * @returns {Promise<boolean>} - True if the allocation was successful
217
217
  */
218
218
  public async allocate(
@@ -230,8 +230,8 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
230
230
  * @public
231
231
  * @async
232
232
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
233
- * @param {?WriteParams<typeof managedBudgetAbi, 'allocate'>} [params]
234
- * @returns {Promise<boolean>} - True if the allocation was successful
233
+ * @param {?WriteParams} [params]
234
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the allocation was successful
235
235
  */
236
236
  public async allocateRaw(
237
237
  transfer: FungibleTransferPayload | ERC1155TransferPayload,
@@ -260,7 +260,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
260
260
  * @public
261
261
  * @async
262
262
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
263
- * @param {?WriteParams<typeof managedBudgetAbi, 'clawback'>} [params]
263
+ * @param {?WriteParams} [params]
264
264
  * @returns {Promise<boolean>} - True if the request was successful
265
265
  */
266
266
  public async clawback(
@@ -279,8 +279,8 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
279
279
  * @public
280
280
  * @async
281
281
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
282
- * @param {?WriteParams<typeof managedBudgetAbi, 'clawback'>} [params]
283
- * @returns {Promise<boolean>} - True if the request was successful
282
+ * @param {?WriteParams} [params]
283
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the request was successful
284
284
  */
285
285
  public async clawbackRaw(
286
286
  transfer: FungibleTransferPayload | ERC1155TransferPayload,
@@ -307,7 +307,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
307
307
  * @public
308
308
  * @async
309
309
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
310
- * @param {?WriteParams<typeof managedBudgetAbi, 'disburse'>} [params]
310
+ * @param {?WriteParams} [params]
311
311
  * @returns {Promise<boolean>} - True if the disbursement was successful
312
312
  */
313
313
  public async disburse(
@@ -324,8 +324,8 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
324
324
  * @public
325
325
  * @async
326
326
  * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
327
- * @param {?WriteParams<typeof managedBudgetAbi, 'disburse'>} [params]
328
- * @returns {Promise<boolean>} - True if the disbursement was successful
327
+ * @param {?WriteParams} [params]
328
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the disbursement was successful
329
329
  */
330
330
  public async disburseRaw(
331
331
  transfer: FungibleTransferPayload | ERC1155TransferPayload,
@@ -351,7 +351,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
351
351
  * @public
352
352
  * @async
353
353
  * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
354
- * @param {?WriteParams<typeof managedBudgetAbi, 'disburseBatch'>} [params]
354
+ * @param {?WriteParams} [params]
355
355
  * @returns {Promise<boolean>} - True if all disbursements were successful
356
356
  */
357
357
  public async disburseBatch(
@@ -367,8 +367,8 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
367
367
  * @public
368
368
  * @async
369
369
  * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
370
- * @param {?WriteParams<typeof managedBudgetAbi, 'disburseBatch'>} [params]
371
- * @returns {Promise<boolean>} - True if all disbursements were successful
370
+ * @param {?WriteParams} [params]
371
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if all disbursements were successful
372
372
  */
373
373
  public async disburseBatchRaw(
374
374
  transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>,
@@ -392,7 +392,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
392
392
  * Get the owner of the budget
393
393
  *
394
394
  * @public
395
- * @param {?ReadParams<typeof managedBudgetAbi, 'owner'>} [params]
395
+ * @param {?ReadParams} [params]
396
396
  * @returns {Promise<Address>}
397
397
  */
398
398
  public owner(params?: ReadParams<typeof managedBudgetAbi, 'owner'>) {
@@ -411,7 +411,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
411
411
  * @public
412
412
  * @param {Address} [asset="0x0000000000000000000000000000000000000000"] - The address of the asset
413
413
  * @param {?(bigint | undefined)} [tokenId] - The ID of the token
414
- * @param {?ReadParams<typeof managedBudgetAbi, 'total'>} [params]
414
+ * @param {?ReadParams} [params]
415
415
  * @returns {Promise<bigint>} - The total amount of assets
416
416
  */
417
417
  public total(
@@ -434,7 +434,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
434
434
  * @public
435
435
  * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
436
436
  * @param {?(bigint | undefined)} [tokenId]
437
- * @param {?ReadParams<typeof managedBudgetAbi, 'available'>} [params]
437
+ * @param {?ReadParams} [params]
438
438
  * @returns {Promise<bigint>} - The amount of assets available
439
439
  */
440
440
  public available(
@@ -457,7 +457,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
457
457
  * @public
458
458
  * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
459
459
  * @param {?(bigint | undefined)} [tokenId]
460
- * @param {?ReadParams<typeof managedBudgetAbi, 'distributed'>} [params]
460
+ * @param {?ReadParams} [params]
461
461
  * @returns {Promise<bigint>} - The amount of assets distributed
462
462
  */
463
463
  public distributed(
@@ -517,7 +517,7 @@ export class ManagedBudget extends DeployableTargetWithRBAC<
517
517
  * @param {Address} param0.owner - The budget's owner
518
518
  * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
519
519
  * @param {{}} param0.roles - List of roles to assign to the corresponding account by index.
520
- * @returns {*}
520
+ * @returns {Hex}
521
521
  */
522
522
  export const prepareManagedBudgetPayload = ({
523
523
  owner,