@boostxyz/sdk 0.0.0-alpha.16 → 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 +7 -7
- 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 -779
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/OpenAllowList.d.ts +183 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +82 -36
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +44 -80
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +192 -9
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +5 -5
- 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 +36 -36
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +24 -174
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +76 -298
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +181 -77
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- 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 +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- 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-CtuAJAjG.js → Incentive-CF7kaz_9.js} +67 -68
- package/dist/Incentive-CF7kaz_9.js.map +1 -0
- package/dist/{Incentive-CqX3fYEd.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 +26 -26
- 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 +25 -25
- 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 +45 -45
- 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 +20 -20
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/SimpleDenyList-D9i4rw_F.js +132 -0
- 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 +25 -25
- 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-DLMdMwD1.js → generated-B8VWObPa.js} +2350 -1290
- package/dist/generated-B8VWObPa.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -122
- package/dist/index.js.map +1 -1
- 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 +12 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +182 -53
- package/src/Actions/EventAction.ts +128 -107
- package/src/AllowLists/SimpleAllowList.ts +14 -59
- package/src/AllowLists/SimpleDenyList.ts +12 -9
- 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/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.ts +21 -295
- package/src/Budgets/VestingBudget.ts +26 -97
- 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 +323 -0
- 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 +3 -4
- package/src/index.ts +2 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +0 -824
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/Incentive-CqX3fYEd.cjs.map +0 -1
- package/dist/Incentive-CtuAJAjG.js.map +0 -1
- package/dist/SimpleDenyList-9UIxZZKP.cjs +0 -2
- package/dist/SimpleDenyList-9UIxZZKP.cjs.map +0 -1
- package/dist/SimpleDenyList-DGPNc7ov.js +0 -132
- package/dist/SimpleDenyList-DGPNc7ov.js.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-Cmg8tUxq.js +0 -13
- package/dist/componentInterfaces-Cmg8tUxq.js.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-BLg7yPgI.cjs +0 -3
- package/dist/generated-BLg7yPgI.cjs.map +0 -1
- package/dist/generated-DLMdMwD1.js.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -563
|
@@ -327,8 +327,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
327
327
|
* @public
|
|
328
328
|
* @async
|
|
329
329
|
* @param {Address} address
|
|
330
|
-
* @param {?ReadParams
|
|
331
|
-
* @returns {
|
|
330
|
+
* @param {?ReadParams} [params]
|
|
331
|
+
* @returns {Promise<boolean>}
|
|
332
332
|
*/
|
|
333
333
|
public async signers(
|
|
334
334
|
address: Address,
|
|
@@ -348,8 +348,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
348
348
|
* @public
|
|
349
349
|
* @async
|
|
350
350
|
* @param {SignerValidatorSignaturePayload} payload
|
|
351
|
-
* @param {?ReadParams
|
|
352
|
-
* @returns {
|
|
351
|
+
* @param {?ReadParams} [params]
|
|
352
|
+
* @returns {Promise<Hex>}
|
|
353
353
|
*/
|
|
354
354
|
public async hashSignerData(
|
|
355
355
|
payload: SignerValidatorSignaturePayload,
|
|
@@ -374,7 +374,7 @@ export class SignerValidator extends DeployableTarget<
|
|
|
374
374
|
* @public
|
|
375
375
|
* @async
|
|
376
376
|
* @param {SignerValidatorValidatePayload} payload
|
|
377
|
-
* @param {?WriteParams
|
|
377
|
+
* @param {?WriteParams} [params]
|
|
378
378
|
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
379
379
|
*/
|
|
380
380
|
protected async validate(
|
|
@@ -390,7 +390,7 @@ export class SignerValidator extends DeployableTarget<
|
|
|
390
390
|
* @public
|
|
391
391
|
* @async
|
|
392
392
|
* @param {SignerValidatorValidatePayload} payload
|
|
393
|
-
* @param {?WriteParams
|
|
393
|
+
* @param {?WriteParams} [params]
|
|
394
394
|
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
395
395
|
*/
|
|
396
396
|
protected async validateRaw(
|
|
@@ -423,8 +423,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
423
423
|
* @async
|
|
424
424
|
* @param {Address[]} addresses - The list of signers to update
|
|
425
425
|
* @param {boolean[]} allowed - The authorized status of each signer
|
|
426
|
-
* @param {?WriteParams
|
|
427
|
-
* @returns {
|
|
426
|
+
* @param {?WriteParams} [params]
|
|
427
|
+
* @returns {Promise<void>}
|
|
428
428
|
*/
|
|
429
429
|
public async setAuthorized(
|
|
430
430
|
addresses: Address[],
|
|
@@ -443,8 +443,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
443
443
|
* @async
|
|
444
444
|
* @param {Address[]} addresses - The list of signers to update
|
|
445
445
|
* @param {boolean[]} allowed - The authorized status of each signer
|
|
446
|
-
* @param {?WriteParams
|
|
447
|
-
* @returns {
|
|
446
|
+
* @param {?WriteParams} [params]
|
|
447
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
448
448
|
*/
|
|
449
449
|
public async setAuthorizedRaw(
|
|
450
450
|
addresses: Address[],
|
|
@@ -471,8 +471,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
471
471
|
* @public
|
|
472
472
|
* @async
|
|
473
473
|
* @param {Address} address
|
|
474
|
-
* @param {?WriteParams
|
|
475
|
-
* @returns {
|
|
474
|
+
* @param {?WriteParams} [params]
|
|
475
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
476
476
|
*/
|
|
477
477
|
public async setValidatorCallerRaw(
|
|
478
478
|
address: Address,
|
|
@@ -501,8 +501,8 @@ export class SignerValidator extends DeployableTarget<
|
|
|
501
501
|
* @public
|
|
502
502
|
* @async
|
|
503
503
|
* @param {Address} address
|
|
504
|
-
* @param {?WriteParams
|
|
505
|
-
* @returns {
|
|
504
|
+
* @param {?WriteParams} [params]
|
|
505
|
+
* @returns {Promise<void>}
|
|
506
506
|
*/
|
|
507
507
|
public async setValidatorCaller(
|
|
508
508
|
address: Address,
|
|
@@ -32,7 +32,7 @@ export const ValidatorByComponentInterface = {
|
|
|
32
32
|
* @async
|
|
33
33
|
* @param {DeployableOptions} options
|
|
34
34
|
* @param {Address} address
|
|
35
|
-
* @returns {
|
|
35
|
+
* @returns {Promise<Validator>}
|
|
36
36
|
* @throws {@link InvalidComponentInterfaceError}
|
|
37
37
|
*/
|
|
38
38
|
export async function validatorFromAddress(
|
package/src/claiming.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface ClaimPayload {
|
|
|
40
40
|
* @param {ClaimPayload} param0
|
|
41
41
|
* @param {Address} param0.target - The address of the recipient
|
|
42
42
|
* @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed
|
|
43
|
-
* @returns {
|
|
43
|
+
* @returns {Hex}
|
|
44
44
|
*/
|
|
45
45
|
export const prepareClaimPayload = ({
|
|
46
46
|
target,
|
package/src/errors.ts
CHANGED
|
@@ -421,6 +421,45 @@ export class TooManyEventActionStepsProvidedError extends Error {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
+
/**
|
|
425
|
+
* The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.
|
|
426
|
+
*
|
|
427
|
+
* @export
|
|
428
|
+
* @class ValidationAbiMissingError
|
|
429
|
+
* @typedef {ValidationAbiMissingError}
|
|
430
|
+
* @extends {Error}
|
|
431
|
+
*/
|
|
432
|
+
export class ValidationAbiMissingError extends Error {
|
|
433
|
+
/**
|
|
434
|
+
* Creates an instance of ValidationAbiMissingError.
|
|
435
|
+
*
|
|
436
|
+
* @constructor
|
|
437
|
+
* @param {Hex} signature
|
|
438
|
+
*/
|
|
439
|
+
constructor(signature: Hex) {
|
|
440
|
+
super(`No known ABI for given signature: ${signature}`);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Thrown when missing logs for validating action steps.
|
|
446
|
+
*
|
|
447
|
+
* @export
|
|
448
|
+
* @class ValidationLogsMissingError
|
|
449
|
+
* @typedef {ValidationLogsMissingError}
|
|
450
|
+
* @extends {Error}
|
|
451
|
+
*/
|
|
452
|
+
export class ValidationLogsMissingError extends Error {
|
|
453
|
+
/**
|
|
454
|
+
* Creates an instance of ValidationLogsMissingError.
|
|
455
|
+
*
|
|
456
|
+
* @constructor
|
|
457
|
+
*/
|
|
458
|
+
constructor() {
|
|
459
|
+
super('Logs are required for validation');
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
424
463
|
/**
|
|
425
464
|
* Function action validation context to help debug other validation errors
|
|
426
465
|
*
|
|
@@ -681,18 +720,144 @@ export class UnrecognizedFilterTypeError extends FieldActionValidationError {
|
|
|
681
720
|
}
|
|
682
721
|
}
|
|
683
722
|
|
|
723
|
+
/**
|
|
724
|
+
* Thrown when no chain ID is provided in the Wagmi configuration.
|
|
725
|
+
*
|
|
726
|
+
* @export
|
|
727
|
+
* @class NoConnectedChainIdError
|
|
728
|
+
* @typedef {NoConnectedChainIdError}
|
|
729
|
+
* @extends {Error}
|
|
730
|
+
*/
|
|
684
731
|
export class NoConnectedChainIdError extends Error {
|
|
732
|
+
/**
|
|
733
|
+
* Creates an instance of NoConnectedChainIdError.
|
|
734
|
+
*
|
|
735
|
+
* @constructor
|
|
736
|
+
*/
|
|
685
737
|
constructor() {
|
|
686
738
|
super(
|
|
687
739
|
'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',
|
|
688
740
|
);
|
|
741
|
+
this.name = 'NoConnectedChainIdError';
|
|
689
742
|
}
|
|
690
743
|
}
|
|
691
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Thrown when an invalid chain ID is provided that doesn't match any deployed protocol.
|
|
747
|
+
*
|
|
748
|
+
* @export
|
|
749
|
+
* @class InvalidProtocolChainIdError
|
|
750
|
+
* @typedef {InvalidProtocolChainIdError}
|
|
751
|
+
* @extends {Error}
|
|
752
|
+
*/
|
|
692
753
|
export class InvalidProtocolChainIdError extends Error {
|
|
754
|
+
/**
|
|
755
|
+
* Creates an instance of InvalidProtocolChainIdError.
|
|
756
|
+
*
|
|
757
|
+
* @constructor
|
|
758
|
+
* @param {number} chainId - The chain ID provided in the configuration.
|
|
759
|
+
* @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.
|
|
760
|
+
*/
|
|
693
761
|
constructor(chainId: number, validChainIds: number[]) {
|
|
694
762
|
super(
|
|
695
763
|
`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,
|
|
696
764
|
);
|
|
765
|
+
this.name = 'InvalidProtocolChainIdError';
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Thrown when the incentive criteria cannot be fetched from the contract.
|
|
771
|
+
*
|
|
772
|
+
* @export
|
|
773
|
+
* @class IncentiveCriteriaNotFoundError
|
|
774
|
+
* @typedef {IncentiveCriteriaNotFoundError}
|
|
775
|
+
* @extends {Error}
|
|
776
|
+
*/
|
|
777
|
+
export class IncentiveCriteriaNotFoundError extends Error {
|
|
778
|
+
/**
|
|
779
|
+
* Creates an instance of IncentiveCriteriaNotFoundError.
|
|
780
|
+
*
|
|
781
|
+
* @constructor
|
|
782
|
+
* @param {Error} [e] - Optional error object for further context.
|
|
783
|
+
* @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.
|
|
784
|
+
*/
|
|
785
|
+
constructor(
|
|
786
|
+
e?: Error,
|
|
787
|
+
message = 'Unable to fetch Incentive Criteria from contract',
|
|
788
|
+
) {
|
|
789
|
+
super(message + (e ? `: ${e.message}` : ''));
|
|
790
|
+
this.name = 'IncentiveCriteriaNotFoundError';
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Thrown when no matching logs are found for a given event signature.
|
|
796
|
+
*
|
|
797
|
+
* @export
|
|
798
|
+
* @class NoMatchingLogsError
|
|
799
|
+
* @typedef {NoMatchingLogsError}
|
|
800
|
+
* @extends {Error}
|
|
801
|
+
*/
|
|
802
|
+
export class NoMatchingLogsError extends Error {
|
|
803
|
+
/**
|
|
804
|
+
* Creates an instance of NoMatchingLogsError.
|
|
805
|
+
*
|
|
806
|
+
* @constructor
|
|
807
|
+
* @param {string} signature - The event signature for which logs are being searched.
|
|
808
|
+
* @param {string} [message] - Optional custom error message.
|
|
809
|
+
*/
|
|
810
|
+
constructor(
|
|
811
|
+
signature: string,
|
|
812
|
+
message = `No logs found for event signature ${signature}`,
|
|
813
|
+
) {
|
|
814
|
+
super(message);
|
|
815
|
+
this.name = 'NoMatchingLogsError';
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Thrown when an invalid criteria type is provided.
|
|
821
|
+
*
|
|
822
|
+
* @export
|
|
823
|
+
* @class InvalidCriteriaTypeError
|
|
824
|
+
* @typedef {InvalidCriteriaTypeError}
|
|
825
|
+
* @extends {Error}
|
|
826
|
+
*/
|
|
827
|
+
export class InvalidCriteriaTypeError extends Error {
|
|
828
|
+
/**
|
|
829
|
+
* Creates an instance of InvalidCriteriaTypeError.
|
|
830
|
+
*
|
|
831
|
+
* @constructor
|
|
832
|
+
* @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.
|
|
833
|
+
* @param {string} [message] - Optional custom error message.
|
|
834
|
+
*/
|
|
835
|
+
constructor(
|
|
836
|
+
criteriaType = 'unknown',
|
|
837
|
+
message = `Invalid criteria type ${criteriaType}`,
|
|
838
|
+
) {
|
|
839
|
+
super(message);
|
|
840
|
+
this.name = 'InvalidCriteriaTypeError';
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Thrown when decoding function arguments fails.
|
|
846
|
+
*
|
|
847
|
+
* @export
|
|
848
|
+
* @class DecodedArgsError
|
|
849
|
+
* @typedef {DecodedArgsError}
|
|
850
|
+
* @extends {Error}
|
|
851
|
+
*/
|
|
852
|
+
export class DecodedArgsError extends Error {
|
|
853
|
+
/**
|
|
854
|
+
* Creates an instance of DecodedArgsError.
|
|
855
|
+
*
|
|
856
|
+
* @constructor
|
|
857
|
+
* @param {string} [message='Issue decoding args'] - Custom error message.
|
|
858
|
+
*/
|
|
859
|
+
constructor(message = 'Issue decoding args') {
|
|
860
|
+
super(message);
|
|
861
|
+
this.name = 'DecodedArgsError';
|
|
697
862
|
}
|
|
698
863
|
}
|
package/src/index.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, expect, test } from
|
|
2
|
-
import * as SDK from
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import * as SDK from "./index";
|
|
3
3
|
|
|
4
|
-
describe(
|
|
4
|
+
describe("sdk exports", () => {
|
|
5
5
|
test(`should export all public API`, () => {
|
|
6
6
|
expect(SDK.BoostRegistry).toBeDefined();
|
|
7
7
|
expect(SDK.BoostCore).toBeDefined();
|
|
@@ -14,7 +14,6 @@ describe('sdk exports', () => {
|
|
|
14
14
|
expect(SDK.SimpleAllowList).toBeDefined();
|
|
15
15
|
expect(SDK.SimpleDenyList).toBeDefined();
|
|
16
16
|
expect(SDK.ManagedBudget).toBeDefined();
|
|
17
|
-
// expect(SDK.SimpleBudget).toBeDefined();
|
|
18
17
|
// expect(SDK.VestingBudget).toBeDefined();
|
|
19
18
|
expect(SDK.AllowListIncentive).toBeDefined();
|
|
20
19
|
expect(SDK.CGDAIncentive).toBeDefined();
|
package/src/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './Budgets/ManagedBudget';
|
|
|
27
27
|
export * from './Deployable/Deployable';
|
|
28
28
|
export * from './Deployable/Contract';
|
|
29
29
|
export * from './Deployable/DeployableTarget';
|
|
30
|
+
export * from './Deployable/DeployableTargetWithRBAC';
|
|
30
31
|
|
|
31
32
|
// Incentives
|
|
32
33
|
|
|
@@ -34,6 +35,7 @@ export * from './Incentives/AllowListIncentive';
|
|
|
34
35
|
export * from './Incentives/CGDAIncentive';
|
|
35
36
|
export * from './Incentives/ERC20Incentive';
|
|
36
37
|
export * from './Incentives/ERC20VariableIncentive';
|
|
38
|
+
export * from './Incentives/ERC20VariableCriteriaIncentive';
|
|
37
39
|
// export * from './Incentives/ERC1155Incentive';
|
|
38
40
|
export * from './Incentives/Incentive';
|
|
39
41
|
export * from './Incentives/PointsIncentive';
|
package/src/transfers.ts
CHANGED
|
@@ -211,7 +211,7 @@ export interface FungiblePayload {
|
|
|
211
211
|
* @export
|
|
212
212
|
* @param {FungiblePayload} param0
|
|
213
213
|
* @param {bigint} param0.amount - The amount being transferred
|
|
214
|
-
* @returns {
|
|
214
|
+
* @returns {Hex}
|
|
215
215
|
*/
|
|
216
216
|
export function prepareFungiblePayload({ amount }: FungiblePayload) {
|
|
217
217
|
return encodeAbiParameters(
|
package/src/utils.ts
CHANGED
|
@@ -154,7 +154,7 @@ export function bytes4(input: string) {
|
|
|
154
154
|
* @param {WagmiConfig} config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)
|
|
155
155
|
* @param {Promise<Hash>} hash - A transaction hash promise
|
|
156
156
|
* @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams] - @see {@link WaitForTransactionReceiptParameters}
|
|
157
|
-
* @returns {
|
|
157
|
+
* @returns {Promise<Address>}
|
|
158
158
|
* @throws {@link NoContractAddressUponReceiptError} if no `contractAddress` exists after the transaction has been received
|
|
159
159
|
*/
|
|
160
160
|
export async function getDeployedContractAddress(
|