@boostxyz/sdk 1.1.0-alpha.22 → 1.1.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +6 -6
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +9 -6
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +820 -15
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/OpenAllowList.d.ts +28 -28
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +28 -28
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +11 -10
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +28 -28
- package/dist/AllowLists/SimpleDenyList.d.ts.map +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-Btl5BdAs.cjs +3 -0
- package/dist/BoostCore-Btl5BdAs.cjs.map +1 -0
- package/dist/{BoostCore-BVZExPPu.js → BoostCore-CD56zbYX.js} +1678 -499
- package/dist/BoostCore-CD56zbYX.js.map +1 -0
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.d.ts +7 -7
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +6 -6
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +6 -6
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +50 -50
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +28 -28
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +30 -29
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +28 -28
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +92 -23
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +145 -47
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/{Incentive-BhHaK3PZ.cjs → Incentive-CcnOIc8L.cjs} +2 -2
- package/dist/{Incentive-BhHaK3PZ.cjs.map → Incentive-CcnOIc8L.cjs.map} +1 -1
- package/dist/{Incentive-Cqg1w6wD.js → Incentive-rM5nKznp.js} +30 -29
- package/dist/{Incentive-Cqg1w6wD.js.map → Incentive-rM5nKznp.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +11 -10
- 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 +28 -28
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +12 -11
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +28 -28
- 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 +34 -31
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +30 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +28 -28
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +28 -28
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +12 -11
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-CGaWjuld.js → SimpleDenyList-BDXpY74P.js} +18 -17
- package/dist/SimpleDenyList-BDXpY74P.js.map +1 -0
- package/dist/{SimpleDenyList-BUR17Tt1.cjs → SimpleDenyList-DNj5qDWM.cjs} +2 -2
- package/dist/SimpleDenyList-DNj5qDWM.cjs.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +13 -12
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/deployments-DF_6-7hH.cjs +2 -0
- package/dist/deployments-DF_6-7hH.cjs.map +1 -0
- package/dist/deployments-fJsWblwS.js +56 -0
- package/dist/deployments-fJsWblwS.js.map +1 -0
- package/dist/deployments.json +26 -12
- package/dist/{generated-CKt2yCQd.js → generated-CsNyWPKA.js} +458 -443
- package/dist/generated-CsNyWPKA.js.map +1 -0
- package/dist/generated-DHerxf1y.cjs +3 -0
- package/dist/generated-DHerxf1y.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +33 -33
- package/package.json +4 -4
- package/src/Actions/EventAction.test.ts +19 -13
- package/src/Actions/EventAction.ts +16 -35
- package/src/AllowLists/SimpleAllowList.ts +1 -0
- package/src/AllowLists/SimpleDenyList.ts +1 -0
- package/src/BoostCore.test.ts +78 -78
- package/src/BoostCore.ts +19 -13
- package/src/BoostRegistry.ts +10 -10
- package/src/Budgets/ManagedBudget.test.ts +41 -17
- package/src/Budgets/ManagedBudget.ts +1 -11
- package/src/Budgets/VestingBudget.ts +3 -1
- package/src/Deployable/DeployableTargetWithRBAC.test.ts +103 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +160 -36
- package/src/Incentives/AllowListIncentive.test.ts +7 -7
- package/src/Incentives/AllowListIncentive.ts +1 -0
- package/src/Incentives/CGDAIncentive.ts +1 -0
- package/src/Incentives/ERC1155Incentive.ts +3 -1
- package/src/Incentives/ERC20Incentive.ts +10 -3
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +1 -0
- package/src/Incentives/ERC20VariableIncentive.ts +1 -0
- package/src/Incentives/PointsIncentive.ts +1 -0
- package/src/Validators/SignerValidator.ts +1 -0
- package/dist/BoostCore-BVZExPPu.js.map +0 -1
- package/dist/BoostCore-D-E-cnGI.cjs +0 -3
- package/dist/BoostCore-D-E-cnGI.cjs.map +0 -1
- package/dist/EventAction-BZt5cjbe.cjs +0 -2
- package/dist/EventAction-BZt5cjbe.cjs.map +0 -1
- package/dist/EventAction-C_-hJXWm.js +0 -1541
- package/dist/EventAction-C_-hJXWm.js.map +0 -1
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +0 -1
- package/dist/SimpleDenyList-CGaWjuld.js.map +0 -1
- package/dist/deployments-DVXioW2i.cjs +0 -2
- package/dist/deployments-DVXioW2i.cjs.map +0 -1
- package/dist/deployments-oykLv3_Z.js +0 -43
- package/dist/deployments-oykLv3_Z.js.map +0 -1
- package/dist/generated-CKt2yCQd.js.map +0 -1
- package/dist/generated-CyTNlOwM.cjs +0 -3
- package/dist/generated-CyTNlOwM.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),a=require("./BoostCore-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),a=require("./BoostCore-Btl5BdAs.cjs"),y=require("./Boost.cjs"),E=require("./Actions/Action.cjs"),o=require("./Actions/EventAction.cjs"),p=require("./AllowLists/AllowList.cjs"),c=require("./AllowLists/SimpleAllowList.cjs"),A=require("./SimpleDenyList-DNj5qDWM.cjs"),u=require("./Budgets/Budget.cjs"),t=require("./Budgets/ManagedBudget.cjs"),R=require("./Deployable/Deployable.cjs"),m=require("./Deployable/Contract.cjs"),B=require("./Deployable/DeployableTarget.cjs"),C=require("./Deployable/DeployableTargetWithRBAC.cjs"),g=require("./Incentives/AllowListIncentive.cjs"),I=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),l=require("./Incentive-CcnOIc8L.cjs"),P=require("./Incentives/PointsIncentive.cjs"),d=require("./Validators/SignerValidator.cjs"),S=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),n=require("./utils.cjs"),b=require("./claiming.cjs"),i=require("./transfers.cjs"),D=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-DHerxf1y.cjs");exports.BOOST_REGISTRY_ADDRESS=s.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=s.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=s.BoostRegistry;exports.BOOST_CORE_ADDRESS=a.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=a.BOOST_CORE_ADDRESSES;exports.BOOST_CORE_CLAIM_FEE=a.BOOST_CORE_CLAIM_FEE;exports.BoostCore=a.BoostCore;exports.ERC20VariableCriteriaIncentive=a.ERC20VariableCriteriaIncentive;exports.prepareERC20VariableCriteriaIncentivePayload=a.prepareERC20VariableCriteriaIncentivePayload;exports.Boost=y.Boost;exports.prepareBoostPayload=y.prepareBoostPayload;exports.ActionByComponentInterface=E.ActionByComponentInterface;exports.actionFromAddress=E.actionFromAddress;exports.EventAction=o.EventAction;exports.FilterType=o.FilterType;exports.PrimitiveType=o.PrimitiveType;exports.SignatureType=o.SignatureType;exports.anyActionParameter=o.anyActionParameter;exports.isEventActionPayloadSimple=o.isEventActionPayloadSimple;exports.prepareEventActionPayload=o.prepareEventActionPayload;exports.AllowListByComponentInterface=p.AllowListByComponentInterface;exports.OpenAllowList=p.OpenAllowList;exports.allowListFromAddress=p.allowListFromAddress;exports.LIST_MANAGER_ROLE=c.LIST_MANAGER_ROLE;exports.SimpleAllowList=c.SimpleAllowList;exports.prepareSimpleAllowListPayload=c.prepareSimpleAllowListPayload;exports.SimpleDenyList=A.SimpleDenyList;exports.prepareSimpleDenyListPayload=A.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=u.BudgetByComponentInterface;exports.budgetFromAddress=u.budgetFromAddress;exports.ManagedBudget=t.ManagedBudget;exports.ManagedBudgetRoles=t.ManagedBudgetRoles;exports.isERC1155TransferPayload=t.isERC1155TransferPayload;exports.isFungibleTransfer=t.isFungibleTransfer;exports.prepareManagedBudgetPayload=t.prepareManagedBudgetPayload;exports.prepareTransfer=t.prepareTransfer;exports.Deployable=R.Deployable;exports.Contract=m.Contract;exports.DeployableTarget=B.DeployableTarget;exports.DeployableTargetWithRBAC=C.DeployableTargetWithRBAC;exports.Roles=C.Roles;exports.AllowListIncentive=g.AllowListIncentive;exports.prepareAllowListIncentivePayload=g.prepareAllowListIncentivePayload;exports.CGDAIncentive=I.CGDAIncentive;exports.prepareCGDAIncentivePayload=I.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=l.ERC20VariableIncentive;exports.IncentiveByComponentInterface=l.IncentiveByComponentInterface;exports.incentiveFromAddress=l.incentiveFromAddress;exports.prepareERC20VariableIncentivePayload=l.prepareERC20VariableIncentivePayload;exports.PointsIncentive=P.PointsIncentive;exports.preparePointsIncentivePayload=P.preparePointsIncentivePayload;exports.SignerValidator=d.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=d.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=d.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=d.prepareSignerValidatorPayload;exports.ValidatorByComponentInterface=S.ValidatorByComponentInterface;exports.validatorFromAddress=S.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.RegistryType=n.RegistryType;exports.assertValidAddressByChainId=n.assertValidAddressByChainId;exports.awaitResult=n.awaitResult;exports.bytes4=n.bytes4;exports.getDeployedContractAddress=n.getDeployedContractAddress;exports.StrategyType=b.StrategyType;exports.prepareClaimPayload=b.prepareClaimPayload;exports.AssetType=i.AssetType;exports.prepareERC1155Payload=i.prepareERC1155Payload;exports.prepareERC1155Transfer=i.prepareERC1155Transfer;exports.prepareFungiblePayload=i.prepareFungiblePayload;exports.prepareFungibleTransfer=i.prepareFungibleTransfer;exports.prepareTransferPayload=i.prepareTransferPayload;exports.PassthroughAuth=D.PassthroughAuth;exports.allowListIncentiveAbi=r.O;exports.boostCoreAbi=r.T;exports.boostRegistryAbi=r.ie;exports.cgdaIncentiveAbi=r.b;exports.erc20IncentiveAbi=r.y;exports.erc20VariableIncentiveAbi=r.f;exports.managedBudgetAbi=r.d;exports.passthroughAuthAbi=r.Be;exports.pointsIncentiveAbi=r.w;exports.rbacAbi=r.R;exports.signerValidatorAbi=r.B;exports.simpleAllowListAbi=r.h;exports.simpleDenyListAbi=r.g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BOOST_REGISTRY_ADDRESS as o, BOOST_REGISTRY_ADDRESSES as a, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
|
-
import {
|
|
2
|
+
import { b as n, a as p, B as s, c as l, E as d, p as E } from "./BoostCore-CD56zbYX.js";
|
|
3
3
|
import { Boost as y, prepareBoostPayload as c } from "./Boost.js";
|
|
4
4
|
import { ActionByComponentInterface as f, actionFromAddress as C } from "./Actions/Action.js";
|
|
5
|
-
import {
|
|
6
|
-
import { AllowListByComponentInterface as
|
|
7
|
-
import { LIST_MANAGER_ROLE as
|
|
8
|
-
import { S as
|
|
5
|
+
import { EventAction as g, FilterType as I, PrimitiveType as v, SignatureType as P, anyActionParameter as R, isEventActionPayloadSimple as S, prepareEventActionPayload as u } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as D, OpenAllowList as x, allowListFromAddress as T } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as O, SimpleAllowList as L, prepareSimpleAllowListPayload as V } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as h, p as _ } from "./SimpleDenyList-BDXpY74P.js";
|
|
9
9
|
import { BudgetByComponentInterface as N, budgetFromAddress as U } from "./Budgets/Budget.js";
|
|
10
10
|
import { ManagedBudget as z, ManagedBudgetRoles as k, isERC1155TransferPayload as q, isFungibleTransfer as W, prepareManagedBudgetPayload as Y, prepareTransfer as j } from "./Budgets/ManagedBudget.js";
|
|
11
11
|
import { Deployable as J } from "./Deployable/Deployable.js";
|
|
@@ -15,19 +15,19 @@ import { DeployableTargetWithRBAC as ee, Roles as re } from "./Deployable/Deploy
|
|
|
15
15
|
import { AllowListIncentive as ae, prepareAllowListIncentivePayload as te } from "./Incentives/AllowListIncentive.js";
|
|
16
16
|
import { CGDAIncentive as ne, prepareCGDAIncentivePayload as pe } from "./Incentives/CGDAIncentive.js";
|
|
17
17
|
import { ERC20Incentive as le, prepareERC20IncentivePayload as de } from "./Incentives/ERC20Incentive.js";
|
|
18
|
-
import { E as me, I as ye, i as ce, p as Ae } from "./Incentive-
|
|
18
|
+
import { E as me, I as ye, i as ce, p as Ae } from "./Incentive-rM5nKznp.js";
|
|
19
19
|
import { PointsIncentive as Ce, preparePointsIncentivePayload as be } from "./Incentives/PointsIncentive.js";
|
|
20
|
-
import { SignerValidator as Ie, prepareSignerValidatorClaimDataPayload as ve, prepareSignerValidatorInputParams as Pe, prepareSignerValidatorPayload as
|
|
21
|
-
import { ValidatorByComponentInterface as ue, validatorFromAddress as
|
|
22
|
-
import { BoostCoreNoIdentifierEmitted as
|
|
20
|
+
import { SignerValidator as Ie, prepareSignerValidatorClaimDataPayload as ve, prepareSignerValidatorInputParams as Pe, prepareSignerValidatorPayload as Re } from "./Validators/SignerValidator.js";
|
|
21
|
+
import { ValidatorByComponentInterface as ue, validatorFromAddress as Be } from "./Validators/Validator.js";
|
|
22
|
+
import { BoostCoreNoIdentifierEmitted as xe, BoostNotFoundError as Te, BudgetMustAuthorizeBoostCore as Fe, ContractAddressRequiredError as Oe, DecodedArgsError as Le, DecodedArgsMalformedError as Ve, DeployableAlreadyDeployedError as we, DeployableBuildParametersUnspecifiedError as he, DeployableMissingPayloadError as _e, DeployableUnknownOwnerProvidedError as Me, DeployableWagmiConfigurationRequiredError as Ne, FieldActionValidationError as Ue, FieldValueNotComparableError as Ge, FieldValueUndefinedError as ze, FunctionDataDecodeError as ke, IncentiveCriteriaNotFoundError as qe, IncentiveNotCloneableError as We, InvalidComponentInterfaceError as Ye, InvalidCriteriaTypeError as je, InvalidNumericalCriteriaError as He, InvalidProtocolChainIdError as Je, MustInitializeBudgetError as Ke, NoConnectedChainIdError as Qe, NoContractAddressUponReceiptError as Xe, NoEventActionStepsProvidedError as Ze, NoMatchingLogsError as $e, TooManyEventActionStepsProvidedError as er, UnknownTransferPayloadSupplied as rr, UnparseableAbiParamError as or, UnrecognizedFilterTypeError as ar, ValidationAbiMissingError as tr } from "./errors.js";
|
|
23
23
|
import { RegistryType as nr, assertValidAddressByChainId as pr, awaitResult as sr, bytes4 as lr, getDeployedContractAddress as dr } from "./utils.js";
|
|
24
24
|
import { StrategyType as mr, prepareClaimPayload as yr } from "./claiming.js";
|
|
25
25
|
import { AssetType as Ar, prepareERC1155Payload as fr, prepareERC1155Transfer as Cr, prepareFungiblePayload as br, prepareFungibleTransfer as gr, prepareTransferPayload as Ir } from "./transfers.js";
|
|
26
26
|
import { PassthroughAuth as Pr } from "./Auth/PassthroughAuth.js";
|
|
27
|
-
import {
|
|
27
|
+
import { O as Sr, T as ur, i as Br, b as Dr, y as xr, f as Tr, d as Fr, a as Or, w as Lr, R as Vr, B as wr, h as hr, g as _r } from "./generated-CsNyWPKA.js";
|
|
28
28
|
export {
|
|
29
29
|
f as ActionByComponentInterface,
|
|
30
|
-
|
|
30
|
+
D as AllowListByComponentInterface,
|
|
31
31
|
ae as AllowListIncentive,
|
|
32
32
|
Ar as AssetType,
|
|
33
33
|
n as BOOST_CORE_ADDRESS,
|
|
@@ -37,20 +37,20 @@ export {
|
|
|
37
37
|
a as BOOST_REGISTRY_ADDRESSES,
|
|
38
38
|
y as Boost,
|
|
39
39
|
l as BoostCore,
|
|
40
|
-
|
|
40
|
+
xe as BoostCoreNoIdentifierEmitted,
|
|
41
41
|
Te as BoostNotFoundError,
|
|
42
42
|
t as BoostRegistry,
|
|
43
43
|
N as BudgetByComponentInterface,
|
|
44
44
|
Fe as BudgetMustAuthorizeBoostCore,
|
|
45
45
|
ne as CGDAIncentive,
|
|
46
46
|
Q as Contract,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
Oe as ContractAddressRequiredError,
|
|
48
|
+
Le as DecodedArgsError,
|
|
49
49
|
Ve as DecodedArgsMalformedError,
|
|
50
50
|
J as Deployable,
|
|
51
51
|
we as DeployableAlreadyDeployedError,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
he as DeployableBuildParametersUnspecifiedError,
|
|
53
|
+
_e as DeployableMissingPayloadError,
|
|
54
54
|
Z as DeployableTarget,
|
|
55
55
|
ee as DeployableTargetWithRBAC,
|
|
56
56
|
Me as DeployableUnknownOwnerProvidedError,
|
|
@@ -71,7 +71,7 @@ export {
|
|
|
71
71
|
je as InvalidCriteriaTypeError,
|
|
72
72
|
He as InvalidNumericalCriteriaError,
|
|
73
73
|
Je as InvalidProtocolChainIdError,
|
|
74
|
-
|
|
74
|
+
O as LIST_MANAGER_ROLE,
|
|
75
75
|
z as ManagedBudget,
|
|
76
76
|
k as ManagedBudgetRoles,
|
|
77
77
|
Ke as MustInitializeBudgetError,
|
|
@@ -79,7 +79,7 @@ export {
|
|
|
79
79
|
Xe as NoContractAddressUponReceiptError,
|
|
80
80
|
Ze as NoEventActionStepsProvidedError,
|
|
81
81
|
$e as NoMatchingLogsError,
|
|
82
|
-
|
|
82
|
+
x as OpenAllowList,
|
|
83
83
|
Pr as PassthroughAuth,
|
|
84
84
|
Ce as PointsIncentive,
|
|
85
85
|
v as PrimitiveType,
|
|
@@ -87,8 +87,8 @@ export {
|
|
|
87
87
|
re as Roles,
|
|
88
88
|
P as SignatureType,
|
|
89
89
|
Ie as SignerValidator,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
L as SimpleAllowList,
|
|
91
|
+
h as SimpleDenyList,
|
|
92
92
|
mr as StrategyType,
|
|
93
93
|
er as TooManyEventActionStepsProvidedError,
|
|
94
94
|
rr as UnknownTransferPayloadSupplied,
|
|
@@ -98,25 +98,25 @@ export {
|
|
|
98
98
|
ue as ValidatorByComponentInterface,
|
|
99
99
|
C as actionFromAddress,
|
|
100
100
|
T as allowListFromAddress,
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
Sr as allowListIncentiveAbi,
|
|
102
|
+
R as anyActionParameter,
|
|
103
103
|
pr as assertValidAddressByChainId,
|
|
104
104
|
sr as awaitResult,
|
|
105
105
|
ur as boostCoreAbi,
|
|
106
|
-
|
|
106
|
+
Br as boostRegistryAbi,
|
|
107
107
|
U as budgetFromAddress,
|
|
108
108
|
lr as bytes4,
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
Dr as cgdaIncentiveAbi,
|
|
110
|
+
xr as erc20IncentiveAbi,
|
|
111
111
|
Tr as erc20VariableIncentiveAbi,
|
|
112
112
|
dr as getDeployedContractAddress,
|
|
113
113
|
ce as incentiveFromAddress,
|
|
114
114
|
q as isERC1155TransferPayload,
|
|
115
|
-
|
|
115
|
+
S as isEventActionPayloadSimple,
|
|
116
116
|
W as isFungibleTransfer,
|
|
117
117
|
Fr as managedBudgetAbi,
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
Or as passthroughAuthAbi,
|
|
119
|
+
Lr as pointsIncentiveAbi,
|
|
120
120
|
te as prepareAllowListIncentivePayload,
|
|
121
121
|
c as prepareBoostPayload,
|
|
122
122
|
pe as prepareCGDAIncentivePayload,
|
|
@@ -133,15 +133,15 @@ export {
|
|
|
133
133
|
be as preparePointsIncentivePayload,
|
|
134
134
|
ve as prepareSignerValidatorClaimDataPayload,
|
|
135
135
|
Pe as prepareSignerValidatorInputParams,
|
|
136
|
-
|
|
136
|
+
Re as prepareSignerValidatorPayload,
|
|
137
137
|
V as prepareSimpleAllowListPayload,
|
|
138
|
-
|
|
138
|
+
_ as prepareSimpleDenyListPayload,
|
|
139
139
|
j as prepareTransfer,
|
|
140
140
|
Ir as prepareTransferPayload,
|
|
141
141
|
Vr as rbacAbi,
|
|
142
142
|
wr as signerValidatorAbi,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
hr as simpleAllowListAbi,
|
|
144
|
+
_r as simpleDenyListAbi,
|
|
145
|
+
Be as validatorFromAddress
|
|
146
146
|
};
|
|
147
147
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostxyz/sdk",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.23",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -196,11 +196,11 @@
|
|
|
196
196
|
},
|
|
197
197
|
"dependencies": {
|
|
198
198
|
"ts-pattern": "5.4.0",
|
|
199
|
-
"@boostxyz/signatures": "1.1.0-alpha.
|
|
199
|
+
"@boostxyz/signatures": "1.1.0-alpha.23"
|
|
200
200
|
},
|
|
201
201
|
"optionalDependencies": {
|
|
202
|
-
"@boostxyz/
|
|
203
|
-
"@boostxyz/
|
|
202
|
+
"@boostxyz/signatures": "1.1.0-alpha.23",
|
|
203
|
+
"@boostxyz/evm": "1.1.0-alpha.23"
|
|
204
204
|
},
|
|
205
205
|
"peerDependencies": {
|
|
206
206
|
"@wagmi/core": "2.x",
|
|
@@ -2,13 +2,11 @@ import { selectors as eventSelectors } from "@boostxyz/signatures/events";
|
|
|
2
2
|
import { selectors as funcSelectors } from "@boostxyz/signatures/functions";
|
|
3
3
|
import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
AbiEvent,
|
|
6
|
+
AbiFunction,
|
|
6
7
|
type Address,
|
|
7
|
-
type GetLogsReturnType,
|
|
8
8
|
type Hex,
|
|
9
|
-
type Log,
|
|
10
9
|
isAddress,
|
|
11
|
-
pad,
|
|
12
10
|
parseEther,
|
|
13
11
|
toHex,
|
|
14
12
|
zeroAddress,
|
|
@@ -37,6 +35,7 @@ import {
|
|
|
37
35
|
Criteria,
|
|
38
36
|
anyActionParameter,
|
|
39
37
|
} from "./EventAction";
|
|
38
|
+
import { allKnownSignatures } from "@boostxyz/test/allKnownSignatures";
|
|
40
39
|
|
|
41
40
|
let fixtures: Fixtures,
|
|
42
41
|
erc721: MockERC721,
|
|
@@ -414,7 +413,7 @@ describe("EventAction Event Selector", () => {
|
|
|
414
413
|
const recipient = accounts[1].account;
|
|
415
414
|
await erc721.approve(recipient, 1n);
|
|
416
415
|
const { hash } = await erc721.transferFromRaw(defaultOptions.account.address, recipient, 1n);
|
|
417
|
-
expect(await action.validateActionSteps({ hash, chainId })).toBe(true);
|
|
416
|
+
expect(await action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).toBe(true);
|
|
418
417
|
});
|
|
419
418
|
|
|
420
419
|
test("can supply your own logs to validate against", async () => {
|
|
@@ -446,7 +445,7 @@ describe("EventAction Event Selector", () => {
|
|
|
446
445
|
},
|
|
447
446
|
];
|
|
448
447
|
const action = await loadFixture(cloneEventAction(fixtures, erc721));
|
|
449
|
-
expect(await action.validateActionSteps({ hash, chainId, logs })).toBe(true);
|
|
448
|
+
expect(await action.validateActionSteps({ hash, chainId, logs, knownSignatures: allKnownSignatures })).toBe(true);
|
|
450
449
|
});
|
|
451
450
|
|
|
452
451
|
describe("string event actions", () => {
|
|
@@ -464,7 +463,7 @@ describe("EventAction Event Selector", () => {
|
|
|
464
463
|
);
|
|
465
464
|
|
|
466
465
|
const hash = await stringEmitterFixtures.emitIndexedString("Hello world");
|
|
467
|
-
await expect(() => action.validateActionSteps({ hash, chainId })).rejects.toThrowError(
|
|
466
|
+
await expect(() => action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).rejects.toThrowError(
|
|
468
467
|
/Parameter is not transparently stored onchain/,
|
|
469
468
|
);
|
|
470
469
|
});
|
|
@@ -481,7 +480,7 @@ describe("EventAction Event Selector", () => {
|
|
|
481
480
|
),
|
|
482
481
|
);
|
|
483
482
|
const hash = await stringEmitterFixtures.emitString("Hello world");
|
|
484
|
-
expect(await action.validateActionSteps({ hash, chainId })).toBe(true);
|
|
483
|
+
expect(await action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).toBe(true);
|
|
485
484
|
});
|
|
486
485
|
test("can parse and validate regex for an emitted string event", async () => {
|
|
487
486
|
const action = await loadFixture(
|
|
@@ -497,7 +496,7 @@ describe("EventAction Event Selector", () => {
|
|
|
497
496
|
);
|
|
498
497
|
|
|
499
498
|
const hash = await stringEmitterFixtures.emitString("Hello world");
|
|
500
|
-
expect(await action.validateActionSteps({ hash, chainId })).toBe(true);
|
|
499
|
+
expect(await action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).toBe(true);
|
|
501
500
|
});
|
|
502
501
|
});
|
|
503
502
|
|
|
@@ -510,6 +509,7 @@ describe("EventAction Event Selector", () => {
|
|
|
510
509
|
await action.deriveActionClaimantFromTransaction(await action.getActionClaimant(), {
|
|
511
510
|
hash,
|
|
512
511
|
chainId,
|
|
512
|
+
knownSignatures: allKnownSignatures
|
|
513
513
|
}),
|
|
514
514
|
).toBe(recipient);
|
|
515
515
|
});
|
|
@@ -525,6 +525,7 @@ describe("EventAction Event Selector", () => {
|
|
|
525
525
|
await action.deriveActionClaimantFromTransaction(await action.getActionClaimant(), {
|
|
526
526
|
hash,
|
|
527
527
|
chainId,
|
|
528
|
+
knownSignatures: allKnownSignatures
|
|
528
529
|
}),
|
|
529
530
|
).toBe(recipient);
|
|
530
531
|
});
|
|
@@ -534,7 +535,7 @@ describe("EventAction Event Selector", () => {
|
|
|
534
535
|
const recipient = accounts[1].account;
|
|
535
536
|
await erc721.approve(recipient, 1n);
|
|
536
537
|
const { hash } = await erc721.transferFromRaw(defaultOptions.account.address, recipient, 1n);
|
|
537
|
-
expect(await action.validateActionSteps({ hash, chainId })).toBe(true);
|
|
538
|
+
expect(await action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).toBe(true);
|
|
538
539
|
})
|
|
539
540
|
});
|
|
540
541
|
});
|
|
@@ -690,7 +691,7 @@ describe("EventAction Func Selector", () => {
|
|
|
690
691
|
});
|
|
691
692
|
|
|
692
693
|
expect(
|
|
693
|
-
await action.isActionStepValid(actionStep, { hash, chainId })
|
|
694
|
+
await action.isActionStepValid(actionStep, { hash, chainId, knownSignatures: allKnownSignatures })
|
|
694
695
|
).toBe(true);
|
|
695
696
|
});
|
|
696
697
|
|
|
@@ -706,6 +707,7 @@ describe("EventAction Func Selector", () => {
|
|
|
706
707
|
const criteriaMatch = await action.isActionStepValid(actionStep, {
|
|
707
708
|
hash,
|
|
708
709
|
chainId,
|
|
710
|
+
knownSignatures: allKnownSignatures
|
|
709
711
|
});
|
|
710
712
|
|
|
711
713
|
expect(criteriaMatch).toBe(true);
|
|
@@ -727,7 +729,7 @@ describe("EventAction Func Selector", () => {
|
|
|
727
729
|
});
|
|
728
730
|
|
|
729
731
|
try {
|
|
730
|
-
await action.isActionStepValid(invalidStep, { hash, chainId });
|
|
732
|
+
await action.isActionStepValid(invalidStep, { hash, chainId, knownSignatures: allKnownSignatures });
|
|
731
733
|
} catch (e) {
|
|
732
734
|
expect(e).toBeInstanceOf(Error);
|
|
733
735
|
expect((e as Error).message).toContain(
|
|
@@ -743,7 +745,7 @@ describe("EventAction Func Selector", () => {
|
|
|
743
745
|
value: parseEther(".1"),
|
|
744
746
|
});
|
|
745
747
|
|
|
746
|
-
expect(await action.validateActionSteps({ hash, chainId })).toBe(true);
|
|
748
|
+
expect(await action.validateActionSteps({ hash, chainId, knownSignatures: allKnownSignatures })).toBe(true);
|
|
747
749
|
})
|
|
748
750
|
|
|
749
751
|
test("validates against NOT_EQUAL filter criteria", async () => {
|
|
@@ -760,6 +762,7 @@ describe("EventAction Func Selector", () => {
|
|
|
760
762
|
await action.isActionStepValid(actionStep, {
|
|
761
763
|
hash,
|
|
762
764
|
chainId,
|
|
765
|
+
knownSignatures: allKnownSignatures
|
|
763
766
|
}),
|
|
764
767
|
).toBe(true);
|
|
765
768
|
});
|
|
@@ -784,6 +787,7 @@ describe("EventAction Func Selector", () => {
|
|
|
784
787
|
await action.isActionStepValid(actionStep, {
|
|
785
788
|
hash,
|
|
786
789
|
chainId,
|
|
790
|
+
knownSignatures: allKnownSignatures
|
|
787
791
|
}),
|
|
788
792
|
).toBe(true);
|
|
789
793
|
});
|
|
@@ -807,6 +811,7 @@ describe("EventAction Func Selector", () => {
|
|
|
807
811
|
await action.isActionStepValid(actionStep, {
|
|
808
812
|
hash,
|
|
809
813
|
chainId,
|
|
814
|
+
knownSignatures: allKnownSignatures
|
|
810
815
|
}),
|
|
811
816
|
).toBe(true);
|
|
812
817
|
});
|
|
@@ -822,6 +827,7 @@ describe("EventAction Func Selector", () => {
|
|
|
822
827
|
await action.validateActionSteps({
|
|
823
828
|
hash,
|
|
824
829
|
chainId,
|
|
830
|
+
knownSignatures: allKnownSignatures
|
|
825
831
|
}),
|
|
826
832
|
).toBe(true);
|
|
827
833
|
});
|
|
@@ -6,24 +6,15 @@ import {
|
|
|
6
6
|
writeEventActionExecute,
|
|
7
7
|
} from '@boostxyz/evm';
|
|
8
8
|
import { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';
|
|
9
|
-
import
|
|
10
|
-
import functions from '@boostxyz/signatures/functions';
|
|
11
|
-
import {
|
|
12
|
-
GetTransactionReceiptParameters,
|
|
13
|
-
getTransaction,
|
|
14
|
-
getTransactionReceipt,
|
|
15
|
-
} from '@wagmi/core';
|
|
9
|
+
import { getTransaction, getTransactionReceipt } from '@wagmi/core';
|
|
16
10
|
import { match } from 'ts-pattern';
|
|
17
11
|
import {
|
|
18
|
-
type Abi,
|
|
19
12
|
type AbiEvent,
|
|
20
13
|
type AbiFunction,
|
|
21
14
|
AbiItem,
|
|
22
15
|
type Address,
|
|
23
|
-
type ContractEventName,
|
|
24
16
|
type ContractFunctionName,
|
|
25
17
|
type GetLogsReturnType,
|
|
26
|
-
type GetTransactionParameters,
|
|
27
18
|
type Hex,
|
|
28
19
|
type Log,
|
|
29
20
|
type PublicClient,
|
|
@@ -55,7 +46,6 @@ import {
|
|
|
55
46
|
ValidationAbiMissingError,
|
|
56
47
|
} from '../errors';
|
|
57
48
|
import {
|
|
58
|
-
type GetLogsParams,
|
|
59
49
|
type Overwrite,
|
|
60
50
|
type ReadParams,
|
|
61
51
|
RegistryType,
|
|
@@ -227,14 +217,14 @@ export interface ActionStep {
|
|
|
227
217
|
* Parameters for validating an action step.
|
|
228
218
|
*
|
|
229
219
|
* @typedef {Object} ValidateActionStepParams
|
|
230
|
-
* @property {Record<Hex, AbiEvent | AbiFunction>} [knownSignatures] -
|
|
220
|
+
* @property {Record<Hex, AbiEvent | AbiFunction>} [knownSignatures] - Record of known events, keyed by 32 byte selectors. You can use [@boostxyz/signatures](https://www.npmjs.com/package/@boostxyz/signatures) to assemble this parameter.
|
|
231
221
|
* @property {AbiEvent | AbiFunction} [abiItem] - Optional ABI item definition.
|
|
232
222
|
* @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.
|
|
233
223
|
* @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.
|
|
234
224
|
* @property {number} [chainId] - Chain ID for the transaction. Required if 'hash' is provided.
|
|
235
225
|
*/
|
|
236
226
|
export type ValidateActionStepParams = {
|
|
237
|
-
knownSignatures
|
|
227
|
+
knownSignatures: Record<Hex, AbiEvent | AbiFunction>;
|
|
238
228
|
abiItem?: AbiEvent | AbiFunction;
|
|
239
229
|
} & ({ logs: EventLogs } | { hash: Hex; chainId: number });
|
|
240
230
|
|
|
@@ -366,6 +356,7 @@ export class EventAction extends DeployableTarget<
|
|
|
366
356
|
* @type {Record<number, Address>}
|
|
367
357
|
*/
|
|
368
358
|
public static override bases: Record<number, Address> = {
|
|
359
|
+
31337: import.meta.env.VITE_EVENT_ACTION_BASE,
|
|
369
360
|
...(EventActionBases as Record<number, Address>),
|
|
370
361
|
};
|
|
371
362
|
/**
|
|
@@ -505,8 +496,11 @@ export class EventAction extends DeployableTarget<
|
|
|
505
496
|
* const params: ValidateActionStepParams = {
|
|
506
497
|
* hash: '0x5678...',
|
|
507
498
|
* chainId: 1,
|
|
508
|
-
* knownSignatures
|
|
509
|
-
* '0x1234...': {
|
|
499
|
+
* knownSignatures: {
|
|
500
|
+
* '0x1234...': {
|
|
501
|
+
* type: 'event',
|
|
502
|
+
* name: 'Transfer(...)'
|
|
503
|
+
* }
|
|
510
504
|
* }
|
|
511
505
|
* };
|
|
512
506
|
* const claimantAddress = await eventAction.deriveActionClaimantFromTransaction(claimant, params);
|
|
@@ -526,13 +520,9 @@ export class EventAction extends DeployableTarget<
|
|
|
526
520
|
let event: AbiEvent;
|
|
527
521
|
if (params.abiItem) event = params.abiItem as AbiEvent;
|
|
528
522
|
else {
|
|
529
|
-
const sigPool
|
|
530
|
-
...(events.abi as Record<Hex, AbiEvent>),
|
|
531
|
-
...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),
|
|
532
|
-
};
|
|
523
|
+
const sigPool = params.knownSignatures as Record<Hex, AbiEvent>;
|
|
533
524
|
event = sigPool[signature] as AbiEvent;
|
|
534
525
|
}
|
|
535
|
-
|
|
536
526
|
if (!event) {
|
|
537
527
|
throw new ValidationAbiMissingError(signature);
|
|
538
528
|
}
|
|
@@ -578,10 +568,7 @@ export class EventAction extends DeployableTarget<
|
|
|
578
568
|
let func: AbiFunction;
|
|
579
569
|
if (params.abiItem) func = params.abiItem as AbiFunction;
|
|
580
570
|
else {
|
|
581
|
-
const sigPool
|
|
582
|
-
...(functions.abi as Record<Hex, AbiFunction>),
|
|
583
|
-
...((params.knownSignatures as Record<Hex, AbiFunction>) || {}),
|
|
584
|
-
};
|
|
571
|
+
const sigPool = params.knownSignatures as Record<Hex, AbiFunction>;
|
|
585
572
|
func = sigPool[signature] as AbiFunction;
|
|
586
573
|
}
|
|
587
574
|
if (!func) {
|
|
@@ -664,10 +651,7 @@ export class EventAction extends DeployableTarget<
|
|
|
664
651
|
let event: AbiEvent;
|
|
665
652
|
if (params.abiItem) event = params.abiItem as AbiEvent;
|
|
666
653
|
else {
|
|
667
|
-
const sigPool
|
|
668
|
-
...(events.abi as Record<Hex, AbiEvent>),
|
|
669
|
-
...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),
|
|
670
|
-
};
|
|
654
|
+
const sigPool = params.knownSignatures as Record<Hex, AbiEvent>;
|
|
671
655
|
event = sigPool[signature] as AbiEvent;
|
|
672
656
|
}
|
|
673
657
|
|
|
@@ -747,7 +731,7 @@ export class EventAction extends DeployableTarget<
|
|
|
747
731
|
* @public
|
|
748
732
|
* @param {ActionStep} actionStep - The action step containing the function to validate.
|
|
749
733
|
* @param {Transaction} transaction - The transaction that will be validated against.
|
|
750
|
-
* @param {Object} [params] -
|
|
734
|
+
* @param {Object} [params] - Parameters for validation.
|
|
751
735
|
* @param {AbiItem} [params.abiItem] - The ABI item for the function, if known.
|
|
752
736
|
* @param {Record<Hex, AbiEvent | AbiFunction>} [params.knownSignatures] - A record of known signatures.
|
|
753
737
|
* @returns {boolean} Returns true if the action function is valid, false otherwise.
|
|
@@ -757,18 +741,15 @@ export class EventAction extends DeployableTarget<
|
|
|
757
741
|
public isActionFunctionValid(
|
|
758
742
|
actionStep: ActionStep,
|
|
759
743
|
transaction: Transaction,
|
|
760
|
-
params
|
|
744
|
+
params: Pick<ValidateActionStepParams, 'abiItem' | 'knownSignatures'>,
|
|
761
745
|
) {
|
|
762
746
|
const criteria = actionStep.actionParameter;
|
|
763
747
|
let signature = actionStep.signature;
|
|
764
748
|
|
|
765
749
|
let func: AbiFunction;
|
|
766
|
-
if (params
|
|
750
|
+
if (params.abiItem) func = params?.abiItem as AbiFunction;
|
|
767
751
|
else {
|
|
768
|
-
const sigPool
|
|
769
|
-
...(functions.abi as Record<Hex, AbiFunction>),
|
|
770
|
-
...((params?.knownSignatures as Record<Hex, AbiFunction>) || {}),
|
|
771
|
-
};
|
|
752
|
+
const sigPool = params.knownSignatures as Record<Hex, AbiFunction>;
|
|
772
753
|
func = sigPool[signature] as AbiFunction;
|
|
773
754
|
}
|
|
774
755
|
if (!func) {
|
|
@@ -99,6 +99,7 @@ export class SimpleAllowList extends DeployableTargetWithRBAC<
|
|
|
99
99
|
* @type {Record<number, Address>}
|
|
100
100
|
*/
|
|
101
101
|
public static override bases: Record<number, Address> = {
|
|
102
|
+
31337: import.meta.env.VITE_SIMPLE_ALLOWLIST_BASE,
|
|
102
103
|
...(SimpleAllowListBases as Record<number, Address>),
|
|
103
104
|
};
|
|
104
105
|
/**
|