@boostxyz/sdk 2.1.2 → 2.2.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.cjs.map +1 -1
- package/dist/Actions/Action.d.ts +2 -1
- package/dist/Actions/Action.d.ts.map +1 -1
- package/dist/Actions/Action.js +14 -13
- package/dist/Actions/Action.js.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +219 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +39 -39
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.d.ts +2 -1
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +18 -17
- package/dist/AllowLists/AllowList.js.map +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +9 -9
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +2 -2
- 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 +33 -0
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +98 -81
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +12 -12
- package/dist/{Budget-CUIFf1Br.js → Budget-2Zb3Mb-8.js} +40 -39
- package/dist/{Budget-CUIFf1Br.js.map → Budget-2Zb3Mb-8.js.map} +1 -1
- package/dist/{Budget-cI30CIMN.cjs → Budget-2xKEvkbL.cjs} +2 -2
- package/dist/{Budget-cI30CIMN.cjs.map → Budget-2xKEvkbL.cjs.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.d.ts +2 -1
- 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 +33 -33
- 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.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +158 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +268 -31
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/Incentive-CfIjdL4T.cjs +2 -0
- package/dist/Incentive-CfIjdL4T.cjs.map +1 -0
- package/dist/Incentive-DNwTyG5Z.js +393 -0
- package/dist/Incentive-DNwTyG5Z.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +28 -28
- 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 +30 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +25 -25
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +25 -0
- 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 +30 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +42 -42
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20PeggedIncentive.d.ts +905 -0
- package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +67 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +31 -31
- 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.d.ts +20 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +18 -18
- package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +26 -4
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +20 -40
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +25 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +29 -29
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-Ds0CQ4uR.cjs → SimpleDenyList-BQ0GqQfC.cjs} +2 -2
- package/dist/{SimpleDenyList-Ds0CQ4uR.cjs.map → SimpleDenyList-BQ0GqQfC.cjs.map} +1 -1
- package/dist/{SimpleDenyList-CXruWOyu.js → SimpleDenyList-D49GF3NX.js} +11 -11
- package/dist/{SimpleDenyList-CXruWOyu.js.map → SimpleDenyList-D49GF3NX.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts +10 -0
- package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +15 -15
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +10 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +8 -8
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +2 -1
- package/dist/Validators/Validator.d.ts.map +1 -1
- package/dist/Validators/Validator.js +20 -19
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/{componentInterfaces-dakxtQHf.js → componentInterfaces-C4uAYjSo.js} +12 -12
- package/dist/componentInterfaces-C4uAYjSo.js.map +1 -0
- package/dist/deployments.json +3 -0
- package/dist/{generated-BTslM7bf.js → generated-B5pVBNb-.js} +1835 -730
- package/dist/generated-B5pVBNb-.js.map +1 -0
- package/dist/generated-D50hBWtr.cjs +3 -0
- package/dist/generated-D50hBWtr.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 +113 -110
- package/package.json +2 -2
- package/src/Actions/Action.ts +3 -0
- package/src/Actions/EventAction.test.ts +49 -2
- package/src/Actions/EventAction.ts +12 -4
- package/src/AllowLists/AllowList.ts +3 -0
- package/src/BoostCore.ts +27 -5
- package/src/Budgets/Budget.ts +3 -0
- package/src/Deployable/DeployableTargetWithRBAC.test.ts +175 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +281 -0
- package/src/Incentives/AllowListIncentive.test.ts +48 -0
- package/src/Incentives/AllowListIncentive.ts +1 -1
- package/src/Incentives/CGDAIncentive.test.ts +50 -0
- package/src/Incentives/CGDAIncentive.ts +1 -1
- package/src/Incentives/ERC1155Incentive.ts +1 -1
- package/src/Incentives/ERC20Incentive.test.ts +49 -0
- package/src/Incentives/ERC20Incentive.ts +1 -1
- package/src/Incentives/ERC20PeggedIncentive.ts +507 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +48 -0
- package/src/Incentives/ERC20VariableIncentive.ts +1 -1
- package/src/Incentives/Incentive.ts +9 -1
- package/src/Incentives/PointsIncentive.test.ts +51 -0
- package/src/Incentives/PointsIncentive.ts +1 -1
- package/src/Validators/Validator.ts +3 -0
- package/src/index.ts +1 -0
- package/dist/componentInterfaces-dakxtQHf.js.map +0 -1
- package/dist/generated-BTslM7bf.js.map +0 -1
- package/dist/generated-DhXxTQ20.cjs +0 -3
- package/dist/generated-DhXxTQ20.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 E=require("./BoostRegistry.cjs"),n=require("./BoostCore.cjs"),C=require("./Boost.cjs"),u=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),y=require("./AllowLists/AllowList.cjs"),g=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-BQ0GqQfC.cjs"),l=require("./Budget-2xKEvkbL.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"),m=require("./Incentives/CGDAIncentive.cjs"),S=require("./Incentives/ERC20Incentive.cjs"),d=require("./Incentive-CfIjdL4T.cjs"),b=require("./Incentives/ERC20VariableIncentive.cjs"),A=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),R=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"),t=require("./transfers.cjs"),F=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-D50hBWtr.cjs");exports.BOOST_REGISTRY_ADDRESS=E.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=E.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=E.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=C.Boost;exports.prepareBoostPayload=C.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=y.AllowListByComponentInterface;exports.OpenAllowList=y.OpenAllowList;exports.allowListFromAddress=y.allowListFromAddress;exports.LIST_MANAGER_ROLE=g.LIST_MANAGER_ROLE;exports.SimpleAllowList=g.SimpleAllowList;exports.prepareSimpleAllowListPayload=g.prepareSimpleAllowListPayload;exports.SimpleDenyList=I.SimpleDenyList;exports.prepareSimpleDenyListPayload=I.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=P.DeployableTargetWithRBAC;exports.Roles=P.Roles;exports.AllowListIncentive=v.AllowListIncentive;exports.prepareAllowListIncentivePayload=v.prepareAllowListIncentivePayload;exports.CGDAIncentive=m.CGDAIncentive;exports.prepareCGDAIncentivePayload=m.prepareCGDAIncentivePayload;exports.ERC20Incentive=S.ERC20Incentive;exports.prepareERC20IncentivePayload=S.prepareERC20IncentivePayload;exports.ERC20PeggedIncentive=d.ERC20PeggedIncentive;exports.IncentiveByComponentInterface=d.IncentiveByComponentInterface;exports.incentiveFromAddress=d.incentiveFromAddress;exports.prepareERC20PeggedIncentivePayload=d.prepareERC20PeggedIncentivePayload;exports.ERC20VariableIncentive=b.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=b.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=A.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=A.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=A.prepareERC20VariableCriteriaIncentivePayload;exports.PointsIncentive=R.PointsIncentive;exports.preparePointsIncentivePayload=R.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.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=F.PassthroughAuth;exports.allowListIncentiveAbi=r.B;exports.boostCoreAbi=r.h;exports.boostRegistryAbi=r.ye;exports.cgdaIncentiveAbi=r.T;exports.erc20IncentiveAbi=r.b;exports.erc20PeggedIncentiveAbi=r.f;exports.erc20VariableCriteriaIncentiveAbi=r.y;exports.erc20VariableIncentiveAbi=r.A;exports.limitedSignerValidatorAbi=r.x;exports.managedBudgetAbi=r.v;exports.managedBudgetWithFeesAbi=r.o;exports.passthroughAuthAbi=r._e;exports.pointsIncentiveAbi=r.g;exports.rbacAbi=r.z;exports.signerValidatorAbi=r.F;exports.simpleAllowListAbi=r.O;exports.simpleDenyListAbi=r.C;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './Deployable/DeployableTargetWithRBAC';
|
|
|
16
16
|
export * from './Incentives/AllowListIncentive';
|
|
17
17
|
export * from './Incentives/CGDAIncentive';
|
|
18
18
|
export * from './Incentives/ERC20Incentive';
|
|
19
|
+
export * from './Incentives/ERC20PeggedIncentive';
|
|
19
20
|
export * from './Incentives/ERC20VariableIncentive';
|
|
20
21
|
export * from './Incentives/ERC20VariableCriteriaIncentive';
|
|
21
22
|
export * from './Incentives/Incentive';
|
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;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"}
|
|
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,mCAAmC,CAAC;AAClD,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
|
@@ -2,12 +2,12 @@ import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegist
|
|
|
2
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
4
|
import { ActionByComponentInterface as A, actionFromAddress as y } from "./Actions/Action.js";
|
|
5
|
-
import { EventAction as
|
|
6
|
-
import { AllowListByComponentInterface as B, OpenAllowList as
|
|
5
|
+
import { EventAction as C, FilterType as f, PrimitiveType as b, SignatureType as I, anyActionParameter as v, isEventActionPayloadSimple as P, prepareEventActionPayload as S, transactionSenderClaimant as u } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as B, OpenAllowList as x, allowListFromAddress as D } from "./AllowLists/AllowList.js";
|
|
7
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-
|
|
9
|
-
import { B as N, M as _, b as U, p as G } from "./Budget-
|
|
10
|
-
import { ManagedBudget as z, ManagedBudgetRoles as k, isERC1155TransferPayload as q, isFungibleTransfer as Y, prepareManagedBudgetPayload as
|
|
8
|
+
import { S as O, p as M } from "./SimpleDenyList-D49GF3NX.js";
|
|
9
|
+
import { B as N, M as _, b as U, p as G } from "./Budget-2Zb3Mb-8.js";
|
|
10
|
+
import { ManagedBudget as z, ManagedBudgetRoles as k, isERC1155TransferPayload as q, isFungibleTransfer as Y, prepareManagedBudgetPayload as j, prepareTransfer as H } from "./Budgets/ManagedBudget.js";
|
|
11
11
|
import { Deployable as K } from "./Deployable/Deployable.js";
|
|
12
12
|
import { Contract as X } from "./Deployable/Contract.js";
|
|
13
13
|
import { DeployableTarget as $ } from "./Deployable/DeployableTarget.js";
|
|
@@ -15,151 +15,154 @@ import { DeployableTargetWithRBAC as re, Roles as ae } from "./Deployable/Deploy
|
|
|
15
15
|
import { AllowListIncentive as te, prepareAllowListIncentivePayload as ie } from "./Incentives/AllowListIncentive.js";
|
|
16
16
|
import { CGDAIncentive as pe, prepareCGDAIncentivePayload as de } from "./Incentives/CGDAIncentive.js";
|
|
17
17
|
import { ERC20Incentive as se, prepareERC20IncentivePayload as me } from "./Incentives/ERC20Incentive.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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 {
|
|
18
|
+
import { E as Ee, I as Ae, i as ye, p as ge } from "./Incentive-DNwTyG5Z.js";
|
|
19
|
+
import { ERC20VariableIncentive as fe, prepareERC20VariableIncentivePayload as be } from "./Incentives/ERC20VariableIncentive.js";
|
|
20
|
+
import { ERC20VariableCriteriaIncentive as ve, gasRebateIncentiveCriteria as Pe, prepareERC20VariableCriteriaIncentivePayload as Se } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
21
|
+
import { PointsIncentive as Re, preparePointsIncentivePayload as Be } from "./Incentives/PointsIncentive.js";
|
|
22
|
+
import { SignerValidator as De, prepareSignerValidatorClaimDataPayload as Te, prepareSignerValidatorInputParams as Ve, prepareSignerValidatorPayload as Fe } from "./Validators/SignerValidator.js";
|
|
23
|
+
import { LimitedSignerValidator as he, prepareLimitedSignerValidatorClaimDataPayload as Oe, prepareLimitedSignerValidatorInputParams as Me, prepareLimitedSignerValidatorPayload as we } from "./Validators/LimitedSignerValidator.js";
|
|
24
|
+
import { BoostValidatorEOA as _e, ValidatorByComponentInterface as Ue, decodeClaimData as Ge, validatorFromAddress as We } from "./Validators/Validator.js";
|
|
25
|
+
import { BoostCoreNoIdentifierEmitted as ke, BoostNotFoundError as qe, BudgetMustAuthorizeBoostCore as Ye, ContractAddressRequiredError as je, DecodedArgsError as He, DecodedArgsMalformedError as Je, DeployableAlreadyDeployedError as Ke, DeployableBuildParametersUnspecifiedError as Qe, DeployableMissingPayloadError as Xe, DeployableUnknownOwnerProvidedError as Ze, DeployableWagmiConfigurationRequiredError as $e, FieldActionValidationError as er, FieldValueNotComparableError as rr, FieldValueUndefinedError as ar, FunctionDataDecodeError as or, IncentiveCriteriaNotFoundError as tr, IncentiveNotCloneableError as ir, InvalidComponentInterfaceError as nr, InvalidCriteriaTypeError as pr, InvalidNumericalCriteriaError as dr, InvalidProtocolChainIdError as lr, MustInitializeBudgetError as sr, NoConnectedChainIdError as mr, NoContractAddressUponReceiptError as cr, NoEventActionStepsProvidedError as Er, NoMatchingLogsError as Ar, TooManyEventActionStepsProvidedError as yr, UnknownTransferPayloadSupplied as gr, UnparseableAbiParamError as Cr, UnrecognizedFilterTypeError as fr, ValidationAbiMissingError as br } from "./errors.js";
|
|
26
|
+
import { CheatCodes as vr, RegistryType as Pr, assertValidAddressByChainId as Sr, awaitResult as ur, bytes4 as Rr, getDeployedContractAddress as Br, getErc20Balance as xr } from "./utils.js";
|
|
27
|
+
import { StrategyType as Tr, prepareClaimPayload as Vr } from "./claiming.js";
|
|
28
|
+
import { AssetType as Lr, prepareERC1155Payload as hr, prepareERC1155Transfer as Or, prepareFungiblePayload as Mr, prepareFungibleTransfer as wr, prepareTransferPayload as Nr } from "./transfers.js";
|
|
29
|
+
import { PassthroughAuth as Ur } from "./Auth/PassthroughAuth.js";
|
|
30
|
+
import { B as Wr, h as zr, y as kr, T as qr, b as Yr, f as jr, a as Hr, A as Jr, x as Kr, v as Qr, o as Xr, _ as Zr, g as $r, z as ea, F as ra, O as aa, C as oa } from "./generated-B5pVBNb-.js";
|
|
31
31
|
export {
|
|
32
32
|
A as ActionByComponentInterface,
|
|
33
33
|
B as AllowListByComponentInterface,
|
|
34
34
|
te as AllowListIncentive,
|
|
35
|
-
|
|
35
|
+
Lr as AssetType,
|
|
36
36
|
n as BOOST_CORE_ADDRESS,
|
|
37
37
|
p as BOOST_CORE_ADDRESSES,
|
|
38
38
|
a as BOOST_REGISTRY_ADDRESS,
|
|
39
39
|
o as BOOST_REGISTRY_ADDRESSES,
|
|
40
40
|
m as Boost,
|
|
41
41
|
d as BoostCore,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
ke as BoostCoreNoIdentifierEmitted,
|
|
43
|
+
qe as BoostNotFoundError,
|
|
44
44
|
t as BoostRegistry,
|
|
45
|
-
|
|
45
|
+
_e as BoostValidatorEOA,
|
|
46
46
|
N as BudgetByComponentInterface,
|
|
47
|
-
|
|
47
|
+
Ye as BudgetMustAuthorizeBoostCore,
|
|
48
48
|
pe as CGDAIncentive,
|
|
49
|
-
|
|
49
|
+
vr as CheatCodes,
|
|
50
50
|
X as Contract,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
je as ContractAddressRequiredError,
|
|
52
|
+
He as DecodedArgsError,
|
|
53
|
+
Je as DecodedArgsMalformedError,
|
|
54
54
|
K as Deployable,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
Ke as DeployableAlreadyDeployedError,
|
|
56
|
+
Qe as DeployableBuildParametersUnspecifiedError,
|
|
57
|
+
Xe as DeployableMissingPayloadError,
|
|
58
58
|
$ as DeployableTarget,
|
|
59
59
|
re as DeployableTargetWithRBAC,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
Ze as DeployableUnknownOwnerProvidedError,
|
|
61
|
+
$e as DeployableWagmiConfigurationRequiredError,
|
|
62
62
|
se as ERC20Incentive,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
Ee as ERC20PeggedIncentive,
|
|
64
|
+
ve as ERC20VariableCriteriaIncentive,
|
|
65
|
+
fe as ERC20VariableIncentive,
|
|
66
|
+
C as EventAction,
|
|
66
67
|
l as FEE_DENOMINATOR,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
er as FieldActionValidationError,
|
|
69
|
+
rr as FieldValueNotComparableError,
|
|
70
|
+
ar as FieldValueUndefinedError,
|
|
71
|
+
f as FilterType,
|
|
72
|
+
or as FunctionDataDecodeError,
|
|
73
|
+
Ae as IncentiveByComponentInterface,
|
|
74
|
+
tr as IncentiveCriteriaNotFoundError,
|
|
75
|
+
ir as IncentiveNotCloneableError,
|
|
76
|
+
nr as InvalidComponentInterfaceError,
|
|
77
|
+
pr as InvalidCriteriaTypeError,
|
|
78
|
+
dr as InvalidNumericalCriteriaError,
|
|
79
|
+
lr as InvalidProtocolChainIdError,
|
|
79
80
|
V as LIST_MANAGER_ROLE,
|
|
80
|
-
|
|
81
|
+
he as LimitedSignerValidator,
|
|
81
82
|
z as ManagedBudget,
|
|
82
83
|
k as ManagedBudgetRoles,
|
|
83
84
|
_ as ManagedBudgetWithFees,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
sr as MustInitializeBudgetError,
|
|
86
|
+
mr as NoConnectedChainIdError,
|
|
87
|
+
cr as NoContractAddressUponReceiptError,
|
|
88
|
+
Er as NoEventActionStepsProvidedError,
|
|
89
|
+
Ar as NoMatchingLogsError,
|
|
90
|
+
x as OpenAllowList,
|
|
91
|
+
Ur as PassthroughAuth,
|
|
92
|
+
Re as PointsIncentive,
|
|
92
93
|
b as PrimitiveType,
|
|
93
|
-
|
|
94
|
+
Pr as RegistryType,
|
|
94
95
|
ae as Roles,
|
|
95
96
|
I as SignatureType,
|
|
96
|
-
|
|
97
|
+
De as SignerValidator,
|
|
97
98
|
F as SimpleAllowList,
|
|
98
99
|
O as SimpleDenyList,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
Tr as StrategyType,
|
|
101
|
+
yr as TooManyEventActionStepsProvidedError,
|
|
102
|
+
gr as UnknownTransferPayloadSupplied,
|
|
103
|
+
Cr as UnparseableAbiParamError,
|
|
104
|
+
fr as UnrecognizedFilterTypeError,
|
|
105
|
+
br as ValidationAbiMissingError,
|
|
106
|
+
Ue as ValidatorByComponentInterface,
|
|
106
107
|
y as actionFromAddress,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
D as allowListFromAddress,
|
|
109
|
+
Wr as allowListIncentiveAbi,
|
|
110
|
+
v as anyActionParameter,
|
|
110
111
|
Sr as assertValidAddressByChainId,
|
|
111
112
|
ur as awaitResult,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
zr as boostCoreAbi,
|
|
114
|
+
kr as boostRegistryAbi,
|
|
114
115
|
U as budgetFromAddress,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
116
|
+
Rr as bytes4,
|
|
117
|
+
qr as cgdaIncentiveAbi,
|
|
118
|
+
Ge as decodeClaimData,
|
|
119
|
+
Yr as erc20IncentiveAbi,
|
|
120
|
+
jr as erc20PeggedIncentiveAbi,
|
|
121
|
+
Hr as erc20VariableCriteriaIncentiveAbi,
|
|
122
|
+
Jr as erc20VariableIncentiveAbi,
|
|
123
|
+
Pe as gasRebateIncentiveCriteria,
|
|
124
|
+
Br as getDeployedContractAddress,
|
|
125
|
+
xr as getErc20Balance,
|
|
126
|
+
ye as incentiveFromAddress,
|
|
125
127
|
q as isERC1155TransferPayload,
|
|
126
|
-
|
|
128
|
+
P as isEventActionPayloadSimple,
|
|
127
129
|
Y as isFungibleTransfer,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
Kr as limitedSignerValidatorAbi,
|
|
131
|
+
Qr as managedBudgetAbi,
|
|
132
|
+
Xr as managedBudgetWithFeesAbi,
|
|
133
|
+
Zr as passthroughAuthAbi,
|
|
134
|
+
$r as pointsIncentiveAbi,
|
|
133
135
|
ie as prepareAllowListIncentivePayload,
|
|
134
136
|
c as prepareBoostPayload,
|
|
135
137
|
de as prepareCGDAIncentivePayload,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
Vr as prepareClaimPayload,
|
|
139
|
+
hr as prepareERC1155Payload,
|
|
140
|
+
Or as prepareERC1155Transfer,
|
|
139
141
|
me as prepareERC20IncentivePayload,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
ge as prepareERC20PeggedIncentivePayload,
|
|
143
|
+
Se as prepareERC20VariableCriteriaIncentivePayload,
|
|
144
|
+
be as prepareERC20VariableIncentivePayload,
|
|
145
|
+
S as prepareEventActionPayload,
|
|
146
|
+
Mr as prepareFungiblePayload,
|
|
147
|
+
wr as prepareFungibleTransfer,
|
|
148
|
+
Oe as prepareLimitedSignerValidatorClaimDataPayload,
|
|
149
|
+
Me as prepareLimitedSignerValidatorInputParams,
|
|
150
|
+
we as prepareLimitedSignerValidatorPayload,
|
|
151
|
+
j as prepareManagedBudgetPayload,
|
|
149
152
|
G as prepareManagedBudgetWithFeesPayload,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
Be as preparePointsIncentivePayload,
|
|
154
|
+
Te as prepareSignerValidatorClaimDataPayload,
|
|
155
|
+
Ve as prepareSignerValidatorInputParams,
|
|
156
|
+
Fe as prepareSignerValidatorPayload,
|
|
154
157
|
L as prepareSimpleAllowListPayload,
|
|
155
158
|
M as prepareSimpleDenyListPayload,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
H as prepareTransfer,
|
|
160
|
+
Nr as prepareTransferPayload,
|
|
161
|
+
ea as rbacAbi,
|
|
162
|
+
ra as signerValidatorAbi,
|
|
163
|
+
aa as simpleAllowListAbi,
|
|
164
|
+
oa as simpleDenyListAbi,
|
|
165
|
+
u as transactionSenderClaimant,
|
|
166
|
+
We as validatorFromAddress
|
|
164
167
|
};
|
|
165
168
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostxyz/sdk",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.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.5.0"
|
|
217
217
|
},
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"@wagmi/core": "2.x",
|
package/src/Actions/Action.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { readContract } from '@wagmi/core';
|
|
|
4
4
|
import type { Address, Hex } from 'viem';
|
|
5
5
|
import type { DeployableOptions } from '../Deployable/Deployable';
|
|
6
6
|
import { InvalidComponentInterfaceError } from '../errors';
|
|
7
|
+
import type { ReadParams } from '../utils';
|
|
7
8
|
import { EventAction } from './EventAction';
|
|
8
9
|
|
|
9
10
|
export {
|
|
@@ -44,11 +45,13 @@ export const ActionByComponentInterface = {
|
|
|
44
45
|
export async function actionFromAddress(
|
|
45
46
|
options: DeployableOptions,
|
|
46
47
|
address: Address,
|
|
48
|
+
params?: ReadParams,
|
|
47
49
|
) {
|
|
48
50
|
const interfaceId = (await readContract(options.config, {
|
|
49
51
|
abi: aActionAbi,
|
|
50
52
|
functionName: 'getComponentInterface',
|
|
51
53
|
address,
|
|
54
|
+
...params,
|
|
52
55
|
})) as keyof typeof ActionByComponentInterface;
|
|
53
56
|
const Ctor = ActionByComponentInterface[interfaceId];
|
|
54
57
|
if (!Ctor) {
|
|
@@ -982,7 +982,54 @@ describe("EventAction Func Selector", () => {
|
|
|
982
982
|
).toBe(true);
|
|
983
983
|
});
|
|
984
984
|
|
|
985
|
-
test("validates action step with `notBeforeBlockNumber` lower than tx blockNumber", async () => {
|
|
985
|
+
test("validates event action step with `notBeforeBlockNumber` lower than tx blockNumber", async () => {
|
|
986
|
+
const action = await loadFixture(cloneEventAction(fixtures, erc721));
|
|
987
|
+
const actionSteps = await action.getActionSteps();
|
|
988
|
+
const actionStep = actionSteps[0]!;
|
|
989
|
+
const recipient = accounts[1].account;
|
|
990
|
+
const { hash } = await erc721.mintRaw(recipient, {
|
|
991
|
+
value: parseEther(".1"),
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
const criteriaMatch = await action.isActionStepValid(actionStep, {
|
|
995
|
+
notBeforeBlockNumber: BigInt(Number.MAX_SAFE_INTEGER),
|
|
996
|
+
hash,
|
|
997
|
+
knownSignatures: allKnownSignatures,
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
expect(criteriaMatch).toBe(false);
|
|
1001
|
+
});
|
|
1002
|
+
|
|
1003
|
+
test("validates event action step with `notBeforeBlockNumber` greater than/equal to tx blockNumber", async () => {
|
|
1004
|
+
const action = await loadFixture(cloneEventAction(fixtures, erc721));
|
|
1005
|
+
const actionSteps = await action.getActionSteps();
|
|
1006
|
+
const actionStep = actionSteps[0]!;
|
|
1007
|
+
const recipient = accounts[1].account;
|
|
1008
|
+
const { hash } = await erc721.mintRaw(recipient, {
|
|
1009
|
+
value: parseEther(".1"),
|
|
1010
|
+
});
|
|
1011
|
+
const receipt = await getTransactionReceipt(defaultOptions.config, {
|
|
1012
|
+
hash,
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
const eqMatch = await action.isActionStepValid(actionStep, {
|
|
1016
|
+
notBeforeBlockNumber: receipt.blockNumber,
|
|
1017
|
+
hash,
|
|
1018
|
+
knownSignatures: allKnownSignatures,
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
expect(eqMatch).toBe(true);
|
|
1022
|
+
const gtMatch = await action.isActionStepValid(actionStep, {
|
|
1023
|
+
notBeforeBlockNumber: receipt.blockNumber - 1n,
|
|
1024
|
+
hash,
|
|
1025
|
+
knownSignatures: allKnownSignatures,
|
|
1026
|
+
});
|
|
1027
|
+
|
|
1028
|
+
expect(gtMatch).toBe(true);
|
|
1029
|
+
});
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
test("validates function action step with `notBeforeBlockNumber` lower than tx blockNumber", async () => {
|
|
986
1033
|
const action = await loadFixture(cloneFunctionAction(fixtures, erc721));
|
|
987
1034
|
const actionSteps = await action.getActionSteps();
|
|
988
1035
|
const actionStep = actionSteps[0]!;
|
|
@@ -1000,7 +1047,7 @@ describe("EventAction Func Selector", () => {
|
|
|
1000
1047
|
expect(criteriaMatch).toBe(false);
|
|
1001
1048
|
});
|
|
1002
1049
|
|
|
1003
|
-
test("validates action step with `notBeforeBlockNumber` greater than/equal to tx blockNumber", async () => {
|
|
1050
|
+
test("validates function action step with `notBeforeBlockNumber` greater than/equal to tx blockNumber", async () => {
|
|
1004
1051
|
const action = await loadFixture(cloneFunctionAction(fixtures, erc721));
|
|
1005
1052
|
const actionSteps = await action.getActionSteps();
|
|
1006
1053
|
const actionStep = actionSteps[0]!;
|
|
@@ -708,8 +708,12 @@ export class EventAction extends DeployableTarget<
|
|
|
708
708
|
...params,
|
|
709
709
|
chainId: actionStep.chainid,
|
|
710
710
|
});
|
|
711
|
-
if (
|
|
712
|
-
|
|
711
|
+
if (
|
|
712
|
+
params.notBeforeBlockNumber &&
|
|
713
|
+
receipt.blockNumber < params.notBeforeBlockNumber
|
|
714
|
+
) {
|
|
715
|
+
return false;
|
|
716
|
+
}
|
|
713
717
|
const decodedLogs = receipt.logs
|
|
714
718
|
.filter((log) => log.topics[0] === toEventSelector(event))
|
|
715
719
|
.map((log) => {
|
|
@@ -730,8 +734,12 @@ export class EventAction extends DeployableTarget<
|
|
|
730
734
|
...params,
|
|
731
735
|
chainId: actionStep.chainid,
|
|
732
736
|
});
|
|
733
|
-
if (
|
|
734
|
-
|
|
737
|
+
if (
|
|
738
|
+
params.notBeforeBlockNumber &&
|
|
739
|
+
transaction.blockNumber < params.notBeforeBlockNumber
|
|
740
|
+
) {
|
|
741
|
+
return false;
|
|
742
|
+
}
|
|
735
743
|
return this.isActionFunctionValid(actionStep, transaction, params);
|
|
736
744
|
}
|
|
737
745
|
}
|
|
@@ -7,6 +7,7 @@ import { readContract } from '@wagmi/core';
|
|
|
7
7
|
import type { Address, Hex } from 'viem';
|
|
8
8
|
import type { DeployableOptions } from '../Deployable/Deployable';
|
|
9
9
|
import { InvalidComponentInterfaceError } from '../errors';
|
|
10
|
+
import type { ReadParams } from '../utils';
|
|
10
11
|
import { OpenAllowList } from './OpenAllowList';
|
|
11
12
|
import { SimpleAllowList } from './SimpleAllowList';
|
|
12
13
|
import { SimpleDenyList } from './SimpleDenyList';
|
|
@@ -45,11 +46,13 @@ export const AllowListByComponentInterface = {
|
|
|
45
46
|
export async function allowListFromAddress(
|
|
46
47
|
options: DeployableOptions,
|
|
47
48
|
address: Address,
|
|
49
|
+
params?: ReadParams,
|
|
48
50
|
) {
|
|
49
51
|
const interfaceId = (await readContract(options.config, {
|
|
50
52
|
abi: aAllowListAbi,
|
|
51
53
|
functionName: 'getComponentInterface',
|
|
52
54
|
address,
|
|
55
|
+
...params,
|
|
53
56
|
})) as keyof typeof AllowListByComponentInterface;
|
|
54
57
|
const Ctor = AllowListByComponentInterface[interfaceId];
|
|
55
58
|
if (!Ctor) {
|
package/src/BoostCore.ts
CHANGED
|
@@ -82,6 +82,10 @@ import {
|
|
|
82
82
|
ERC20Incentive,
|
|
83
83
|
type ERC20IncentivePayload,
|
|
84
84
|
} from './Incentives/ERC20Incentive';
|
|
85
|
+
import {
|
|
86
|
+
ERC20PeggedIncentive,
|
|
87
|
+
type ERC20PeggedIncentivePayload,
|
|
88
|
+
} from './Incentives/ERC20PeggedIncentive';
|
|
85
89
|
import {
|
|
86
90
|
ERC20VariableCriteriaIncentive,
|
|
87
91
|
type ERC20VariableCriteriaIncentivePayload,
|
|
@@ -810,13 +814,13 @@ export class BoostCore extends Deployable<
|
|
|
810
814
|
};
|
|
811
815
|
const [action, budget, validator, allowList, incentives] =
|
|
812
816
|
await Promise.all([
|
|
813
|
-
actionFromAddress(options, boostPayload.action),
|
|
814
|
-
budgetFromAddress(options, boostPayload.budget),
|
|
815
|
-
validatorFromAddress(options, boostPayload.validator),
|
|
816
|
-
allowListFromAddress(options, boostPayload.allowList),
|
|
817
|
+
actionFromAddress(options, boostPayload.action, params),
|
|
818
|
+
budgetFromAddress(options, boostPayload.budget, params),
|
|
819
|
+
validatorFromAddress(options, boostPayload.validator, params),
|
|
820
|
+
allowListFromAddress(options, boostPayload.allowList, params),
|
|
817
821
|
Promise.all(
|
|
818
822
|
boostPayload.incentives.map((incentiveAddress) =>
|
|
819
|
-
incentiveFromAddress(options, incentiveAddress),
|
|
823
|
+
incentiveFromAddress(options, incentiveAddress, params),
|
|
820
824
|
),
|
|
821
825
|
),
|
|
822
826
|
]);
|
|
@@ -1371,6 +1375,24 @@ export class BoostCore extends Deployable<
|
|
|
1371
1375
|
options,
|
|
1372
1376
|
);
|
|
1373
1377
|
}
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Bound {@link ERC20PeggedIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1381
|
+
*
|
|
1382
|
+
* @example
|
|
1383
|
+
* ```ts
|
|
1384
|
+
* const incentive = core.ERC20PeggedIncentive({ ... }) // is roughly equivalent to
|
|
1385
|
+
* const incentive = new ERC20PeggedIncentive({ config: core._config, account: core._account }, { ... })
|
|
1386
|
+
* ```
|
|
1387
|
+
* @param {ERC20PeggedIncentivePayload} options
|
|
1388
|
+
* @returns {ERC20PeggedIncentive}
|
|
1389
|
+
*/
|
|
1390
|
+
ERC20PeggedIncentive(options: ERC20PeggedIncentivePayload) {
|
|
1391
|
+
return new ERC20PeggedIncentive(
|
|
1392
|
+
{ config: this._config, account: this._account },
|
|
1393
|
+
options,
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1374
1396
|
// /**
|
|
1375
1397
|
// * Temporarily disabled until low level ABI encoding bugs are resolved
|
|
1376
1398
|
// * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.
|
package/src/Budgets/Budget.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { readContract } from '@wagmi/core';
|
|
|
7
7
|
import type { Address, Hex } from 'viem';
|
|
8
8
|
import type { DeployableOptions } from '../Deployable/Deployable';
|
|
9
9
|
import { InvalidComponentInterfaceError } from '../errors';
|
|
10
|
+
import type { ReadParams } from '../utils';
|
|
10
11
|
import { ManagedBudget } from './ManagedBudget';
|
|
11
12
|
import { ManagedBudgetWithFees } from './ManagedBudgetWithFees';
|
|
12
13
|
|
|
@@ -48,11 +49,13 @@ export const BudgetByComponentInterface = {
|
|
|
48
49
|
export async function budgetFromAddress(
|
|
49
50
|
options: DeployableOptions,
|
|
50
51
|
address: Address,
|
|
52
|
+
params?: ReadParams,
|
|
51
53
|
) {
|
|
52
54
|
const interfaceId = (await readContract(options.config, {
|
|
53
55
|
abi: aBudgetAbi,
|
|
54
56
|
functionName: 'getComponentInterface',
|
|
55
57
|
address,
|
|
58
|
+
...params,
|
|
56
59
|
})) as keyof typeof BudgetByComponentInterface;
|
|
57
60
|
const Ctor = BudgetByComponentInterface[interfaceId];
|
|
58
61
|
if (!Ctor) {
|