@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9

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 (191) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +46 -3
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +37 -10
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +257 -11
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +249 -82
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.d.ts +2 -2
  15. package/dist/AllowLists/AllowList.js +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  17. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  18. package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
  19. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  20. package/dist/AllowLists/SimpleAllowList.js +52 -37
  21. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  22. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  23. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleDenyList.js +41 -129
  27. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  28. package/dist/Auth/PassthroughAuth.cjs +1 -1
  29. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  30. package/dist/Auth/PassthroughAuth.js +4 -4
  31. package/dist/Auth/PassthroughAuth.js.map +1 -1
  32. package/dist/Boost.cjs +1 -1
  33. package/dist/Boost.cjs.map +1 -1
  34. package/dist/Boost.d.ts +93 -1
  35. package/dist/Boost.d.ts.map +1 -1
  36. package/dist/Boost.js +151 -5
  37. package/dist/Boost.js.map +1 -1
  38. package/dist/BoostCore.cjs +2 -2
  39. package/dist/BoostCore.cjs.map +1 -1
  40. package/dist/BoostCore.d.ts +45 -7
  41. package/dist/BoostCore.d.ts.map +1 -1
  42. package/dist/BoostCore.js +352 -305
  43. package/dist/BoostCore.js.map +1 -1
  44. package/dist/BoostRegistry.cjs +1 -1
  45. package/dist/BoostRegistry.cjs.map +1 -1
  46. package/dist/BoostRegistry.d.ts +18 -4
  47. package/dist/BoostRegistry.d.ts.map +1 -1
  48. package/dist/BoostRegistry.js +36 -25
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.js +1 -1
  52. package/dist/Budgets/ManagedBudget.cjs +1 -1
  53. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  54. package/dist/Budgets/ManagedBudget.d.ts +40 -2
  55. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  56. package/dist/Budgets/ManagedBudget.js +53 -36
  57. package/dist/Budgets/ManagedBudget.js.map +1 -1
  58. package/dist/Budgets/SimpleBudget.d.ts +33 -2
  59. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  60. package/dist/Budgets/VestingBudget.d.ts +54 -2
  61. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  62. package/dist/Deployable/Contract.cjs +1 -1
  63. package/dist/Deployable/Contract.cjs.map +1 -1
  64. package/dist/Deployable/Contract.js +1 -1
  65. package/dist/Deployable/Contract.js.map +1 -1
  66. package/dist/Deployable/Deployable.cjs.map +1 -1
  67. package/dist/Deployable/Deployable.d.ts +8 -2
  68. package/dist/Deployable/Deployable.d.ts.map +1 -1
  69. package/dist/Deployable/Deployable.js +6 -0
  70. package/dist/Deployable/Deployable.js.map +1 -1
  71. package/dist/Deployable/DeployableTarget.cjs +1 -1
  72. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  73. package/dist/Deployable/DeployableTarget.d.ts +4 -3
  74. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  75. package/dist/Deployable/DeployableTarget.js +31 -28
  76. package/dist/Deployable/DeployableTarget.js.map +1 -1
  77. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  78. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  79. package/dist/Incentives/AllowListIncentive.d.ts +35 -5
  80. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  81. package/dist/Incentives/AllowListIncentive.js +33 -21
  82. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  83. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  84. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  85. package/dist/Incentives/CGDAIncentive.d.ts +89 -5
  86. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/CGDAIncentive.js +44 -23
  88. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
  90. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  91. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  92. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  93. package/dist/Incentives/ERC20Incentive.d.ts +49 -5
  94. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/ERC20Incentive.js +46 -27
  96. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
  98. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.cjs.map +1 -1
  101. package/dist/Incentives/Incentive.js +48 -32
  102. package/dist/Incentives/Incentive.js.map +1 -1
  103. package/dist/Incentives/PointsIncentive.cjs +1 -1
  104. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  105. package/dist/Incentives/PointsIncentive.d.ts +49 -5
  106. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  107. package/dist/Incentives/PointsIncentive.js +38 -21
  108. package/dist/Incentives/PointsIncentive.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.d.ts +298 -5
  112. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  113. package/dist/Validators/SignerValidator.js +151 -26
  114. package/dist/Validators/SignerValidator.js.map +1 -1
  115. package/dist/Validators/Validator.cjs +1 -1
  116. package/dist/Validators/Validator.js +1 -1
  117. package/dist/claiming.cjs +2 -0
  118. package/dist/claiming.cjs.map +1 -0
  119. package/dist/claiming.d.ts +43 -0
  120. package/dist/claiming.d.ts.map +1 -0
  121. package/dist/claiming.js +17 -0
  122. package/dist/claiming.js.map +1 -0
  123. package/dist/errors.cjs +1 -1
  124. package/dist/errors.cjs.map +1 -1
  125. package/dist/errors.d.ts +15 -1
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +30 -21
  128. package/dist/errors.js.map +1 -1
  129. package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
  130. package/dist/generated-57_Kffpz.js.map +1 -0
  131. package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
  132. package/dist/generated-wKBNvm48.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +4 -4
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +108 -124
  137. package/dist/transfers.cjs +2 -0
  138. package/dist/transfers.cjs.map +1 -0
  139. package/dist/transfers.d.ts +198 -0
  140. package/dist/transfers.d.ts.map +1 -0
  141. package/dist/transfers.js +84 -0
  142. package/dist/transfers.js.map +1 -0
  143. package/dist/utils.cjs +1 -1
  144. package/dist/utils.cjs.map +1 -1
  145. package/dist/utils.d.ts +2 -1371
  146. package/dist/utils.d.ts.map +1 -1
  147. package/dist/utils.js +26 -653
  148. package/dist/utils.js.map +1 -1
  149. package/package.json +17 -3
  150. package/src/Actions/Action.test.ts +5 -4
  151. package/src/Actions/ContractAction.test.ts +4 -6
  152. package/src/Actions/ContractAction.ts +73 -10
  153. package/src/Actions/ERC721MintAction.test.ts +2 -2
  154. package/src/Actions/ERC721MintAction.ts +70 -16
  155. package/src/Actions/EventAction.test.ts +43 -17
  156. package/src/Actions/EventAction.ts +451 -26
  157. package/src/AllowLists/SimpleAllowList.ts +51 -7
  158. package/src/AllowLists/SimpleDenyList.ts +47 -109
  159. package/src/Auth/PassthroughAuth.ts +1 -1
  160. package/src/Boost.ts +136 -1
  161. package/src/BoostCore.test.ts +4 -11
  162. package/src/BoostCore.ts +114 -45
  163. package/src/BoostRegistry.ts +39 -21
  164. package/src/Budgets/ManagedBudget.ts +69 -16
  165. package/src/Budgets/SimpleBudget.ts +57 -14
  166. package/src/Budgets/VestingBudget.ts +79 -9
  167. package/src/Deployable/Contract.ts +1 -1
  168. package/src/Deployable/Deployable.ts +8 -2
  169. package/src/Deployable/DeployableTarget.ts +19 -6
  170. package/src/Incentives/AllowListIncentive.test.ts +2 -5
  171. package/src/Incentives/AllowListIncentive.ts +59 -15
  172. package/src/Incentives/CGDAIncentive.test.ts +3 -7
  173. package/src/Incentives/CGDAIncentive.ts +123 -19
  174. package/src/Incentives/ERC1155Incentive.test.ts +2 -13
  175. package/src/Incentives/ERC1155Incentive.ts +104 -22
  176. package/src/Incentives/ERC20Incentive.test.ts +6 -17
  177. package/src/Incentives/ERC20Incentive.ts +86 -21
  178. package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
  179. package/src/Incentives/ERC20VariableIncentive.ts +71 -19
  180. package/src/Incentives/Incentive.test.ts +1 -1
  181. package/src/Incentives/PointsIncentive.test.ts +3 -6
  182. package/src/Incentives/PointsIncentive.ts +79 -17
  183. package/src/Validators/SignerValidator.test.ts +3 -7
  184. package/src/Validators/SignerValidator.ts +422 -13
  185. package/src/claiming.ts +56 -0
  186. package/src/errors.ts +19 -1
  187. package/src/index.ts +10 -7
  188. package/src/transfers.ts +284 -0
  189. package/src/utils.ts +3 -2052
  190. package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
  191. package/dist/generated-DGpIVcv5.js.map +0 -1
