@boostxyz/sdk 7.6.0 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +21 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +133 -109
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/{AllowList-BYYm3b9d.cjs → AllowList-BJ9HQGFs.cjs} +2 -2
- package/dist/{AllowList-BYYm3b9d.cjs.map → AllowList-BJ9HQGFs.cjs.map} +1 -1
- package/dist/{AllowList-D_K4S6jV.js → AllowList-DiU7g4Hs.js} +3 -3
- package/dist/{AllowList-D_K4S6jV.js.map → AllowList-DiU7g4Hs.js.map} +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +2 -2
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.js +6 -6
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +1 -1
- package/dist/{Budget-DwVY-GGt.cjs → Budget-D_zhh1rh.cjs} +2 -2
- package/dist/{Budget-DwVY-GGt.cjs.map → Budget-D_zhh1rh.cjs.map} +1 -1
- package/dist/{Budget-DZlb1py_.js → Budget-YIhV65cc.js} +2 -2
- package/dist/{Budget-DZlb1py_.js.map → Budget-YIhV65cc.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.js +1 -1
- package/dist/{Incentive-BKZisyIm.js → Incentive-CeoEla-t.js} +2 -2
- package/dist/{Incentive-BKZisyIm.js.map → Incentive-CeoEla-t.js.map} +1 -1
- package/dist/{Incentive-Ctfodrh5.cjs → Incentive-CrnbYN_a.cjs} +2 -2
- package/dist/{Incentive-Ctfodrh5.cjs.map → Incentive-CrnbYN_a.cjs.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +2 -2
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +1 -1
- package/dist/{SimpleDenyList-Bv2mSQJO.cjs → SimpleDenyList-7-VTqfsH.cjs} +2 -2
- package/dist/{SimpleDenyList-Bv2mSQJO.cjs.map → SimpleDenyList-7-VTqfsH.cjs.map} +1 -1
- package/dist/{SimpleDenyList-tEOqSTnD.js → SimpleDenyList-Dr03aOeP.js} +2 -2
- package/dist/{SimpleDenyList-tEOqSTnD.js.map → SimpleDenyList-Dr03aOeP.js.map} +1 -1
- package/dist/{Validator-ztOItKpP.js → Validator-DgvB9wge.js} +2 -2
- package/dist/{Validator-ztOItKpP.js.map → Validator-DgvB9wge.js.map} +1 -1
- package/dist/{Validator-CUGwkN06.cjs → Validator-rYW7PMwW.cjs} +2 -2
- package/dist/{Validator-CUGwkN06.cjs.map → Validator-rYW7PMwW.cjs.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/deployments-BjBgk03b.cjs +2 -0
- package/dist/deployments-BjBgk03b.cjs.map +1 -0
- package/dist/{deployments-EFoHkvCp.js → deployments-CHQ30INq.js} +31 -9
- package/dist/deployments-CHQ30INq.js.map +1 -0
- package/dist/deployments.json +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +185 -182
- package/package.json +1 -1
- package/src/Actions/EventAction.test.ts +161 -1
- package/src/Actions/EventAction.ts +52 -5
- package/dist/deployments-EFoHkvCp.js.map +0 -1
- package/dist/deployments-xekPSd2S.cjs +0 -2
- package/dist/deployments-xekPSd2S.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,205 +2,208 @@ import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as i, BoostRegist
|
|
|
2
2
|
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as l, FEE_DENOMINATOR as p } from "./BoostCore.js";
|
|
3
3
|
import { Boost as c, prepareBoostPayload as g } from "./Boost.js";
|
|
4
4
|
import { ActionByComponentInterface as A, actionFromAddress as y } from "./Actions/Action.js";
|
|
5
|
-
import { EventAction as
|
|
6
|
-
import { A as
|
|
7
|
-
import { LIST_MANAGER_ROLE as
|
|
8
|
-
import { S as
|
|
9
|
-
import { B as
|
|
10
|
-
import { ManagedBudget as
|
|
11
|
-
import { Deployable as
|
|
12
|
-
import { Contract as
|
|
13
|
-
import { DeployableTarget as
|
|
14
|
-
import { DeployableTargetWithRBAC as
|
|
15
|
-
import { AllowListIncentive as
|
|
16
|
-
import { CGDAIncentive as
|
|
17
|
-
import { ERC20Incentive as
|
|
18
|
-
import { E as
|
|
19
|
-
import { ERC20VariableIncentive as
|
|
20
|
-
import { ERC20VariableCriteriaIncentive as
|
|
21
|
-
import { ERC20PeggedVariableCriteriaIncentive as
|
|
22
|
-
import { ERC20VariableCriteriaIncentiveV2 as
|
|
23
|
-
import { ERC20PeggedVariableCriteriaIncentiveV2 as
|
|
24
|
-
import { PointsIncentive as
|
|
25
|
-
import { SignerValidator as
|
|
26
|
-
import { LimitedSignerValidator as
|
|
27
|
-
import { B as
|
|
28
|
-
import { BoostCoreNoIdentifierEmitted as
|
|
29
|
-
import { CheatCodes as
|
|
30
|
-
import { StrategyType as
|
|
31
|
-
import { AssetType as
|
|
32
|
-
import { PassthroughAuth as
|
|
33
|
-
import { q as
|
|
5
|
+
import { EventAction as E, FilterType as b, PrimitiveType as I, SignatureType as P, ValueType as f, anyActionParameter as u, decodeAndReorderLogArgs as v, detectSignatureType as V, getScalarValueFromTuple as S, isClaimantFieldIndexTuple as R, isCriteriaFieldIndexTuple as x, isEventActionPayloadSimple as B, packClaimantFieldIndexes as T, packCriteriaFieldIndexes as D, packFieldIndexes as F, prepareEventActionPayload as L, transactionSenderClaimant as h, unpackClaimantFieldIndexes as O, unpackCriteriaFieldIndexes as M, unpackFieldIndexes as N } from "./Actions/EventAction.js";
|
|
6
|
+
import { A as _, O as k, a as U, b as W, p as G } from "./AllowList-DiU7g4Hs.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as q, SimpleAllowList as Y, prepareSimpleAllowListPayload as j } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as J, p as K } from "./SimpleDenyList-Dr03aOeP.js";
|
|
9
|
+
import { B as X, M as Z, a as $, T as ee, b as re, p as ae, c as ie } from "./Budget-YIhV65cc.js";
|
|
10
|
+
import { ManagedBudget as te, ManagedBudgetRoles as ne, isERC1155TransferPayload as de, isFungibleTransfer as le, prepareManagedBudgetPayload as pe, prepareTransfer as se } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as ge } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as Ae } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as Ce } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { DeployableTargetWithRBAC as be, Roles as Ie } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
15
|
+
import { AllowListIncentive as fe, prepareAllowListIncentivePayload as ue } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as Ve, prepareCGDAIncentivePayload as Se } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as xe, prepareERC20IncentivePayload as Be } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { E as De, I as Fe, i as Le, p as he } from "./Incentive-CeoEla-t.js";
|
|
19
|
+
import { ERC20VariableIncentive as Me, prepareERC20VariableIncentivePayload as Ne } from "./Incentives/ERC20VariableIncentive.js";
|
|
20
|
+
import { ERC20VariableCriteriaIncentive as _e, gasRebateIncentiveCriteria as ke, prepareERC20VariableCriteriaIncentivePayload as Ue } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
21
|
+
import { ERC20PeggedVariableCriteriaIncentive as Ge, prepareERC20PeggedVariableCriteriaIncentivePayload as ze } from "./Incentives/ERC20PeggedVariableCriteriaIncentive.js";
|
|
22
|
+
import { ERC20VariableCriteriaIncentiveV2 as Ye, gasRebateIncentiveCriteriaV2 as je, prepareERC20VariableCriteriaIncentiveV2Payload as He } from "./Incentives/ERC20VariableCriteriaIncentiveV2.js";
|
|
23
|
+
import { ERC20PeggedVariableCriteriaIncentiveV2 as Ke, prepareERC20PeggedVariableCriteriaIncentiveV2Payload as Qe } from "./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js";
|
|
24
|
+
import { PointsIncentive as Ze, preparePointsIncentivePayload as $e } from "./Incentives/PointsIncentive.js";
|
|
25
|
+
import { SignerValidator as rr, prepareSignerValidatorClaimDataPayload as ar, prepareSignerValidatorInputParams as ir, prepareSignerValidatorPayload as or } from "./Validators/SignerValidator.js";
|
|
26
|
+
import { LimitedSignerValidator as nr, prepareLimitedSignerValidatorClaimDataPayload as dr, prepareLimitedSignerValidatorInputParams as lr, prepareLimitedSignerValidatorPayload as pr } from "./Validators/LimitedSignerValidator.js";
|
|
27
|
+
import { B as cr, P as gr, V as mr, d as Ar, p as yr, a as Cr, b as Er, v as br } from "./Validator-DgvB9wge.js";
|
|
28
|
+
import { BoostCoreNoIdentifierEmitted as Pr, BoostNotFoundError as fr, BudgetMustAuthorizeBoostCore as ur, ContractAddressRequiredError as vr, DecodedArgsError as Vr, DecodedArgsMalformedError as Sr, DeployableAlreadyDeployedError as Rr, DeployableBuildParametersUnspecifiedError as xr, DeployableMissingPayloadError as Br, DeployableUnknownOwnerProvidedError as Tr, DeployableWagmiConfigurationRequiredError as Dr, FieldActionValidationError as Fr, FieldValueNotComparableError as Lr, FieldValueUndefinedError as hr, FunctionDataDecodeError as Or, IncentiveCriteriaNotFoundError as Mr, IncentiveNotCloneableError as Nr, InvalidComponentInterfaceError as wr, InvalidCriteriaTypeError as _r, InvalidNumericalCriteriaError as kr, InvalidProtocolChainIdError as Ur, InvalidTupleDecodingError as Wr, InvalidTupleEncodingError as Gr, MustInitializeBudgetError as zr, NoConnectedChainIdError as qr, NoContractAddressUponReceiptError as Yr, NoEventActionStepsProvidedError as jr, NoMatchingLogsError as Hr, TooManyEventActionStepsProvidedError as Jr, UnknownTransferPayloadSupplied as Kr, UnparseableAbiParamError as Qr, UnrecognizedFilterTypeError as Xr, ValidationAbiMissingError as Zr } from "./errors.js";
|
|
29
|
+
import { CheatCodes as ea, RegistryType as ra, TRANSFER_SIGNATURE as aa, assertValidAddressByChainId as ia, awaitResult as oa, bytes4 as ta, getDeployedContractAddress as na, getErc20Balance as da } from "./utils.js";
|
|
30
|
+
import { StrategyType as pa, prepareClaimPayload as sa } from "./claiming.js";
|
|
31
|
+
import { AssetType as ga, prepareERC1155Payload as ma, prepareERC1155Transfer as Aa, prepareFungiblePayload as ya, prepareFungibleTransfer as Ca, prepareTransferPayload as Ea } from "./transfers.js";
|
|
32
|
+
import { PassthroughAuth as Ia } from "./Auth/PassthroughAuth.js";
|
|
33
|
+
import { q as fa, a as ua, R as va, z as Va, T as Sa, g as Ra, y as xa, d as Ba, c as Ta, m as Da, O as Fa, G as La, C as ha, p as Oa, r as Ma, M as Na, e as wa, _ as _a, H as ka, D as Ua, j as Wa, S as Ga, P as za, b as qa } from "./generated-B6mEIx8i.js";
|
|
34
34
|
export {
|
|
35
35
|
A as ActionByComponentInterface,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
_ as AllowListByComponentInterface,
|
|
37
|
+
fe as AllowListIncentive,
|
|
38
|
+
ga as AssetType,
|
|
39
39
|
n as BOOST_CORE_ADDRESS,
|
|
40
40
|
d as BOOST_CORE_ADDRESSES,
|
|
41
41
|
a as BOOST_REGISTRY_ADDRESS,
|
|
42
42
|
i as BOOST_REGISTRY_ADDRESSES,
|
|
43
43
|
c as Boost,
|
|
44
44
|
l as BoostCore,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
Pr as BoostCoreNoIdentifierEmitted,
|
|
46
|
+
fr as BoostNotFoundError,
|
|
47
47
|
o as BoostRegistry,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
cr as BoostValidatorEOA,
|
|
49
|
+
X as BudgetByComponentInterface,
|
|
50
|
+
ur as BudgetMustAuthorizeBoostCore,
|
|
51
|
+
Ve as CGDAIncentive,
|
|
52
|
+
ea as CheatCodes,
|
|
53
|
+
Ae as Contract,
|
|
54
|
+
vr as ContractAddressRequiredError,
|
|
55
|
+
Vr as DecodedArgsError,
|
|
56
|
+
Sr as DecodedArgsMalformedError,
|
|
57
|
+
ge as Deployable,
|
|
58
|
+
Rr as DeployableAlreadyDeployedError,
|
|
59
|
+
xr as DeployableBuildParametersUnspecifiedError,
|
|
60
|
+
Br as DeployableMissingPayloadError,
|
|
61
|
+
Ce as DeployableTarget,
|
|
62
|
+
be as DeployableTargetWithRBAC,
|
|
63
|
+
Tr as DeployableUnknownOwnerProvidedError,
|
|
64
|
+
Dr as DeployableWagmiConfigurationRequiredError,
|
|
65
|
+
xe as ERC20Incentive,
|
|
66
|
+
De as ERC20PeggedIncentive,
|
|
67
|
+
Ge as ERC20PeggedVariableCriteriaIncentive,
|
|
68
|
+
Ke as ERC20PeggedVariableCriteriaIncentiveV2,
|
|
69
|
+
_e as ERC20VariableCriteriaIncentive,
|
|
70
|
+
Ye as ERC20VariableCriteriaIncentiveV2,
|
|
71
|
+
Me as ERC20VariableIncentive,
|
|
72
|
+
E as EventAction,
|
|
73
73
|
p as FEE_DENOMINATOR,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
Fr as FieldActionValidationError,
|
|
75
|
+
Lr as FieldValueNotComparableError,
|
|
76
|
+
hr as FieldValueUndefinedError,
|
|
77
77
|
b as FilterType,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
78
|
+
Or as FunctionDataDecodeError,
|
|
79
|
+
Fe as IncentiveByComponentInterface,
|
|
80
|
+
Mr as IncentiveCriteriaNotFoundError,
|
|
81
|
+
Nr as IncentiveNotCloneableError,
|
|
82
|
+
wr as InvalidComponentInterfaceError,
|
|
83
|
+
_r as InvalidCriteriaTypeError,
|
|
84
|
+
kr as InvalidNumericalCriteriaError,
|
|
85
|
+
Ur as InvalidProtocolChainIdError,
|
|
86
|
+
Wr as InvalidTupleDecodingError,
|
|
87
|
+
Gr as InvalidTupleEncodingError,
|
|
88
|
+
q as LIST_MANAGER_ROLE,
|
|
89
|
+
nr as LimitedSignerValidator,
|
|
90
|
+
te as ManagedBudget,
|
|
91
|
+
ne as ManagedBudgetRoles,
|
|
92
|
+
Z as ManagedBudgetWithFees,
|
|
93
|
+
$ as ManagedBudgetWithFeesV2,
|
|
94
|
+
zr as MustInitializeBudgetError,
|
|
95
|
+
qr as NoConnectedChainIdError,
|
|
96
|
+
Yr as NoContractAddressUponReceiptError,
|
|
97
|
+
jr as NoEventActionStepsProvidedError,
|
|
98
|
+
Hr as NoMatchingLogsError,
|
|
99
|
+
k as OffchainAccessList,
|
|
100
|
+
U as OpenAllowList,
|
|
101
|
+
Ia as PassthroughAuth,
|
|
102
|
+
gr as PayableLimitedSignerValidator,
|
|
103
|
+
Ze as PointsIncentive,
|
|
104
104
|
I as PrimitiveType,
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
ra as RegistryType,
|
|
106
|
+
Ie as Roles,
|
|
107
107
|
P as SignatureType,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
rr as SignerValidator,
|
|
109
|
+
Y as SimpleAllowList,
|
|
110
|
+
J as SimpleDenyList,
|
|
111
|
+
pa as StrategyType,
|
|
112
|
+
aa as TRANSFER_SIGNATURE,
|
|
113
|
+
Jr as TooManyEventActionStepsProvidedError,
|
|
114
|
+
ee as TransparentBudget,
|
|
115
|
+
Kr as UnknownTransferPayloadSupplied,
|
|
116
|
+
Qr as UnparseableAbiParamError,
|
|
117
|
+
Xr as UnrecognizedFilterTypeError,
|
|
118
|
+
Zr as ValidationAbiMissingError,
|
|
119
|
+
mr as ValidatorByComponentInterface,
|
|
120
120
|
f as ValueType,
|
|
121
121
|
y as actionFromAddress,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
W as allowListFromAddress,
|
|
123
|
+
fa as allowListIncentiveAbi,
|
|
124
|
+
u as anyActionParameter,
|
|
125
|
+
ia as assertValidAddressByChainId,
|
|
126
|
+
oa as awaitResult,
|
|
127
|
+
ua as boostCoreAbi,
|
|
128
|
+
va as boostRegistryAbi,
|
|
129
|
+
re as budgetFromAddress,
|
|
130
|
+
ta as bytes4,
|
|
131
|
+
Va as cgdaIncentiveAbi,
|
|
132
|
+
v as decodeAndReorderLogArgs,
|
|
133
|
+
Ar as decodeClaimData,
|
|
134
134
|
V as detectSignatureType,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
Sa as erc20IncentiveAbi,
|
|
136
|
+
Ra as erc20PeggedIncentiveAbi,
|
|
137
|
+
xa as erc20PeggedVariableCriteriaIncentiveAbi,
|
|
138
|
+
Ba as erc20PeggedVariableCriteriaIncentiveV2Abi,
|
|
139
|
+
Ta as erc20VariableCriteriaIncentiveAbi,
|
|
140
|
+
Da as erc20VariableCriteriaIncentiveV2Abi,
|
|
141
|
+
Fa as erc20VariableIncentiveAbi,
|
|
142
|
+
ke as gasRebateIncentiveCriteria,
|
|
143
|
+
je as gasRebateIncentiveCriteriaV2,
|
|
144
|
+
na as getDeployedContractAddress,
|
|
145
|
+
da as getErc20Balance,
|
|
146
146
|
S as getScalarValueFromTuple,
|
|
147
|
-
|
|
148
|
-
R as
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
T as
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
147
|
+
Le as incentiveFromAddress,
|
|
148
|
+
R as isClaimantFieldIndexTuple,
|
|
149
|
+
x as isCriteriaFieldIndexTuple,
|
|
150
|
+
de as isERC1155TransferPayload,
|
|
151
|
+
B as isEventActionPayloadSimple,
|
|
152
|
+
le as isFungibleTransfer,
|
|
153
|
+
La as limitedSignerValidatorAbi,
|
|
154
|
+
ha as managedBudgetAbi,
|
|
155
|
+
Oa as managedBudgetWithFeesAbi,
|
|
156
|
+
Ma as managedBudgetWithFeesV2Abi,
|
|
157
|
+
Na as offchainAccessListAbi,
|
|
158
|
+
T as packClaimantFieldIndexes,
|
|
159
|
+
D as packCriteriaFieldIndexes,
|
|
160
|
+
F as packFieldIndexes,
|
|
161
|
+
wa as passthroughAuthAbi,
|
|
162
|
+
_a as payableLimitedSignerValidatorAbi,
|
|
163
|
+
ka as pointsIncentiveAbi,
|
|
164
|
+
ue as prepareAllowListIncentivePayload,
|
|
163
165
|
g as prepareBoostPayload,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
166
|
+
Se as prepareCGDAIncentivePayload,
|
|
167
|
+
sa as prepareClaimPayload,
|
|
168
|
+
ma as prepareERC1155Payload,
|
|
169
|
+
Aa as prepareERC1155Transfer,
|
|
170
|
+
Be as prepareERC20IncentivePayload,
|
|
171
|
+
he as prepareERC20PeggedIncentivePayload,
|
|
172
|
+
ze as prepareERC20PeggedVariableCriteriaIncentivePayload,
|
|
173
|
+
Qe as prepareERC20PeggedVariableCriteriaIncentiveV2Payload,
|
|
174
|
+
Ue as prepareERC20VariableCriteriaIncentivePayload,
|
|
175
|
+
He as prepareERC20VariableCriteriaIncentiveV2Payload,
|
|
176
|
+
Ne as prepareERC20VariableIncentivePayload,
|
|
177
|
+
L as prepareEventActionPayload,
|
|
178
|
+
ya as prepareFungiblePayload,
|
|
179
|
+
Ca as prepareFungibleTransfer,
|
|
180
|
+
dr as prepareLimitedSignerValidatorClaimDataPayload,
|
|
181
|
+
lr as prepareLimitedSignerValidatorInputParams,
|
|
182
|
+
pr as prepareLimitedSignerValidatorPayload,
|
|
183
|
+
pe as prepareManagedBudgetPayload,
|
|
184
|
+
ae as prepareManagedBudgetWithFeesPayload,
|
|
185
|
+
ie as prepareManagedBudgetWithFeesV2Payload,
|
|
186
|
+
G as prepareOffchainAccessListPayload,
|
|
187
|
+
yr as preparePayableLimitedSignerValidatorClaimDataPayload,
|
|
188
|
+
Cr as preparePayableLimitedSignerValidatorInputParams,
|
|
189
|
+
Er as preparePayableLimitedSignerValidatorPayload,
|
|
190
|
+
$e as preparePointsIncentivePayload,
|
|
191
|
+
ar as prepareSignerValidatorClaimDataPayload,
|
|
192
|
+
ir as prepareSignerValidatorInputParams,
|
|
193
|
+
or as prepareSignerValidatorPayload,
|
|
194
|
+
j as prepareSimpleAllowListPayload,
|
|
195
|
+
K as prepareSimpleDenyListPayload,
|
|
196
|
+
se as prepareTransfer,
|
|
197
|
+
Ea as prepareTransferPayload,
|
|
198
|
+
Ua as rbacAbi,
|
|
199
|
+
Wa as signerValidatorAbi,
|
|
200
|
+
Ga as simpleAllowListAbi,
|
|
201
|
+
za as simpleDenyListAbi,
|
|
202
|
+
h as transactionSenderClaimant,
|
|
203
|
+
qa as transparentBudgetAbi,
|
|
204
|
+
O as unpackClaimantFieldIndexes,
|
|
205
|
+
M as unpackCriteriaFieldIndexes,
|
|
206
|
+
N as unpackFieldIndexes,
|
|
207
|
+
br as validatorFromAddress
|
|
205
208
|
};
|
|
206
209
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -44,7 +44,9 @@ import {
|
|
|
44
44
|
packCriteriaFieldIndexes,
|
|
45
45
|
unpackCriteriaFieldIndexes,
|
|
46
46
|
isCriteriaFieldIndexTuple,
|
|
47
|
-
|
|
47
|
+
packClaimantFieldIndexes,
|
|
48
|
+
decodeAndReorderLogArgs,
|
|
49
|
+
ActionClaimant
|
|
48
50
|
} from "./EventAction";
|
|
49
51
|
import { allKnownSignatures } from "@boostxyz/test/allKnownSignatures";
|
|
50
52
|
import { getTransactionReceipt } from "@wagmi/core";
|
|
@@ -1602,3 +1604,161 @@ describe("criteria field index tuple support", () => {
|
|
|
1602
1604
|
});
|
|
1603
1605
|
});
|
|
1604
1606
|
});
|
|
1607
|
+
|
|
1608
|
+
describe("claimant tuple field support", () => {
|
|
1609
|
+
describe("validateClaimantAgainstArgs with tuple access", () => {
|
|
1610
|
+
test("correctly extracts address from tuple field", () => {
|
|
1611
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1612
|
+
|
|
1613
|
+
// Test args with a tuple containing an address at position [2][1]
|
|
1614
|
+
const testArgs = [
|
|
1615
|
+
"0x1111111111111111111111111111111111111111",
|
|
1616
|
+
100n,
|
|
1617
|
+
["0x2222222222222222222222222222222222222222", "0x3333333333333333333333333333333333333333", 500n],
|
|
1618
|
+
"test"
|
|
1619
|
+
];
|
|
1620
|
+
|
|
1621
|
+
// Test extracting from tuple at args[2][1]
|
|
1622
|
+
const claimant: ActionClaimant = {
|
|
1623
|
+
signatureType: SignatureType.EVENT,
|
|
1624
|
+
signature: zeroHash,
|
|
1625
|
+
fieldIndex: packClaimantFieldIndexes([2, 1]),
|
|
1626
|
+
targetContract: zeroAddress,
|
|
1627
|
+
chainid: 1
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1630
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1631
|
+
expect(result).toBe("0x3333333333333333333333333333333333333333");
|
|
1632
|
+
});
|
|
1633
|
+
|
|
1634
|
+
test("returns undefined if tuple index is out of bounds", () => {
|
|
1635
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1636
|
+
|
|
1637
|
+
const testArgs = [
|
|
1638
|
+
"0x1111111111111111111111111111111111111111",
|
|
1639
|
+
["0x2222222222222222222222222222222222222222"]
|
|
1640
|
+
];
|
|
1641
|
+
|
|
1642
|
+
// Try to access args[1][2] which doesn't exist
|
|
1643
|
+
const claimant: ActionClaimant = {
|
|
1644
|
+
signatureType: SignatureType.EVENT,
|
|
1645
|
+
signature: zeroHash,
|
|
1646
|
+
fieldIndex: packClaimantFieldIndexes([1, 2]),
|
|
1647
|
+
targetContract: zeroAddress,
|
|
1648
|
+
chainid: 1
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1652
|
+
expect(result).toBeUndefined();
|
|
1653
|
+
});
|
|
1654
|
+
|
|
1655
|
+
test("returns undefined if first index is out of bounds", () => {
|
|
1656
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1657
|
+
|
|
1658
|
+
const testArgs = ["0x1111111111111111111111111111111111111111"];
|
|
1659
|
+
|
|
1660
|
+
// Try to access args[5][0] where args[5] doesn't exist
|
|
1661
|
+
const claimant: ActionClaimant = {
|
|
1662
|
+
signatureType: SignatureType.EVENT,
|
|
1663
|
+
signature: zeroHash,
|
|
1664
|
+
fieldIndex: packClaimantFieldIndexes([5, 0]),
|
|
1665
|
+
targetContract: zeroAddress,
|
|
1666
|
+
chainid: 1
|
|
1667
|
+
};
|
|
1668
|
+
|
|
1669
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1670
|
+
expect(result).toBeUndefined();
|
|
1671
|
+
});
|
|
1672
|
+
|
|
1673
|
+
test("returns undefined if tuple field is not an address", () => {
|
|
1674
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1675
|
+
|
|
1676
|
+
const testArgs = [
|
|
1677
|
+
["not-an-address", 123n, "test"]
|
|
1678
|
+
];
|
|
1679
|
+
|
|
1680
|
+
// Try to access args[0][0] which is not an address
|
|
1681
|
+
const claimant: ActionClaimant = {
|
|
1682
|
+
signatureType: SignatureType.EVENT,
|
|
1683
|
+
signature: zeroHash,
|
|
1684
|
+
fieldIndex: packClaimantFieldIndexes([0, 0]),
|
|
1685
|
+
targetContract: zeroAddress,
|
|
1686
|
+
chainid: 1
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1690
|
+
expect(result).toBeUndefined();
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
test("returns undefined if field at first index is not a tuple", () => {
|
|
1694
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1695
|
+
|
|
1696
|
+
const testArgs = [
|
|
1697
|
+
"0x1111111111111111111111111111111111111111",
|
|
1698
|
+
"not-a-tuple"
|
|
1699
|
+
];
|
|
1700
|
+
|
|
1701
|
+
// Try to access args[1][0] but args[1] is not an array
|
|
1702
|
+
const claimant: ActionClaimant = {
|
|
1703
|
+
signatureType: SignatureType.EVENT,
|
|
1704
|
+
signature: zeroHash,
|
|
1705
|
+
fieldIndex: packClaimantFieldIndexes([1, 0]),
|
|
1706
|
+
targetContract: zeroAddress,
|
|
1707
|
+
chainid: 1
|
|
1708
|
+
};
|
|
1709
|
+
|
|
1710
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1711
|
+
expect(result).toBeUndefined();
|
|
1712
|
+
});
|
|
1713
|
+
|
|
1714
|
+
test("still handles direct field access correctly", () => {
|
|
1715
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1716
|
+
|
|
1717
|
+
const testArgs = [
|
|
1718
|
+
"0x1111111111111111111111111111111111111111",
|
|
1719
|
+
"0x2222222222222222222222222222222222222222",
|
|
1720
|
+
100n
|
|
1721
|
+
];
|
|
1722
|
+
|
|
1723
|
+
// Direct access to args[1] (not a tuple index)
|
|
1724
|
+
const claimant: ActionClaimant = {
|
|
1725
|
+
signatureType: SignatureType.EVENT,
|
|
1726
|
+
signature: zeroHash,
|
|
1727
|
+
fieldIndex: 1,
|
|
1728
|
+
targetContract: zeroAddress,
|
|
1729
|
+
chainid: 1
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1733
|
+
expect(result).toBe("0x2222222222222222222222222222222222222222");
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1736
|
+
test("handles complex tuple with correct address", () => {
|
|
1737
|
+
const eventAction = new EventAction({ config: {} as any });
|
|
1738
|
+
|
|
1739
|
+
// Complex nested structure
|
|
1740
|
+
const testArgs = [
|
|
1741
|
+
{ someField: "data" },
|
|
1742
|
+
100n,
|
|
1743
|
+
[
|
|
1744
|
+
"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
1745
|
+
"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
1746
|
+
["nested", "data"],
|
|
1747
|
+
"0xcccccccccccccccccccccccccccccccccccccccc"
|
|
1748
|
+
]
|
|
1749
|
+
];
|
|
1750
|
+
|
|
1751
|
+
// Access args[2][3] which is an address
|
|
1752
|
+
const claimant: ActionClaimant = {
|
|
1753
|
+
signatureType: SignatureType.EVENT,
|
|
1754
|
+
signature: zeroHash,
|
|
1755
|
+
fieldIndex: packClaimantFieldIndexes([2, 3]),
|
|
1756
|
+
targetContract: zeroAddress,
|
|
1757
|
+
chainid: 1
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
const result = eventAction.validateClaimantAgainstArgs(claimant, { args: testArgs });
|
|
1761
|
+
expect(result).toBe("0xcccccccccccccccccccccccccccccccccccccccc");
|
|
1762
|
+
});
|
|
1763
|
+
});
|
|
1764
|
+
});
|
|
@@ -671,11 +671,28 @@ export class EventAction extends DeployableTarget<
|
|
|
671
671
|
args: Array<unknown> | readonly unknown[] | Record<string, unknown>;
|
|
672
672
|
},
|
|
673
673
|
): Address | undefined {
|
|
674
|
-
if (
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
) {
|
|
674
|
+
if (!logOrFnData || !Array.isArray(logOrFnData?.args)) {
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
if (isClaimantFieldIndexTuple(claimant.fieldIndex)) {
|
|
679
|
+
const [index0, index1] = unpackClaimantFieldIndexes(claimant.fieldIndex);
|
|
680
|
+
|
|
681
|
+
if (logOrFnData.args.length <= index0) {
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
const tuple = logOrFnData.args[index0];
|
|
686
|
+
if (!Array.isArray(tuple) || tuple.length <= index1) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
const maybeAddress = tuple[index1];
|
|
691
|
+
if (isAddress(maybeAddress)) return maybeAddress;
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
if (logOrFnData.args.length <= claimant.fieldIndex) {
|
|
679
696
|
return;
|
|
680
697
|
}
|
|
681
698
|
const maybeAddress = logOrFnData.args.at(claimant.fieldIndex);
|
|
@@ -1990,6 +2007,36 @@ export function isCriteriaFieldIndexTuple(fieldIndex: number): boolean {
|
|
|
1990
2007
|
return fieldIndex >= 32;
|
|
1991
2008
|
}
|
|
1992
2009
|
|
|
2010
|
+
/**
|
|
2011
|
+
* Helper function to check if a claimant fieldIndex represents tuple access.
|
|
2012
|
+
*
|
|
2013
|
+
* @param {number} fieldIndex - The field index to check
|
|
2014
|
+
* @returns {boolean} - True if it's a tuple index, false for direct access
|
|
2015
|
+
*/
|
|
2016
|
+
export function isClaimantFieldIndexTuple(fieldIndex: number): boolean {
|
|
2017
|
+
return isCriteriaFieldIndexTuple(fieldIndex);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* Packs two indices for claimant tuple access.
|
|
2022
|
+
*
|
|
2023
|
+
* @param {[number, number]} indices - Tuple of [firstIndex, secondIndex]
|
|
2024
|
+
* @returns {number} - Packed uint8 value for the claimant fieldIndex
|
|
2025
|
+
*/
|
|
2026
|
+
export function packClaimantFieldIndexes(indices: [number, number]): number {
|
|
2027
|
+
return packCriteriaFieldIndexes(indices);
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Unpacks a claimant fieldIndex into tuple indices.
|
|
2032
|
+
*
|
|
2033
|
+
* @param {number} packed - Packed fieldIndex value
|
|
2034
|
+
* @returns {[number, number]} - [firstIndex, secondIndex]
|
|
2035
|
+
*/
|
|
2036
|
+
export function unpackClaimantFieldIndexes(packed: number): [number, number] {
|
|
2037
|
+
return unpackCriteriaFieldIndexes(packed);
|
|
2038
|
+
}
|
|
2039
|
+
|
|
1993
2040
|
/**
|
|
1994
2041
|
* Extracts a scalar value from a tuple within event or function arguments.
|
|
1995
2042
|
* This is used for incentive criteria when determining reward amounts.
|