@boostxyz/sdk 0.0.0-alpha.20 → 0.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +3 -3
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +3 -3
- 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.js +13 -13
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- 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 +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +5 -24
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +42 -44
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-DolmDuXW.cjs +3 -0
- package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
- package/dist/BoostCore-Z97KVu4V.js +1448 -0
- package/dist/BoostCore-Z97KVu4V.js.map +1 -0
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.d.ts +633 -47
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +6 -6
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +31 -3
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +68 -48
- 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 +34 -4
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +45 -45
- package/dist/Budgets/VestingBudget.d.ts +34 -4
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +17 -17
- package/dist/EventAction-CBKzuNoN.cjs +2 -0
- package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
- package/dist/{EventAction-CIPqmAoP.js → EventAction-DWuuc_Qy.js} +295 -217
- package/dist/EventAction-DWuuc_Qy.js.map +1 -0
- package/dist/Incentive-BxzEtN26.js +298 -0
- package/dist/Incentive-BxzEtN26.js.map +1 -0
- package/dist/Incentive-CrF3-ayL.cjs +2 -0
- package/dist/Incentive-CrF3-ayL.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 +16 -2
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +13 -13
- 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 +197 -4
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +31 -31
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +192 -5
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +197 -4
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +17 -17
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +189 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +197 -4
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +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 +16 -2
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +8 -8
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-BwfNjRsg.cjs → SimpleDenyList-BUR17Tt1.cjs} +2 -2
- package/dist/{SimpleDenyList-BwfNjRsg.cjs.map → SimpleDenyList-BUR17Tt1.cjs.map} +1 -1
- package/dist/{SimpleDenyList-Cn5WpNn0.js → SimpleDenyList-CGaWjuld.js} +15 -15
- package/dist/{SimpleDenyList-Cn5WpNn0.js.map → SimpleDenyList-CGaWjuld.js.map} +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +3 -3
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +16 -13
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -4
- package/dist/errors.js.map +1 -1
- package/dist/{generated-B7VaSah4.js → generated-CKt2yCQd.js} +1071 -447
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +79 -78
- package/package.json +4 -4
- package/src/Actions/EventAction.ts +24 -20
- package/src/Boost.ts +5 -27
- package/src/BoostCore.test.ts +113 -46
- package/src/BoostCore.ts +162 -171
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +48 -3
- package/src/Budgets/ManagedBudget.test.ts +7 -7
- package/src/Incentives/CGDAIncentive.test.ts +4 -1
- package/src/Incentives/CGDAIncentive.ts +6 -0
- package/src/Incentives/ERC20Incentive.test.ts +3 -0
- package/src/Incentives/ERC20Incentive.ts +6 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +3 -0
- package/src/Incentives/ERC20VariableIncentive.ts +6 -0
- package/src/Incentives/Incentive.test.ts +3 -0
- package/src/Incentives/Incentive.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +1 -2
- package/src/errors.ts +22 -0
- package/dist/BoostCore-3-U1xTQN.cjs +0 -3
- package/dist/BoostCore-3-U1xTQN.cjs.map +0 -1
- package/dist/BoostCore-DVGBUr2y.js +0 -1477
- package/dist/BoostCore-DVGBUr2y.js.map +0 -1
- package/dist/EventAction-CIPqmAoP.js.map +0 -1
- package/dist/EventAction-d-oeqZQs.cjs +0 -2
- package/dist/EventAction-d-oeqZQs.cjs.map +0 -1
- package/dist/Incentive-Bp8Sez7M.js +0 -298
- package/dist/Incentive-Bp8Sez7M.js.map +0 -1
- package/dist/Incentive-Djnzseoj.cjs +0 -2
- package/dist/Incentive-Djnzseoj.cjs.map +0 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +0 -2
- package/dist/componentInterfaces-D09mhzxO.cjs.map +0 -1
- package/dist/componentInterfaces-RXBMI5yH.js +0 -14
- package/dist/componentInterfaces-RXBMI5yH.js.map +0 -1
- package/dist/deployments-BM42vImE.js +0 -43
- package/dist/deployments-BM42vImE.js.map +0 -1
- package/dist/deployments-CMdF5uEC.cjs +0 -2
- package/dist/deployments-CMdF5uEC.cjs.map +0 -1
- package/dist/generated-B0tk-c9b.cjs +0 -3
- package/dist/generated-B0tk-c9b.cjs.map +0 -1
- package/dist/generated-B7VaSah4.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),o=require("./BoostCore-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),o=require("./BoostCore-DolmDuXW.cjs"),E=require("./Boost.cjs"),y=require("./Actions/Action.cjs"),a=require("./EventAction-CBKzuNoN.cjs"),p=require("./AllowLists/AllowList.cjs"),c=require("./AllowLists/SimpleAllowList.cjs"),A=require("./SimpleDenyList-BUR17Tt1.cjs"),u=require("./Budgets/Budget.cjs"),i=require("./Budgets/ManagedBudget.cjs"),R=require("./Deployable/Deployable.cjs"),m=require("./Deployable/Contract.cjs"),D=require("./Deployable/DeployableTarget.cjs"),C=require("./Deployable/DeployableTargetWithRBAC.cjs"),g=require("./Incentives/AllowListIncentive.cjs"),I=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),l=require("./Incentive-CrF3-ayL.cjs"),S=require("./Incentives/PointsIncentive.cjs"),d=require("./Validators/SignerValidator.cjs"),b=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),n=require("./utils.cjs"),P=require("./claiming.cjs"),t=require("./transfers.cjs"),B=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-CyTNlOwM.cjs");exports.BOOST_REGISTRY_ADDRESS=s.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=s.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=s.BoostRegistry;exports.BOOST_CORE_ADDRESS=o.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=o.BOOST_CORE_ADDRESSES;exports.BOOST_CORE_CLAIM_FEE=o.BOOST_CORE_CLAIM_FEE;exports.BoostCore=o.BoostCore;exports.ERC20VariableCriteriaIncentive=o.ERC20VariableCriteriaIncentive;exports.prepareERC20VariableCriteriaIncentivePayload=o.prepareERC20VariableCriteriaIncentivePayload;exports.Boost=E.Boost;exports.prepareBoostPayload=E.prepareBoostPayload;exports.ActionByComponentInterface=y.ActionByComponentInterface;exports.actionFromAddress=y.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.AllowListByComponentInterface=p.AllowListByComponentInterface;exports.OpenAllowList=p.OpenAllowList;exports.allowListFromAddress=p.allowListFromAddress;exports.LIST_MANAGER_ROLE=c.LIST_MANAGER_ROLE;exports.SimpleAllowList=c.SimpleAllowList;exports.prepareSimpleAllowListPayload=c.prepareSimpleAllowListPayload;exports.SimpleDenyList=A.SimpleDenyList;exports.prepareSimpleDenyListPayload=A.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=u.BudgetByComponentInterface;exports.budgetFromAddress=u.budgetFromAddress;exports.ManagedBudget=i.ManagedBudget;exports.ManagedBudgetRoles=i.ManagedBudgetRoles;exports.isERC1155TransferPayload=i.isERC1155TransferPayload;exports.isFungibleTransfer=i.isFungibleTransfer;exports.prepareManagedBudgetPayload=i.prepareManagedBudgetPayload;exports.prepareTransfer=i.prepareTransfer;exports.Deployable=R.Deployable;exports.Contract=m.Contract;exports.DeployableTarget=D.DeployableTarget;exports.DeployableTargetWithRBAC=C.DeployableTargetWithRBAC;exports.Roles=C.Roles;exports.AllowListIncentive=g.AllowListIncentive;exports.prepareAllowListIncentivePayload=g.prepareAllowListIncentivePayload;exports.CGDAIncentive=I.CGDAIncentive;exports.prepareCGDAIncentivePayload=I.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=l.ERC20VariableIncentive;exports.IncentiveByComponentInterface=l.IncentiveByComponentInterface;exports.incentiveFromAddress=l.incentiveFromAddress;exports.prepareERC20VariableIncentivePayload=l.prepareERC20VariableIncentivePayload;exports.PointsIncentive=S.PointsIncentive;exports.preparePointsIncentivePayload=S.preparePointsIncentivePayload;exports.SignerValidator=d.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=d.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=d.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=d.prepareSignerValidatorPayload;exports.ValidatorByComponentInterface=b.ValidatorByComponentInterface;exports.validatorFromAddress=b.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.RegistryType=n.RegistryType;exports.assertValidAddressByChainId=n.assertValidAddressByChainId;exports.awaitResult=n.awaitResult;exports.bytes4=n.bytes4;exports.getDeployedContractAddress=n.getDeployedContractAddress;exports.StrategyType=P.StrategyType;exports.prepareClaimPayload=P.prepareClaimPayload;exports.AssetType=t.AssetType;exports.prepareERC1155Payload=t.prepareERC1155Payload;exports.prepareERC1155Transfer=t.prepareERC1155Transfer;exports.prepareFungiblePayload=t.prepareFungiblePayload;exports.prepareFungibleTransfer=t.prepareFungibleTransfer;exports.prepareTransferPayload=t.prepareTransferPayload;exports.PassthroughAuth=B.PassthroughAuth;exports.allowListIncentiveAbi=r.R;exports.boostCoreAbi=r.T;exports.boostRegistryAbi=r.ie;exports.cgdaIncentiveAbi=r.b;exports.erc20IncentiveAbi=r.y;exports.erc20VariableIncentiveAbi=r.f;exports.managedBudgetAbi=r.d;exports.passthroughAuthAbi=r.xe;exports.pointsIncentiveAbi=r.w;exports.rbacAbi=r.z;exports.signerValidatorAbi=r.x;exports.simpleAllowListAbi=r.N;exports.simpleDenyListAbi=r.g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BOOST_REGISTRY_ADDRESS as o, BOOST_REGISTRY_ADDRESSES as a, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
|
-
import { a as n, b as p, B as s, c as l, E as d, p as E } from "./BoostCore-
|
|
3
|
-
import { Boost as
|
|
2
|
+
import { a as n, b as p, B as s, c as l, E as d, p as E } from "./BoostCore-Z97KVu4V.js";
|
|
3
|
+
import { Boost as y, prepareBoostPayload as c } from "./Boost.js";
|
|
4
4
|
import { ActionByComponentInterface as f, actionFromAddress as C } from "./Actions/Action.js";
|
|
5
|
-
import { E as
|
|
6
|
-
import { AllowListByComponentInterface as x, OpenAllowList as
|
|
7
|
-
import { LIST_MANAGER_ROLE as F, SimpleAllowList as
|
|
8
|
-
import { S as w, p as _ } from "./SimpleDenyList-
|
|
5
|
+
import { E as g, F as I, P as v, S, i as P, p as R } from "./EventAction-DWuuc_Qy.js";
|
|
6
|
+
import { AllowListByComponentInterface as x, OpenAllowList as B, allowListFromAddress as D } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as F, SimpleAllowList as L, prepareSimpleAllowListPayload as O } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as w, p as _ } from "./SimpleDenyList-CGaWjuld.js";
|
|
9
9
|
import { BudgetByComponentInterface as M, budgetFromAddress as N } from "./Budgets/Budget.js";
|
|
10
10
|
import { ManagedBudget as G, ManagedBudgetRoles as z, isERC1155TransferPayload as k, isFungibleTransfer as q, prepareManagedBudgetPayload as W, prepareTransfer as Y } from "./Budgets/ManagedBudget.js";
|
|
11
11
|
import { Deployable as H } from "./Deployable/Deployable.js";
|
|
@@ -15,16 +15,16 @@ import { DeployableTargetWithRBAC as $, Roles as ee } from "./Deployable/Deploya
|
|
|
15
15
|
import { AllowListIncentive as oe, prepareAllowListIncentivePayload as ae } from "./Incentives/AllowListIncentive.js";
|
|
16
16
|
import { CGDAIncentive as ie, prepareCGDAIncentivePayload as ne } from "./Incentives/CGDAIncentive.js";
|
|
17
17
|
import { ERC20Incentive as se, prepareERC20IncentivePayload as le } from "./Incentives/ERC20Incentive.js";
|
|
18
|
-
import { E as Ee, I as me, i as
|
|
18
|
+
import { E as Ee, I as me, i as ye, p as ce } from "./Incentive-BxzEtN26.js";
|
|
19
19
|
import { PointsIncentive as fe, preparePointsIncentivePayload as Ce } from "./Incentives/PointsIncentive.js";
|
|
20
|
-
import { SignerValidator as
|
|
20
|
+
import { SignerValidator as ge, prepareSignerValidatorClaimDataPayload as Ie, prepareSignerValidatorInputParams as ve, prepareSignerValidatorPayload as Se } from "./Validators/SignerValidator.js";
|
|
21
21
|
import { ValidatorByComponentInterface as Re, validatorFromAddress as ue } from "./Validators/Validator.js";
|
|
22
|
-
import { BoostCoreNoIdentifierEmitted as De, BudgetMustAuthorizeBoostCore as
|
|
23
|
-
import { RegistryType as
|
|
24
|
-
import { StrategyType as
|
|
25
|
-
import { AssetType as cr, prepareERC1155Payload as Ar, prepareERC1155Transfer as
|
|
26
|
-
import { PassthroughAuth as
|
|
27
|
-
import { R as
|
|
22
|
+
import { BoostCoreNoIdentifierEmitted as Be, BoostNotFoundError as De, BudgetMustAuthorizeBoostCore as Te, ContractAddressRequiredError as Fe, DecodedArgsError as Le, DecodedArgsMalformedError as Oe, DeployableAlreadyDeployedError as Ve, DeployableBuildParametersUnspecifiedError as we, DeployableMissingPayloadError as _e, DeployableUnknownOwnerProvidedError as he, DeployableWagmiConfigurationRequiredError as Me, FieldActionValidationError as Ne, FieldValueNotComparableError as Ue, FieldValueUndefinedError as Ge, FunctionDataDecodeError as ze, IncentiveCriteriaNotFoundError as ke, IncentiveNotCloneableError as qe, InvalidComponentInterfaceError as We, InvalidCriteriaTypeError as Ye, InvalidNumericalCriteriaError as je, InvalidProtocolChainIdError as He, MustInitializeBudgetError as Je, NoConnectedChainIdError as Ke, NoContractAddressUponReceiptError as Qe, NoEventActionStepsProvidedError as Xe, NoMatchingLogsError as Ze, TooManyEventActionStepsProvidedError as $e, UnknownTransferPayloadSupplied as er, UnparseableAbiParamError as rr, UnrecognizedFilterTypeError as or, ValidationAbiMissingError as ar } from "./errors.js";
|
|
23
|
+
import { RegistryType as ir, assertValidAddressByChainId as nr, awaitResult as pr, bytes4 as sr, getDeployedContractAddress as lr } from "./utils.js";
|
|
24
|
+
import { StrategyType as Er, prepareClaimPayload as mr } from "./claiming.js";
|
|
25
|
+
import { AssetType as cr, prepareERC1155Payload as Ar, prepareERC1155Transfer as fr, prepareFungiblePayload as Cr, prepareFungibleTransfer as br, prepareTransferPayload as gr } from "./transfers.js";
|
|
26
|
+
import { PassthroughAuth as vr } from "./Auth/PassthroughAuth.js";
|
|
27
|
+
import { R as Pr, T as Rr, i as ur, b as xr, y as Br, f as Dr, d as Tr, a as Fr, w as Lr, z as Or, x as Vr, N as wr, g as _r } from "./generated-CKt2yCQd.js";
|
|
28
28
|
export {
|
|
29
29
|
f as ActionByComponentInterface,
|
|
30
30
|
x as AllowListByComponentInterface,
|
|
@@ -35,111 +35,112 @@ export {
|
|
|
35
35
|
s as BOOST_CORE_CLAIM_FEE,
|
|
36
36
|
o as BOOST_REGISTRY_ADDRESS,
|
|
37
37
|
a as BOOST_REGISTRY_ADDRESSES,
|
|
38
|
-
|
|
38
|
+
y as Boost,
|
|
39
39
|
l as BoostCore,
|
|
40
|
-
|
|
40
|
+
Be as BoostCoreNoIdentifierEmitted,
|
|
41
|
+
De as BoostNotFoundError,
|
|
41
42
|
t as BoostRegistry,
|
|
42
43
|
M as BudgetByComponentInterface,
|
|
43
|
-
|
|
44
|
+
Te as BudgetMustAuthorizeBoostCore,
|
|
44
45
|
ie as CGDAIncentive,
|
|
45
46
|
K as Contract,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
Fe as ContractAddressRequiredError,
|
|
48
|
+
Le as DecodedArgsError,
|
|
48
49
|
Oe as DecodedArgsMalformedError,
|
|
49
50
|
H as Deployable,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
Ve as DeployableAlreadyDeployedError,
|
|
52
|
+
we as DeployableBuildParametersUnspecifiedError,
|
|
53
|
+
_e as DeployableMissingPayloadError,
|
|
53
54
|
X as DeployableTarget,
|
|
54
55
|
$ as DeployableTargetWithRBAC,
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
he as DeployableUnknownOwnerProvidedError,
|
|
57
|
+
Me as DeployableWagmiConfigurationRequiredError,
|
|
57
58
|
se as ERC20Incentive,
|
|
58
59
|
d as ERC20VariableCriteriaIncentive,
|
|
59
60
|
Ee as ERC20VariableIncentive,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
g as EventAction,
|
|
62
|
+
Ne as FieldActionValidationError,
|
|
63
|
+
Ue as FieldValueNotComparableError,
|
|
64
|
+
Ge as FieldValueUndefinedError,
|
|
65
|
+
I as FilterType,
|
|
66
|
+
ze as FunctionDataDecodeError,
|
|
66
67
|
me as IncentiveByComponentInterface,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
ke as IncentiveCriteriaNotFoundError,
|
|
69
|
+
qe as IncentiveNotCloneableError,
|
|
70
|
+
We as InvalidComponentInterfaceError,
|
|
71
|
+
Ye as InvalidCriteriaTypeError,
|
|
72
|
+
je as InvalidNumericalCriteriaError,
|
|
73
|
+
He as InvalidProtocolChainIdError,
|
|
73
74
|
F as LIST_MANAGER_ROLE,
|
|
74
75
|
G as ManagedBudget,
|
|
75
76
|
z as ManagedBudgetRoles,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
Je as MustInitializeBudgetError,
|
|
78
|
+
Ke as NoConnectedChainIdError,
|
|
79
|
+
Qe as NoContractAddressUponReceiptError,
|
|
80
|
+
Xe as NoEventActionStepsProvidedError,
|
|
81
|
+
Ze as NoMatchingLogsError,
|
|
82
|
+
B as OpenAllowList,
|
|
83
|
+
vr as PassthroughAuth,
|
|
83
84
|
fe as PointsIncentive,
|
|
84
85
|
v as PrimitiveType,
|
|
85
|
-
|
|
86
|
+
ir as RegistryType,
|
|
86
87
|
ee as Roles,
|
|
87
88
|
S as SignatureType,
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
ge as SignerValidator,
|
|
90
|
+
L as SimpleAllowList,
|
|
90
91
|
w as SimpleDenyList,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
Er as StrategyType,
|
|
93
|
+
$e as TooManyEventActionStepsProvidedError,
|
|
94
|
+
er as UnknownTransferPayloadSupplied,
|
|
95
|
+
rr as UnparseableAbiParamError,
|
|
96
|
+
or as UnrecognizedFilterTypeError,
|
|
97
|
+
ar as ValidationAbiMissingError,
|
|
97
98
|
Re as ValidatorByComponentInterface,
|
|
98
99
|
C as actionFromAddress,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
D as allowListFromAddress,
|
|
101
|
+
Pr as allowListIncentiveAbi,
|
|
102
|
+
nr as assertValidAddressByChainId,
|
|
103
|
+
pr as awaitResult,
|
|
104
|
+
Rr as boostCoreAbi,
|
|
105
|
+
ur as boostRegistryAbi,
|
|
105
106
|
N as budgetFromAddress,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
sr as bytes4,
|
|
108
|
+
xr as cgdaIncentiveAbi,
|
|
109
|
+
Br as erc20IncentiveAbi,
|
|
109
110
|
Dr as erc20VariableIncentiveAbi,
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
lr as getDeployedContractAddress,
|
|
112
|
+
ye as incentiveFromAddress,
|
|
112
113
|
k as isERC1155TransferPayload,
|
|
113
114
|
P as isEventActionPayloadSimple,
|
|
114
115
|
q as isFungibleTransfer,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
Tr as managedBudgetAbi,
|
|
117
|
+
Fr as passthroughAuthAbi,
|
|
118
|
+
Lr as pointsIncentiveAbi,
|
|
118
119
|
ae as prepareAllowListIncentivePayload,
|
|
119
|
-
|
|
120
|
+
c as prepareBoostPayload,
|
|
120
121
|
ne as prepareCGDAIncentivePayload,
|
|
121
|
-
|
|
122
|
+
mr as prepareClaimPayload,
|
|
122
123
|
Ar as prepareERC1155Payload,
|
|
123
|
-
|
|
124
|
+
fr as prepareERC1155Transfer,
|
|
124
125
|
le as prepareERC20IncentivePayload,
|
|
125
126
|
E as prepareERC20VariableCriteriaIncentivePayload,
|
|
126
|
-
|
|
127
|
+
ce as prepareERC20VariableIncentivePayload,
|
|
127
128
|
R as prepareEventActionPayload,
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
Cr as prepareFungiblePayload,
|
|
130
|
+
br as prepareFungibleTransfer,
|
|
130
131
|
W as prepareManagedBudgetPayload,
|
|
131
132
|
Ce as preparePointsIncentivePayload,
|
|
132
|
-
|
|
133
|
+
Ie as prepareSignerValidatorClaimDataPayload,
|
|
133
134
|
ve as prepareSignerValidatorInputParams,
|
|
134
135
|
Se as prepareSignerValidatorPayload,
|
|
135
|
-
|
|
136
|
+
O as prepareSimpleAllowListPayload,
|
|
136
137
|
_ as prepareSimpleDenyListPayload,
|
|
137
138
|
Y as prepareTransfer,
|
|
138
|
-
|
|
139
|
+
gr as prepareTransferPayload,
|
|
139
140
|
Or as rbacAbi,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
Vr as signerValidatorAbi,
|
|
142
|
+
wr as simpleAllowListAbi,
|
|
143
|
+
_r as simpleDenyListAbi,
|
|
143
144
|
ue as validatorFromAddress
|
|
144
145
|
};
|
|
145
146
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostxyz/sdk",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.21",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -196,11 +196,11 @@
|
|
|
196
196
|
},
|
|
197
197
|
"dependencies": {
|
|
198
198
|
"ts-pattern": "5.4.0",
|
|
199
|
-
"@boostxyz/signatures": "0.0.0-alpha.
|
|
199
|
+
"@boostxyz/signatures": "0.0.0-alpha.7"
|
|
200
200
|
},
|
|
201
201
|
"optionalDependencies": {
|
|
202
|
-
"@boostxyz/evm": "0.0.0-alpha.
|
|
203
|
-
"@boostxyz/signatures": "0.0.0-alpha.
|
|
202
|
+
"@boostxyz/evm": "0.0.0-alpha.7",
|
|
203
|
+
"@boostxyz/signatures": "0.0.0-alpha.7"
|
|
204
204
|
},
|
|
205
205
|
"peerDependencies": {
|
|
206
206
|
"@wagmi/core": "2.x",
|
|
@@ -524,10 +524,12 @@ export class EventAction extends DeployableTarget<
|
|
|
524
524
|
if (claimant.signatureType === SignatureType.EVENT) {
|
|
525
525
|
let event: AbiEvent;
|
|
526
526
|
if (params.abiItem) event = params.abiItem as AbiEvent;
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
527
|
+
else {
|
|
528
|
+
const sigPool: Record<Hex, AbiEvent> = {
|
|
529
|
+
...(events.abi as Record<Hex, AbiEvent>),
|
|
530
|
+
...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),
|
|
531
|
+
};
|
|
532
|
+
event = sigPool[signature] as AbiEvent;
|
|
531
533
|
}
|
|
532
534
|
|
|
533
535
|
if (!event) {
|
|
@@ -574,12 +576,12 @@ export class EventAction extends DeployableTarget<
|
|
|
574
576
|
if (!isAddressEqual(transaction.to!, claimant.targetContract)) return;
|
|
575
577
|
let func: AbiFunction;
|
|
576
578
|
if (params.abiItem) func = params.abiItem as AbiFunction;
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
] as AbiFunction;
|
|
579
|
+
else {
|
|
580
|
+
const sigPool: Record<Hex, AbiFunction> = {
|
|
581
|
+
...(functions.abi as Record<Hex, AbiFunction>),
|
|
582
|
+
...((params.knownSignatures as Record<Hex, AbiFunction>) || {}),
|
|
583
|
+
};
|
|
584
|
+
func = sigPool[signature] as AbiFunction;
|
|
583
585
|
}
|
|
584
586
|
if (!func) {
|
|
585
587
|
throw new ValidationAbiMissingError(claimant.signature);
|
|
@@ -660,10 +662,12 @@ export class EventAction extends DeployableTarget<
|
|
|
660
662
|
const signature = actionStep.signature;
|
|
661
663
|
let event: AbiEvent;
|
|
662
664
|
if (params.abiItem) event = params.abiItem as AbiEvent;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
665
|
+
else {
|
|
666
|
+
const sigPool: Record<Hex, AbiEvent> = {
|
|
667
|
+
...(events.abi as Record<Hex, AbiEvent>),
|
|
668
|
+
...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),
|
|
669
|
+
};
|
|
670
|
+
event = sigPool[signature] as AbiEvent;
|
|
667
671
|
}
|
|
668
672
|
|
|
669
673
|
if (!event) {
|
|
@@ -759,12 +763,12 @@ export class EventAction extends DeployableTarget<
|
|
|
759
763
|
|
|
760
764
|
let func: AbiFunction;
|
|
761
765
|
if (params?.abiItem) func = params?.abiItem as AbiFunction;
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
] as AbiFunction;
|
|
766
|
+
else {
|
|
767
|
+
const sigPool: Record<Hex, AbiFunction> = {
|
|
768
|
+
...(functions.abi as Record<Hex, AbiFunction>),
|
|
769
|
+
...((params?.knownSignatures as Record<Hex, AbiFunction>) || {}),
|
|
770
|
+
};
|
|
771
|
+
func = sigPool[signature] as AbiFunction;
|
|
768
772
|
}
|
|
769
773
|
if (!func) {
|
|
770
774
|
throw new ValidationAbiMissingError(signature);
|
package/src/Boost.ts
CHANGED
|
@@ -16,8 +16,8 @@ import type { Validator } from './Validators/Validator';
|
|
|
16
16
|
* Interface representing a `BoostLib.Boost` on-chain struct
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
20
|
-
* @typedef {
|
|
19
|
+
* @interface RawBoost
|
|
20
|
+
* @typedef {RawBoost}
|
|
21
21
|
*/
|
|
22
22
|
export interface RawBoost {
|
|
23
23
|
action: Address;
|
|
@@ -26,7 +26,6 @@ export interface RawBoost {
|
|
|
26
26
|
budget: Address;
|
|
27
27
|
incentives: readonly Address[];
|
|
28
28
|
protocolFee: bigint;
|
|
29
|
-
referralFee: bigint;
|
|
30
29
|
maxParticipants: bigint;
|
|
31
30
|
owner: Address;
|
|
32
31
|
}
|
|
@@ -35,8 +34,8 @@ export interface RawBoost {
|
|
|
35
34
|
* Configuration used to instantiate a `Boost` instance.
|
|
36
35
|
*
|
|
37
36
|
* @export
|
|
38
|
-
* @interface
|
|
39
|
-
* @typedef {
|
|
37
|
+
* @interface BoostConfig
|
|
38
|
+
* @typedef {BoostConfig}
|
|
40
39
|
*/
|
|
41
40
|
export interface BoostConfig {
|
|
42
41
|
/**
|
|
@@ -74,11 +73,6 @@ export interface BoostConfig {
|
|
|
74
73
|
* @type {?bigint}
|
|
75
74
|
*/
|
|
76
75
|
protocolFee?: bigint;
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
* @type {?bigint}
|
|
80
|
-
*/
|
|
81
|
-
referralFee?: bigint;
|
|
82
76
|
/**
|
|
83
77
|
*
|
|
84
78
|
* @type {?bigint}
|
|
@@ -141,12 +135,6 @@ export class Boost {
|
|
|
141
135
|
* @type {bigint}
|
|
142
136
|
*/
|
|
143
137
|
readonly protocolFee: bigint;
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
* @readonly
|
|
147
|
-
* @type {bigint}
|
|
148
|
-
*/
|
|
149
|
-
readonly referralFee: bigint;
|
|
150
138
|
/**
|
|
151
139
|
*
|
|
152
140
|
* @readonly
|
|
@@ -174,7 +162,6 @@ export class Boost {
|
|
|
174
162
|
this.allowList = config.allowList;
|
|
175
163
|
this.incentives = config.incentives;
|
|
176
164
|
this.protocolFee = config.protocolFee || 0n;
|
|
177
|
-
this.referralFee = config.referralFee || 0n;
|
|
178
165
|
this.maxParticipants = config.maxParticipants || 0n;
|
|
179
166
|
this.owner = config.owner || zeroAddress;
|
|
180
167
|
}
|
|
@@ -237,12 +224,6 @@ export interface BoostPayload {
|
|
|
237
224
|
* @type {?bigint}
|
|
238
225
|
*/
|
|
239
226
|
protocolFee?: bigint;
|
|
240
|
-
/**
|
|
241
|
-
* The base referral fee (in bps)
|
|
242
|
-
*
|
|
243
|
-
* @type {?bigint}
|
|
244
|
-
*/
|
|
245
|
-
referralFee?: bigint;
|
|
246
227
|
/**
|
|
247
228
|
* Optional maximum amount of participants in the Boost.
|
|
248
229
|
*
|
|
@@ -268,7 +249,6 @@ export interface BoostPayload {
|
|
|
268
249
|
* @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.
|
|
269
250
|
* @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.
|
|
270
251
|
* @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)
|
|
271
|
-
* @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)
|
|
272
252
|
* @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.
|
|
273
253
|
* @param {Address} param0.owner - The owner of the Boost.
|
|
274
254
|
* @returns {Hex}
|
|
@@ -280,7 +260,6 @@ export function prepareBoostPayload({
|
|
|
280
260
|
allowList,
|
|
281
261
|
incentives,
|
|
282
262
|
protocolFee = 0n,
|
|
283
|
-
referralFee = 0n,
|
|
284
263
|
maxParticipants = 0n,
|
|
285
264
|
owner,
|
|
286
265
|
}: BoostPayload): Hex {
|
|
@@ -288,7 +267,7 @@ export function prepareBoostPayload({
|
|
|
288
267
|
encodeAbiParameters(
|
|
289
268
|
parseAbiParameters([
|
|
290
269
|
'BoostPayload payload',
|
|
291
|
-
'struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee;
|
|
270
|
+
'struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint256 maxParticipants; address owner; }',
|
|
292
271
|
'struct Target { bool isBase; address instance; bytes parameters; }',
|
|
293
272
|
]),
|
|
294
273
|
[
|
|
@@ -299,7 +278,6 @@ export function prepareBoostPayload({
|
|
|
299
278
|
allowList,
|
|
300
279
|
incentives,
|
|
301
280
|
protocolFee,
|
|
302
|
-
referralFee,
|
|
303
281
|
maxParticipants,
|
|
304
282
|
owner,
|
|
305
283
|
},
|