@@ -10,6 +10,7 @@ import {
10
10
  type Address,
11
11
  type ContractEventName,
12
12
  type Hex,
13
+ encodeAbiParameters,
13
14
  zeroAddress,
14
15
  zeroHash,
15
16
  } from 'viem';
@@ -23,13 +24,32 @@ import {
23
24
  type GenericLog,
24
25
  type ReadParams,
25
26
  RegistryType,
26
- type SimpleDenyListPayload,
27
27
  type WriteParams,
28
- prepareSimpleDenyListPayload,
29
28
  } from '../utils';
30
29
 
31
30
  export { simpleDenyListAbi };
32
- export type { SimpleDenyListPayload };
31
+
32
+ /**
33
+ * Object representation of a {@link SimpleDenyList} initialization payload.
34
+ *
35
+ * @export
36
+ * @interface SimpleDenyListPayload
37
+ * @typedef {SimpleDenyListPayload}
38
+ */
39
+ export interface SimpleDenyListPayload {
40
+ /**
41
+ * The allow list's owner
42
+ *
43
+ * @type {Address}
44
+ */
45
+ owner: Address;
46
+ /**
47
+ * List of denied addresses.
48
+ *
49
+ * @type {Address[]}
50
+ */
51
+ denied: Address[];
52
+ }
33
53
 
