@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/dist/Actions/Action.cjs +2 -1
  2. package/dist/Actions/Action.cjs.map +1 -0
  3. package/dist/Actions/Action.d.ts +1 -1
  4. package/dist/Actions/Action.d.ts.map +1 -1
  5. package/dist/Actions/Action.js +14 -12
  6. package/dist/Actions/Action.js.map +1 -0
  7. package/dist/Actions/ContractAction.d.ts +57 -14
  8. package/dist/Actions/ContractAction.d.ts.map +1 -1
  9. package/dist/Actions/ERC721MintAction.d.ts +50 -23
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.cjs +2 -1
  12. package/dist/Actions/EventAction.cjs.map +1 -0
  13. package/dist/Actions/EventAction.d.ts +405 -36
  14. package/dist/Actions/EventAction.d.ts.map +1 -1
  15. package/dist/Actions/EventAction.js +15 -209
  16. package/dist/Actions/EventAction.js.map +1 -0
  17. package/dist/AllowLists/AllowList.cjs +2 -1
  18. package/dist/AllowLists/AllowList.cjs.map +1 -0
  19. package/dist/AllowLists/AllowList.d.ts +6 -5
  20. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  21. package/dist/AllowLists/AllowList.js +46 -22
  22. package/dist/AllowLists/AllowList.js.map +1 -0
  23. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  24. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -1
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  29. package/dist/AllowLists/SimpleAllowList.js +76 -76
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -1
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  35. package/dist/AllowLists/SimpleDenyList.js +12 -200
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +1 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.js +1 -0
  40. package/dist/Auth/Auth.js.map +1 -0
  41. package/dist/Auth/PassthroughAuth.cjs +2 -1
  42. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  43. package/dist/Auth/PassthroughAuth.js +5 -4
  44. package/dist/Auth/PassthroughAuth.js.map +1 -0
  45. package/dist/Boost.cjs +2 -1
  46. package/dist/Boost.cjs.map +1 -0
  47. package/dist/Boost.d.ts +105 -14
  48. package/dist/Boost.d.ts.map +1 -1
  49. package/dist/Boost.js +138 -5
  50. package/dist/Boost.js.map +1 -0
  51. package/dist/BoostCore-DolmDuXW.cjs +3 -0
  52. package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
  53. package/dist/BoostCore-Z97KVu4V.js +1448 -0
  54. package/dist/BoostCore-Z97KVu4V.js.map +1 -0
  55. package/dist/BoostCore.cjs +2 -2
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +788 -79
  58. package/dist/BoostCore.d.ts.map +1 -1
  59. package/dist/BoostCore.js +30 -1103
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -1
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +95 -26
  64. package/dist/BoostRegistry.d.ts.map +1 -1
  65. package/dist/BoostRegistry.js +183 -89
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -1
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +1 -1
  70. package/dist/Budgets/Budget.d.ts.map +1 -1
  71. package/dist/Budgets/Budget.js +15 -13
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -1
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +112 -192
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  77. package/dist/Budgets/ManagedBudget.js +91 -291
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/VestingBudget.d.ts +277 -91
  80. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  81. package/dist/Deployable/Contract.cjs +2 -1
  82. package/dist/Deployable/Contract.cjs.map +1 -0
  83. package/dist/Deployable/Contract.d.ts +4 -5
  84. package/dist/Deployable/Contract.d.ts.map +1 -1
  85. package/dist/Deployable/Contract.js +7 -8
  86. package/dist/Deployable/Contract.js.map +1 -0
  87. package/dist/Deployable/Deployable.cjs +1 -0
  88. package/dist/Deployable/Deployable.cjs.map +1 -0
  89. package/dist/Deployable/Deployable.d.ts +9 -3
  90. package/dist/Deployable/Deployable.d.ts.map +1 -1
  91. package/dist/Deployable/Deployable.js +10 -5
  92. package/dist/Deployable/Deployable.js.map +1 -0
  93. package/dist/Deployable/DeployableTarget.cjs +2 -1
  94. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  95. package/dist/Deployable/DeployableTarget.d.ts +16 -15
  96. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  97. package/dist/Deployable/DeployableTarget.js +49 -42
  98. package/dist/Deployable/DeployableTarget.js.map +1 -0
  99. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  100. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  101. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  102. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  103. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  104. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  105. package/dist/EventAction-CBKzuNoN.cjs +2 -0
  106. package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
  107. package/dist/EventAction-DWuuc_Qy.js +1528 -0
  108. package/dist/EventAction-DWuuc_Qy.js.map +1 -0
  109. package/dist/Incentive-BxzEtN26.js +298 -0
  110. package/dist/Incentive-BxzEtN26.js.map +1 -0
  111. package/dist/Incentive-CrF3-ayL.cjs +2 -0
  112. package/dist/Incentive-CrF3-ayL.cjs.map +1 -0
  113. package/dist/Incentives/AllowListIncentive.cjs +2 -1
  114. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  115. package/dist/Incentives/AllowListIncentive.d.ts +65 -21
  116. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  117. package/dist/Incentives/AllowListIncentive.js +52 -36
  118. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  119. package/dist/Incentives/CGDAIncentive.cjs +2 -1
  120. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  121. package/dist/Incentives/CGDAIncentive.d.ts +315 -26
  122. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  123. package/dist/Incentives/CGDAIncentive.js +64 -39
  124. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  125. package/dist/Incentives/ERC1155Incentive.d.ts +291 -43
  126. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  127. package/dist/Incentives/ERC20Incentive.cjs +2 -1
  128. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  129. package/dist/Incentives/ERC20Incentive.d.ts +270 -33
  130. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  131. package/dist/Incentives/ERC20Incentive.js +69 -46
  132. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  133. package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +338 -421
  134. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  135. package/dist/Incentives/ERC20VariableIncentive.d.ts +262 -32
  136. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  137. package/dist/Incentives/Incentive.cjs +2 -1
  138. package/dist/Incentives/Incentive.cjs.map +1 -0
  139. package/dist/Incentives/Incentive.d.ts +5 -8
  140. package/dist/Incentives/Incentive.d.ts.map +1 -1
  141. package/dist/Incentives/Incentive.js +17 -278
  142. package/dist/Incentives/Incentive.js.map +1 -0
  143. package/dist/Incentives/PointsIncentive.cjs +2 -1
  144. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  145. package/dist/Incentives/PointsIncentive.d.ts +81 -23
  146. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  147. package/dist/Incentives/PointsIncentive.js +57 -36
  148. package/dist/Incentives/PointsIncentive.js.map +1 -0
  149. package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
  150. package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
  151. package/dist/SimpleDenyList-CGaWjuld.js +132 -0
  152. package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
  153. package/dist/Validators/SignerValidator.cjs +2 -1
  154. package/dist/Validators/SignerValidator.cjs.map +1 -0
  155. package/dist/Validators/SignerValidator.d.ts +310 -17
  156. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  157. package/dist/Validators/SignerValidator.js +165 -36
  158. package/dist/Validators/SignerValidator.js.map +1 -0
  159. package/dist/Validators/Validator.cjs +2 -1
  160. package/dist/Validators/Validator.cjs.map +1 -0
  161. package/dist/Validators/Validator.d.ts +2 -2
  162. package/dist/Validators/Validator.d.ts.map +1 -1
  163. package/dist/Validators/Validator.js +10 -8
  164. package/dist/Validators/Validator.js.map +1 -0
  165. package/dist/claiming.cjs +2 -0
  166. package/dist/claiming.cjs.map +1 -0
  167. package/dist/claiming.d.ts +43 -0
  168. package/dist/claiming.d.ts.map +1 -0
  169. package/dist/claiming.js +17 -0
  170. package/dist/claiming.js.map +1 -0
  171. package/dist/componentInterfaces-BBCFkrZv.js +14 -0
  172. package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
  173. package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
  174. package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
  175. package/dist/deployments-DVXioW2i.cjs +2 -0
  176. package/dist/deployments-DVXioW2i.cjs.map +1 -0
  177. package/dist/deployments-oykLv3_Z.js +43 -0
  178. package/dist/deployments-oykLv3_Z.js.map +1 -0
  179. package/dist/deployments.json +44 -0
  180. package/dist/errors.cjs +2 -1
  181. package/dist/errors.cjs.map +1 -0
  182. package/dist/errors.d.ts +421 -1
  183. package/dist/errors.d.ts.map +1 -1
  184. package/dist/errors.js +297 -39
  185. package/dist/errors.js.map +1 -0
  186. package/dist/{generated-x_abr3Yv.js → generated-CKt2yCQd.js} +3143 -3002
  187. package/dist/generated-CKt2yCQd.js.map +1 -0
  188. package/dist/generated-CyTNlOwM.cjs +3 -0
  189. package/dist/generated-CyTNlOwM.cjs.map +1 -0
  190. package/dist/index.cjs +2 -1
  191. package/dist/index.cjs.map +1 -0
  192. package/dist/index.d.ts +10 -9
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +144 -1353
  195. package/dist/index.js.map +1 -0
  196. package/dist/transfers.cjs +2 -0
  197. package/dist/transfers.cjs.map +1 -0
  198. package/dist/transfers.d.ts +198 -0
  199. package/dist/transfers.d.ts.map +1 -0
  200. package/dist/transfers.js +84 -0
  201. package/dist/transfers.js.map +1 -0
  202. package/dist/utils.cjs +2 -1
  203. package/dist/utils.cjs.map +1 -0
  204. package/dist/utils.d.ts +26 -1350
  205. package/dist/utils.d.ts.map +1 -1
  206. package/dist/utils.js +38 -636
  207. package/dist/utils.js.map +1 -0
  208. package/package.json +37 -11
  209. package/src/Actions/Action.test.ts +79 -0
  210. package/src/Actions/Action.ts +61 -0
  211. package/src/Actions/ContractAction.test.ts +197 -0
  212. package/src/Actions/ContractAction.ts +300 -0
  213. package/src/Actions/ERC721MintAction.test.ts +112 -0
  214. package/src/Actions/ERC721MintAction.ts +291 -0
  215. package/src/Actions/EventAction.test.ts +787 -0
  216. package/src/Actions/EventAction.ts +1218 -0
  217. package/src/AllowLists/AllowList.test.ts +64 -0
  218. package/src/AllowLists/AllowList.ts +62 -0
  219. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  220. package/src/AllowLists/OpenAllowList.ts +45 -0
  221. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  222. package/src/AllowLists/SimpleAllowList.ts +262 -0
  223. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  224. package/src/AllowLists/SimpleDenyList.ts +250 -0
  225. package/src/Auth/Auth.ts +11 -0
  226. package/src/Auth/PassthroughAuth.test.ts +12 -0
  227. package/src/Auth/PassthroughAuth.ts +80 -0
  228. package/src/Boost.ts +287 -0
  229. package/src/BoostCore.test.ts +894 -0
  230. package/src/BoostCore.ts +1438 -0
  231. package/src/BoostRegistry.test.ts +53 -0
  232. package/src/BoostRegistry.ts +588 -0
  233. package/src/Budgets/Budget.test.ts +27 -0
  234. package/src/Budgets/Budget.ts +60 -0
  235. package/src/Budgets/ManagedBudget.test.ts +217 -0
  236. package/src/Budgets/ManagedBudget.ts +534 -0
  237. package/src/Budgets/VestingBudget.test.ts +123 -0
  238. package/src/Budgets/VestingBudget.ts +530 -0
  239. package/src/Deployable/Contract.ts +228 -0
  240. package/src/Deployable/Deployable.ts +250 -0
  241. package/src/Deployable/DeployableTarget.ts +234 -0
  242. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  243. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  244. package/src/Incentives/AllowListIncentive.ts +336 -0
  245. package/src/Incentives/CGDAIncentive.test.ts +135 -0
  246. package/src/Incentives/CGDAIncentive.ts +476 -0
  247. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  248. package/src/Incentives/ERC1155Incentive.ts +465 -0
  249. package/src/Incentives/ERC20Incentive.test.ts +133 -0
  250. package/src/Incentives/ERC20Incentive.ts +490 -0
  251. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  252. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  253. package/src/Incentives/ERC20VariableIncentive.test.ts +139 -0
  254. package/src/Incentives/ERC20VariableIncentive.ts +428 -0
  255. package/src/Incentives/Incentive.test.ts +95 -0
  256. package/src/Incentives/Incentive.ts +86 -0
  257. package/src/Incentives/PointsIncentive.test.ts +138 -0
  258. package/src/Incentives/PointsIncentive.ts +367 -0
  259. package/src/Validators/SignerValidator.test.ts +159 -0
  260. package/src/Validators/SignerValidator.ts +683 -0
  261. package/src/Validators/Validator.test.ts +21 -0
  262. package/src/Validators/Validator.ts +55 -0
  263. package/src/claiming.ts +56 -0
  264. package/src/errors.ts +866 -0
  265. package/src/index.test.ts +122 -0
  266. package/src/index.ts +58 -0
  267. package/src/transfers.ts +284 -0
  268. package/src/utils.test.ts +44 -0
  269. package/src/utils.ts +247 -0
  270. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  271. package/dist/generated-BaaleHW-.cjs +0 -2
