@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.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +13 -13
- package/dist/Actions/ContractAction.d.ts +9 -9
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +12 -12
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +32 -49
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +13 -962
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +5 -5
- package/dist/AllowLists/SimpleAllowList.js +24 -24
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +6 -6
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +18 -0
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs +3 -0
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
- package/dist/BoostCore-C00iqvks.js +1477 -0
- package/dist/BoostCore-C00iqvks.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +80 -35
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1273
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +18 -18
- package/dist/BoostRegistry.js +28 -28
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +18 -18
- package/dist/Budgets/ManagedBudget.js +48 -48
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +23 -23
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +4 -5
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.js +1 -1
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +5 -5
- package/dist/Deployable/DeployableTarget.js +10 -10
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +15 -15
- package/dist/Deployable/DeployableTargetWithRBAC.js +32 -32
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/EventAction-BO5WI_5s.js +1355 -0
- package/dist/EventAction-BO5WI_5s.js.map +1 -0
- package/dist/EventAction-DBDRaG4A.cjs +2 -0
- package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
- package/dist/{Incentive-DJf-vdyL.js → Incentive-CF7kaz_9.js} +61 -62
- package/dist/Incentive-CF7kaz_9.js.map +1 -0
- package/dist/{Incentive-DNwROd1r.cjs → Incentive-Djnzseoj.cjs} +2 -2
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +12 -12
- package/dist/Incentives/AllowListIncentive.js +19 -19
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +15 -15
- package/dist/Incentives/CGDAIncentive.js +18 -18
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +23 -23
- package/dist/Incentives/ERC20Incentive.js +25 -25
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +14 -14
- package/dist/Incentives/PointsIncentive.js +21 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-DMlUkmAn.cjs → SimpleDenyList-BwfNjRsg.cjs} +2 -2
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/{SimpleDenyList-DvUvmOeE.js → SimpleDenyList-D9i4rw_F.js} +9 -9
- package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +14 -14
- package/dist/Validators/SignerValidator.js +19 -19
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
- package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
- package/dist/componentInterfaces-RXBMI5yH.js +14 -0
- package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
- package/dist/deployments-BM42vImE.js +43 -0
- package/dist/deployments-BM42vImE.js.map +1 -0
- package/dist/deployments-CMdF5uEC.cjs +2 -0
- package/dist/deployments-CMdF5uEC.cjs.map +1 -0
- package/dist/deployments.json +15 -12
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +132 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +122 -36
- package/dist/errors.js.map +1 -1
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-C_7Jx3YG.js → generated-B8VWObPa.js} +631 -343
- package/dist/generated-B8VWObPa.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +133 -125
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +45 -54
- package/src/Actions/EventAction.ts +100 -100
- package/src/AllowLists/SimpleAllowList.ts +5 -5
- package/src/AllowLists/SimpleDenyList.ts +6 -6
- package/src/Boost.ts +19 -0
- package/src/BoostCore.test.ts +117 -1
- package/src/BoostCore.ts +113 -54
- package/src/BoostRegistry.ts +18 -18
- package/src/Budgets/ManagedBudget.ts +18 -18
- package/src/Budgets/VestingBudget.ts +23 -23
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +5 -5
- package/src/Deployable/DeployableTargetWithRBAC.ts +15 -15
- package/src/Incentives/AllowListIncentive.ts +12 -12
- package/src/Incentives/CGDAIncentive.ts +15 -15
- package/src/Incentives/ERC1155Incentive.ts +26 -26
- package/src/Incentives/ERC20Incentive.ts +23 -23
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.ts +19 -19
- package/src/Incentives/Incentive.ts +6 -5
- package/src/Incentives/PointsIncentive.test.ts +21 -21
- package/src/Incentives/PointsIncentive.ts +14 -14
- package/src/Validators/SignerValidator.ts +14 -14
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +165 -0
- package/src/index.ts +1 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Incentive-DJf-vdyL.js.map +0 -1
- package/dist/Incentive-DNwROd1r.cjs.map +0 -1
- package/dist/SimpleDenyList-DMlUkmAn.cjs.map +0 -1
- package/dist/SimpleDenyList-DvUvmOeE.js.map +0 -1
- package/dist/componentInterfaces-BPVR_Ykd.js +0 -13
- package/dist/componentInterfaces-BPVR_Ykd.js.map +0 -1
- package/dist/componentInterfaces-BfppSIl4.cjs +0 -2
- package/dist/componentInterfaces-BfppSIl4.cjs.map +0 -1
- package/dist/deployments-BvFcK_eR.js +0 -40
- package/dist/deployments-BvFcK_eR.js.map +0 -1
- package/dist/deployments-Ho4PnGCS.cjs +0 -2
- package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
- package/dist/generated-CMQ6ZC2_.cjs +0 -3
- package/dist/generated-CMQ6ZC2_.cjs.map +0 -1
- package/dist/generated-C_7Jx3YG.js.map +0 -1
package/dist/BoostCore.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { boostCoreAbi, type iAuthAbi } from '@boostxyz/evm';
|
|
2
|
+
import { type GetTransactionReceiptParameters } from '@wagmi/core';
|
|
2
3
|
import { type Address, type ContractEventName, type Hex } from 'viem';
|
|
3
4
|
import { type Action } from './Actions/Action';
|
|
4
5
|
import { EventAction, type EventActionPayload } from './Actions/EventAction';
|
|
@@ -14,6 +15,7 @@ import { Deployable, type DeployableOptions, type DeployablePayloadOrAddress, ty
|
|
|
14
15
|
import { AllowListIncentive, type AllowListIncentivePayload } from './Incentives/AllowListIncentive';
|
|
15
16
|
import { CGDAIncentive, type CGDAIncentivePayload } from './Incentives/CGDAIncentive';
|
|
16
17
|
import { ERC20Incentive, type ERC20IncentivePayload } from './Incentives/ERC20Incentive';
|
|
18
|
+
import { ERC20VariableCriteriaIncentive, type ERC20VariableCriteriaIncentivePayload } from './Incentives/ERC20VariableCriteriaIncentive';
|
|
17
19
|
import type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';
|
|
18
20
|
import { ERC20VariableIncentive, type Incentive } from './Incentives/Incentive';
|
|
19
21
|
import { PointsIncentive, type PointsIncentivePayload } from './Incentives/PointsIncentive';
|
|
@@ -104,7 +106,7 @@ export type BoostCoreConfig = BoostCoreDeployedOptions | BoostCoreOptionsWithPay
|
|
|
104
106
|
export type CreateBoostPayload = {
|
|
105
107
|
budget: Budget;
|
|
106
108
|
action: Action;
|
|
107
|
-
validator
|
|
109
|
+
validator?: Validator;
|
|
108
110
|
allowList: AllowList;
|
|
109
111
|
incentives: Array<Incentive>;
|
|
110
112
|
protocolFee?: bigint;
|
|
@@ -157,7 +159,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
157
159
|
* @async
|
|
158
160
|
* @param {CreateBoostPayload} _boostPayload
|
|
159
161
|
* @param {?DeployableOptions} [_options]
|
|
160
|
-
* @returns {Boost}
|
|
162
|
+
* @returns {Promise<Boost>}
|
|
161
163
|
*/
|
|
162
164
|
createBoost(_boostPayload: CreateBoostPayload, _params?: DeployableOptions & WriteParams<typeof boostCoreAbi, 'createBoost'>): Promise<Boost>;
|
|
163
165
|
/**
|
|
@@ -169,8 +171,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
169
171
|
* @param {bigint} incentiveId
|
|
170
172
|
* @param {Address} address
|
|
171
173
|
* @param {Hex} data
|
|
172
|
-
* @param {?WriteParams
|
|
173
|
-
* @returns {
|
|
174
|
+
* @param {?WriteParams} [params]
|
|
175
|
+
* @returns {Promise<void>}
|
|
174
176
|
*/
|
|
175
177
|
claimIncentive(boostId: bigint, incentiveId: bigint, address: Address, data: Hex, params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>): Promise<void>;
|
|
176
178
|
/**
|
|
@@ -182,8 +184,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
182
184
|
* @param {bigint} incentiveId - The ID of the Incentive
|
|
183
185
|
* @param {Address} referrer - The address of the referrer (if any)
|
|
184
186
|
* @param {Hex} data- The data for the claim
|
|
185
|
-
* @param {?WriteParams
|
|
186
|
-
* @returns {
|
|
187
|
+
* @param {?WriteParams} [params]
|
|
188
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
187
189
|
*/
|
|
188
190
|
claimIncentiveRaw(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>): Promise<{
|
|
189
191
|
hash: `0x${string}`;
|
|
@@ -199,8 +201,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
199
201
|
* @param {Address} referrer
|
|
200
202
|
* @param {Hex} data
|
|
201
203
|
* @param {Address} claimant
|
|
202
|
-
* @param {?WriteParams
|
|
203
|
-
* @returns {
|
|
204
|
+
* @param {?WriteParams} [params]
|
|
205
|
+
* @returns {Promise<void>}
|
|
204
206
|
*/
|
|
205
207
|
claimIncentiveFor(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, claimant: Address, params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>): Promise<void>;
|
|
206
208
|
/**
|
|
@@ -213,8 +215,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
213
215
|
* @param {Address} referrer - The address of the referrer (if any)
|
|
214
216
|
* @param {Hex} data - The data for the claim
|
|
215
217
|
* @param {Address} claimant - The address of the user eligible for the incentive payout
|
|
216
|
-
* @param {?WriteParams
|
|
217
|
-
* @returns {
|
|
218
|
+
* @param {?WriteParams} [params]
|
|
219
|
+
* @returns {Promise<{ hash: Hex; result: void; }>}
|
|
218
220
|
*/
|
|
219
221
|
claimIncentiveForRaw(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, claimant: Address, params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>): Promise<{
|
|
220
222
|
hash: `0x${string}`;
|
|
@@ -226,8 +228,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
226
228
|
* @public
|
|
227
229
|
* @async
|
|
228
230
|
* @param {bigint} id
|
|
229
|
-
* @param {?ReadParams
|
|
230
|
-
* @returns {
|
|
231
|
+
* @param {?ReadParams} [params]
|
|
232
|
+
* @returns {Promise<RawBoost>}
|
|
231
233
|
*/
|
|
232
234
|
readBoost(id: bigint, params?: ReadParams<typeof boostCoreAbi, 'getBoost'>): Promise<{
|
|
233
235
|
action: `0x${string}`;
|
|
@@ -246,8 +248,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
246
248
|
* @public
|
|
247
249
|
* @async
|
|
248
250
|
* @param {(string | bigint)} _id
|
|
249
|
-
* @param {?ReadParams
|
|
250
|
-
* @returns {
|
|
251
|
+
* @param {?ReadParams} [params]
|
|
252
|
+
* @returns {Promise<Boost>}
|
|
251
253
|
*/
|
|
252
254
|
getBoost(_id: string | bigint, params?: ReadParams<typeof boostCoreAbi, 'getBoost'>): Promise<Boost>;
|
|
253
255
|
/**
|
|
@@ -255,7 +257,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
255
257
|
*
|
|
256
258
|
* @public
|
|
257
259
|
* @async
|
|
258
|
-
* @param {?ReadParams
|
|
260
|
+
* @param {?ReadParams} [params]
|
|
259
261
|
* @returns {Promise<bigint>}
|
|
260
262
|
*/
|
|
261
263
|
getBoostCount(params?: ReadParams<typeof boostCoreAbi, 'getBoostCount'>): Promise<bigint>;
|
|
@@ -265,7 +267,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
265
267
|
* @public
|
|
266
268
|
* @async
|
|
267
269
|
* @param {Address} address
|
|
268
|
-
* @param {?ReadParams
|
|
270
|
+
* @param {?ReadParams &
|
|
269
271
|
* ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
|
|
270
272
|
* @returns {Promise<boolean>}
|
|
271
273
|
*/
|
|
@@ -275,8 +277,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
275
277
|
*
|
|
276
278
|
* @public
|
|
277
279
|
* @async
|
|
278
|
-
* @param {?ReadParams
|
|
279
|
-
* @returns {
|
|
280
|
+
* @param {?ReadParams} [params]
|
|
281
|
+
* @returns {Promise<Address>}
|
|
280
282
|
*/
|
|
281
283
|
createBoostAuth(params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>): Promise<`0x${string}`>;
|
|
282
284
|
/**
|
|
@@ -285,8 +287,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
285
287
|
* @public
|
|
286
288
|
* @async
|
|
287
289
|
* @param {Auth} auth
|
|
288
|
-
* @param {?WriteParams
|
|
289
|
-
* @returns {
|
|
290
|
+
* @param {?WriteParams} [params]
|
|
291
|
+
* @returns {Promise<void>}
|
|
290
292
|
*/
|
|
291
293
|
setCreateBoostAuth(auth: Auth, params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>): Promise<void>;
|
|
292
294
|
/**
|
|
@@ -295,8 +297,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
295
297
|
* @public
|
|
296
298
|
* @async
|
|
297
299
|
* @param {Address} address
|
|
298
|
-
* @param {?WriteParams
|
|
299
|
-
* @returns {
|
|
300
|
+
* @param {?WriteParams} [params]
|
|
301
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
300
302
|
*/
|
|
301
303
|
setCreateBoostAuthRaw(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>): Promise<{
|
|
302
304
|
hash: `0x${string}`;
|
|
@@ -307,7 +309,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
307
309
|
*
|
|
308
310
|
* @public
|
|
309
311
|
* @async
|
|
310
|
-
* @param {?ReadParams
|
|
312
|
+
* @param {?ReadParams} [params]
|
|
311
313
|
* @returns {unknown}
|
|
312
314
|
*/
|
|
313
315
|
protocolFee(params?: ReadParams<typeof boostCoreAbi, 'protocolFee'>): Promise<bigint>;
|
|
@@ -316,8 +318,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
316
318
|
*
|
|
317
319
|
* @public
|
|
318
320
|
* @async
|
|
319
|
-
* @param {?ReadParams
|
|
320
|
-
* @returns {
|
|
321
|
+
* @param {?ReadParams} [params]
|
|
322
|
+
* @returns {Promise<Address>}
|
|
321
323
|
*/
|
|
322
324
|
protocolFeeReceiver(params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>): Promise<`0x${string}`>;
|
|
323
325
|
/**
|
|
@@ -326,8 +328,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
326
328
|
* @public
|
|
327
329
|
* @async
|
|
328
330
|
* @param {Address} address
|
|
329
|
-
* @param {?WriteParams
|
|
330
|
-
* @returns {
|
|
331
|
+
* @param {?WriteParams} [params]
|
|
332
|
+
* @returns {Promise<void>}
|
|
331
333
|
*/
|
|
332
334
|
setProcolFeeReceiver(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>): Promise<void>;
|
|
333
335
|
/**
|
|
@@ -336,8 +338,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
336
338
|
* @public
|
|
337
339
|
* @async
|
|
338
340
|
* @param {Address} address
|
|
339
|
-
* @param {?WriteParams
|
|
340
|
-
* @returns {
|
|
341
|
+
* @param {?WriteParams} [params]
|
|
342
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
341
343
|
*/
|
|
342
344
|
setProcolFeeReceiverRaw(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>): Promise<{
|
|
343
345
|
hash: `0x${string}`;
|
|
@@ -348,8 +350,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
348
350
|
*
|
|
349
351
|
* @public
|
|
350
352
|
* @async
|
|
351
|
-
* @param {?ReadParams
|
|
352
|
-
* @returns {
|
|
353
|
+
* @param {?ReadParams} [params]
|
|
354
|
+
* @returns {Promise<bigint>}
|
|
353
355
|
*/
|
|
354
356
|
claimFee(params?: ReadParams<typeof boostCoreAbi, 'claimFee'>): Promise<bigint>;
|
|
355
357
|
/**
|
|
@@ -358,8 +360,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
358
360
|
* @public
|
|
359
361
|
* @async
|
|
360
362
|
* @param {bigint} claimFee
|
|
361
|
-
* @param {?WriteParams
|
|
362
|
-
* @returns {
|
|
363
|
+
* @param {?WriteParams} [params]
|
|
364
|
+
* @returns {Promise<void>}
|
|
363
365
|
*/
|
|
364
366
|
setClaimFee(claimFee: bigint, params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>): Promise<void>;
|
|
365
367
|
/**
|
|
@@ -368,13 +370,43 @@ export declare class BoostCore extends Deployable<[
|
|
|
368
370
|
* @public
|
|
369
371
|
* @async
|
|
370
372
|
* @param {bigint} claimFee
|
|
371
|
-
* @param {?WriteParams
|
|
372
|
-
* @returns {
|
|
373
|
+
* @param {?WriteParams} [params]
|
|
374
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
373
375
|
*/
|
|
374
376
|
setClaimFeeRaw(claimFee: bigint, params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>): Promise<{
|
|
375
377
|
hash: `0x${string}`;
|
|
376
378
|
result: void;
|
|
377
379
|
}>;
|
|
380
|
+
/**
|
|
381
|
+
* Retrieves the claim information from a transaction receipt.
|
|
382
|
+
*
|
|
383
|
+
* @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.
|
|
384
|
+
* @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.
|
|
385
|
+
*
|
|
386
|
+
* @description
|
|
387
|
+
* This method retrieves the transaction receipt using the provided parameters,
|
|
388
|
+
* then parses the logs to find the 'BoostClaimed' event.
|
|
389
|
+
* If found, it returns the arguments of the event, which include the boost ID,
|
|
390
|
+
* incentive ID, claimer address, and claimed amount.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* ```ts
|
|
394
|
+
* const claimInfo = await boostCore.getClaimFromTransaction({
|
|
395
|
+
* hash: '0x...',
|
|
396
|
+
* chainId: 1
|
|
397
|
+
* });
|
|
398
|
+
* if (claimInfo) {
|
|
399
|
+
* console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);
|
|
400
|
+
* }
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
getClaimFromTransaction(params: GetTransactionReceiptParameters): Promise<{
|
|
404
|
+
boostId: bigint;
|
|
405
|
+
incentiveId: bigint;
|
|
406
|
+
claimant: `0x${string}`;
|
|
407
|
+
referrer: `0x${string}`;
|
|
408
|
+
data: `0x${string}`;
|
|
409
|
+
} | undefined>;
|
|
378
410
|
/**
|
|
379
411
|
* Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
|
|
380
412
|
*
|
|
@@ -507,6 +539,19 @@ export declare class BoostCore extends Deployable<[
|
|
|
507
539
|
* @returns {SignerValidator}
|
|
508
540
|
*/
|
|
509
541
|
SignerValidator(options: DeployablePayloadOrAddress<SignerValidatorPayload>, isBase?: boolean): SignerValidator;
|
|
542
|
+
/**
|
|
543
|
+
* Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```ts
|
|
547
|
+
* const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to
|
|
548
|
+
* const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })
|
|
549
|
+
* ```
|
|
550
|
+
* @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options
|
|
551
|
+
* @param {?boolean} [isBase]
|
|
552
|
+
* @returns {ERC20VariableCrtieriaIncentive}
|
|
553
|
+
* */
|
|
554
|
+
ERC20VariableCriteriaIncentive(options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>, isBase?: boolean): ERC20VariableCriteriaIncentive;
|
|
510
555
|
/**
|
|
511
556
|
* Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
512
557
|
*
|
package/dist/BoostCore.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoostCore.d.ts","sourceRoot":"","sources":["../src/BoostCore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,QAAQ,EAkBd,MAAM,eAAe,C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