@boostxyz/sdk 2.0.0-alpha.26 → 2.0.0-alpha.27
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 +8 -8
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +6 -7
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +99 -95
- 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 +6 -6
- 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.js +33 -33
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +12 -12
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +25 -25
- 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 +21 -21
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +9 -9
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +6 -6
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +22 -22
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +20 -20
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +16 -16
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +30 -30
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +11 -11
- package/dist/{SimpleDenyList-D0cyVUVv.js → SimpleDenyList-7BojkCuF.js} +12 -12
- package/dist/{SimpleDenyList-D0cyVUVv.js.map → SimpleDenyList-7BojkCuF.js.map} +1 -1
- package/dist/{SimpleDenyList-BdlpZdDz.cjs → SimpleDenyList-DqM-Bczx.cjs} +2 -2
- package/dist/{SimpleDenyList-BdlpZdDz.cjs.map → SimpleDenyList-DqM-Bczx.cjs.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +10 -10
- 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 +25 -27
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/componentInterfaces-BJ_XfE8j.cjs +2 -0
- package/dist/componentInterfaces-BJ_XfE8j.cjs.map +1 -0
- package/dist/componentInterfaces-DBJaFhsl.js +15 -0
- package/dist/componentInterfaces-DBJaFhsl.js.map +1 -0
- package/dist/{generated-Cqn4wS01.cjs → generated-BSUMIFi5.cjs} +3 -3
- package/dist/generated-BSUMIFi5.cjs.map +1 -0
- package/dist/{generated-BAKNSOjJ.js → generated-Dz_g2mFT.js} +217 -217
- package/dist/generated-Dz_g2mFT.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +25 -25
- package/package.json +1 -1
- package/src/Actions/EventAction.test.ts +1 -1
- package/src/Actions/EventAction.ts +20 -17
- package/src/Incentives/Incentive.ts +3 -2
- package/src/Validators/SignerValidator.ts +7 -12
- package/dist/componentInterfaces-DRI_dQ-P.cjs +0 -2
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +0 -1
- package/dist/componentInterfaces-bIVo8eyA.js +0 -14
- package/dist/componentInterfaces-bIVo8eyA.js.map +0 -1
- package/dist/generated-BAKNSOjJ.js.map +0 -1
- package/dist/generated-Cqn4wS01.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"),n=require("./BoostCore.cjs"),A=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),p=require("./AllowLists/AllowList.cjs"),c=require("./AllowLists/SimpleAllowList.cjs"),u=require("./SimpleDenyList-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),n=require("./BoostCore.cjs"),A=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),p=require("./AllowLists/AllowList.cjs"),c=require("./AllowLists/SimpleAllowList.cjs"),u=require("./SimpleDenyList-DqM-Bczx.cjs"),g=require("./Budgets/Budget.cjs"),o=require("./Budgets/ManagedBudget.cjs"),B=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),I=require("./Deployable/DeployableTargetWithRBAC.cjs"),S=require("./Incentives/AllowListIncentive.cjs"),m=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),y=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/Incentive.cjs"),R=require("./Incentives/PointsIncentive.cjs"),l=require("./Validators/SignerValidator.cjs"),d=require("./Validators/LimitedSignerValidator.cjs"),E=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),D=require("./claiming.cjs"),t=require("./transfers.cjs"),L=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-BSUMIFi5.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=n.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=n.BOOST_CORE_ADDRESSES;exports.BOOST_CORE_CLAIM_FEE=n.BOOST_CORE_CLAIM_FEE;exports.BoostCore=n.BoostCore;exports.Boost=A.Boost;exports.prepareBoostPayload=A.prepareBoostPayload;exports.ActionByComponentInterface=C.ActionByComponentInterface;exports.actionFromAddress=C.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;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=u.SimpleDenyList;exports.prepareSimpleDenyListPayload=u.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=g.BudgetByComponentInterface;exports.budgetFromAddress=g.budgetFromAddress;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=B.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=I.DeployableTargetWithRBAC;exports.Roles=I.Roles;exports.AllowListIncentive=S.AllowListIncentive;exports.prepareAllowListIncentivePayload=S.prepareAllowListIncentivePayload;exports.CGDAIncentive=m.CGDAIncentive;exports.prepareCGDAIncentivePayload=m.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=P.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=P.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=y.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=y.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=y.prepareERC20VariableCriteriaIncentivePayload;exports.IncentiveByComponentInterface=b.IncentiveByComponentInterface;exports.incentiveFromAddress=b.incentiveFromAddress;exports.PointsIncentive=R.PointsIncentive;exports.preparePointsIncentivePayload=R.preparePointsIncentivePayload;exports.SignerValidator=l.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=l.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=l.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=l.prepareSignerValidatorPayload;exports.LimitedSignerValidator=d.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=d.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=d.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=d.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=E.BoostValidatorEOA;exports.ValidatorByComponentInterface=E.ValidatorByComponentInterface;exports.validatorFromAddress=E.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.StrategyType=D.StrategyType;exports.prepareClaimPayload=D.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.C;exports.boostCoreAbi=r.A;exports.boostRegistryAbi=r.oe;exports.cgdaIncentiveAbi=r.f;exports.erc20IncentiveAbi=r.y;exports.erc20VariableCriteriaIncentiveAbi=r.b;exports.erc20VariableIncentiveAbi=r.v;exports.limitedSignerValidatorAbi=r.z;exports.managedBudgetAbi=r.d;exports.passthroughAuthAbi=r.Ve;exports.pointsIncentiveAbi=r.T;exports.rbacAbi=r.O;exports.signerValidatorAbi=r.S;exports.simpleAllowListAbi=r.g;exports.simpleDenyListAbi=r.M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BOOST_REGISTRY_ADDRESS as o, BOOST_REGISTRY_ADDRESSES as a, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
2
|
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as p, BOOST_CORE_CLAIM_FEE as l, BoostCore as d } from "./BoostCore.js";
|
|
3
|
-
import { Boost as m, prepareBoostPayload as
|
|
4
|
-
import { ActionByComponentInterface as y, actionFromAddress as
|
|
5
|
-
import { EventAction as f, FilterType as g, PrimitiveType as b, SignatureType as I, anyActionParameter as S, isEventActionPayloadSimple as v, prepareEventActionPayload as P, transactionSenderClaimant as
|
|
3
|
+
import { Boost as m, prepareBoostPayload as A } from "./Boost.js";
|
|
4
|
+
import { ActionByComponentInterface as y, actionFromAddress as E } from "./Actions/Action.js";
|
|
5
|
+
import { EventAction as f, FilterType as g, PrimitiveType as b, SignatureType as I, anyActionParameter as S, isEventActionPayloadSimple as v, prepareEventActionPayload as P, transactionSenderClaimant as u } from "./Actions/EventAction.js";
|
|
6
6
|
import { AllowListByComponentInterface as x, OpenAllowList as D, allowListFromAddress as B } from "./AllowLists/AllowList.js";
|
|
7
7
|
import { LIST_MANAGER_ROLE as V, SimpleAllowList as L, prepareSimpleAllowListPayload as O } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
-
import { S as h, p as w } from "./SimpleDenyList-
|
|
9
|
-
import { BudgetByComponentInterface as
|
|
8
|
+
import { S as h, p as w } from "./SimpleDenyList-7BojkCuF.js";
|
|
9
|
+
import { BudgetByComponentInterface as _, budgetFromAddress as N } from "./Budgets/Budget.js";
|
|
10
10
|
import { ManagedBudget as G, ManagedBudgetRoles as z, isERC1155TransferPayload as k, isFungibleTransfer as q, prepareManagedBudgetPayload as W, prepareTransfer as Y } from "./Budgets/ManagedBudget.js";
|
|
11
11
|
import { Deployable as H } from "./Deployable/Deployable.js";
|
|
12
12
|
import { Contract as K } from "./Deployable/Contract.js";
|
|
@@ -15,19 +15,19 @@ import { DeployableTargetWithRBAC as $, Roles as ee } from "./Deployable/Deploya
|
|
|
15
15
|
import { AllowListIncentive as oe, prepareAllowListIncentivePayload as ae } from "./Incentives/AllowListIncentive.js";
|
|
16
16
|
import { CGDAIncentive as ie, prepareCGDAIncentivePayload as ne } from "./Incentives/CGDAIncentive.js";
|
|
17
17
|
import { ERC20Incentive as le, prepareERC20IncentivePayload as de } from "./Incentives/ERC20Incentive.js";
|
|
18
|
-
import { ERC20VariableIncentive as me, prepareERC20VariableIncentivePayload as
|
|
19
|
-
import { ERC20VariableCriteriaIncentive as ye, gasRebateIncentiveCriteria as
|
|
18
|
+
import { ERC20VariableIncentive as me, prepareERC20VariableIncentivePayload as Ae } from "./Incentives/ERC20VariableIncentive.js";
|
|
19
|
+
import { ERC20VariableCriteriaIncentive as ye, gasRebateIncentiveCriteria as Ee, prepareERC20VariableCriteriaIncentivePayload as Ce } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
20
20
|
import { IncentiveByComponentInterface as ge, incentiveFromAddress as be } from "./Incentives/Incentive.js";
|
|
21
21
|
import { PointsIncentive as Se, preparePointsIncentivePayload as ve } from "./Incentives/PointsIncentive.js";
|
|
22
|
-
import { SignerValidator as
|
|
22
|
+
import { SignerValidator as ue, prepareSignerValidatorClaimDataPayload as Re, prepareSignerValidatorInputParams as xe, prepareSignerValidatorPayload as De } from "./Validators/SignerValidator.js";
|
|
23
23
|
import { LimitedSignerValidator as Te, prepareLimitedSignerValidatorClaimDataPayload as Ve, prepareLimitedSignerValidatorInputParams as Le, prepareLimitedSignerValidatorPayload as Oe } from "./Validators/LimitedSignerValidator.js";
|
|
24
|
-
import { BoostValidatorEOA as he, ValidatorByComponentInterface as we, validatorFromAddress as
|
|
25
|
-
import { BoostCoreNoIdentifierEmitted as Ne, BoostNotFoundError as Ue, BudgetMustAuthorizeBoostCore as Ge, ContractAddressRequiredError as ze, DecodedArgsError as ke, DecodedArgsMalformedError as qe, DeployableAlreadyDeployedError as We, DeployableBuildParametersUnspecifiedError as Ye, DeployableMissingPayloadError as je, DeployableUnknownOwnerProvidedError as He, DeployableWagmiConfigurationRequiredError as Je, FieldActionValidationError as Ke, FieldValueNotComparableError as Qe, FieldValueUndefinedError as Xe, FunctionDataDecodeError as Ze, IncentiveCriteriaNotFoundError as $e, IncentiveNotCloneableError as er, InvalidComponentInterfaceError as rr, InvalidCriteriaTypeError as or, InvalidNumericalCriteriaError as ar, InvalidProtocolChainIdError as tr, MustInitializeBudgetError as ir, NoConnectedChainIdError as nr, NoContractAddressUponReceiptError as pr, NoEventActionStepsProvidedError as lr, NoMatchingLogsError as dr, TooManyEventActionStepsProvidedError as sr, UnknownTransferPayloadSupplied as mr, UnparseableAbiParamError as
|
|
24
|
+
import { BoostValidatorEOA as he, ValidatorByComponentInterface as we, validatorFromAddress as Me } from "./Validators/Validator.js";
|
|
25
|
+
import { BoostCoreNoIdentifierEmitted as Ne, BoostNotFoundError as Ue, BudgetMustAuthorizeBoostCore as Ge, ContractAddressRequiredError as ze, DecodedArgsError as ke, DecodedArgsMalformedError as qe, DeployableAlreadyDeployedError as We, DeployableBuildParametersUnspecifiedError as Ye, DeployableMissingPayloadError as je, DeployableUnknownOwnerProvidedError as He, DeployableWagmiConfigurationRequiredError as Je, FieldActionValidationError as Ke, FieldValueNotComparableError as Qe, FieldValueUndefinedError as Xe, FunctionDataDecodeError as Ze, IncentiveCriteriaNotFoundError as $e, IncentiveNotCloneableError as er, InvalidComponentInterfaceError as rr, InvalidCriteriaTypeError as or, InvalidNumericalCriteriaError as ar, InvalidProtocolChainIdError as tr, MustInitializeBudgetError as ir, NoConnectedChainIdError as nr, NoContractAddressUponReceiptError as pr, NoEventActionStepsProvidedError as lr, NoMatchingLogsError as dr, TooManyEventActionStepsProvidedError as sr, UnknownTransferPayloadSupplied as mr, UnparseableAbiParamError as Ar, UnrecognizedFilterTypeError as cr, ValidationAbiMissingError as yr } from "./errors.js";
|
|
26
26
|
import { CheatCodes as Cr, RegistryType as fr, assertValidAddressByChainId as gr, awaitResult as br, bytes4 as Ir, getDeployedContractAddress as Sr } from "./utils.js";
|
|
27
|
-
import { StrategyType as Pr, prepareClaimPayload as
|
|
27
|
+
import { StrategyType as Pr, prepareClaimPayload as ur } from "./claiming.js";
|
|
28
28
|
import { AssetType as xr, prepareERC1155Payload as Dr, prepareERC1155Transfer as Br, prepareFungiblePayload as Tr, prepareFungibleTransfer as Vr, prepareTransferPayload as Lr } from "./transfers.js";
|
|
29
29
|
import { PassthroughAuth as Fr } from "./Auth/PassthroughAuth.js";
|
|
30
|
-
import {
|
|
30
|
+
import { C as wr, A as Mr, o as _r, f as Nr, y as Ur, b as Gr, v as zr, z as kr, d as qr, V as Wr, T as Yr, O as jr, S as Hr, g as Jr, M as Kr } from "./generated-Dz_g2mFT.js";
|
|
31
31
|
export {
|
|
32
32
|
y as ActionByComponentInterface,
|
|
33
33
|
x as AllowListByComponentInterface,
|
|
@@ -44,7 +44,7 @@ export {
|
|
|
44
44
|
Ue as BoostNotFoundError,
|
|
45
45
|
t as BoostRegistry,
|
|
46
46
|
he as BoostValidatorEOA,
|
|
47
|
-
|
|
47
|
+
_ as BudgetByComponentInterface,
|
|
48
48
|
Ge as BudgetMustAuthorizeBoostCore,
|
|
49
49
|
ie as CGDAIncentive,
|
|
50
50
|
Cr as CheatCodes,
|
|
@@ -92,31 +92,31 @@ export {
|
|
|
92
92
|
fr as RegistryType,
|
|
93
93
|
ee as Roles,
|
|
94
94
|
I as SignatureType,
|
|
95
|
-
|
|
95
|
+
ue as SignerValidator,
|
|
96
96
|
L as SimpleAllowList,
|
|
97
97
|
h as SimpleDenyList,
|
|
98
98
|
Pr as StrategyType,
|
|
99
99
|
sr as TooManyEventActionStepsProvidedError,
|
|
100
100
|
mr as UnknownTransferPayloadSupplied,
|
|
101
|
-
|
|
101
|
+
Ar as UnparseableAbiParamError,
|
|
102
102
|
cr as UnrecognizedFilterTypeError,
|
|
103
103
|
yr as ValidationAbiMissingError,
|
|
104
104
|
we as ValidatorByComponentInterface,
|
|
105
|
-
|
|
105
|
+
E as actionFromAddress,
|
|
106
106
|
B as allowListFromAddress,
|
|
107
107
|
wr as allowListIncentiveAbi,
|
|
108
108
|
S as anyActionParameter,
|
|
109
109
|
gr as assertValidAddressByChainId,
|
|
110
110
|
br as awaitResult,
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
Mr as boostCoreAbi,
|
|
112
|
+
_r as boostRegistryAbi,
|
|
113
113
|
N as budgetFromAddress,
|
|
114
114
|
Ir as bytes4,
|
|
115
115
|
Nr as cgdaIncentiveAbi,
|
|
116
116
|
Ur as erc20IncentiveAbi,
|
|
117
117
|
Gr as erc20VariableCriteriaIncentiveAbi,
|
|
118
118
|
zr as erc20VariableIncentiveAbi,
|
|
119
|
-
|
|
119
|
+
Ee as gasRebateIncentiveCriteria,
|
|
120
120
|
Sr as getDeployedContractAddress,
|
|
121
121
|
be as incentiveFromAddress,
|
|
122
122
|
k as isERC1155TransferPayload,
|
|
@@ -127,14 +127,14 @@ export {
|
|
|
127
127
|
Wr as passthroughAuthAbi,
|
|
128
128
|
Yr as pointsIncentiveAbi,
|
|
129
129
|
ae as prepareAllowListIncentivePayload,
|
|
130
|
-
|
|
130
|
+
A as prepareBoostPayload,
|
|
131
131
|
ne as prepareCGDAIncentivePayload,
|
|
132
|
-
|
|
132
|
+
ur as prepareClaimPayload,
|
|
133
133
|
Dr as prepareERC1155Payload,
|
|
134
134
|
Br as prepareERC1155Transfer,
|
|
135
135
|
de as prepareERC20IncentivePayload,
|
|
136
136
|
Ce as prepareERC20VariableCriteriaIncentivePayload,
|
|
137
|
-
|
|
137
|
+
Ae as prepareERC20VariableIncentivePayload,
|
|
138
138
|
P as prepareEventActionPayload,
|
|
139
139
|
Tr as prepareFungiblePayload,
|
|
140
140
|
Vr as prepareFungibleTransfer,
|
|
@@ -143,7 +143,7 @@ export {
|
|
|
143
143
|
Oe as prepareLimitedSignerValidatorPayload,
|
|
144
144
|
W as prepareManagedBudgetPayload,
|
|
145
145
|
ve as preparePointsIncentivePayload,
|
|
146
|
-
|
|
146
|
+
Re as prepareSignerValidatorClaimDataPayload,
|
|
147
147
|
xe as prepareSignerValidatorInputParams,
|
|
148
148
|
De as prepareSignerValidatorPayload,
|
|
149
149
|
O as prepareSimpleAllowListPayload,
|
|
@@ -154,7 +154,7 @@ export {
|
|
|
154
154
|
Hr as signerValidatorAbi,
|
|
155
155
|
Jr as simpleAllowListAbi,
|
|
156
156
|
Kr as simpleDenyListAbi,
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
u as transactionSenderClaimant,
|
|
158
|
+
Me as validatorFromAddress
|
|
159
159
|
};
|
|
160
160
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -546,7 +546,7 @@ describe("EventAction Event Selector", () => {
|
|
|
546
546
|
const action = await loadFixture(
|
|
547
547
|
cloneEventAction(fixtures, erc721, {
|
|
548
548
|
...basicErc721TransferAction(erc721),
|
|
549
|
-
actionClaimant: transactionSenderClaimant(),
|
|
549
|
+
actionClaimant: transactionSenderClaimant(chainId),
|
|
550
550
|
}),
|
|
551
551
|
);
|
|
552
552
|
const recipient = accounts[1].account;
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
type Address,
|
|
16
16
|
type ContractFunctionName,
|
|
17
17
|
type GetLogsReturnType,
|
|
18
|
+
type GetTransactionParameters,
|
|
18
19
|
type Hex,
|
|
19
20
|
type Log,
|
|
20
|
-
type PublicClient,
|
|
21
21
|
type Transaction,
|
|
22
22
|
decodeEventLog,
|
|
23
23
|
decodeFunctionData,
|
|
@@ -223,13 +223,11 @@ export interface ActionStep {
|
|
|
223
223
|
* @property {AbiEvent | AbiFunction} [abiItem] - Optional ABI item definition.
|
|
224
224
|
* @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.
|
|
225
225
|
* @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.
|
|
226
|
-
* @property {number} [chainId] - Chain ID for the transaction.
|
|
227
226
|
*/
|
|
228
227
|
export type ValidateActionStepParams = {
|
|
229
228
|
knownSignatures: Record<Hex, AbiEvent | AbiFunction>;
|
|
230
229
|
abiItem?: AbiEvent | AbiFunction;
|
|
231
|
-
|
|
232
|
-
} & ({ logs: EventLogs } | { hash: Hex });
|
|
230
|
+
} & ({ logs: EventLogs } | (GetTransactionParameters & { hash: Hex }));
|
|
233
231
|
|
|
234
232
|
/**
|
|
235
233
|
* You can either supply a simplified version of the payload, or one that explicitly declares action steps.
|
|
@@ -525,8 +523,8 @@ export class EventAction extends DeployableTarget<
|
|
|
525
523
|
if (claimant.fieldIndex === CheatCodes.TX_SENDER_CLAIMANT) {
|
|
526
524
|
if ('hash' in params) {
|
|
527
525
|
const transaction = await getTransaction(this._config, {
|
|
528
|
-
|
|
529
|
-
chainId:
|
|
526
|
+
...params,
|
|
527
|
+
chainId: claimant.chainid,
|
|
530
528
|
});
|
|
531
529
|
return transaction.from;
|
|
532
530
|
}
|
|
@@ -534,6 +532,7 @@ export class EventAction extends DeployableTarget<
|
|
|
534
532
|
for (let log of params.logs) {
|
|
535
533
|
if (log.transactionHash) {
|
|
536
534
|
const transaction = await getTransaction(this._config, {
|
|
535
|
+
...params,
|
|
537
536
|
hash: log.transactionHash,
|
|
538
537
|
chainId: claimant.chainid,
|
|
539
538
|
});
|
|
@@ -569,7 +568,10 @@ export class EventAction extends DeployableTarget<
|
|
|
569
568
|
}
|
|
570
569
|
return address;
|
|
571
570
|
}
|
|
572
|
-
const receipt = await getTransactionReceipt(this._config,
|
|
571
|
+
const receipt = await getTransactionReceipt(this._config, {
|
|
572
|
+
...params,
|
|
573
|
+
chainId: claimant.chainid,
|
|
574
|
+
});
|
|
573
575
|
const decodedLogs = receipt.logs.map((log) => {
|
|
574
576
|
const { eventName, args } = decodeEventLog({
|
|
575
577
|
abi: [event],
|
|
@@ -588,8 +590,8 @@ export class EventAction extends DeployableTarget<
|
|
|
588
590
|
}
|
|
589
591
|
if (claimant.signatureType === SignatureType.FUNC && 'hash' in params) {
|
|
590
592
|
const transaction = await getTransaction(this._config, {
|
|
591
|
-
|
|
592
|
-
chainId:
|
|
593
|
+
...params,
|
|
594
|
+
chainId: claimant.chainid,
|
|
593
595
|
});
|
|
594
596
|
if (!isAddressEqual(transaction.to!, claimant.targetContract)) return;
|
|
595
597
|
let func: AbiFunction;
|
|
@@ -700,8 +702,8 @@ export class EventAction extends DeployableTarget<
|
|
|
700
702
|
}
|
|
701
703
|
|
|
702
704
|
const receipt = await getTransactionReceipt(this._config, {
|
|
703
|
-
|
|
704
|
-
chainId:
|
|
705
|
+
...params,
|
|
706
|
+
chainId: actionStep.chainid,
|
|
705
707
|
});
|
|
706
708
|
const decodedLogs = receipt.logs.map((log) => {
|
|
707
709
|
const { eventName, args } = decodeEventLog({
|
|
@@ -716,10 +718,10 @@ export class EventAction extends DeployableTarget<
|
|
|
716
718
|
return this.isActionEventValid(actionStep, decodedLogs);
|
|
717
719
|
}
|
|
718
720
|
if (actionStep.signatureType === SignatureType.FUNC) {
|
|
719
|
-
if ('hash' in params
|
|
721
|
+
if ('hash' in params) {
|
|
720
722
|
const transaction = await getTransaction(this._config, {
|
|
721
|
-
|
|
722
|
-
chainId:
|
|
723
|
+
...params,
|
|
724
|
+
chainId: actionStep.chainid,
|
|
723
725
|
});
|
|
724
726
|
return this.isActionFunctionValid(actionStep, transaction, params);
|
|
725
727
|
}
|
|
@@ -1281,8 +1283,9 @@ export function anyActionParameter(): Criteria {
|
|
|
1281
1283
|
* - signature: Set to zeroHash (0x0000...0000)
|
|
1282
1284
|
* - fieldIndex: Set to 255, indicating "any" field using CheatCodes enum
|
|
1283
1285
|
* - targetContract: Set to zeroAddress (0x0000...0000)
|
|
1284
|
-
* - chainid:
|
|
1286
|
+
* - chainid: The chain ID on which the transaction is sent, should match the chain ID for the action's {@link ActionStep}
|
|
1285
1287
|
*
|
|
1288
|
+
* @param {number} chainId - The chain ID on which the transaction is sent, should match the chain ID for the action's {@link ActionStep}
|
|
1286
1289
|
* @returns {ActionClaimant} An ActionClaimant object representing the msg.sender
|
|
1287
1290
|
*
|
|
1288
1291
|
* @example
|
|
@@ -1295,12 +1298,12 @@ export function anyActionParameter(): Criteria {
|
|
|
1295
1298
|
* };
|
|
1296
1299
|
* await eventAction.deploy(payload);
|
|
1297
1300
|
*/
|
|
1298
|
-
export function transactionSenderClaimant(): ActionClaimant {
|
|
1301
|
+
export function transactionSenderClaimant(chainId: number): ActionClaimant {
|
|
1299
1302
|
return {
|
|
1300
1303
|
signatureType: SignatureType.EVENT,
|
|
1301
1304
|
signature: zeroHash,
|
|
1302
1305
|
fieldIndex: CheatCodes.TX_SENDER_CLAIMANT,
|
|
1303
1306
|
targetContract: zeroAddress,
|
|
1304
|
-
chainid:
|
|
1307
|
+
chainid: chainId,
|
|
1305
1308
|
};
|
|
1306
1309
|
}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AAllowListIncentive,
|
|
4
4
|
ACGDAIncentive,
|
|
5
5
|
AERC20Incentive,
|
|
6
|
+
AERC20VariableCriteriaIncentive,
|
|
6
7
|
AERC20VariableIncentive,
|
|
7
8
|
// AERC20VariableCriteriaIncentive
|
|
8
9
|
APointsIncentive,
|
|
@@ -47,7 +48,7 @@ export type Incentive =
|
|
|
47
48
|
/**
|
|
48
49
|
* A map of Incentive component interfaces to their constructors.
|
|
49
50
|
*
|
|
50
|
-
* @type {{ "0xc5b24b8e": typeof PointsIncentive; "0x8c901437": typeof ERC20Incentive; "0x4414fbb4": typeof AllowListIncentive; "0xa39e44d9": typeof CGDAIncentive; "0xa8e4af1e": typeof ERC20VariableIncentive }}
|
|
51
|
+
* @type {{ "0xc5b24b8e": typeof PointsIncentive; "0x8c901437": typeof ERC20Incentive; "0x4414fbb4": typeof AllowListIncentive; "0xa39e44d9": typeof CGDAIncentive; "0xa8e4af1e": typeof ERC20VariableIncentive; "0x90318111": typeof ERC20VariableCriteriaIncentive }}
|
|
51
52
|
*/
|
|
52
53
|
export const IncentiveByComponentInterface = {
|
|
53
54
|
[APointsIncentive as Hex]: PointsIncentive,
|
|
@@ -56,7 +57,7 @@ export const IncentiveByComponentInterface = {
|
|
|
56
57
|
// [AERC1155Incentive as Hex]: ERC1155Incentive,
|
|
57
58
|
[ACGDAIncentive as Hex]: CGDAIncentive,
|
|
58
59
|
[AERC20VariableIncentive as Hex]: ERC20VariableIncentive,
|
|
59
|
-
|
|
60
|
+
[AERC20VariableCriteriaIncentive as Hex]: ERC20VariableCriteriaIncentive,
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
/**
|
|
@@ -578,14 +578,13 @@ export async function prepareSignerValidatorClaimDataPayload({
|
|
|
578
578
|
claimant,
|
|
579
579
|
boostId,
|
|
580
580
|
}: SignerValidatorClaimDataParams): Promise<Hex> {
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
domain,
|
|
581
|
+
const trustedSignature = await signer.privateKey.signTypedData({
|
|
582
|
+
domain: {
|
|
583
|
+
name: 'SignerValidator',
|
|
584
|
+
version: '1',
|
|
585
|
+
chainId: chainId,
|
|
586
|
+
verifyingContract: validator,
|
|
587
|
+
},
|
|
589
588
|
types: {
|
|
590
589
|
SignerValidatorData: [
|
|
591
590
|
{ name: 'boostId', type: 'uint256' },
|
|
@@ -601,10 +600,6 @@ export async function prepareSignerValidatorClaimDataPayload({
|
|
|
601
600
|
claimant,
|
|
602
601
|
incentiveData: incentiveData,
|
|
603
602
|
},
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
const trustedSignature = await signer.privateKey.signTypedData({
|
|
607
|
-
...typedData,
|
|
608
603
|
});
|
|
609
604
|
|
|
610
605
|
// Prepare the claim data payload using the new helper
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const n="0xc2c281ec",e="0x53cf8555",t="0x7cc1d5bb",c="0x90318111",i="0x7687b0ed",A="0x5fbfaa4e",o="0x0d36a40d",s="0xb8ce7b22",a="0x1392d798",l="0x3d30a22c";exports.AAllowListIncentive=n;exports.ACGDAIncentive=e;exports.AERC20Incentive=t;exports.AERC20VariableIncentive=c;exports.AEventAction=i;exports.AManagedBudget=A;exports.APointsIncentive=o;exports.ASignerValidator=s;exports.ASimpleAllowList=a;exports.ASimpleDenyList=l;
|
|
2
|
-
//# sourceMappingURL=componentInterfaces-DRI_dQ-P.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentInterfaces-DRI_dQ-P.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const n = "0xc2c281ec", c = "0x53cf8555", e = "0x7cc1d5bb", s = "0x90318111", t = "0x7687b0ed", a = "0x5fbfaa4e", i = "0x0d36a40d", o = "0xb8ce7b22", A = "0x1392d798", x = "0x3d30a22c";
|
|
2
|
-
export {
|
|
3
|
-
t as A,
|
|
4
|
-
a,
|
|
5
|
-
i as b,
|
|
6
|
-
e as c,
|
|
7
|
-
n as d,
|
|
8
|
-
c as e,
|
|
9
|
-
s as f,
|
|
10
|
-
o as g,
|
|
11
|
-
A as h,
|
|
12
|
-
x as i
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=componentInterfaces-bIVo8eyA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentInterfaces-bIVo8eyA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|