@@ -0,0 +1,1438 @@
1
+ import {
2
+ boostCoreAbi,
3
+ type iAuthAbi,
4
+ readBoostCoreCreateBoostAuth,
5
+ readBoostCoreGetBoost,
6
+ readBoostCoreGetBoostCount,
7
+ readBoostCoreProtocolFee,
8
+ readBoostCoreProtocolFeeReceiver,
9
+ readIAuthIsAuthorized,
10
+ simulateBoostCoreClaimIncentive,
11
+ simulateBoostCoreClaimIncentiveFor,
12
+ simulateBoostCoreCreateBoost,
13
+ simulateBoostCoreSetCreateBoostAuth,
14
+ simulateBoostCoreSetProtocolFeeReceiver,
15
+ writeBoostCoreClaimIncentive,
16
+ writeBoostCoreClaimIncentiveFor,
17
+ writeBoostCoreSetCreateBoostAuth,
18
+ writeBoostCoreSetProtocolFeeReceiver,
19
+ } from '@boostxyz/evm';
20
+ import { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';
21
+ import {
22
+ type GetTransactionReceiptParameters,
23
+ getAccount,
24
+ getTransactionReceipt,
25
+ waitForTransactionReceipt,
26
+ } from '@wagmi/core';
27
+ import type { SimulateContractReturnType } from '@wagmi/core/actions';
28
+ import { createWriteContract } from '@wagmi/core/codegen';
29
+ import {
30
+ type Address,
31
+ type ContractEventName,
32
+ type Hex,
33
+ parseEther,
34
+ parseEventLogs,
35
+ zeroAddress,
36
+ zeroHash,
37
+ } from 'viem';
38
+ import { BoostCore as BoostCoreBases } from '../dist/deployments.json';
39
+ import { type Action, actionFromAddress } from './Actions/Action';
40
+ import { EventAction, type EventActionPayload } from './Actions/EventAction';
41
+ import { type AllowList, allowListFromAddress } from './AllowLists/AllowList';
42
+ import { OpenAllowList } from './AllowLists/OpenAllowList';
43
+ import {
44
+ SimpleAllowList,
45
+ type SimpleAllowListPayload,
46
+ } from './AllowLists/SimpleAllowList';
47
+ import {
48
+ SimpleDenyList,
49
+ type SimpleDenyListPayload,
50
+ } from './AllowLists/SimpleDenyList';
51
+ import { type Auth, PassthroughAuth } from './Auth/Auth';
52
+ import {
53
+ Boost,
54
+ type BoostPayload,
55
+ type RawBoost,
56
+ type Target,
57
+ prepareBoostPayload,
58
+ } from './Boost';
59
+ import { type Budget, budgetFromAddress } from './Budgets/Budget';
60
+ import {
61
+ ManagedBudget,
62
+ type ManagedBudgetPayload,
63
+ } from './Budgets/ManagedBudget';
64
+ import {
65
+ Deployable,
66
+ type DeployableOptions,
67
+ type DeployablePayloadOrAddress,
68
+ type GenericDeployableParams,
69
+ } from './Deployable/Deployable';
70
+ import {
71
+ AllowListIncentive,
72
+ type AllowListIncentivePayload,
73
+ } from './Incentives/AllowListIncentive';
74
+ import {
75
+ CGDAIncentive,
76
+ type CGDAIncentivePayload,
77
+ } from './Incentives/CGDAIncentive';
78
+ import {
79
+ ERC20Incentive,
80
+ type ERC20IncentivePayload,
81
+ } from './Incentives/ERC20Incentive';
82
+ import {
83
+ ERC20VariableCriteriaIncentive,
84
+ type ERC20VariableCriteriaIncentivePayload,
85
+ } from './Incentives/ERC20VariableCriteriaIncentive';
86
+ import type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';
87
+ import {
88
+ ERC20VariableIncentive,
89
+ type Incentive,
90
+ incentiveFromAddress,
91
+ } from './Incentives/Incentive';
92
+ import {
93
+ PointsIncentive,
94
+ type PointsIncentivePayload,
95
+ } from './Incentives/PointsIncentive';
96
+ import {
97
+ SignerValidator,
98
+ type SignerValidatorPayload,
99
+ } from './Validators/SignerValidator';
100
+ import { type Validator, validatorFromAddress } from './Validators/Validator';
101
+ import {
102
+ BoostCoreNoIdentifierEmitted,
103
+ BoostNotFoundError,
104
+ BudgetMustAuthorizeBoostCore,
105
+ DeployableUnknownOwnerProvidedError,
106
+ IncentiveNotCloneableError,
107
+ MustInitializeBudgetError,
108
+ } from './errors';
109
+ import {
110
+ type GenericLog,
111
+ type ReadParams,
112
+ type WriteParams,
113
+ assertValidAddressByChainId,
114
+ } from './utils';
115
+
116
+ /**
117
+ * The ABI of the BoostCore contract, if needed for low level operations
118
+ *
119
+ * @type {typeof boostCoreAbi}
120
+ */
121
+ export { boostCoreAbi };
122
+
123
+ /**
124
+ * The fee (in wei) required to claim each incentive, must be provided for the `claimIncentive` transaction
125
+ *
126
+ * @type {bigint}
127
+ */
128
+ export const BOOST_CORE_CLAIM_FEE = parseEther('0.000075');
129
+
130
+ /**
131
+ * The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address
132
+ *
133
+ * @type {Address}
134
+ */
135
+ export const BOOST_CORE_ADDRESS =
136
+ (BoostCoreBases as Record<string, Address>)[__DEFAULT_CHAIN_ID__] ||
137
+ zeroAddress;
138
+
139
+ /**
140
+ * The fixed addresses for the deployed Boost Core.
141
+ * By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.
142
+ *
143
+ * @type {Record<number, Address>}
144
+ */
145
+ export const BOOST_CORE_ADDRESSES: Record<number, Address> = {
146
+ ...(BoostCoreBases as Record<number, Address>),
147
+ 31337: import.meta.env.VITE_BOOST_CORE_ADDRESS,
148
+ };
149
+
150
+ /**
151
+ * A generic `viem.Log` event with support for `BoostCore` event types.
152
+ *
153
+ * @export
154
+ * @typedef {BoostCoreLog}
155
+ * @template {ContractEventName<typeof boostCoreAbi>} [event=ContractEventName<
156
+ * typeof boostCoreAbi
157
+ * >]
158
+ */
159
+ export type BoostCoreLog<
160
+ event extends ContractEventName<typeof boostCoreAbi> = ContractEventName<
161
+ typeof boostCoreAbi
162
+ >,
163
+ > = GenericLog<typeof boostCoreAbi, event>;
164
+
165
+ /**
166
+ * Boost Core instantiation options for a custom deployed instance.
167
+ *
168
+ * @export
169
+ * @interface BoostCoreDeployedOptions
170
+ * @typedef {BoostCoreDeployedOptions}
171
+ * @extends {DeployableOptions}
172
+ */
173
+ export interface BoostCoreDeployedOptions extends DeployableOptions {
174
+ /**
175
+ * The address of a deployed, custom Boost Core contract.
176
+ *
177
+ * @type {?Address}
178
+ */
179
+ address?: Address;
180
+ }
181
+
182
+ /**
183
+ * Typeguard to determine if a user is supplying a custom address for a Boost Core contract.
184
+ *
185
+ * @param {*} opts
186
+ * @returns {opts is BoostCoreDeployedOptions}
187
+ */
188
+ // biome-ignore lint/suspicious/noExplicitAny: type guard
189
+ function isBoostCoreDeployed(opts: any): opts is BoostCoreDeployedOptions {
190
+ return opts.address;
191
+ }
192
+
193
+ /**
194
+ * Boost Core instantiation options when a user intends to deploy a new instance of Boost Core, setting their own registry address and protocol fee receiver.
195
+ *
196
+ * @export
197
+ * @interface BoostCoreOptionsWithPayload
198
+ * @typedef {BoostCoreOptionsWithPayload}
199
+ * @extends {DeployableOptions}
200
+ */
201
+ export interface BoostCoreOptionsWithPayload extends DeployableOptions {
202
+ /**
203
+ * The address of a deployed Boost Registry contract.
204
+ *
205
+ * @type {Address}
206
+ */
207
+ registryAddress: Address;
208
+ /**
209
+ * The address to send fees.
210
+ *
211
+ * @type {Address}
212
+ */
213
+ protocolFeeReceiver: Address;
214
+ }
215
+
216
+ /**
217
+ * Typeguard to determine if a user is intending to deploy a new instance of the Boost Core contracts with {@link BoostCoreOptionsWithPayload}.
218
+ *
219
+ * @param {*} opts
220
+ * @returns {opts is BoostCoreOptionsWithPayload}
221
+ */
222
+ // biome-ignore lint/suspicious/noExplicitAny: type guard
223
+ function isBoostCoreDeployable(opts: any): opts is BoostCoreOptionsWithPayload {
224
+ return opts.registryAddress && opts.protocolFeeReceiver;
225
+ }
226
+
227
+ /**
228
+ * A union representing both of the valid Boost Core instantiation parameters.
229
+ *
230
+ * @export
231
+ * @typedef {BoostCoreConfig}
232
+ */
233
+ export type BoostCoreConfig =
234
+ | BoostCoreDeployedOptions
235
+ | BoostCoreOptionsWithPayload;
236
+
237
+ /**
238
+ * The interface required to create a new Boost.
239
+ *
240
+ * @export
241
+ * @typedef {CreateBoostPayload}
242
+ */
243
+ export type CreateBoostPayload = {
244
+ budget: Budget;
245
+ action: Action;
246
+ validator?: Validator;
247
+ allowList: AllowList;
248
+ incentives: Array<Incentive>;
249
+ protocolFee?: bigint;
250
+ maxParticipants?: bigint;
251
+ owner?: Address;
252
+ };
253
+
254
+ /**
255
+ * The core contract for the Boost protocol. Used to create and retrieve deployed Boosts.
256
+ *
257
+ * @export
258
+ * @class BoostCore
259
+ * @typedef {BoostCore}
260
+ * @extends {Deployable<[Address, Address]>}
261
+ */
262
+ export class BoostCore extends Deployable<
263
+ [Address, Address],
264
+ typeof boostCoreAbi
265
+ > {
266
+ /**
267
+ * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain
268
+ *
269
+ * @static
270
+ * @readonly
271
+ * @type {Record<string, Address>}
272
+ */
273
+ static readonly addresses: Record<number, Address> = BOOST_CORE_ADDRESSES;
274
+
275
+ /**
276
+ * A getter that will return Boost core's static addresses by numerical chain ID
277
+ *
278
+ * @public
279
+ * @readonly
280
+ * @type {Record<number, Address>}
281
+ */
282
+ public get addresses(): Record<number, Address> {
283
+ return (this.constructor as typeof BoostCore).addresses;
284
+ }
285
+
286
+ /**
287
+ * Creates an instance of BoostCore.
288
+ *
289
+ * @constructor
290
+ * @param {BoostCoreConfig} param0
291
+ * @param {Config} param0.config
292
+ * @param {?Account} [param0.account]
293
+ * @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; })} param0....options
294
+ */
295
+ constructor({ config, account, ...options }: BoostCoreConfig) {
296
+ if (isBoostCoreDeployed(options) && options.address) {
297
+ super({ account, config }, options.address);
298
+ } else if (isBoostCoreDeployable(options)) {
299
+ super({ account, config }, [
300
+ options.registryAddress,
301
+ options.protocolFeeReceiver,
302
+ ]);
303
+ } else {
304
+ const { address } = assertValidAddressByChainId(
305
+ config,
306
+ BOOST_CORE_ADDRESSES,
307
+ );
308
+ super({ account, config }, address);
309
+ }
310
+ //@ts-expect-error I can't set this property on the class because for some reason it takes super out of constructor scope?
311
+ this.abi = boostCoreAbi;
312
+ }
313
+
314
+ /**
315
+ * Create a new Boost.
316
+ *
317
+ * @public
318
+ * @async
319
+ * @param {CreateBoostPayload} _boostPayload
320
+ * @param {?DeployableOptions} [_params]
321
+ * @returns {Promise<Boost>}
322
+ */
323
+ public async createBoost(
324
+ _boostPayload: CreateBoostPayload,
325
+ _params?: DeployableOptions &
326
+ WriteParams<typeof boostCoreAbi, 'createBoost'>,
327
+ ) {
328
+ const [payload, options] =
329
+ this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload, _params);
330
+ const desiredChainId = _params?.chain?.id || _params?.chainId;
331
+ const { chainId, address: coreAddress } = assertValidAddressByChainId(
332
+ options.config,
333
+ this.addresses,
334
+ desiredChainId,
335
+ );
336
+
337
+ const boostFactory = createWriteContract({
338
+ abi: boostCoreAbi,
339
+ functionName: 'createBoost',
340
+ address: coreAddress,
341
+ });
342
+
343
+ const onChainPayload = await this.prepareCreateBoostPayload(
344
+ coreAddress,
345
+ chainId,
346
+ payload,
347
+ options,
348
+ );
349
+
350
+ const boostHash = await boostFactory(options.config, {
351
+ ...this.optionallyAttachAccount(options.account),
352
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
353
+ ...(_params as any),
354
+ chainId,
355
+ args: [prepareBoostPayload(onChainPayload)],
356
+ });
357
+ const receipt = await waitForTransactionReceipt(options.config, {
358
+ hash: boostHash,
359
+ });
360
+ const boostCreatedLog = parseEventLogs({
361
+ abi: boostCoreAbi,
362
+ eventName: 'BoostCreated',
363
+ logs: receipt.logs,
364
+ }).at(0);
365
+ let boostId = 0n;
366
+ if (!boostCreatedLog) throw new BoostCoreNoIdentifierEmitted();
367
+ boostId = boostCreatedLog?.args.boostId;
368
+ const boost = await this.readBoost(boostId);
369
+ return new Boost({
370
+ id: boostId,
371
+ budget: payload.budget.at(boost.budget),
372
+ action: payload.action.at(boost.action),
373
+ validator: payload.validator!.at(boost.validator),
374
+ allowList: payload.allowList.at(boost.allowList),
375
+ incentives: payload.incentives.map((incentive, i) =>
376
+ // biome-ignore lint/style/noNonNullAssertion: this will never be undefined
377
+ incentive.at(boost.incentives.at(i)!),
378
+ ),
379
+ protocolFee: boost.protocolFee,
380
+ maxParticipants: boost.maxParticipants,
381
+ owner: boost.owner,
382
+ });
383
+ }
384
+
385
+ /**
386
+ * Returns a simulated Boost creation.
387
+ *
388
+ * @public
389
+ * @async
390
+ * @param {CreateBoostPayload} _boostPayload
391
+ * @param {?DeployableOptions} [_params]
392
+ * @returns {Promise<SimulateContractReturnType>}
393
+ */
394
+ public async simulateCreateBoost(
395
+ _boostPayload: CreateBoostPayload,
396
+ _params?: DeployableOptions &
397
+ WriteParams<typeof boostCoreAbi, 'createBoost'>,
398
+ ) {
399
+ const [payload, options] =
400
+ this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload, _params);
401
+ const desiredChainId = _params?.chain?.id || _params?.chainId;
402
+ const { chainId, address: coreAddress } = assertValidAddressByChainId(
403
+ options.config,
404
+ this.addresses,
405
+ desiredChainId,
406
+ );
407
+
408
+ const onChainPayload = await this.prepareCreateBoostPayload(
409
+ coreAddress,
410
+ chainId,
411
+ payload,
412
+ options,
413
+ );
414
+
415
+ return await simulateBoostCoreCreateBoost(this._config, {
416
+ ...this.optionallyAttachAccount(),
417
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
418
+ ...(_params as any),
419
+ address: coreAddress,
420
+ chainId,
421
+ args: [prepareBoostPayload(onChainPayload)],
422
+ });
423
+ }
424
+
425
+ // This function mutates payload, which isn't awesome but it's fine
426
+ private async prepareCreateBoostPayload(
427
+ coreAddress: Address,
428
+ chainId: number,
429
+ payload: CreateBoostPayload,
430
+ options: DeployableOptions,
431
+ ): Promise<BoostPayload> {
432
+ if (!payload.owner) {
433
+ payload.owner =
434
+ this._account?.address ||
435
+ getAccount(options.config).address ||
436
+ zeroAddress;
437
+ if (payload.owner === zeroAddress) {
438
+ throw new DeployableUnknownOwnerProvidedError();
439
+ }
440
+ }
441
+
442
+ if (!payload.validator) {
443
+ payload.validator = this.SignerValidator({
444
+ signers: [payload.owner],
445
+ validatorCaller: coreAddress,
446
+ });
447
+ }
448
+
449
+ let budgetPayload: BoostPayload['budget'] = zeroAddress;
450
+ if (payload.budget.address) {
451
+ budgetPayload = payload.budget.address;
452
+ if (!(await payload.budget.isAuthorized(coreAddress))) {
453
+ throw new BudgetMustAuthorizeBoostCore(coreAddress);
454
+ }
455
+ } else {
456
+ throw new MustInitializeBudgetError();
457
+ }
458
+
459
+ // if we're supplying an address, it could be a pre-initialized target
460
+ // if base is explicitly set to false, then it will not be initialized, and it will be referenced as is if it implements interface correctly
461
+ let actionPayload: BoostPayload['action'] = {
462
+ instance: zeroAddress,
463
+ isBase: true,
464
+ parameters: zeroHash,
465
+ };
466
+ if (payload.action.address) {
467
+ const isBase = payload.action.isBase;
468
+ actionPayload = {
469
+ isBase: isBase,
470
+ instance: payload.action.address,
471
+ parameters: isBase
472
+ ? payload.action.buildParameters(undefined, options).args.at(0) ||
473
+ zeroHash
474
+ : zeroHash,
475
+ };
476
+ } else {
477
+ actionPayload.parameters =
478
+ payload.action.buildParameters(undefined, options).args.at(0) ||
479
+ zeroHash;
480
+ actionPayload.instance = assertValidAddressByChainId(
481
+ options.config,
482
+ payload.action.bases,
483
+ chainId,
484
+ ).address;
485
+ }
486
+
487
+ let validatorPayload: BoostPayload['validator'] = {
488
+ instance: zeroAddress,
489
+ isBase: true,
490
+ parameters: zeroHash,
491
+ };
492
+ if (payload.validator.address) {
493
+ const isBase = payload.validator.isBase;
494
+ validatorPayload = {
495
+ isBase: isBase,
496
+ instance: payload.validator.address,
497
+ parameters: isBase
498
+ ? payload.validator.buildParameters(undefined, options).args.at(0) ||
499
+ zeroHash
500
+ : zeroHash,
501
+ };
502
+ } else {
503
+ validatorPayload.parameters =
504
+ payload.validator.buildParameters(undefined, options).args.at(0) ||
505
+ zeroHash;
506
+ validatorPayload.instance = assertValidAddressByChainId(
507
+ options.config,
508
+ payload.validator.bases,
509
+ chainId,
510
+ ).address;
511
+ }
512
+
513
+ let allowListPayload: BoostPayload['allowList'] = {
514
+ instance: zeroAddress,
515
+ isBase: true,
516
+ parameters: zeroHash,
517
+ };
518
+ if (payload.allowList.address) {
519
+ const isBase = payload.allowList.isBase;
520
+ allowListPayload = {
521
+ isBase: isBase,
522
+ instance: payload.allowList.address,
523
+ parameters: isBase
524
+ ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash
525
+ : zeroHash,
526
+ };
527
+ } else {
528
+ allowListPayload.parameters =
529
+ payload.allowList.buildParameters(undefined, options).args.at(0) ||
530
+ zeroHash;
531
+ allowListPayload.instance = assertValidAddressByChainId(
532
+ options.config,
533
+ payload.allowList.bases,
534
+ chainId,
535
+ ).address;
536
+ }
537
+
538
+ const incentivesPayloads: Array<Target> = payload.incentives.map(() => ({
539
+ instance: zeroAddress,
540
+ isBase: true,
541
+ parameters: zeroHash,
542
+ }));
543
+ for (let i = 0; i < payload.incentives.length; i++) {
544
+ // biome-ignore lint/style/noNonNullAssertion: this will never be undefined
545
+ const incentive = payload.incentives.at(i)!;
546
+ if (incentive.address) {
547
+ const isBase = incentive.isBase;
548
+ if (!isBase) throw new IncentiveNotCloneableError(incentive);
549
+ incentivesPayloads[i] = {
550
+ isBase: isBase,
551
+ instance: incentive.address,
552
+ parameters: isBase
553
+ ? incentive.buildParameters(undefined, options).args.at(0) ||
554
+ zeroHash
555
+ : zeroHash,
556
+ };
557
+ } else {
558
+ // biome-ignore lint/style/noNonNullAssertion: this will never be undefined
559
+ incentivesPayloads[i]!.parameters =
560
+ incentive.buildParameters(undefined, options).args.at(0) || zeroHash;
561
+ // biome-ignore lint/style/noNonNullAssertion: this will never be undefined
562
+ incentivesPayloads[i]!.instance = assertValidAddressByChainId(
563
+ options.config,
564
+ incentive.bases,
565
+ chainId,
566
+ ).address;
567
+ }
568
+ }
569
+
570
+ const onChainPayload = {
571
+ budget: budgetPayload,
572
+ action: actionPayload,
573
+ validator: validatorPayload,
574
+ allowList: allowListPayload,
575
+ incentives: incentivesPayloads,
576
+ protocolFee: payload.protocolFee || 0n,
577
+ maxParticipants: payload.maxParticipants || 0n,
578
+ owner: payload.owner,
579
+ };
580
+
581
+ return onChainPayload;
582
+ }
583
+
584
+ /**
585
+ * Claims one incentive from a given `Boost` by `boostId` and `incentiveId`
586
+ *
587
+ * @public
588
+ * @async
589
+ * @param {bigint} boostId
590
+ * @param {bigint} incentiveId
591
+ * @param {Address} address
592
+ * @param {Hex} data
593
+ * @param {?WriteParams} [params]
594
+ * @returns {Promise<void>}
595
+ */
596
+ public async claimIncentive(
597
+ boostId: bigint,
598
+ incentiveId: bigint,
599
+ address: Address,
600
+ data: Hex,
601
+ params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>,
602
+ ) {
603
+ return await this.awaitResult(
604
+ this.claimIncentiveRaw(boostId, incentiveId, address, data, params),
605
+ );
606
+ }
607
+
608
+ /**
609
+ * Claim an incentive for a Boost
610
+ *
611
+ * @public
612
+ * @async
613
+ * @param {bigint} boostId - The ID of the Boost
614
+ * @param {bigint} incentiveId - The ID of the Incentive
615
+ * @param {Address} referrer - The address of the referrer (if any)
616
+ * @param {Hex} data- The data for the claim
617
+ * @param {?WriteParams} [params]
618
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
619
+ */
620
+ public async claimIncentiveRaw(
621
+ boostId: bigint,
622
+ incentiveId: bigint,
623
+ referrer: Address,
624
+ data: Hex,
625
+ params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>,
626
+ ) {
627
+ const { request, result } = await simulateBoostCoreClaimIncentive(
628
+ this._config,
629
+ {
630
+ ...assertValidAddressByChainId(
631
+ this._config,
632
+ this.addresses,
633
+ params?.chain?.id || params?.chainId,
634
+ ),
635
+ args: [boostId, incentiveId, referrer, data],
636
+ ...this.optionallyAttachAccount(),
637
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
638
+ ...(params as any),
639
+ },
640
+ );
641
+ const hash = await writeBoostCoreClaimIncentive(this._config, request);
642
+ return { hash, result };
643
+ }
644
+
645
+ /**
646
+ * Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`
647
+ *
648
+ * @public
649
+ * @async
650
+ * @param {bigint} boostId
651
+ * @param {bigint} incentiveId
652
+ * @param {Address} referrer
653
+ * @param {Hex} data
654
+ * @param {Address} claimant
655
+ * @param {?WriteParams} [params]
656
+ * @returns {Promise<void>}
657
+ */
658
+ public async claimIncentiveFor(
659
+ boostId: bigint,
660
+ incentiveId: bigint,
661
+ referrer: Address,
662
+ data: Hex,
663
+ claimant: Address,
664
+ params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>,
665
+ ) {
666
+ return await this.awaitResult(
667
+ this.claimIncentiveForRaw(
668
+ boostId,
669
+ incentiveId,
670
+ referrer,
671
+ data,
672
+ claimant,
673
+ params,
674
+ ),
675
+ );
676
+ }
677
+
678
+ /**
679
+ * Claim an incentive for a Boost on behalf of another user
680
+ *
681
+ * @public
682
+ * @async
683
+ * @param {bigint} boostId - The ID of the Boost
684
+ * @param {bigint} incentiveId - The ID of the Incentive
685
+ * @param {Address} referrer - The address of the referrer (if any)
686
+ * @param {Hex} data - The data for the claim
687
+ * @param {Address} claimant - The address of the user eligible for the incentive payout
688
+ * @param {?WriteParams} [params]
689
+ * @returns {Promise<{ hash: Hex; result: void; }>}
690
+ */
691
+ public async claimIncentiveForRaw(
692
+ boostId: bigint,
693
+ incentiveId: bigint,
694
+ referrer: Address,
695
+ data: Hex,
696
+ claimant: Address,
697
+ params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>,
698
+ ) {
699
+ const { request, result } = await simulateBoostCoreClaimIncentiveFor(
700
+ this._config,
701
+ {
702
+ ...assertValidAddressByChainId(
703
+ this._config,
704
+ this.addresses,
705
+ params?.chain?.id || params?.chainId,
706
+ ),
707
+ args: [boostId, incentiveId, referrer, data, claimant],
708
+ ...this.optionallyAttachAccount(),
709
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
710
+ ...(params as any),
711
+ },
712
+ );
713
+ const hash = await writeBoostCoreClaimIncentiveFor(this._config, request);
714
+ return { hash, result };
715
+ }
716
+
717
+ /**
718
+ * Get a Boost by index, will return the raw on chain representation of a Boost.
719
+ *
720
+ * @public
721
+ * @async
722
+ * @param {bigint | string} id
723
+ * @param {?ReadParams} [params]
724
+ * @returns {Promise<RawBoost>}
725
+ * @throws {@link BoostNotFoundError}
726
+ */
727
+ public async readBoost(
728
+ _id: string | bigint,
729
+ params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,
730
+ ): Promise<RawBoost> {
731
+ try {
732
+ let id: bigint;
733
+ if (typeof _id === 'string') {
734
+ id = BigInt(_id);
735
+ } else id = _id;
736
+ return await readBoostCoreGetBoost(this._config, {
737
+ ...assertValidAddressByChainId(
738
+ this._config,
739
+ this.addresses,
740
+ params?.chainId,
741
+ ),
742
+ args: [id],
743
+ ...this.optionallyAttachAccount(),
744
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
745
+ ...(params as any),
746
+ });
747
+ // biome-ignore lint/suspicious/noExplicitAny: unknown error
748
+ } catch (e: any) {
749
+ if (e?.message?.includes('bounds'))
750
+ throw new BoostNotFoundError(String(_id));
751
+ throw e;
752
+ }
753
+ }
754
+
755
+ /**
756
+ * Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`
757
+ *
758
+ * @public
759
+ * @async
760
+ * @param {(string | bigint)} _id
761
+ * @param {?ReadParams} [params]
762
+ * @returns {Promise<Boost>}
763
+ * @throws {@link BoostNotFoundError}
764
+ */
765
+ public async getBoost(
766
+ _id: string | bigint,
767
+ params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,
768
+ ) {
769
+ let id: bigint;
770
+ if (typeof _id === 'string') {
771
+ id = BigInt(_id);
772
+ } else id = _id;
773
+ const { protocolFee, maxParticipants, owner, ...boostPayload } =
774
+ await this.readBoost(id, params);
775
+ const options: DeployableOptions = {
776
+ config: this._config,
777
+ account: this._account,
778
+ };
779
+ const [action, budget, validator, allowList, incentives] =
780
+ await Promise.all([
781
+ actionFromAddress(options, boostPayload.action),
782
+ budgetFromAddress(options, boostPayload.budget),
783
+ validatorFromAddress(options, boostPayload.validator),
784
+ allowListFromAddress(options, boostPayload.allowList),
785
+ Promise.all(
786
+ boostPayload.incentives.map((incentiveAddress) =>
787
+ incentiveFromAddress(options, incentiveAddress),
788
+ ),
789
+ ),
790
+ ]);
791
+ return new Boost({
792
+ id,
793
+ action,
794
+ budget,
795
+ validator,
796
+ allowList,
797
+ incentives,
798
+ protocolFee,
799
+ maxParticipants,
800
+ owner,
801
+ });
802
+ }
803
+
804
+ /**
805
+ * Retrieve the total number of deployed Boosts
806
+ *
807
+ * @public
808
+ * @async
809
+ * @param {?ReadParams} [params]
810
+ * @returns {Promise<bigint>}
811
+ */
812
+ public async getBoostCount(
813
+ params?: ReadParams<typeof boostCoreAbi, 'getBoostCount'>,
814
+ ) {
815
+ return await readBoostCoreGetBoostCount(this._config, {
816
+ ...assertValidAddressByChainId(
817
+ this._config,
818
+ this.addresses,
819
+ params?.chainId,
820
+ ),
821
+ args: [],
822
+ ...this.optionallyAttachAccount(),
823
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
824
+ ...(params as any),
825
+ });
826
+ }
827
+
828
+ /**
829
+ * Checks if an address is authorized
830
+ *
831
+ * @public
832
+ * @async
833
+ * @param {Address} address
834
+ * @param {?ReadParams &
835
+ * ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
836
+ * @returns {Promise<boolean>}
837
+ */
838
+ public async isAuthorized(
839
+ address: Address,
840
+ params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &
841
+ ReadParams<typeof iAuthAbi, 'isAuthorized'>,
842
+ ) {
843
+ const auth = await this.createBoostAuth(params);
844
+ return readIAuthIsAuthorized(this._config, {
845
+ address: auth,
846
+ args: [address],
847
+ ...this.optionallyAttachAccount(),
848
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
849
+ ...(params as any),
850
+ });
851
+ }
852
+
853
+ /**
854
+ * Retrieve the address of the current creation auth provider.
855
+ *
856
+ * @public
857
+ * @async
858
+ * @param {?ReadParams} [params]
859
+ * @returns {Promise<Address>}
860
+ */
861
+ public async createBoostAuth(
862
+ params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>,
863
+ ) {
864
+ return await readBoostCoreCreateBoostAuth(this._config, {
865
+ ...assertValidAddressByChainId(
866
+ this._config,
867
+ this.addresses,
868
+ params?.chainId,
869
+ ),
870
+ args: [],
871
+ ...this.optionallyAttachAccount(),
872
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
873
+ ...(params as any),
874
+ });
875
+ }
876
+
877
+ /**
878
+ * Replace the current auth scheme.
879
+ *
880
+ * @public
881
+ * @async
882
+ * @param {Auth} auth
883
+ * @param {?WriteParams} [params]
884
+ * @returns {Promise<void>}
885
+ */
886
+ public async setCreateBoostAuth(
887
+ auth: Auth,
888
+ params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,
889
+ ) {
890
+ return await this.awaitResult(
891
+ this.setCreateBoostAuthRaw(auth.assertValidAddress(), {
892
+ ...params,
893
+ }),
894
+ );
895
+ }
896
+
897
+ /**
898
+ * Set the createBoostAuth address
899
+ *
900
+ * @public
901
+ * @async
902
+ * @param {Address} address
903
+ * @param {?WriteParams} [params]
904
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
905
+ */
906
+ public async setCreateBoostAuthRaw(
907
+ address: Address,
908
+ params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,
909
+ ) {
910
+ const { request, result } = await simulateBoostCoreSetCreateBoostAuth(
911
+ this._config,
912
+ {
913
+ ...assertValidAddressByChainId(
914
+ this._config,
915
+ this.addresses,
916
+ params?.chainId,
917
+ ),
918
+ args: [address],
919
+ ...this.optionallyAttachAccount(),
920
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
921
+ ...(params as any),
922
+ },
923
+ );
924
+ const hash = await writeBoostCoreSetCreateBoostAuth(this._config, request);
925
+ return { hash, result };
926
+ }
927
+
928
+ /**
929
+ * Get the protocol fee.
930
+ *
931
+ * @public
932
+ * @async
933
+ * @param {?ReadParams} [params]
934
+ * @returns {unknown}
935
+ */
936
+ public async protocolFee(
937
+ params?: ReadParams<typeof boostCoreAbi, 'protocolFee'>,
938
+ ) {
939
+ return await readBoostCoreProtocolFee(this._config, {
940
+ ...assertValidAddressByChainId(
941
+ this._config,
942
+ this.addresses,
943
+ params?.chainId,
944
+ ),
945
+ args: [],
946
+ ...this.optionallyAttachAccount(),
947
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
948
+ ...(params as any),
949
+ });
950
+ }
951
+
952
+ /**
953
+ * Get the protocol fee receiver.
954
+ *
955
+ * @public
956
+ * @async
957
+ * @param {?ReadParams} [params]
958
+ * @returns {Promise<Address>}
959
+ */
960
+ public async protocolFeeReceiver(
961
+ params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>,
962
+ ) {
963
+ return await readBoostCoreProtocolFeeReceiver(this._config, {
964
+ ...assertValidAddressByChainId(
965
+ this._config,
966
+ this.addresses,
967
+ params?.chainId,
968
+ ),
969
+ args: [],
970
+ ...this.optionallyAttachAccount(),
971
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
972
+ ...(params as any),
973
+ });
974
+ }
975
+
976
+ /**
977
+ * Set the protocol fee receiver address. This function is only callable by the owner.
978
+ *
979
+ * @public
980
+ * @async
981
+ * @param {Address} address
982
+ * @param {?WriteParams} [params]
983
+ * @returns {Promise<void>}
984
+ */
985
+ public async setProcolFeeReceiver(
986
+ address: Address,
987
+ params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,
988
+ ) {
989
+ return await this.awaitResult(
990
+ this.setProcolFeeReceiverRaw(address, {
991
+ ...params,
992
+ }),
993
+ );
994
+ }
995
+
996
+ /**
997
+ * Set the protocol fee receiver address. This function is only callable by the owner.
998
+ *
999
+ * @public
1000
+ * @async
1001
+ * @param {Address} address
1002
+ * @param {?WriteParams} [params]
1003
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
1004
+ */
1005
+ public async setProcolFeeReceiverRaw(
1006
+ address: Address,
1007
+ params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,
1008
+ ) {
1009
+ const { request, result } = await simulateBoostCoreSetProtocolFeeReceiver(
1010
+ this._config,
1011
+ {
1012
+ ...assertValidAddressByChainId(
1013
+ this._config,
1014
+ this.addresses,
1015
+ params?.chainId,
1016
+ ),
1017
+ args: [address],
1018
+ ...this.optionallyAttachAccount(),
1019
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
1020
+ ...(params as any),
1021
+ },
1022
+ );
1023
+ const hash = await writeBoostCoreSetProtocolFeeReceiver(
1024
+ this._config,
1025
+ request,
1026
+ );
1027
+ return { hash, result };
1028
+ }
1029
+
1030
+ /**
1031
+ * Retrieves the claim information from a transaction receipt.
1032
+ *
1033
+ * @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.
1034
+ * @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.
1035
+ *
1036
+ * @description
1037
+ * This method retrieves the transaction receipt using the provided parameters,
1038
+ * then parses the logs to find the 'BoostClaimed' event.
1039
+ * If found, it returns the arguments of the event, which include the boost ID,
1040
+ * incentive ID, claimer address, and claimed amount.
1041
+ *
1042
+ * @example
1043
+ * ```ts
1044
+ * const claimInfo = await boostCore.getClaimFromTransaction({
1045
+ * hash: '0x...',
1046
+ * chainId: 1
1047
+ * });
1048
+ * if (claimInfo) {
1049
+ * console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);
1050
+ * }
1051
+ * ```
1052
+ */
1053
+ public async getClaimFromTransaction(
1054
+ params: GetTransactionReceiptParameters,
1055
+ ) {
1056
+ const receipt = await getTransactionReceipt(this._config, params);
1057
+ const logs = parseEventLogs({
1058
+ abi: boostCoreAbi,
1059
+ eventName: 'BoostClaimed',
1060
+ logs: receipt.logs,
1061
+ });
1062
+ return logs.at(0)?.args;
1063
+ }
1064
+
1065
+ /**
1066
+ * Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
1067
+ *
1068
+ * @example
1069
+ * ```ts
1070
+ * const auth = core.PassthroughAuth('0x') // is roughly equivalent to
1071
+ * const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')
1072
+ * ```
1073
+ * @param {Address} address
1074
+ * @returns {PassthroughAuth}
1075
+ */
1076
+ PassthroughAuth(address?: Address) {
1077
+ return new PassthroughAuth(
1078
+ { config: this._config, account: this._account },
1079
+ address,
1080
+ );
1081
+ }
1082
+
1083
+ // /**
1084
+ // * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.
1085
+ // *
1086
+ // * @example
1087
+ // * ```ts
1088
+ // * const action = core.ContractAction('0x') // is roughly equivalent to
1089
+ // * const action = new ContractAction({ config: core._config, account: core._account }, '0x')
1090
+ // * ```
1091
+ // * @param {DeployablePayloadOrAddress<ContractActionPayload>} options
1092
+ // * @param {?boolean} [isBase]
1093
+ // * @returns {ContractAction}
1094
+ // */
1095
+ // ContractAction(
1096
+ // options: DeployablePayloadOrAddress<ContractActionPayload>,
1097
+ // isBase?: boolean,
1098
+ // ) {
1099
+ // return new ContractAction(
1100
+ // { config: this._config, account: this._account },
1101
+ // options,
1102
+ // isBase,
1103
+ // );
1104
+ // }
1105
+
1106
+ /**
1107
+ * Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.
1108
+ *
1109
+ * @example
1110
+ * ```ts
1111
+ * const action = core.EventAction('0x') // is roughly equivalent to
1112
+ * const action = new EventAction({ config: core._config, account: core._account }, '0x')
1113
+ */
1114
+ EventAction(
1115
+ options: DeployablePayloadOrAddress<EventActionPayload>,
1116
+ isBase?: boolean,
1117
+ ) {
1118
+ return new EventAction(
1119
+ { config: this._config, account: this._account },
1120
+ options,
1121
+ isBase,
1122
+ );
1123
+ }
1124
+ // /**
1125
+ // * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.
1126
+ // *
1127
+ // * @example
1128
+ // * ```ts
1129
+ // * const action = core.ERC721MintAction('0x') // is roughly equivalent to
1130
+ // * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')
1131
+ // * ```
1132
+ // * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options
1133
+ // * @param {?boolean} [isBase]
1134
+ // * @returns {ERC721MintAction}
1135
+ // */
1136
+ // ERC721MintAction(
1137
+ // options: DeployablePayloadOrAddress<ERC721MintActionPayload>,
1138
+ // isBase?: boolean,
1139
+ // ) {
1140
+ // return new ERC721MintAction(
1141
+ // { config: this._config, account: this._account },
1142
+ // options,
1143
+ // isBase,
1144
+ // );
1145
+ // }
1146
+ /**
1147
+ * Bound {@link OpenAllowList} constructor that reuses the same configuration as the Boost Core instance.
1148
+ *
1149
+ * @example
1150
+ * ```ts
1151
+ * const list = core.OpenAllowList('0x') // is roughly equivalent to
1152
+ * const list = new OpenAllowList({ config: core._config, account: core._account }, '0x')
1153
+ * ```
1154
+ * @param {?boolean} [isBase]
1155
+ * @returns {OpenAllowList}
1156
+ */
1157
+ OpenAllowList(isBase?: boolean) {
1158
+ return new OpenAllowList(
1159
+ { config: this._config, account: this._account },
1160
+ undefined,
1161
+ isBase,
1162
+ );
1163
+ }
1164
+ /**
1165
+ * Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.
1166
+ *
1167
+ * @example
1168
+ * ```ts
1169
+ * const list = core.SimpleAllowList('0x') // is roughly equivalent to
1170
+ * const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')
1171
+ * ```
1172
+ * @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options
1173
+ * @param {?boolean} [isBase]
1174
+ * @returns {SimpleAllowList}
1175
+ */
1176
+ SimpleAllowList(
1177
+ options: DeployablePayloadOrAddress<SimpleAllowListPayload>,
1178
+ isBase?: boolean,
1179
+ ) {
1180
+ return new SimpleAllowList(
1181
+ { config: this._config, account: this._account },
1182
+ options,
1183
+ isBase,
1184
+ );
1185
+ }
1186
+ /**
1187
+ * Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.
1188
+ *
1189
+ * @example
1190
+ * ```ts
1191
+ * const list = core.SimpleDenyList('0x') // is roughly equivalent to
1192
+ * const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')
1193
+ * ```
1194
+ * @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options
1195
+ * @param {?boolean} [isBase]
1196
+ * @returns {SimpleDenyList}
1197
+ */
1198
+ SimpleDenyList(
1199
+ options: DeployablePayloadOrAddress<SimpleDenyListPayload>,
1200
+ isBase?: boolean,
1201
+ ) {
1202
+ return new SimpleDenyList(
1203
+ { config: this._config, account: this._account },
1204
+ options,
1205
+ isBase,
1206
+ );
1207
+ }
1208
+ // /**
1209
+ // * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.
1210
+ // *
1211
+ // * @example
1212
+ // * ```ts
1213
+ // * const budget = core.SimpleBudget('0x') // is roughly equivalent to
1214
+ // * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')
1215
+ // * ```
1216
+ // * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options
1217
+ // * @returns {SimpleBudget}
1218
+ // */
1219
+ // SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {
1220
+ // return new SimpleBudget(
1221
+ // { config: this._config, account: this._account },
1222
+ // options,
1223
+ // );
1224
+ // }
1225
+ /**
1226
+ * Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.
1227
+ *
1228
+ * @example
1229
+ * ```ts
1230
+ * const budget = core.ManagedBudget('0x') // is roughly equivalent to
1231
+ * const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')
1232
+ * ```
1233
+ * @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options
1234
+ * @returns {ManagedBudget}
1235
+ */
1236
+ ManagedBudget(options: DeployablePayloadOrAddress<ManagedBudgetPayload>) {
1237
+ return new ManagedBudget(
1238
+ { config: this._config, account: this._account },
1239
+ options,
1240
+ );
1241
+ }
1242
+ // /**
1243
+ // * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.
1244
+ // *
1245
+ // * @example
1246
+ // * ```ts
1247
+ // * const budget = core.VestingBudget('0x') // is roughly equivalent to
1248
+ // * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')
1249
+ // * ```
1250
+ // * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
1251
+ // * @returns {VestingBudget}
1252
+ // */
1253
+ // VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {
1254
+ // return new VestingBudget(
1255
+ // { config: this._config, account: this._account },
1256
+ // options,
1257
+ // );
1258
+ // }
1259
+ /**
1260
+ * Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.
1261
+ *
1262
+ * @example
1263
+ * ```ts
1264
+ * const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to
1265
+ * const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })
1266
+ * ```
1267
+ * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
1268
+ * @returns {VestingBudget}
1269
+ */
1270
+ AllowListIncentive(options: AllowListIncentivePayload) {
1271
+ return new AllowListIncentive(
1272
+ { config: this._config, account: this._account },
1273
+ options,
1274
+ );
1275
+ }
1276
+ /**
1277
+ * Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.
1278
+ *
1279
+ * @example
1280
+ * ```ts
1281
+ * const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to
1282
+ * const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })
1283
+ * ```
1284
+ * @param {CGDAIncentivePayload} options
1285
+ * @returns {CGDAIncentive}
1286
+ */
1287
+ CGDAIncentive(options: CGDAIncentivePayload) {
1288
+ return new CGDAIncentive(
1289
+ { config: this._config, account: this._account },
1290
+ options,
1291
+ );
1292
+ }
1293
+ /**
1294
+ * Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.
1295
+ *
1296
+ * @example
1297
+ * ```ts
1298
+ * const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to
1299
+ * const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })
1300
+ * ```
1301
+ * @param {ERC20IncentivePayload} options
1302
+ * @returns {ERC20Incentive}
1303
+ */
1304
+ ERC20Incentive(options: ERC20IncentivePayload) {
1305
+ return new ERC20Incentive(
1306
+ { config: this._config, account: this._account },
1307
+ options,
1308
+ );
1309
+ }
1310
+ // /**
1311
+ // * Temporarily disabled until low level ABI encoding bugs are resolved
1312
+ // * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.
1313
+ // *
1314
+ // * @experimental
1315
+ // * @example
1316
+ // * ```ts
1317
+ // * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to
1318
+ // * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })
1319
+ // * ```
1320
+ // * @param {ERC1155IncentivePayload} options
1321
+ // * @returns {ERC1155Incentive}
1322
+ // */
1323
+ // ERC1155Incentive(options: ERC1155IncentivePayload) {
1324
+ // return new ERC1155Incentive(
1325
+ // { config: this._config, account: this._account },
1326
+ // options,
1327
+ // );
1328
+ // }
1329
+ /**
1330
+ * Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.
1331
+ *
1332
+ * @example
1333
+ * ```ts
1334
+ * const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to
1335
+ * const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })
1336
+ * ```
1337
+ * @param {PointsIncentivePayload} options
1338
+ * @returns {PointsIncentive}
1339
+ */
1340
+ PointsIncentive(options: PointsIncentivePayload) {
1341
+ return new PointsIncentive(
1342
+ { config: this._config, account: this._account },
1343
+ options,
1344
+ );
1345
+ }
1346
+ /**
1347
+ * Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.
1348
+ *
1349
+ * @example
1350
+ * ```ts
1351
+ * const validator = core.SignerValidator({ ... }) // is roughly equivalent to
1352
+ * const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })
1353
+ * ```
1354
+ * @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options
1355
+ * @param {?boolean} [isBase]
1356
+ * @returns {SignerValidator}
1357
+ */
1358
+ SignerValidator(
1359
+ options: DeployablePayloadOrAddress<SignerValidatorPayload>,
1360
+ isBase?: boolean,
1361
+ ) {
1362
+ return new SignerValidator(
1363
+ { config: this._config, account: this._account },
1364
+ options,
1365
+ isBase,
1366
+ );
1367
+ }
1368
+
1369
+ /**
1370
+ * Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.
1371
+ *
1372
+ * @example
1373
+ * ```ts
1374
+ * const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to
1375
+ * const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })
1376
+ * ```
1377
+ * @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options
1378
+ * @param {?boolean} [isBase]
1379
+ * @returns {ERC20VariableCrtieriaIncentive}
1380
+ * */
1381
+ ERC20VariableCriteriaIncentive(
1382
+ options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>,
1383
+ isBase?: boolean,
1384
+ ) {
1385
+ return new ERC20VariableCriteriaIncentive(
1386
+ { config: this._config, account: this._account },
1387
+ options,
1388
+ isBase,
1389
+ );
1390
+ }
1391
+
1392
+ /**
1393
+ * Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
1394
+ *
1395
+ * @example
1396
+ * ```ts
1397
+ * const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to
1398
+ * const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })
1399
+ * ```
1400
+ * @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options
1401
+ * @param {?boolean} [isBase]
1402
+ * @returns {ERC20VariableIncentive}
1403
+ */
1404
+ ERC20VariableIncentive(
1405
+ options: DeployablePayloadOrAddress<ERC20VariableIncentivePayload>,
1406
+ isBase?: boolean,
1407
+ ) {
1408
+ return new ERC20VariableIncentive(
1409
+ { config: this._config, account: this._account },
1410
+ options,
1411
+ isBase,
1412
+ );
1413
+ }
1414
+
1415
+ /**
1416
+ * @inheritdoc
1417
+ *
1418
+ * @public
1419
+ * @param {?[Address, Address]} [_payload]
1420
+ * @param {?DeployableOptions} [_options]
1421
+ * @returns {GenericDeployableParams}
1422
+ */
1423
+ public override buildParameters(
1424
+ _payload?: [Address, Address],
1425
+ _options?: DeployableOptions,
1426
+ ): GenericDeployableParams {
1427
+ const [payload, options] = this.validateDeploymentConfig(
1428
+ _payload,
1429
+ _options,
1430
+ );
1431
+ return {
1432
+ abi: boostCoreAbi,
1433
+ bytecode: bytecode as Hex,
1434
+ args: payload,
1435
+ ...this.optionallyAttachAccount(options.account),
1436
+ };
1437
+ }
1438
+ }