34
54
  /**
35
55
  * A generic `viem.Log` event with support for `SimpleDenyList` event types.
@@ -114,7 +134,9 @@ export class SimpleDenyList extends DeployableTarget<
114
134
  allowed: boolean[],
115
135
  params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,
116
136
  ) {
117
- return this.awaitResult(this.setDeniedRaw(addresses, allowed, params));
137
+ return await this.awaitResult(
138
+ this.setDeniedRaw(addresses, allowed, params),
139
+ );
118
140
  }
119
141
 
120
142
  /**
@@ -146,111 +168,6 @@ export class SimpleDenyList extends DeployableTarget<
146
168
  return { hash, result };
147
169
  }
148
170
 
149
- // /**
150
- // * A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].
151
- // * Accepts `eventName` and `eventNames` as optional parameters to narrow the returned log types.
152
- // * @example
153
- // * ```ts
154
- // * const logs = contract.getLogs({ eventName: 'EventName' })
155
- // * const logs = contract.getLogs({ eventNames: ['EventName'] })
156
- // * ```
157
- // * @public
158
- // * @async
159
- // * @template {ContractEventName<typeof simpleDenyListAbi>} event
160
- // * @template {ExtractAbiEvent<
161
- // * typeof simpleDenyListAbi,
162
- // * event
163
- // * >} [abiEvent=ExtractAbiEvent<typeof simpleDenyListAbi, event>]
164
- // * @param {?Omit<
165
- // * GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
166
- // * 'event' | 'events'
167
- // * > & {
168
- // * eventName?: event;
169
- // * eventNames?: event[];
170
- // * }} [params]
171
- // * @returns {Promise<GetLogsReturnType<abiEvent, abiEvent[]>>}
172
- // */
173
- // public async getLogs<
174
- // event extends ContractEventName<typeof simpleDenyListAbi>,
175
- // const abiEvent extends ExtractAbiEvent<
176
- // typeof simpleDenyListAbi,
177
- // event
178
- // > = ExtractAbiEvent<typeof simpleDenyListAbi, event>,
179
- // >(
180
- // params?: Omit<
181
- // GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
182
- // 'event' | 'events'
183
- // > & {
184
- // eventName?: event;
185
- // eventNames?: event[];
186
- // },
187
- // ): Promise<GetLogsReturnType<abiEvent, abiEvent[]>> {
188
- // return getLogs(this._config.getClient({ chainId: params?.chainId }), {
189
- // // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wag
190
- // ...(params as any),
191
- // ...(params?.eventName
192
- // ? {
193
- // event: getAbiItem({
194
- // abi: simpleDenyListAbi,
195
- // name: params.eventName,
196
- // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
197
- // } as any),
198
- // }
199
- // : {}),
200
- // ...(params?.eventNames
201
- // ? {
202
- // events: params.eventNames.map((name) =>
203
- // getAbiItem({
204
- // abi: simpleDenyListAbi,
205
- // name,
206
- // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
207
- // } as any),
208
- // ),
209
- // }
210
- // : {}),
211
- // address: this.assertValidAddress(),
212
- // });
213
- // }
214
-
215
- // /**
216
- // * A typed wrapper for `wagmi.watchContractEvent`
217
- // *
218
- // * @public
219
- // * @async
220
- // * @template {ContractEventName<typeof simpleDenyListAbi>} event
221
- // * @param {(log: SimpleDenyListLog<event>) => unknown} cb
222
- // * @param {?WatchParams<typeof simpleDenyListAbi, event> & {
223
- // * eventName?: event;
224
- // * }} [params]
225
- // * @returns {unknown, params?: any) => unknown} Unsubscribe function
226
- // */
227
- // public async subscribe<
228
- // event extends ContractEventName<typeof simpleDenyListAbi>,
229
- // >(
230
- // cb: (log: SimpleDenyListLog<event>) => unknown,
231
- // params?: WatchParams<typeof simpleDenyListAbi, event> & {
232
- // eventName?: event;
233
- // },
234
- // ) {
235
- // return watchContractEvent<
236
- // typeof this._config,
237
- // (typeof this._config)['chains'][number]['id'],
238
- // typeof simpleDenyListAbi,
239
- // event
240
- // >(this._config, {
241
- // // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
242
- // ...(params as any),
243
- // eventName: params?.eventName,
244
- // abi: simpleDenyListAbi,
245
- // address: this.assertValidAddress(),
246
- // onLogs: (logs) => {
247
- // for (let l of logs) {
248
- // cb(l as unknown as SimpleDenyListLog<event>);
249
- // }
250
- // },
251
- // });
252
- // }
253
-
254
171
  /**
255
172
  * @inheritdoc
256
173
  *
@@ -287,3 +204,24 @@ export class SimpleDenyList extends DeployableTarget<
287
204
  };
288
205
  }
289
206
  }
207
+
208
+ /**
209
+ * Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.
210
+ *
211
+ * @param {SimpleDenyListPayload} param0
212
+ * @param {Address} param0.owner - The allow list's owner
213
+ * @param {Address[]} param0.denied - List of denied addresses.
214
+ * @returns {Hex}
215
+ */
216
+ export function prepareSimpleDenyListPayload({
217
+ owner,
218
+ denied,
219
+ }: SimpleDenyListPayload) {
220
+ return encodeAbiParameters(
221
+ [
222
+ { type: 'address', name: 'owner' },
223
+ { type: 'address[]', name: 'denied' },
224
+ ],
225
+ [owner, denied],
226
+ );
227
+ }
@@ -48,7 +48,7 @@ export class PassthroughAuth extends Deployable<
48
48
  address: Address,
