@boostxyz/sdk 2.0.0 → 2.1.0
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 +4 -4
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.js +17 -17
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +5 -5
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +19 -19
- 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 +100 -81
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +31 -31
- package/dist/Budget-B0kJsZtZ.cjs +2 -0
- package/dist/Budget-B0kJsZtZ.cjs.map +1 -0
- package/dist/Budget-NtzY9H7G.js +462 -0
- package/dist/Budget-NtzY9H7G.js.map +1 -0
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts +5 -4
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +9 -26
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +34 -34
- package/dist/Budgets/ManagedBudgetWithFees.d.ts +1203 -0
- package/dist/Budgets/ManagedBudgetWithFees.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 +23 -23
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +16 -16
- 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.js +28 -28
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +25 -25
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +29 -29
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +6 -6
- package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +4 -4
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.js +12 -12
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-wDvsNIuY.cjs → SimpleDenyList-B65fnca2.cjs} +2 -2
- package/dist/{SimpleDenyList-wDvsNIuY.cjs.map → SimpleDenyList-B65fnca2.cjs.map} +1 -1
- package/dist/{SimpleDenyList-D-rGBaay.js → SimpleDenyList-UvXQl2vm.js} +20 -20
- package/dist/{SimpleDenyList-D-rGBaay.js.map → SimpleDenyList-UvXQl2vm.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +9 -9
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +8 -8
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.js +20 -20
- package/dist/componentInterfaces-Bt-4sNB5.cjs +2 -0
- package/dist/componentInterfaces-Bt-4sNB5.cjs.map +1 -0
- package/dist/componentInterfaces-dakxtQHf.js +16 -0
- package/dist/componentInterfaces-dakxtQHf.js.map +1 -0
- package/dist/deployments-DxkwtCyu.cjs +2 -0
- package/dist/deployments-DxkwtCyu.cjs.map +1 -0
- package/dist/{deployments-BdPDIh-i.js → deployments-ZLVwJGZD.js} +33 -30
- package/dist/deployments-ZLVwJGZD.js.map +1 -0
- package/dist/deployments.json +17 -14
- package/dist/{generated-CDEDSOGZ.js → generated-B0XfMfoq.js} +1037 -470
- package/dist/generated-B0XfMfoq.js.map +1 -0
- package/dist/generated-pNKCp_Ez.cjs +3 -0
- package/dist/generated-pNKCp_Ez.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -145
- package/package.json +1 -1
- package/src/BoostCore.ts +30 -0
- package/src/Budgets/Budget.ts +8 -3
- package/src/Budgets/ManagedBudgetWithFees.test.ts +286 -0
- package/src/Budgets/ManagedBudgetWithFees.ts +671 -0
- package/src/index.ts +1 -0
- package/dist/componentInterfaces-BQw7DH-m.cjs +0 -2
- package/dist/componentInterfaces-BQw7DH-m.cjs.map +0 -1
- package/dist/componentInterfaces-C0vuWQlh.js +0 -15
- package/dist/componentInterfaces-C0vuWQlh.js.map +0 -1
- package/dist/deployments--f75Pthq.cjs +0 -2
- package/dist/deployments--f75Pthq.cjs.map +0 -1
- package/dist/deployments-BdPDIh-i.js.map +0 -1
- package/dist/generated-CDEDSOGZ.js.map +0 -1
- package/dist/generated-D3DE5TfH.cjs +0 -3
- package/dist/generated-D3DE5TfH.cjs.map +0 -1
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 c=require("./BoostRegistry.cjs"),n=require("./BoostCore.cjs"),A=require("./Boost.cjs"),u=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),E=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),C=require("./SimpleDenyList-B65fnca2.cjs"),l=require("./Budget-B0kJsZtZ.cjs"),o=require("./Budgets/ManagedBudget.cjs"),D=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),I=require("./Deployable/DeployableTargetWithRBAC.cjs"),m=require("./Incentives/AllowListIncentive.cjs"),S=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),g=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/Incentive.cjs"),R=require("./Incentives/PointsIncentive.cjs"),d=require("./Validators/SignerValidator.cjs"),s=require("./Validators/LimitedSignerValidator.cjs"),p=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./claiming.cjs"),t=require("./transfers.cjs"),L=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-pNKCp_Ez.cjs");exports.BOOST_REGISTRY_ADDRESS=c.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=c.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=c.BoostRegistry;exports.BOOST_CORE_ADDRESS=n.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=n.BOOST_CORE_ADDRESSES;exports.BoostCore=n.BoostCore;exports.FEE_DENOMINATOR=n.FEE_DENOMINATOR;exports.Boost=A.Boost;exports.prepareBoostPayload=A.prepareBoostPayload;exports.ActionByComponentInterface=u.ActionByComponentInterface;exports.actionFromAddress=u.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;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=C.SimpleDenyList;exports.prepareSimpleDenyListPayload=C.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=l.BudgetByComponentInterface;exports.ManagedBudgetWithFees=l.ManagedBudgetWithFees;exports.budgetFromAddress=l.budgetFromAddress;exports.prepareManagedBudgetWithFeesPayload=l.prepareManagedBudgetWithFeesPayload;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=I.DeployableTargetWithRBAC;exports.Roles=I.Roles;exports.AllowListIncentive=m.AllowListIncentive;exports.prepareAllowListIncentivePayload=m.prepareAllowListIncentivePayload;exports.CGDAIncentive=S.CGDAIncentive;exports.prepareCGDAIncentivePayload=S.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=P.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=P.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=g.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=g.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=g.prepareERC20VariableCriteriaIncentivePayload;exports.IncentiveByComponentInterface=b.IncentiveByComponentInterface;exports.incentiveFromAddress=b.incentiveFromAddress;exports.PointsIncentive=R.PointsIncentive;exports.preparePointsIncentivePayload=R.preparePointsIncentivePayload;exports.SignerValidator=d.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=d.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=d.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=d.prepareSignerValidatorPayload;exports.LimitedSignerValidator=s.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=s.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=s.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=s.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=p.BoostValidatorEOA;exports.ValidatorByComponentInterface=p.ValidatorByComponentInterface;exports.decodeClaimData=p.decodeClaimData;exports.validatorFromAddress=p.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.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;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=t.AssetType;exports.prepareERC1155Payload=t.prepareERC1155Payload;exports.prepareERC1155Transfer=t.prepareERC1155Transfer;exports.prepareFungiblePayload=t.prepareFungiblePayload;exports.prepareFungibleTransfer=t.prepareFungibleTransfer;exports.prepareTransferPayload=t.prepareTransferPayload;exports.PassthroughAuth=L.PassthroughAuth;exports.allowListIncentiveAbi=r.z;exports.boostCoreAbi=r.I;exports.boostRegistryAbi=r.ue;exports.cgdaIncentiveAbi=r.w;exports.erc20IncentiveAbi=r.m;exports.erc20VariableCriteriaIncentiveAbi=r.b;exports.erc20VariableIncentiveAbi=r.T;exports.limitedSignerValidatorAbi=r.H;exports.managedBudgetAbi=r.f;exports.managedBudgetWithFeesAbi=r.o;exports.passthroughAuthAbi=r.Le;exports.pointsIncentiveAbi=r.h;exports.rbacAbi=r.E;exports.signerValidatorAbi=r.F;exports.simpleAllowListAbi=r.R;exports.simpleDenyListAbi=r.O;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './AllowLists/SimpleAllowList';
|
|
|
8
8
|
export * from './AllowLists/SimpleDenyList';
|
|
9
9
|
export * from './Budgets/Budget';
|
|
10
10
|
export * from './Budgets/ManagedBudget';
|
|
11
|
+
export * from './Budgets/ManagedBudgetWithFees';
|
|
11
12
|
export * from './Deployable/Deployable';
|
|
12
13
|
export * from './Deployable/Contract';
|
|
13
14
|
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;
|
|
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;AAIhD,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,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAE5D,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,162 +1,165 @@
|
|
|
1
|
-
import { BOOST_REGISTRY_ADDRESS as
|
|
2
|
-
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as p, BoostCore as
|
|
1
|
+
import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
|
+
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as p, BoostCore as d, FEE_DENOMINATOR as l } from "./BoostCore.js";
|
|
3
3
|
import { Boost as m, prepareBoostPayload as c } from "./Boost.js";
|
|
4
|
-
import { ActionByComponentInterface as
|
|
5
|
-
import { EventAction as f, FilterType as
|
|
6
|
-
import { AllowListByComponentInterface as
|
|
7
|
-
import { LIST_MANAGER_ROLE as V, SimpleAllowList as
|
|
8
|
-
import { S as
|
|
9
|
-
import {
|
|
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 { ERC20VariableIncentive as
|
|
19
|
-
import { ERC20VariableCriteriaIncentive as
|
|
20
|
-
import { IncentiveByComponentInterface 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 {
|
|
4
|
+
import { ActionByComponentInterface as A, actionFromAddress as y } from "./Actions/Action.js";
|
|
5
|
+
import { EventAction as f, FilterType as C, PrimitiveType as b, SignatureType as I, anyActionParameter as S, isEventActionPayloadSimple as u, prepareEventActionPayload as v, transactionSenderClaimant as P } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as B, OpenAllowList as D, allowListFromAddress as x } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as V, SimpleAllowList as F, prepareSimpleAllowListPayload as L } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as O, p as M } from "./SimpleDenyList-UvXQl2vm.js";
|
|
9
|
+
import { B as N, M as _, b as U, p as G } from "./Budget-NtzY9H7G.js";
|
|
10
|
+
import { ManagedBudget as z, ManagedBudgetRoles as k, isERC1155TransferPayload as q, isFungibleTransfer as Y, prepareManagedBudgetPayload as H, prepareTransfer as j } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as K } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as X } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as $ } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { DeployableTargetWithRBAC as re, Roles as ae } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
15
|
+
import { AllowListIncentive as te, prepareAllowListIncentivePayload as ie } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as pe, prepareCGDAIncentivePayload as de } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as se, prepareERC20IncentivePayload as me } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { ERC20VariableIncentive as Ee, prepareERC20VariableIncentivePayload as Ae } from "./Incentives/ERC20VariableIncentive.js";
|
|
19
|
+
import { ERC20VariableCriteriaIncentive as ge, gasRebateIncentiveCriteria as fe, prepareERC20VariableCriteriaIncentivePayload as Ce } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
20
|
+
import { IncentiveByComponentInterface as Ie, incentiveFromAddress as Se } from "./Incentives/Incentive.js";
|
|
21
|
+
import { PointsIncentive as ve, preparePointsIncentivePayload as Pe } from "./Incentives/PointsIncentive.js";
|
|
22
|
+
import { SignerValidator as Be, prepareSignerValidatorClaimDataPayload as De, prepareSignerValidatorInputParams as xe, prepareSignerValidatorPayload as Te } from "./Validators/SignerValidator.js";
|
|
23
|
+
import { LimitedSignerValidator as Fe, prepareLimitedSignerValidatorClaimDataPayload as Le, prepareLimitedSignerValidatorInputParams as he, prepareLimitedSignerValidatorPayload as Oe } from "./Validators/LimitedSignerValidator.js";
|
|
24
|
+
import { BoostValidatorEOA as we, ValidatorByComponentInterface as Ne, decodeClaimData as _e, validatorFromAddress as Ue } from "./Validators/Validator.js";
|
|
25
|
+
import { BoostCoreNoIdentifierEmitted as We, BoostNotFoundError as ze, BudgetMustAuthorizeBoostCore as ke, ContractAddressRequiredError as qe, DecodedArgsError as Ye, DecodedArgsMalformedError as He, DeployableAlreadyDeployedError as je, DeployableBuildParametersUnspecifiedError as Je, DeployableMissingPayloadError as Ke, DeployableUnknownOwnerProvidedError as Qe, DeployableWagmiConfigurationRequiredError as Xe, FieldActionValidationError as Ze, FieldValueNotComparableError as $e, FieldValueUndefinedError as er, FunctionDataDecodeError as rr, IncentiveCriteriaNotFoundError as ar, IncentiveNotCloneableError as or, InvalidComponentInterfaceError as tr, InvalidCriteriaTypeError as ir, InvalidNumericalCriteriaError as nr, InvalidProtocolChainIdError as pr, MustInitializeBudgetError as dr, NoConnectedChainIdError as lr, NoContractAddressUponReceiptError as sr, NoEventActionStepsProvidedError as mr, NoMatchingLogsError as cr, TooManyEventActionStepsProvidedError as Er, UnknownTransferPayloadSupplied as Ar, UnparseableAbiParamError as yr, UnrecognizedFilterTypeError as gr, ValidationAbiMissingError as fr } from "./errors.js";
|
|
26
|
+
import { CheatCodes as br, RegistryType as Ir, assertValidAddressByChainId as Sr, awaitResult as ur, bytes4 as vr, getDeployedContractAddress as Pr, getErc20Balance as Rr } from "./utils.js";
|
|
27
|
+
import { StrategyType as Dr, prepareClaimPayload as xr } from "./claiming.js";
|
|
28
|
+
import { AssetType as Vr, prepareERC1155Payload as Fr, prepareERC1155Transfer as Lr, prepareFungiblePayload as hr, prepareFungibleTransfer as Or, prepareTransferPayload as Mr } from "./transfers.js";
|
|
29
|
+
import { PassthroughAuth as Nr } from "./Auth/PassthroughAuth.js";
|
|
30
|
+
import { z as Ur, I as Gr, u as Wr, w as zr, m as kr, b as qr, T as Yr, H as Hr, f as jr, o as Jr, L as Kr, h as Qr, E as Xr, F as Zr, R as $r, O as ea } from "./generated-B0XfMfoq.js";
|
|
31
31
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
A as ActionByComponentInterface,
|
|
33
|
+
B as AllowListByComponentInterface,
|
|
34
|
+
te as AllowListIncentive,
|
|
35
|
+
Vr as AssetType,
|
|
36
36
|
n as BOOST_CORE_ADDRESS,
|
|
37
37
|
p as BOOST_CORE_ADDRESSES,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
a as BOOST_REGISTRY_ADDRESS,
|
|
39
|
+
o as BOOST_REGISTRY_ADDRESSES,
|
|
40
40
|
m as Boost,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
d as BoostCore,
|
|
42
|
+
We as BoostCoreNoIdentifierEmitted,
|
|
43
|
+
ze as BoostNotFoundError,
|
|
44
44
|
t as BoostRegistry,
|
|
45
|
-
|
|
45
|
+
we as BoostValidatorEOA,
|
|
46
46
|
N as BudgetByComponentInterface,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
ke as BudgetMustAuthorizeBoostCore,
|
|
48
|
+
pe as CGDAIncentive,
|
|
49
|
+
br as CheatCodes,
|
|
50
|
+
X as Contract,
|
|
51
|
+
qe as ContractAddressRequiredError,
|
|
52
|
+
Ye as DecodedArgsError,
|
|
53
|
+
He as DecodedArgsMalformedError,
|
|
54
|
+
K as Deployable,
|
|
55
|
+
je as DeployableAlreadyDeployedError,
|
|
56
|
+
Je as DeployableBuildParametersUnspecifiedError,
|
|
57
|
+
Ke as DeployableMissingPayloadError,
|
|
58
|
+
$ as DeployableTarget,
|
|
59
|
+
re as DeployableTargetWithRBAC,
|
|
60
|
+
Qe as DeployableUnknownOwnerProvidedError,
|
|
61
|
+
Xe as DeployableWagmiConfigurationRequiredError,
|
|
62
|
+
se as ERC20Incentive,
|
|
63
|
+
ge as ERC20VariableCriteriaIncentive,
|
|
64
|
+
Ee as ERC20VariableIncentive,
|
|
65
65
|
f as EventAction,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
l as FEE_DENOMINATOR,
|
|
67
|
+
Ze as FieldActionValidationError,
|
|
68
|
+
$e as FieldValueNotComparableError,
|
|
69
|
+
er as FieldValueUndefinedError,
|
|
70
|
+
C as FilterType,
|
|
71
|
+
rr as FunctionDataDecodeError,
|
|
72
|
+
Ie as IncentiveByComponentInterface,
|
|
73
|
+
ar as IncentiveCriteriaNotFoundError,
|
|
74
|
+
or as IncentiveNotCloneableError,
|
|
75
|
+
tr as InvalidComponentInterfaceError,
|
|
76
|
+
ir as InvalidCriteriaTypeError,
|
|
77
|
+
nr as InvalidNumericalCriteriaError,
|
|
78
|
+
pr as InvalidProtocolChainIdError,
|
|
79
79
|
V as LIST_MANAGER_ROLE,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
lr as
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
Fe as LimitedSignerValidator,
|
|
81
|
+
z as ManagedBudget,
|
|
82
|
+
k as ManagedBudgetRoles,
|
|
83
|
+
_ as ManagedBudgetWithFees,
|
|
84
|
+
dr as MustInitializeBudgetError,
|
|
85
|
+
lr as NoConnectedChainIdError,
|
|
86
|
+
sr as NoContractAddressUponReceiptError,
|
|
87
|
+
mr as NoEventActionStepsProvidedError,
|
|
88
|
+
cr as NoMatchingLogsError,
|
|
89
|
+
D as OpenAllowList,
|
|
90
|
+
Nr as PassthroughAuth,
|
|
91
|
+
ve as PointsIncentive,
|
|
91
92
|
b as PrimitiveType,
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
Ir as RegistryType,
|
|
94
|
+
ae as Roles,
|
|
94
95
|
I as SignatureType,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
Be as SignerValidator,
|
|
97
|
+
F as SimpleAllowList,
|
|
98
|
+
O as SimpleDenyList,
|
|
99
|
+
Dr as StrategyType,
|
|
100
|
+
Er as TooManyEventActionStepsProvidedError,
|
|
101
|
+
Ar as UnknownTransferPayloadSupplied,
|
|
102
|
+
yr as UnparseableAbiParamError,
|
|
103
|
+
gr as UnrecognizedFilterTypeError,
|
|
104
|
+
fr as ValidationAbiMissingError,
|
|
105
|
+
Ne as ValidatorByComponentInterface,
|
|
105
106
|
y as actionFromAddress,
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
x as allowListFromAddress,
|
|
108
|
+
Ur as allowListIncentiveAbi,
|
|
108
109
|
S as anyActionParameter,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
Sr as assertValidAddressByChainId,
|
|
111
|
+
ur as awaitResult,
|
|
112
|
+
Gr as boostCoreAbi,
|
|
113
|
+
Wr as boostRegistryAbi,
|
|
114
|
+
U as budgetFromAddress,
|
|
115
|
+
vr as bytes4,
|
|
116
|
+
zr as cgdaIncentiveAbi,
|
|
117
|
+
_e as decodeClaimData,
|
|
118
|
+
kr as erc20IncentiveAbi,
|
|
119
|
+
qr as erc20VariableCriteriaIncentiveAbi,
|
|
120
|
+
Yr as erc20VariableIncentiveAbi,
|
|
121
|
+
fe as gasRebateIncentiveCriteria,
|
|
122
|
+
Pr as getDeployedContractAddress,
|
|
123
|
+
Rr as getErc20Balance,
|
|
124
|
+
Se as incentiveFromAddress,
|
|
125
|
+
q as isERC1155TransferPayload,
|
|
126
|
+
u as isEventActionPayloadSimple,
|
|
127
|
+
Y as isFungibleTransfer,
|
|
128
|
+
Hr as limitedSignerValidatorAbi,
|
|
129
|
+
jr as managedBudgetAbi,
|
|
130
|
+
Jr as managedBudgetWithFeesAbi,
|
|
131
|
+
Kr as passthroughAuthAbi,
|
|
132
|
+
Qr as pointsIncentiveAbi,
|
|
133
|
+
ie as prepareAllowListIncentivePayload,
|
|
132
134
|
c as prepareBoostPayload,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
de as prepareCGDAIncentivePayload,
|
|
136
|
+
xr as prepareClaimPayload,
|
|
137
|
+
Fr as prepareERC1155Payload,
|
|
138
|
+
Lr as prepareERC1155Transfer,
|
|
139
|
+
me as prepareERC20IncentivePayload,
|
|
138
140
|
Ce as prepareERC20VariableCriteriaIncentivePayload,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
De as
|
|
150
|
-
xe as
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
141
|
+
Ae as prepareERC20VariableIncentivePayload,
|
|
142
|
+
v as prepareEventActionPayload,
|
|
143
|
+
hr as prepareFungiblePayload,
|
|
144
|
+
Or as prepareFungibleTransfer,
|
|
145
|
+
Le as prepareLimitedSignerValidatorClaimDataPayload,
|
|
146
|
+
he as prepareLimitedSignerValidatorInputParams,
|
|
147
|
+
Oe as prepareLimitedSignerValidatorPayload,
|
|
148
|
+
H as prepareManagedBudgetPayload,
|
|
149
|
+
G as prepareManagedBudgetWithFeesPayload,
|
|
150
|
+
Pe as preparePointsIncentivePayload,
|
|
151
|
+
De as prepareSignerValidatorClaimDataPayload,
|
|
152
|
+
xe as prepareSignerValidatorInputParams,
|
|
153
|
+
Te as prepareSignerValidatorPayload,
|
|
154
|
+
L as prepareSimpleAllowListPayload,
|
|
155
|
+
M as prepareSimpleDenyListPayload,
|
|
156
|
+
j as prepareTransfer,
|
|
157
|
+
Mr as prepareTransferPayload,
|
|
158
|
+
Xr as rbacAbi,
|
|
159
|
+
Zr as signerValidatorAbi,
|
|
160
|
+
$r as simpleAllowListAbi,
|
|
161
|
+
ea as simpleDenyListAbi,
|
|
162
|
+
P as transactionSenderClaimant,
|
|
163
|
+
Ue as validatorFromAddress
|
|
161
164
|
};
|
|
162
165
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/src/BoostCore.ts
CHANGED
|
@@ -59,12 +59,17 @@ import {
|
|
|
59
59
|
ManagedBudget,
|
|
60
60
|
type ManagedBudgetPayload,
|
|
61
61
|
} from './Budgets/ManagedBudget';
|
|
62
|
+
import {
|
|
63
|
+
ManagedBudgetWithFees,
|
|
64
|
+
type ManagedBudgetWithFeesPayload,
|
|
65
|
+
} from './Budgets/ManagedBudgetWithFees';
|
|
62
66
|
import {
|
|
63
67
|
Deployable,
|
|
64
68
|
type DeployableOptions,
|
|
65
69
|
type DeployablePayloadOrAddress,
|
|
66
70
|
type GenericDeployableParams,
|
|
67
71
|
} from './Deployable/Deployable';
|
|
72
|
+
import { Roles } from './Deployable/DeployableTargetWithRBAC';
|
|
68
73
|
import {
|
|
69
74
|
AllowListIncentive,
|
|
70
75
|
type AllowListIncentivePayload,
|
|
@@ -1268,6 +1273,31 @@ export class BoostCore extends Deployable<
|
|
|
1268
1273
|
options,
|
|
1269
1274
|
);
|
|
1270
1275
|
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Bound {@link ManagedBudgetWithFees} constructor that reuses the same configuration as the Boost Core instance.
|
|
1278
|
+
* Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.
|
|
1279
|
+
*
|
|
1280
|
+
* @example
|
|
1281
|
+
* ```ts
|
|
1282
|
+
* const budget = core.ManagedBudgetWithFees('0x') // is roughly equivalent to
|
|
1283
|
+
* const budget = new ManagedBudgetWithFees({ config: core._config, account: core._account }, '0x')
|
|
1284
|
+
* ```
|
|
1285
|
+
* @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>} options
|
|
1286
|
+
* @returns {ManagedBudgetWithFees}
|
|
1287
|
+
*/
|
|
1288
|
+
ManagedBudgetWithFees(
|
|
1289
|
+
options: DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>,
|
|
1290
|
+
) {
|
|
1291
|
+
if (typeof options !== 'string') {
|
|
1292
|
+
options.authorized = [this.assertValidAddress(), ...options.authorized];
|
|
1293
|
+
options.roles = [Roles.MANAGER, ...options.roles];
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
return new ManagedBudgetWithFees(
|
|
1297
|
+
{ config: this._config, account: this._account },
|
|
1298
|
+
options,
|
|
1299
|
+
);
|
|
1300
|
+
}
|
|
1271
1301
|
// /**
|
|
1272
1302
|
// * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
1273
1303
|
// *
|
package/src/Budgets/Budget.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { aBudgetAbi } from '@boostxyz/evm';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
AManagedBudget,
|
|
4
|
+
AManagedBudgetWithFees,
|
|
5
|
+
} from '@boostxyz/evm/deploys/componentInterfaces.json';
|
|
3
6
|
import { readContract } from '@wagmi/core';
|
|
4
7
|
import type { Address, Hex } from 'viem';
|
|
5
8
|
import type { DeployableOptions } from '../Deployable/Deployable';
|
|
6
9
|
import { InvalidComponentInterfaceError } from '../errors';
|
|
7
10
|
import { ManagedBudget } from './ManagedBudget';
|
|
11
|
+
import { ManagedBudgetWithFees } from './ManagedBudgetWithFees';
|
|
8
12
|
|
|
9
13
|
export {
|
|
10
14
|
// VestingBudget,
|
|
@@ -17,7 +21,7 @@ export {
|
|
|
17
21
|
* @export
|
|
18
22
|
* @typedef {Budget}
|
|
19
23
|
*/
|
|
20
|
-
export type Budget = ManagedBudget; // | VestingBudget
|
|
24
|
+
export type Budget = ManagedBudget | ManagedBudgetWithFees; // | VestingBudget
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
27
|
* A map of Budget component interfaces to their constructors.
|
|
@@ -28,6 +32,7 @@ export const BudgetByComponentInterface = {
|
|
|
28
32
|
// ['0x64683da1']: VestingBudget,
|
|
29
33
|
// ['0x2929d19c']: SimpleBudget,
|
|
30
34
|
[AManagedBudget as Hex]: ManagedBudget,
|
|
35
|
+
[AManagedBudgetWithFees as Hex]: ManagedBudgetWithFees,
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
/**
|
|
@@ -37,7 +42,7 @@ export const BudgetByComponentInterface = {
|
|
|
37
42
|
* @async
|
|
38
43
|
* @param {DeployableOptions} options
|
|
39
44
|
* @param {Address} address
|
|
40
|
-
* @returns {Promise<ManagedBudget>}
|
|
45
|
+
* @returns {Promise<ManagedBudget | ManagedBudgetWithFees>}
|
|
41
46
|
* @throws {@link InvalidComponentInterfaceError}
|
|
42
47
|
*/
|
|
43
48
|
export async function budgetFromAddress(
|