@boostxyz/sdk 6.0.0 → 6.0.1
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 +2 -2
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.js +40 -40
- 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 +2 -2
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- 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/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +14 -0
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +119 -101
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +2 -2
- package/dist/Budget-CsqSI4NH.cjs +2 -0
- package/dist/Budget-CsqSI4NH.cjs.map +1 -0
- package/dist/Budget-bMiAGF8s.js +922 -0
- package/dist/Budget-bMiAGF8s.js.map +1 -0
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.d.ts +5 -4
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +3 -3
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +2 -2
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +1331 -0
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -0
- 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 +2 -2
- package/dist/{Incentive-Boviez4z.js → Incentive-DZLG6T1-.js} +27 -27
- package/dist/{Incentive-Boviez4z.js.map → Incentive-DZLG6T1-.js.map} +1 -1
- package/dist/{Incentive-wM4zizTH.cjs → Incentive-DvNdIJ_x.cjs} +2 -2
- package/dist/{Incentive-wM4zizTH.cjs.map → Incentive-DvNdIJ_x.cjs.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +3 -3
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +2 -2
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +2 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +2 -2
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +2 -2
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +2 -2
- package/dist/{SimpleDenyList-Cybtz7AK.cjs → SimpleDenyList-BAIrFBAW.cjs} +2 -2
- package/dist/{SimpleDenyList-Cybtz7AK.cjs.map → SimpleDenyList-BAIrFBAW.cjs.map} +1 -1
- package/dist/{SimpleDenyList-CW4RwwRw.js → SimpleDenyList-C734XLxt.js} +11 -11
- package/dist/{SimpleDenyList-CW4RwwRw.js.map → SimpleDenyList-C734XLxt.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +2 -2
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +1 -1
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +2 -2
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/componentInterfaces-5Ezh3Pvx.js +19 -0
- package/dist/componentInterfaces-5Ezh3Pvx.js.map +1 -0
- package/dist/componentInterfaces-Cm4Zfn1v.cjs +2 -0
- package/dist/componentInterfaces-Cm4Zfn1v.cjs.map +1 -0
- package/dist/{deployments-DqjtOTUr.js → deployments-3RHH-eW7.js} +3 -3
- package/dist/{deployments-DqjtOTUr.js.map → deployments-3RHH-eW7.js.map} +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/generated-BPiHi7W2.cjs +3 -0
- package/dist/{generated-DgXPUgXl.cjs.map → generated-BPiHi7W2.cjs.map} +1 -1
- package/dist/{generated-pJZHmRCK.js → generated-CElkFqkY.js} +1315 -682
- package/dist/{generated-pJZHmRCK.js.map → generated-CElkFqkY.js.map} +1 -1
- 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 +155 -152
- package/package.json +2 -2
- package/src/AllowLists/SimpleAllowList.ts +2 -2
- package/src/BoostCore.ts +36 -4
- package/src/Budgets/Budget.ts +8 -2
- package/src/Budgets/ManagedBudgetWithFees.test.ts +0 -1
- package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +327 -0
- package/src/Budgets/ManagedBudgetWithFeesV2.ts +713 -0
- package/src/Validators/LimitedSignerValidator.ts +1 -1
- package/src/Validators/SignerValidator.ts +1 -1
- package/src/errors.ts +1 -1
- package/src/index.ts +1 -0
- package/dist/Budget-DMbfdTom.cjs +0 -2
- package/dist/Budget-DMbfdTom.cjs.map +0 -1
- package/dist/Budget-DO6sGTIR.js +0 -463
- package/dist/Budget-DO6sGTIR.js.map +0 -1
- package/dist/componentInterfaces-D7r9xJmt.cjs +0 -2
- package/dist/componentInterfaces-D7r9xJmt.cjs.map +0 -1
- package/dist/componentInterfaces-PR3ijhgZ.js +0 -18
- package/dist/componentInterfaces-PR3ijhgZ.js.map +0 -1
- package/dist/generated-DgXPUgXl.cjs +0 -3
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./BoostRegistry.cjs"),l=require("./BoostCore.cjs"),u=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),E=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-BAIrFBAW.cjs"),t=require("./Budget-CsqSI4NH.cjs"),o=require("./Budgets/ManagedBudget.cjs"),D=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),P=require("./Deployable/DeployableTargetWithRBAC.cjs"),v=require("./Incentives/AllowListIncentive.cjs"),R=require("./Incentives/CGDAIncentive.cjs"),S=require("./Incentives/ERC20Incentive.cjs"),n=require("./Incentive-DvNdIJ_x.cjs"),m=require("./Incentives/ERC20VariableIncentive.cjs"),A=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/PointsIncentive.cjs"),s=require("./Validators/SignerValidator.cjs"),p=require("./Validators/LimitedSignerValidator.cjs"),c=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./claiming.cjs"),d=require("./transfers.cjs"),F=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-BPiHi7W2.cjs");exports.BOOST_REGISTRY_ADDRESS=g.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=g.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=g.BoostRegistry;exports.BOOST_CORE_ADDRESS=l.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=l.BOOST_CORE_ADDRESSES;exports.BoostCore=l.BoostCore;exports.FEE_DENOMINATOR=l.FEE_DENOMINATOR;exports.Boost=u.Boost;exports.prepareBoostPayload=u.prepareBoostPayload;exports.ActionByComponentInterface=C.ActionByComponentInterface;exports.actionFromAddress=C.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.decodeAndReorderLogArgs=a.decodeAndReorderLogArgs;exports.detectSignatureType=a.detectSignatureType;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.packFieldIndexes=a.packFieldIndexes;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.unpackFieldIndexes=a.unpackFieldIndexes;exports.AllowListByComponentInterface=E.AllowListByComponentInterface;exports.OpenAllowList=E.OpenAllowList;exports.allowListFromAddress=E.allowListFromAddress;exports.LIST_MANAGER_ROLE=y.LIST_MANAGER_ROLE;exports.SimpleAllowList=y.SimpleAllowList;exports.prepareSimpleAllowListPayload=y.prepareSimpleAllowListPayload;exports.SimpleDenyList=I.SimpleDenyList;exports.prepareSimpleDenyListPayload=I.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=t.BudgetByComponentInterface;exports.ManagedBudgetWithFees=t.ManagedBudgetWithFees;exports.ManagedBudgetWithFeesV2=t.ManagedBudgetWithFeesV2;exports.budgetFromAddress=t.budgetFromAddress;exports.prepareManagedBudgetWithFeesPayload=t.prepareManagedBudgetWithFeesPayload;exports.prepareManagedBudgetWithFeesV2Payload=t.prepareManagedBudgetWithFeesV2Payload;exports.ManagedBudget=o.ManagedBudget;exports.ManagedBudgetRoles=o.ManagedBudgetRoles;exports.isERC1155TransferPayload=o.isERC1155TransferPayload;exports.isFungibleTransfer=o.isFungibleTransfer;exports.prepareManagedBudgetPayload=o.prepareManagedBudgetPayload;exports.prepareTransfer=o.prepareTransfer;exports.Deployable=D.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=P.DeployableTargetWithRBAC;exports.Roles=P.Roles;exports.AllowListIncentive=v.AllowListIncentive;exports.prepareAllowListIncentivePayload=v.prepareAllowListIncentivePayload;exports.CGDAIncentive=R.CGDAIncentive;exports.prepareCGDAIncentivePayload=R.prepareCGDAIncentivePayload;exports.ERC20Incentive=S.ERC20Incentive;exports.prepareERC20IncentivePayload=S.prepareERC20IncentivePayload;exports.ERC20PeggedIncentive=n.ERC20PeggedIncentive;exports.ERC20PeggedVariableCriteriaIncentive=n.ERC20PeggedVariableCriteriaIncentive;exports.IncentiveByComponentInterface=n.IncentiveByComponentInterface;exports.incentiveFromAddress=n.incentiveFromAddress;exports.prepareERC20PeggedIncentivePayload=n.prepareERC20PeggedIncentivePayload;exports.prepareERC20PeggedVariableCriteriaIncentivePayload=n.prepareERC20PeggedVariableCriteriaIncentivePayload;exports.ERC20VariableIncentive=m.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=m.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=A.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=A.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=A.prepareERC20VariableCriteriaIncentivePayload;exports.PointsIncentive=b.PointsIncentive;exports.preparePointsIncentivePayload=b.preparePointsIncentivePayload;exports.SignerValidator=s.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=s.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=s.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=s.prepareSignerValidatorPayload;exports.LimitedSignerValidator=p.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=p.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=p.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=p.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=c.BoostValidatorEOA;exports.ValidatorByComponentInterface=c.ValidatorByComponentInterface;exports.decodeClaimData=c.decodeClaimData;exports.validatorFromAddress=c.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.InvalidTupleDecodingError=e.InvalidTupleDecodingError;exports.InvalidTupleEncodingError=e.InvalidTupleEncodingError;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.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;exports.TRANSFER_SIGNATURE=i.TRANSFER_SIGNATURE;exports.assertValidAddressByChainId=i.assertValidAddressByChainId;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.getErc20Balance=i.getErc20Balance;exports.StrategyType=B.StrategyType;exports.prepareClaimPayload=B.prepareClaimPayload;exports.AssetType=d.AssetType;exports.prepareERC1155Payload=d.prepareERC1155Payload;exports.prepareERC1155Transfer=d.prepareERC1155Transfer;exports.prepareFungiblePayload=d.prepareFungiblePayload;exports.prepareFungibleTransfer=d.prepareFungibleTransfer;exports.prepareTransferPayload=d.prepareTransferPayload;exports.PassthroughAuth=F.PassthroughAuth;exports.allowListIncentiveAbi=r.H;exports.boostCoreAbi=r.g;exports.boostRegistryAbi=r.be;exports.cgdaIncentiveAbi=r.N;exports.erc20IncentiveAbi=r.m;exports.erc20PeggedIncentiveAbi=r.f;exports.erc20PeggedVariableCriteriaIncentiveAbi=r.y;exports.erc20VariableCriteriaIncentiveAbi=r.d;exports.erc20VariableIncentiveAbi=r.A;exports.limitedSignerValidatorAbi=r.S;exports.managedBudgetAbi=r.h;exports.managedBudgetWithFeesAbi=r.p;exports.managedBudgetWithFeesV2Abi=r.r;exports.passthroughAuthAbi=r.$e;exports.pointsIncentiveAbi=r.R;exports.rbacAbi=r.V;exports.signerValidatorAbi=r._;exports.simpleAllowListAbi=r.z;exports.simpleDenyListAbi=r.B;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './AllowLists/SimpleDenyList';
|
|
|
9
9
|
export * from './Budgets/Budget';
|
|
10
10
|
export * from './Budgets/ManagedBudget';
|
|
11
11
|
export * from './Budgets/ManagedBudgetWithFees';
|
|
12
|
+
export * from './Budgets/ManagedBudgetWithFeesV2';
|
|
12
13
|
export * from './Deployable/Deployable';
|
|
13
14
|
export * from './Deployable/Contract';
|
|
14
15
|
export * from './Deployable/DeployableTarget';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAIxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAI5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAIxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAI5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAIlD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AAItD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAElE,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAI5B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,178 +1,181 @@
|
|
|
1
|
-
import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as
|
|
1
|
+
import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
2
|
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as p, FEE_DENOMINATOR as l } from "./BoostCore.js";
|
|
3
|
-
import { Boost as c, prepareBoostPayload as
|
|
3
|
+
import { Boost as c, prepareBoostPayload as g } from "./Boost.js";
|
|
4
4
|
import { ActionByComponentInterface as E, actionFromAddress as A } from "./Actions/Action.js";
|
|
5
|
-
import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as
|
|
6
|
-
import { AllowListByComponentInterface as V, OpenAllowList as F, allowListFromAddress as
|
|
7
|
-
import { LIST_MANAGER_ROLE as
|
|
8
|
-
import { S as _, p as U } from "./SimpleDenyList-
|
|
9
|
-
import { B as
|
|
10
|
-
import { ManagedBudget as
|
|
11
|
-
import { Deployable as
|
|
12
|
-
import { Contract as
|
|
13
|
-
import { DeployableTarget as
|
|
14
|
-
import { DeployableTargetWithRBAC as
|
|
15
|
-
import { AllowListIncentive as
|
|
16
|
-
import { CGDAIncentive as
|
|
17
|
-
import { ERC20Incentive as
|
|
18
|
-
import { E as
|
|
19
|
-
import { ERC20VariableIncentive as
|
|
20
|
-
import { ERC20VariableCriteriaIncentive as
|
|
21
|
-
import { PointsIncentive as
|
|
22
|
-
import { SignerValidator as
|
|
23
|
-
import { LimitedSignerValidator as
|
|
24
|
-
import { BoostValidatorEOA as
|
|
25
|
-
import { BoostCoreNoIdentifierEmitted as
|
|
26
|
-
import { CheatCodes as
|
|
27
|
-
import { StrategyType as
|
|
28
|
-
import { AssetType as
|
|
29
|
-
import { PassthroughAuth as
|
|
30
|
-
import { H as
|
|
5
|
+
import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as P, decodeAndReorderLogArgs as v, detectSignatureType as u, isEventActionPayloadSimple as R, packFieldIndexes as S, prepareEventActionPayload as B, transactionSenderClaimant as x, unpackFieldIndexes as D } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as V, OpenAllowList as F, allowListFromAddress as h } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as M, SimpleAllowList as N, prepareSimpleAllowListPayload as O } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as _, p as U } from "./SimpleDenyList-C734XLxt.js";
|
|
9
|
+
import { B as G, M as k, a as z, b as q, p as Y, c as H } from "./Budget-bMiAGF8s.js";
|
|
10
|
+
import { ManagedBudget as j, ManagedBudgetRoles as J, isERC1155TransferPayload as K, isFungibleTransfer as Q, prepareManagedBudgetPayload as X, prepareTransfer as Z } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as re } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as oe } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as ie } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { DeployableTargetWithRBAC as de, Roles as pe } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
15
|
+
import { AllowListIncentive as se, prepareAllowListIncentivePayload as ce } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as me, prepareCGDAIncentivePayload as Ee } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as ye, prepareERC20IncentivePayload as Ce } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { E as be, a as fe, I as Pe, i as ve, p as ue, b as Re } from "./Incentive-DZLG6T1-.js";
|
|
19
|
+
import { ERC20VariableIncentive as Be, prepareERC20VariableIncentivePayload as xe } from "./Incentives/ERC20VariableIncentive.js";
|
|
20
|
+
import { ERC20VariableCriteriaIncentive as Te, gasRebateIncentiveCriteria as Ve, prepareERC20VariableCriteriaIncentivePayload as Fe } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
21
|
+
import { PointsIncentive as Le, preparePointsIncentivePayload as Me } from "./Incentives/PointsIncentive.js";
|
|
22
|
+
import { SignerValidator as Oe, prepareSignerValidatorClaimDataPayload as we, prepareSignerValidatorInputParams as _e, prepareSignerValidatorPayload as Ue } from "./Validators/SignerValidator.js";
|
|
23
|
+
import { LimitedSignerValidator as Ge, prepareLimitedSignerValidatorClaimDataPayload as ke, prepareLimitedSignerValidatorInputParams as ze, prepareLimitedSignerValidatorPayload as qe } from "./Validators/LimitedSignerValidator.js";
|
|
24
|
+
import { BoostValidatorEOA as He, ValidatorByComponentInterface as $e, decodeClaimData as je, validatorFromAddress as Je } from "./Validators/Validator.js";
|
|
25
|
+
import { BoostCoreNoIdentifierEmitted as Qe, BoostNotFoundError as Xe, BudgetMustAuthorizeBoostCore as Ze, ContractAddressRequiredError as er, DecodedArgsError as rr, DecodedArgsMalformedError as ar, DeployableAlreadyDeployedError as or, DeployableBuildParametersUnspecifiedError as tr, DeployableMissingPayloadError as ir, DeployableUnknownOwnerProvidedError as nr, DeployableWagmiConfigurationRequiredError as dr, FieldActionValidationError as pr, FieldValueNotComparableError as lr, FieldValueUndefinedError as sr, FunctionDataDecodeError as cr, IncentiveCriteriaNotFoundError as gr, IncentiveNotCloneableError as mr, InvalidComponentInterfaceError as Er, InvalidCriteriaTypeError as Ar, InvalidNumericalCriteriaError as yr, InvalidProtocolChainIdError as Cr, InvalidTupleDecodingError as Ir, InvalidTupleEncodingError as br, MustInitializeBudgetError as fr, NoConnectedChainIdError as Pr, NoContractAddressUponReceiptError as vr, NoEventActionStepsProvidedError as ur, NoMatchingLogsError as Rr, TooManyEventActionStepsProvidedError as Sr, UnknownTransferPayloadSupplied as Br, UnparseableAbiParamError as xr, UnrecognizedFilterTypeError as Dr, ValidationAbiMissingError as Tr } from "./errors.js";
|
|
26
|
+
import { CheatCodes as Fr, RegistryType as hr, TRANSFER_SIGNATURE as Lr, assertValidAddressByChainId as Mr, awaitResult as Nr, bytes4 as Or, getDeployedContractAddress as wr, getErc20Balance as _r } from "./utils.js";
|
|
27
|
+
import { StrategyType as Wr, prepareClaimPayload as Gr } from "./claiming.js";
|
|
28
|
+
import { AssetType as zr, prepareERC1155Payload as qr, prepareERC1155Transfer as Yr, prepareFungiblePayload as Hr, prepareFungibleTransfer as $r, prepareTransferPayload as jr } from "./transfers.js";
|
|
29
|
+
import { PassthroughAuth as Kr } from "./Auth/PassthroughAuth.js";
|
|
30
|
+
import { H as Xr, g as Zr, b as ea, N as ra, m as aa, f as oa, y as ta, d as ia, A as na, S as da, h as pa, p as la, r as sa, $ as ca, R as ga, V as ma, _ as Ea, z as Aa, B as ya } from "./generated-CElkFqkY.js";
|
|
31
31
|
export {
|
|
32
32
|
E as ActionByComponentInterface,
|
|
33
33
|
V as AllowListByComponentInterface,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
se as AllowListIncentive,
|
|
35
|
+
zr as AssetType,
|
|
36
36
|
n as BOOST_CORE_ADDRESS,
|
|
37
37
|
d as BOOST_CORE_ADDRESSES,
|
|
38
38
|
a as BOOST_REGISTRY_ADDRESS,
|
|
39
39
|
o as BOOST_REGISTRY_ADDRESSES,
|
|
40
40
|
c as Boost,
|
|
41
41
|
p as BoostCore,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
Qe as BoostCoreNoIdentifierEmitted,
|
|
43
|
+
Xe as BoostNotFoundError,
|
|
44
|
+
t as BoostRegistry,
|
|
45
|
+
He as BoostValidatorEOA,
|
|
46
|
+
G as BudgetByComponentInterface,
|
|
47
|
+
Ze as BudgetMustAuthorizeBoostCore,
|
|
48
|
+
me as CGDAIncentive,
|
|
49
|
+
Fr as CheatCodes,
|
|
50
|
+
oe as Contract,
|
|
51
|
+
er as ContractAddressRequiredError,
|
|
52
|
+
rr as DecodedArgsError,
|
|
53
|
+
ar as DecodedArgsMalformedError,
|
|
54
|
+
re as Deployable,
|
|
55
|
+
or as DeployableAlreadyDeployedError,
|
|
56
|
+
tr as DeployableBuildParametersUnspecifiedError,
|
|
57
|
+
ir as DeployableMissingPayloadError,
|
|
58
|
+
ie as DeployableTarget,
|
|
59
|
+
de as DeployableTargetWithRBAC,
|
|
60
|
+
nr as DeployableUnknownOwnerProvidedError,
|
|
61
|
+
dr as DeployableWagmiConfigurationRequiredError,
|
|
62
|
+
ye as ERC20Incentive,
|
|
63
|
+
be as ERC20PeggedIncentive,
|
|
64
|
+
fe as ERC20PeggedVariableCriteriaIncentive,
|
|
65
|
+
Te as ERC20VariableCriteriaIncentive,
|
|
66
|
+
Be as ERC20VariableIncentive,
|
|
67
67
|
C as EventAction,
|
|
68
68
|
l as FEE_DENOMINATOR,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
pr as FieldActionValidationError,
|
|
70
|
+
lr as FieldValueNotComparableError,
|
|
71
|
+
sr as FieldValueUndefinedError,
|
|
72
72
|
I as FilterType,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
cr as FunctionDataDecodeError,
|
|
74
|
+
Pe as IncentiveByComponentInterface,
|
|
75
|
+
gr as IncentiveCriteriaNotFoundError,
|
|
76
|
+
mr as IncentiveNotCloneableError,
|
|
77
|
+
Er as InvalidComponentInterfaceError,
|
|
78
|
+
Ar as InvalidCriteriaTypeError,
|
|
79
|
+
yr as InvalidNumericalCriteriaError,
|
|
80
|
+
Cr as InvalidProtocolChainIdError,
|
|
81
|
+
Ir as InvalidTupleDecodingError,
|
|
82
|
+
br as InvalidTupleEncodingError,
|
|
83
|
+
M as LIST_MANAGER_ROLE,
|
|
84
|
+
Ge as LimitedSignerValidator,
|
|
85
|
+
j as ManagedBudget,
|
|
86
|
+
J as ManagedBudgetRoles,
|
|
87
87
|
k as ManagedBudgetWithFees,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
vr as
|
|
92
|
-
|
|
88
|
+
z as ManagedBudgetWithFeesV2,
|
|
89
|
+
fr as MustInitializeBudgetError,
|
|
90
|
+
Pr as NoConnectedChainIdError,
|
|
91
|
+
vr as NoContractAddressUponReceiptError,
|
|
92
|
+
ur as NoEventActionStepsProvidedError,
|
|
93
|
+
Rr as NoMatchingLogsError,
|
|
93
94
|
F as OpenAllowList,
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
Kr as PassthroughAuth,
|
|
96
|
+
Le as PointsIncentive,
|
|
96
97
|
b as PrimitiveType,
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
hr as RegistryType,
|
|
99
|
+
pe as Roles,
|
|
99
100
|
f as SignatureType,
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
Oe as SignerValidator,
|
|
102
|
+
N as SimpleAllowList,
|
|
102
103
|
_ as SimpleDenyList,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
Wr as StrategyType,
|
|
105
|
+
Lr as TRANSFER_SIGNATURE,
|
|
106
|
+
Sr as TooManyEventActionStepsProvidedError,
|
|
107
|
+
Br as UnknownTransferPayloadSupplied,
|
|
108
|
+
xr as UnparseableAbiParamError,
|
|
109
|
+
Dr as UnrecognizedFilterTypeError,
|
|
110
|
+
Tr as ValidationAbiMissingError,
|
|
111
|
+
$e as ValidatorByComponentInterface,
|
|
111
112
|
A as actionFromAddress,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
113
|
+
h as allowListFromAddress,
|
|
114
|
+
Xr as allowListIncentiveAbi,
|
|
115
|
+
P as anyActionParameter,
|
|
116
|
+
Mr as assertValidAddressByChainId,
|
|
117
|
+
Nr as awaitResult,
|
|
118
|
+
Zr as boostCoreAbi,
|
|
119
|
+
ea as boostRegistryAbi,
|
|
120
|
+
q as budgetFromAddress,
|
|
121
|
+
Or as bytes4,
|
|
122
|
+
ra as cgdaIncentiveAbi,
|
|
123
|
+
v as decodeAndReorderLogArgs,
|
|
124
|
+
je as decodeClaimData,
|
|
125
|
+
u as detectSignatureType,
|
|
126
|
+
aa as erc20IncentiveAbi,
|
|
127
|
+
oa as erc20PeggedIncentiveAbi,
|
|
128
|
+
ta as erc20PeggedVariableCriteriaIncentiveAbi,
|
|
129
|
+
ia as erc20VariableCriteriaIncentiveAbi,
|
|
130
|
+
na as erc20VariableIncentiveAbi,
|
|
131
|
+
Ve as gasRebateIncentiveCriteria,
|
|
132
|
+
wr as getDeployedContractAddress,
|
|
133
|
+
_r as getErc20Balance,
|
|
134
|
+
ve as incentiveFromAddress,
|
|
135
|
+
K as isERC1155TransferPayload,
|
|
136
|
+
R as isEventActionPayloadSimple,
|
|
137
|
+
Q as isFungibleTransfer,
|
|
138
|
+
da as limitedSignerValidatorAbi,
|
|
139
|
+
pa as managedBudgetAbi,
|
|
140
|
+
la as managedBudgetWithFeesAbi,
|
|
141
|
+
sa as managedBudgetWithFeesV2Abi,
|
|
142
|
+
S as packFieldIndexes,
|
|
143
|
+
ca as passthroughAuthAbi,
|
|
144
|
+
ga as pointsIncentiveAbi,
|
|
145
|
+
ce as prepareAllowListIncentivePayload,
|
|
146
|
+
g as prepareBoostPayload,
|
|
147
|
+
Ee as prepareCGDAIncentivePayload,
|
|
148
|
+
Gr as prepareClaimPayload,
|
|
149
|
+
qr as prepareERC1155Payload,
|
|
150
|
+
Yr as prepareERC1155Transfer,
|
|
151
|
+
Ce as prepareERC20IncentivePayload,
|
|
152
|
+
ue as prepareERC20PeggedIncentivePayload,
|
|
153
|
+
Re as prepareERC20PeggedVariableCriteriaIncentivePayload,
|
|
154
|
+
Fe as prepareERC20VariableCriteriaIncentivePayload,
|
|
155
|
+
xe as prepareERC20VariableIncentivePayload,
|
|
154
156
|
B as prepareEventActionPayload,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
Hr as prepareFungiblePayload,
|
|
158
|
+
$r as prepareFungibleTransfer,
|
|
159
|
+
ke as prepareLimitedSignerValidatorClaimDataPayload,
|
|
160
|
+
ze as prepareLimitedSignerValidatorInputParams,
|
|
161
|
+
qe as prepareLimitedSignerValidatorPayload,
|
|
162
|
+
X as prepareManagedBudgetPayload,
|
|
163
|
+
Y as prepareManagedBudgetWithFeesPayload,
|
|
164
|
+
H as prepareManagedBudgetWithFeesV2Payload,
|
|
165
|
+
Me as preparePointsIncentivePayload,
|
|
166
|
+
we as prepareSignerValidatorClaimDataPayload,
|
|
167
|
+
_e as prepareSignerValidatorInputParams,
|
|
168
|
+
Ue as prepareSignerValidatorPayload,
|
|
169
|
+
O as prepareSimpleAllowListPayload,
|
|
167
170
|
U as prepareSimpleDenyListPayload,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
Z as prepareTransfer,
|
|
172
|
+
jr as prepareTransferPayload,
|
|
173
|
+
ma as rbacAbi,
|
|
174
|
+
Ea as signerValidatorAbi,
|
|
175
|
+
Aa as simpleAllowListAbi,
|
|
176
|
+
ya as simpleDenyListAbi,
|
|
174
177
|
x as transactionSenderClaimant,
|
|
175
178
|
D as unpackFieldIndexes,
|
|
176
|
-
|
|
179
|
+
Je as validatorFromAddress
|
|
177
180
|
};
|
|
178
181
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostxyz/sdk",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
"dependencies": {
|
|
216
|
-
"ts-pattern": "5.
|
|
216
|
+
"ts-pattern": "5.6.2"
|
|
217
217
|
},
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"@wagmi/core": "2.x",
|
|
@@ -180,13 +180,13 @@ export class SimpleAllowList extends DeployableTargetWithRBAC<
|
|
|
180
180
|
* @async
|
|
181
181
|
* @param {Address[]} addresses - The list of users to update
|
|
182
182
|
* @param {boolean[]} allowed - The allowed status of each user
|
|
183
|
-
* @param {?
|
|
183
|
+
* @param {?WriteParams} [params]
|
|
184
184
|
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
185
185
|
*/
|
|
186
186
|
public async setAllowedRaw(
|
|
187
187
|
addresses: Address[],
|
|
188
188
|
allowed: boolean[],
|
|
189
|
-
params?:
|
|
189
|
+
params?: WriteParams,
|
|
190
190
|
) {
|
|
191
191
|
const { request, result } = await simulateSimpleAllowListSetAllowed(
|
|
192
192
|
this._config,
|
package/src/BoostCore.ts
CHANGED
|
@@ -74,6 +74,10 @@ import {
|
|
|
74
74
|
ManagedBudgetWithFees,
|
|
75
75
|
type ManagedBudgetWithFeesPayload,
|
|
76
76
|
} from './Budgets/ManagedBudgetWithFees';
|
|
77
|
+
import {
|
|
78
|
+
ManagedBudgetWithFeesV2,
|
|
79
|
+
type ManagedBudgetWithFeesV2Payload,
|
|
80
|
+
} from './Budgets/ManagedBudgetWithFeesV2';
|
|
77
81
|
import {
|
|
78
82
|
Deployable,
|
|
79
83
|
type DeployableOptions,
|
|
@@ -1401,6 +1405,34 @@ export class BoostCore extends Deployable<
|
|
|
1401
1405
|
options,
|
|
1402
1406
|
);
|
|
1403
1407
|
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Bound {@link ManagedBudgetWithFeesV2} constructor that reuses the same configuration as the Boost Core instance.
|
|
1410
|
+
* Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.
|
|
1411
|
+
*
|
|
1412
|
+
* @example
|
|
1413
|
+
* ```ts
|
|
1414
|
+
* const budget = core.ManagedBudgetWithFeesV2('0x') // is roughly equivalent to
|
|
1415
|
+
* const budget = new ManagedBudgetWithFeesV2({ config: core._config, account: core._account }, '0x')
|
|
1416
|
+
* ```
|
|
1417
|
+
* @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>} options
|
|
1418
|
+
* @returns {ManagedBudgetWithFeesV2}
|
|
1419
|
+
*/
|
|
1420
|
+
ManagedBudgetWithFeesV2(
|
|
1421
|
+
options: DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>,
|
|
1422
|
+
) {
|
|
1423
|
+
if (
|
|
1424
|
+
typeof options !== 'string' &&
|
|
1425
|
+
!options.authorized.includes(this.assertValidAddress())
|
|
1426
|
+
) {
|
|
1427
|
+
options.authorized = [this.assertValidAddress(), ...options.authorized];
|
|
1428
|
+
options.roles = [Roles.MANAGER, ...options.roles];
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
return new ManagedBudgetWithFeesV2(
|
|
1432
|
+
{ config: this._config, account: this._account },
|
|
1433
|
+
options,
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1404
1436
|
// /**
|
|
1405
1437
|
// * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
1406
1438
|
// *
|
|
@@ -1681,7 +1713,7 @@ export class BoostCore extends Deployable<
|
|
|
1681
1713
|
budget?: Address,
|
|
1682
1714
|
params?: WriteParams,
|
|
1683
1715
|
) {
|
|
1684
|
-
const boost = await this.getBoost(boostId, params);
|
|
1716
|
+
const boost = await this.getBoost(boostId, params as ReadParams);
|
|
1685
1717
|
if (incentiveId >= boost.incentives.length) {
|
|
1686
1718
|
throw new Error(`Incentive ID ${incentiveId} out of range`);
|
|
1687
1719
|
}
|
|
@@ -1727,7 +1759,7 @@ export class BoostCore extends Deployable<
|
|
|
1727
1759
|
budget?: Address,
|
|
1728
1760
|
params?: WriteParams,
|
|
1729
1761
|
) {
|
|
1730
|
-
const feeBps = await this.protocolFee(params);
|
|
1762
|
+
const feeBps = await this.protocolFee(params as ReadParams);
|
|
1731
1763
|
const topupAmount =
|
|
1732
1764
|
(totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);
|
|
1733
1765
|
return this.topupIncentiveFromBudgetPreFee(
|
|
@@ -1757,7 +1789,7 @@ export class BoostCore extends Deployable<
|
|
|
1757
1789
|
topupAmount: bigint,
|
|
1758
1790
|
params?: WriteParams,
|
|
1759
1791
|
) {
|
|
1760
|
-
const boost = await this.getBoost(boostId, params);
|
|
1792
|
+
const boost = await this.getBoost(boostId, params as ReadParams);
|
|
1761
1793
|
if (incentiveId >= boost.incentives.length) {
|
|
1762
1794
|
throw new Error(`Incentive ID ${incentiveId} out of range`);
|
|
1763
1795
|
}
|
|
@@ -1800,7 +1832,7 @@ export class BoostCore extends Deployable<
|
|
|
1800
1832
|
totalAmount: bigint,
|
|
1801
1833
|
params?: WriteParams,
|
|
1802
1834
|
) {
|
|
1803
|
-
const feeBps = await this.protocolFee(params);
|
|
1835
|
+
const feeBps = await this.protocolFee(params as ReadParams);
|
|
1804
1836
|
const topupAmount =
|
|
1805
1837
|
(totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);
|
|
1806
1838
|
|
package/src/Budgets/Budget.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { aBudgetAbi } from '@boostxyz/evm';
|
|
|
2
2
|
import {
|
|
3
3
|
AManagedBudget,
|
|
4
4
|
AManagedBudgetWithFees,
|
|
5
|
+
AManagedBudgetWithFeesV2,
|
|
5
6
|
} from '@boostxyz/evm/deploys/componentInterfaces.json';
|
|
6
7
|
import { readContract } from '@wagmi/core';
|
|
7
8
|
import type { Address, Hex } from 'viem';
|
|
@@ -10,6 +11,7 @@ import { InvalidComponentInterfaceError } from '../errors';
|
|
|
10
11
|
import type { ReadParams } from '../utils';
|
|
11
12
|
import { ManagedBudget } from './ManagedBudget';
|
|
12
13
|
import { ManagedBudgetWithFees } from './ManagedBudgetWithFees';
|
|
14
|
+
import { ManagedBudgetWithFeesV2 } from './ManagedBudgetWithFeesV2';
|
|
13
15
|
|
|
14
16
|
export {
|
|
15
17
|
// VestingBudget,
|
|
@@ -22,7 +24,10 @@ export {
|
|
|
22
24
|
* @export
|
|
23
25
|
* @typedef {Budget}
|
|
24
26
|
*/
|
|
25
|
-
export type Budget =
|
|
27
|
+
export type Budget =
|
|
28
|
+
| ManagedBudget
|
|
29
|
+
| ManagedBudgetWithFees
|
|
30
|
+
| ManagedBudgetWithFeesV2; // | VestingBudget
|
|
26
31
|
|
|
27
32
|
/**
|
|
28
33
|
* A map of Budget component interfaces to their constructors.
|
|
@@ -34,6 +39,7 @@ export const BudgetByComponentInterface = {
|
|
|
34
39
|
// ['0x2929d19c']: SimpleBudget,
|
|
35
40
|
[AManagedBudget as Hex]: ManagedBudget,
|
|
36
41
|
[AManagedBudgetWithFees as Hex]: ManagedBudgetWithFees,
|
|
42
|
+
[AManagedBudgetWithFeesV2 as Hex]: ManagedBudgetWithFeesV2,
|
|
37
43
|
};
|
|
38
44
|
|
|
39
45
|
/**
|
|
@@ -43,7 +49,7 @@ export const BudgetByComponentInterface = {
|
|
|
43
49
|
* @async
|
|
44
50
|
* @param {DeployableOptions} options
|
|
45
51
|
* @param {Address} address
|
|
46
|
-
* @returns {Promise<ManagedBudget | ManagedBudgetWithFees>}
|
|
52
|
+
* @returns {Promise<ManagedBudget | ManagedBudgetWithFees | ManagedBudgetWithFeesV2>}
|
|
47
53
|
* @throws {@link InvalidComponentInterfaceError}
|
|
48
54
|
*/
|
|
49
55
|
export async function budgetFromAddress(
|