49
49
  params?: ReadParams<typeof passthroughAuthAbi, 'isAuthorized'>,
50
50
  ) {
51
- return readPassthroughAuthIsAuthorized(this._config, {
51
+ return await readPassthroughAuthIsAuthorized(this._config, {
52
52
  address: this.assertValidAddress(),
53
53
  args: [address],
54
54
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
package/src/Boost.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { type Address, zeroAddress } from 'viem';
1
+ import { LibZip } from 'solady';
2
+ import {
3
+ type Address,
4
+ type Hex,
5
+ encodeAbiParameters,
6
+ parseAbiParameters,
7
+ zeroAddress,
8
+ } from 'viem';
2
9
  import type { Action } from './Actions/Action';
3
10
  import type { AllowList } from './AllowLists/AllowList';
4
11
  import type { Budget } from './Budgets/Budget';
@@ -153,3 +160,131 @@ export class Boost {
153
160
  this.owner = config.owner || zeroAddress;
154
161
  }
155
162
  }
163
+
164
+ /**
165
+ * Object representation of `BoostLib.Target` struct. Used for low level Boost creation operations.
166
+ * This is used to pass the base contract and its initialization parameters in an efficient manner
167
+ *
168
+ * @export
169
+ * @typedef {Target}
170
+ */
171
+ export type Target = {
172
+ isBase: boolean;
173
+ instance: Address;
174
+ parameters: Hex;
175
+ };
176
+
177
+ /**
178
+ * Object representation of `BoostCore.InitPayload` struct.
179
+ *
180
+ * @export
181
+ * @interface BoostPayload
182
+ * @typedef {BoostPayload}
183
+ */
184
+ export interface BoostPayload {
185
+ /**
186
+ * Address to valid budget.
187
+ *
188
+ * @type {Address}
189
+ */
190
+ budget: Address;
191
+ /**
192
+ * Target for existing action, or base with initialization payload.
193
+ *
194
+ * @type {Target}
195
+ */
196
+ action: Target;
197
+ /**
198
+ * Target for existing validator, or base with initialization payload.
199
+ *
200
+ * @type {Target}
201
+ */
202
+ validator: Target;
203
+ /**
204
+ * Target for existing allowList, or base with initialization payload.
205
+ *
206
+ * @type {Target}
207
+ */
208
+ allowList: Target;
209
+ /**
210
+ * Targets for new incentives, with initialization payloads.
211
+ *
212
+ * @type {Target[]}
213
+ */
214
+ incentives: Target[];
215
+ /**
216
+ * The base protocol fee (in bps)
217
+ *
218
+ * @type {?bigint}
219
+ */
220
+ protocolFee?: bigint;
221
+ /**
222
+ * The base referral fee (in bps)
223
+ *
224
+ * @type {?bigint}
225
+ */
226
+ referralFee?: bigint;
227
+ /**
228
+ * Optional maximum amount of participants in the Boost.
229
+ *
230
+ * @type {?bigint}
231
+ */
232
+ maxParticipants?: bigint;
233
+ /**
234
+ * The owner of the Boost.
235
+ *
236
+ * @type {Address}
237
+ */
238
+ owner: Address;
239
+ }
240
+
241
+ /**
242
+ * Given a valid {@link BoostPayload}, properly encode and compress the payload for use with `createBoost`
243
+ *
244
+ * @export
245
+ * @param {BoostPayload} param0
246
+ * @param {Address} param0.budget - Address to valid budget.
247
+ * @param {Target} param0.action - Target for existing action, or base with initialization payload.
248
+ * @param {Target} param0.validator - Target for existing validator, or base with initialization payload.
249
+ * @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.
250
+ * @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.
251
+ * @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)
252
+ * @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)
253
+ * @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.
254
+ * @param {Address} param0.owner - The owner of the Boost.
255
+ * @returns {Hex}
256
+ */
257
+ export function prepareBoostPayload({
258
+ budget,
259
+ action,
260
+ validator,
261
+ allowList,
262
+ incentives,
263
+ protocolFee = 0n,
264
+ referralFee = 0n,
265
+ maxParticipants = 0n,
266
+ owner,
267
+ }: BoostPayload): Hex {
268
+ return LibZip.cdCompress(
269
+ encodeAbiParameters(
270
+ parseAbiParameters([
271
+ 'BoostPayload payload',
272
+ 'struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint64 referralFee; uint256 maxParticipants; address owner; }',
273
+ 'struct Target { bool isBase; address instance; bytes parameters; }',
274
+ ]),
275
+ [
276
+ {
277
+ budget,
278
+ action,
279
+ validator,
280
+ allowList,
281
+ incentives,
282
+ protocolFee,
283
+ referralFee,
284
+ maxParticipants,
285
+ owner,
286
+ },
287
+ ],
288
+ ),
289
+ ) as Hex;
290
+ }
@@ -10,19 +10,12 @@ import {
10
10
  makeMockEventActionPayload,
11
11
  } from '../test/helpers';
12
12
  import { ContractAction } from './Actions/ContractAction';
13
- import { PassthroughAuth } from './Auth/PassthroughAuth';
14
13
  import { BoostCore } from './BoostCore';
15
14
  import type { ERC20Incentive } from './Incentives/ERC20Incentive';
15
+ import { ERC1155StrategyType } from './Incentives/ERC1155Incentive';
16
+ import { StrategyType } from './claiming';
16
17
  import { IncentiveNotCloneableError } from './errors';
17
- import {
18
- ActionStep,
19
- ERC1155StrategyType,
20
- FilterType,
21
- PrimitiveType,
22
- SignatureType,
23
- StrategyType,
24
- bytes4,
25
- } from './utils';
18
+ import { bytes4 } from './utils';
26
19
 
27
20
  let fixtures: Fixtures, budgets: BudgetFixtures;
28
21
 
@@ -683,7 +676,7 @@ describe('BoostCore', () => {
683
676
  expect(await client.claimFee()).toBe(100n);
684
677
  });
685
678
 
686
- test('binds all actions, budgets, allowlists, incentives, and validators to reuse core options and account', async () => {
679
+ test('binds all actions, budgets, allowlists, incentives, and validators to reuse core options and account', () => {
687
680
  const { core } = fixtures;
688
681
 
689
682
  // const contractAction = core.ContractAction(zeroAddress);