@boostxyz/sdk 0.0.0-alpha.17 → 0.0.0-alpha.19
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-kwoUw7YE.js +1477 -0
- package/dist/BoostCore-kwoUw7YE.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +86 -36
- 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 +25 -19
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +30 -29
- 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 +6 -6
- 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 +33 -33
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/EventAction-D5tnm00s.js +1355 -0
- package/dist/EventAction-D5tnm00s.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-Bp8Sez7M.js} +61 -62
- package/dist/Incentive-Bp8Sez7M.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-Cn5WpNn0.js} +9 -9
- package/dist/SimpleDenyList-Cn5WpNn0.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-B7VaSah4.js} +631 -343
- package/dist/generated-B7VaSah4.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 +135 -126
- 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 +121 -57
- package/src/BoostRegistry.ts +29 -21
- 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.test.ts +117 -33
- 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,12 +15,18 @@ 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';
|
|
20
22
|
import { SignerValidator, type SignerValidatorPayload } from './Validators/SignerValidator';
|
|
21
23
|
import { type Validator } from './Validators/Validator';
|
|
22
24
|
import { type GenericLog, type ReadParams, type WriteParams } from './utils';
|
|
25
|
+
/**
|
|
26
|
+
* The ABI of the BoostCore contract, if needed for low level operations
|
|
27
|
+
*
|
|
28
|
+
* @type {typeof boostCoreAbi}
|
|
29
|
+
*/
|
|
23
30
|
export { boostCoreAbi };
|
|
24
31
|
/**
|
|
25
32
|
* The fee (in wei) required to claim each incentive, must be provided for the `claimIncentive` transaction
|
|
@@ -32,7 +39,7 @@ export declare const BOOST_CORE_CLAIM_FEE: bigint;
|
|
|
32
39
|
*
|
|
33
40
|
* @type {Address}
|
|
34
41
|
*/
|
|
35
|
-
export declare const BOOST_CORE_ADDRESS: `0x${string}
|
|
42
|
+
export declare const BOOST_CORE_ADDRESS: `0x${string}`;
|
|
36
43
|
/**
|
|
37
44
|
* The fixed addresses for the deployed Boost Core.
|
|
38
45
|
* By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.
|
|
@@ -104,7 +111,7 @@ export type BoostCoreConfig = BoostCoreDeployedOptions | BoostCoreOptionsWithPay
|
|
|
104
111
|
export type CreateBoostPayload = {
|
|
105
112
|
budget: Budget;
|
|
106
113
|
action: Action;
|
|
107
|
-
validator
|
|
114
|
+
validator?: Validator;
|
|
108
115
|
allowList: AllowList;
|
|
109
116
|
incentives: Array<Incentive>;
|
|
110
117
|
protocolFee?: bigint;
|
|
@@ -157,7 +164,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
157
164
|
* @async
|
|
158
165
|
* @param {CreateBoostPayload} _boostPayload
|
|
159
166
|
* @param {?DeployableOptions} [_options]
|
|
160
|
-
* @returns {Boost}
|
|
167
|
+
* @returns {Promise<Boost>}
|
|
161
168
|
*/
|
|
162
169
|
createBoost(_boostPayload: CreateBoostPayload, _params?: DeployableOptions & WriteParams<typeof boostCoreAbi, 'createBoost'>): Promise<Boost>;
|
|
163
170
|
/**
|
|
@@ -169,8 +176,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
169
176
|
* @param {bigint} incentiveId
|
|
170
177
|
* @param {Address} address
|
|
171
178
|
* @param {Hex} data
|
|
172
|
-
* @param {?WriteParams
|
|
173
|
-
* @returns {
|
|
179
|
+
* @param {?WriteParams} [params]
|
|
180
|
+
* @returns {Promise<void>}
|
|
174
181
|
*/
|
|
175
182
|
claimIncentive(boostId: bigint, incentiveId: bigint, address: Address, data: Hex, params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>): Promise<void>;
|
|
176
183
|
/**
|
|
@@ -182,8 +189,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
182
189
|
* @param {bigint} incentiveId - The ID of the Incentive
|
|
183
190
|
* @param {Address} referrer - The address of the referrer (if any)
|
|
184
191
|
* @param {Hex} data- The data for the claim
|
|
185
|
-
* @param {?WriteParams
|
|
186
|
-
* @returns {
|
|
192
|
+
* @param {?WriteParams} [params]
|
|
193
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
187
194
|
*/
|
|
188
195
|
claimIncentiveRaw(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>): Promise<{
|
|
189
196
|
hash: `0x${string}`;
|
|
@@ -199,8 +206,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
199
206
|
* @param {Address} referrer
|
|
200
207
|
* @param {Hex} data
|
|
201
208
|
* @param {Address} claimant
|
|
202
|
-
* @param {?WriteParams
|
|
203
|
-
* @returns {
|
|
209
|
+
* @param {?WriteParams} [params]
|
|
210
|
+
* @returns {Promise<void>}
|
|
204
211
|
*/
|
|
205
212
|
claimIncentiveFor(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, claimant: Address, params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>): Promise<void>;
|
|
206
213
|
/**
|
|
@@ -213,8 +220,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
213
220
|
* @param {Address} referrer - The address of the referrer (if any)
|
|
214
221
|
* @param {Hex} data - The data for the claim
|
|
215
222
|
* @param {Address} claimant - The address of the user eligible for the incentive payout
|
|
216
|
-
* @param {?WriteParams
|
|
217
|
-
* @returns {
|
|
223
|
+
* @param {?WriteParams} [params]
|
|
224
|
+
* @returns {Promise<{ hash: Hex; result: void; }>}
|
|
218
225
|
*/
|
|
219
226
|
claimIncentiveForRaw(boostId: bigint, incentiveId: bigint, referrer: Address, data: Hex, claimant: Address, params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>): Promise<{
|
|
220
227
|
hash: `0x${string}`;
|
|
@@ -226,8 +233,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
226
233
|
* @public
|
|
227
234
|
* @async
|
|
228
235
|
* @param {bigint} id
|
|
229
|
-
* @param {?ReadParams
|
|
230
|
-
* @returns {
|
|
236
|
+
* @param {?ReadParams} [params]
|
|
237
|
+
* @returns {Promise<RawBoost>}
|
|
231
238
|
*/
|
|
232
239
|
readBoost(id: bigint, params?: ReadParams<typeof boostCoreAbi, 'getBoost'>): Promise<{
|
|
233
240
|
action: `0x${string}`;
|
|
@@ -246,8 +253,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
246
253
|
* @public
|
|
247
254
|
* @async
|
|
248
255
|
* @param {(string | bigint)} _id
|
|
249
|
-
* @param {?ReadParams
|
|
250
|
-
* @returns {
|
|
256
|
+
* @param {?ReadParams} [params]
|
|
257
|
+
* @returns {Promise<Boost>}
|
|
251
258
|
*/
|
|
252
259
|
getBoost(_id: string | bigint, params?: ReadParams<typeof boostCoreAbi, 'getBoost'>): Promise<Boost>;
|
|
253
260
|
/**
|
|
@@ -255,7 +262,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
255
262
|
*
|
|
256
263
|
* @public
|
|
257
264
|
* @async
|
|
258
|
-
* @param {?ReadParams
|
|
265
|
+
* @param {?ReadParams} [params]
|
|
259
266
|
* @returns {Promise<bigint>}
|
|
260
267
|
*/
|
|
261
268
|
getBoostCount(params?: ReadParams<typeof boostCoreAbi, 'getBoostCount'>): Promise<bigint>;
|
|
@@ -265,7 +272,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
265
272
|
* @public
|
|
266
273
|
* @async
|
|
267
274
|
* @param {Address} address
|
|
268
|
-
* @param {?ReadParams
|
|
275
|
+
* @param {?ReadParams &
|
|
269
276
|
* ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
|
|
270
277
|
* @returns {Promise<boolean>}
|
|
271
278
|
*/
|
|
@@ -275,8 +282,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
275
282
|
*
|
|
276
283
|
* @public
|
|
277
284
|
* @async
|
|
278
|
-
* @param {?ReadParams
|
|
279
|
-
* @returns {
|
|
285
|
+
* @param {?ReadParams} [params]
|
|
286
|
+
* @returns {Promise<Address>}
|
|
280
287
|
*/
|
|
281
288
|
createBoostAuth(params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>): Promise<`0x${string}`>;
|
|
282
289
|
/**
|
|
@@ -285,8 +292,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
285
292
|
* @public
|
|
286
293
|
* @async
|
|
287
294
|
* @param {Auth} auth
|
|
288
|
-
* @param {?WriteParams
|
|
289
|
-
* @returns {
|
|
295
|
+
* @param {?WriteParams} [params]
|
|
296
|
+
* @returns {Promise<void>}
|
|
290
297
|
*/
|
|
291
298
|
setCreateBoostAuth(auth: Auth, params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>): Promise<void>;
|
|
292
299
|
/**
|
|
@@ -295,8 +302,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
295
302
|
* @public
|
|
296
303
|
* @async
|
|
297
304
|
* @param {Address} address
|
|
298
|
-
* @param {?WriteParams
|
|
299
|
-
* @returns {
|
|
305
|
+
* @param {?WriteParams} [params]
|
|
306
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
300
307
|
*/
|
|
301
308
|
setCreateBoostAuthRaw(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>): Promise<{
|
|
302
309
|
hash: `0x${string}`;
|
|
@@ -307,7 +314,7 @@ export declare class BoostCore extends Deployable<[
|
|
|
307
314
|
*
|
|
308
315
|
* @public
|
|
309
316
|
* @async
|
|
310
|
-
* @param {?ReadParams
|
|
317
|
+
* @param {?ReadParams} [params]
|
|
311
318
|
* @returns {unknown}
|
|
312
319
|
*/
|
|
313
320
|
protocolFee(params?: ReadParams<typeof boostCoreAbi, 'protocolFee'>): Promise<bigint>;
|
|
@@ -316,8 +323,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
316
323
|
*
|
|
317
324
|
* @public
|
|
318
325
|
* @async
|
|
319
|
-
* @param {?ReadParams
|
|
320
|
-
* @returns {
|
|
326
|
+
* @param {?ReadParams} [params]
|
|
327
|
+
* @returns {Promise<Address>}
|
|
321
328
|
*/
|
|
322
329
|
protocolFeeReceiver(params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>): Promise<`0x${string}`>;
|
|
323
330
|
/**
|
|
@@ -326,8 +333,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
326
333
|
* @public
|
|
327
334
|
* @async
|
|
328
335
|
* @param {Address} address
|
|
329
|
-
* @param {?WriteParams
|
|
330
|
-
* @returns {
|
|
336
|
+
* @param {?WriteParams} [params]
|
|
337
|
+
* @returns {Promise<void>}
|
|
331
338
|
*/
|
|
332
339
|
setProcolFeeReceiver(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>): Promise<void>;
|
|
333
340
|
/**
|
|
@@ -336,8 +343,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
336
343
|
* @public
|
|
337
344
|
* @async
|
|
338
345
|
* @param {Address} address
|
|
339
|
-
* @param {?WriteParams
|
|
340
|
-
* @returns {
|
|
346
|
+
* @param {?WriteParams} [params]
|
|
347
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
341
348
|
*/
|
|
342
349
|
setProcolFeeReceiverRaw(address: Address, params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>): Promise<{
|
|
343
350
|
hash: `0x${string}`;
|
|
@@ -348,8 +355,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
348
355
|
*
|
|
349
356
|
* @public
|
|
350
357
|
* @async
|
|
351
|
-
* @param {?ReadParams
|
|
352
|
-
* @returns {
|
|
358
|
+
* @param {?ReadParams} [params]
|
|
359
|
+
* @returns {Promise<bigint>}
|
|
353
360
|
*/
|
|
354
361
|
claimFee(params?: ReadParams<typeof boostCoreAbi, 'claimFee'>): Promise<bigint>;
|
|
355
362
|
/**
|
|
@@ -358,8 +365,8 @@ export declare class BoostCore extends Deployable<[
|
|
|
358
365
|
* @public
|
|
359
366
|
* @async
|
|
360
367
|
* @param {bigint} claimFee
|
|
361
|
-
* @param {?WriteParams
|
|
362
|
-
* @returns {
|
|
368
|
+
* @param {?WriteParams} [params]
|
|
369
|
+
* @returns {Promise<void>}
|
|
363
370
|
*/
|
|
364
371
|
setClaimFee(claimFee: bigint, params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>): Promise<void>;
|
|
365
372
|
/**
|
|
@@ -368,13 +375,43 @@ export declare class BoostCore extends Deployable<[
|
|
|
368
375
|
* @public
|
|
369
376
|
* @async
|
|
370
377
|
* @param {bigint} claimFee
|
|
371
|
-
* @param {?WriteParams
|
|
372
|
-
* @returns {
|
|
378
|
+
* @param {?WriteParams} [params]
|
|
379
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
373
380
|
*/
|
|
374
381
|
setClaimFeeRaw(claimFee: bigint, params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>): Promise<{
|
|
375
382
|
hash: `0x${string}`;
|
|
376
383
|
result: void;
|
|
377
384
|
}>;
|
|
385
|
+
/**
|
|
386
|
+
* Retrieves the claim information from a transaction receipt.
|
|
387
|
+
*
|
|
388
|
+
* @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.
|
|
389
|
+
* @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.
|
|
390
|
+
*
|
|
391
|
+
* @description
|
|
392
|
+
* This method retrieves the transaction receipt using the provided parameters,
|
|
393
|
+
* then parses the logs to find the 'BoostClaimed' event.
|
|
394
|
+
* If found, it returns the arguments of the event, which include the boost ID,
|
|
395
|
+
* incentive ID, claimer address, and claimed amount.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```ts
|
|
399
|
+
* const claimInfo = await boostCore.getClaimFromTransaction({
|
|
400
|
+
* hash: '0x...',
|
|
401
|
+
* chainId: 1
|
|
402
|
+
* });
|
|
403
|
+
* if (claimInfo) {
|
|
404
|
+
* console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);
|
|
405
|
+
* }
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
getClaimFromTransaction(params: GetTransactionReceiptParameters): Promise<{
|
|
409
|
+
boostId: bigint;
|
|
410
|
+
incentiveId: bigint;
|
|
411
|
+
claimant: `0x${string}`;
|
|
412
|
+
referrer: `0x${string}`;
|
|
413
|
+
data: `0x${string}`;
|
|
414
|
+
} | undefined>;
|
|
378
415
|
/**
|
|
379
416
|
* Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
|
|
380
417
|
*
|
|
@@ -507,6 +544,19 @@ export declare class BoostCore extends Deployable<[
|
|
|
507
544
|
* @returns {SignerValidator}
|
|
508
545
|
*/
|
|
509
546
|
SignerValidator(options: DeployablePayloadOrAddress<SignerValidatorPayload>, isBase?: boolean): SignerValidator;
|
|
547
|
+
/**
|
|
548
|
+
* Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* ```ts
|
|
552
|
+
* const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to
|
|
553
|
+
* const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })
|
|
554
|
+
* ```
|
|
555
|
+
* @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options
|
|
556
|
+
* @param {?boolean} [isBase]
|
|
557
|
+
* @returns {ERC20VariableCrtieriaIncentive}
|
|
558
|
+
* */
|
|
559
|
+
ERC20VariableCriteriaIncentive(options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>, isBase?: boolean): ERC20VariableCriteriaIncentive;
|
|
510
560
|
/**
|
|
511
561
|
* Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
512
562
|
*
|
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,CAAC;
|
|
1
|
+
{"version":3,"file":"BoostCore.d.ts","sourceRoot":"","sources":["../src/BoostCore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,QAAQ,EAkBd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,+BAA+B,EAIrC,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAKT,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,wBAAwB,CAAC;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