@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.
Files changed (79) hide show
  1. package/dist/Actions/EventAction.cjs +1 -1
  2. package/dist/Actions/EventAction.cjs.map +1 -1
  3. package/dist/Actions/EventAction.d.ts +21 -0
  4. package/dist/Actions/EventAction.d.ts.map +1 -1
  5. package/dist/Actions/EventAction.js +133 -109
  6. package/dist/Actions/EventAction.js.map +1 -1
  7. package/dist/{AllowList-BYYm3b9d.cjs → AllowList-BJ9HQGFs.cjs} +2 -2
  8. package/dist/{AllowList-BYYm3b9d.cjs.map → AllowList-BJ9HQGFs.cjs.map} +1 -1
  9. package/dist/{AllowList-D_K4S6jV.js → AllowList-DiU7g4Hs.js} +3 -3
  10. package/dist/{AllowList-D_K4S6jV.js.map → AllowList-DiU7g4Hs.js.map} +1 -1
  11. package/dist/AllowLists/AllowList.cjs +1 -1
  12. package/dist/AllowLists/AllowList.js +2 -2
  13. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  14. package/dist/AllowLists/SimpleAllowList.js +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.js +2 -2
  17. package/dist/BoostCore.cjs +1 -1
  18. package/dist/BoostCore.js +6 -6
  19. package/dist/BoostRegistry.cjs +1 -1
  20. package/dist/BoostRegistry.js +1 -1
  21. package/dist/{Budget-DwVY-GGt.cjs → Budget-D_zhh1rh.cjs} +2 -2
  22. package/dist/{Budget-DwVY-GGt.cjs.map → Budget-D_zhh1rh.cjs.map} +1 -1
  23. package/dist/{Budget-DZlb1py_.js → Budget-YIhV65cc.js} +2 -2
  24. package/dist/{Budget-DZlb1py_.js.map → Budget-YIhV65cc.js.map} +1 -1
  25. package/dist/Budgets/Budget.cjs +1 -1
  26. package/dist/Budgets/Budget.js +1 -1
  27. package/dist/Budgets/ManagedBudget.cjs +1 -1
  28. package/dist/Budgets/ManagedBudget.js +1 -1
  29. package/dist/{Incentive-BKZisyIm.js → Incentive-CeoEla-t.js} +2 -2
  30. package/dist/{Incentive-BKZisyIm.js.map → Incentive-CeoEla-t.js.map} +1 -1
  31. package/dist/{Incentive-Ctfodrh5.cjs → Incentive-CrnbYN_a.cjs} +2 -2
  32. package/dist/{Incentive-Ctfodrh5.cjs.map → Incentive-CrnbYN_a.cjs.map} +1 -1
  33. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  34. package/dist/Incentives/AllowListIncentive.js +2 -2
  35. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  36. package/dist/Incentives/CGDAIncentive.js +1 -1
  37. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  38. package/dist/Incentives/ERC20Incentive.js +1 -1
  39. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  40. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +1 -1
  41. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  42. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +1 -1
  43. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  44. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +1 -1
  45. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  46. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +1 -1
  47. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  48. package/dist/Incentives/ERC20VariableIncentive.js +1 -1
  49. package/dist/Incentives/Incentive.cjs +1 -1
  50. package/dist/Incentives/Incentive.js +1 -1
  51. package/dist/Incentives/PointsIncentive.cjs +1 -1
  52. package/dist/Incentives/PointsIncentive.js +1 -1
  53. package/dist/{SimpleDenyList-Bv2mSQJO.cjs → SimpleDenyList-7-VTqfsH.cjs} +2 -2
  54. package/dist/{SimpleDenyList-Bv2mSQJO.cjs.map → SimpleDenyList-7-VTqfsH.cjs.map} +1 -1
  55. package/dist/{SimpleDenyList-tEOqSTnD.js → SimpleDenyList-Dr03aOeP.js} +2 -2
  56. package/dist/{SimpleDenyList-tEOqSTnD.js.map → SimpleDenyList-Dr03aOeP.js.map} +1 -1
  57. package/dist/{Validator-ztOItKpP.js → Validator-DgvB9wge.js} +2 -2
  58. package/dist/{Validator-ztOItKpP.js.map → Validator-DgvB9wge.js.map} +1 -1
  59. package/dist/{Validator-CUGwkN06.cjs → Validator-rYW7PMwW.cjs} +2 -2
  60. package/dist/{Validator-CUGwkN06.cjs.map → Validator-rYW7PMwW.cjs.map} +1 -1
  61. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  62. package/dist/Validators/LimitedSignerValidator.js +1 -1
  63. package/dist/Validators/SignerValidator.cjs +1 -1
  64. package/dist/Validators/SignerValidator.js +1 -1
  65. package/dist/Validators/Validator.cjs +1 -1
  66. package/dist/Validators/Validator.js +1 -1
  67. package/dist/deployments-BjBgk03b.cjs +2 -0
  68. package/dist/deployments-BjBgk03b.cjs.map +1 -0
  69. package/dist/{deployments-EFoHkvCp.js → deployments-CHQ30INq.js} +31 -9
  70. package/dist/deployments-CHQ30INq.js.map +1 -0
  71. package/dist/deployments.json +23 -0
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +185 -182
  74. package/package.json +1 -1
  75. package/src/Actions/EventAction.test.ts +161 -1
  76. package/src/Actions/EventAction.ts +52 -5
  77. package/dist/deployments-EFoHkvCp.js.map +0 -1
  78. package/dist/deployments-xekPSd2S.cjs +0 -2
  79. 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 C, FilterType as b, PrimitiveType as I, SignatureType as P, ValueType as f, anyActionParameter as v, decodeAndReorderLogArgs as u, detectSignatureType as V, getScalarValueFromTuple as S, isCriteriaFieldIndexTuple as R, isEventActionPayloadSimple as x, packCriteriaFieldIndexes as B, packFieldIndexes as T, prepareEventActionPayload as D, transactionSenderClaimant as F, unpackCriteriaFieldIndexes as L, unpackFieldIndexes as h } from "./Actions/EventAction.js";
6
- import { A as M, O as N, a as w, b as _, p as U } from "./AllowList-D_K4S6jV.js";
7
- import { LIST_MANAGER_ROLE as G, SimpleAllowList as k, prepareSimpleAllowListPayload as z } from "./AllowLists/SimpleAllowList.js";
8
- import { S as Y, p as j } from "./SimpleDenyList-tEOqSTnD.js";
9
- import { B as J, M as K, a as Q, T as X, b as Z, p as $, c as ee } from "./Budget-DZlb1py_.js";
10
- import { ManagedBudget as ae, ManagedBudgetRoles as ie, isERC1155TransferPayload as oe, isFungibleTransfer as te, prepareManagedBudgetPayload as ne, prepareTransfer as de } from "./Budgets/ManagedBudget.js";
11
- import { Deployable as pe } from "./Deployable/Deployable.js";
12
- import { Contract as ce } from "./Deployable/Contract.js";
13
- import { DeployableTarget as me } from "./Deployable/DeployableTarget.js";
14
- import { DeployableTargetWithRBAC as ye, Roles as Ee } from "./Deployable/DeployableTargetWithRBAC.js";
15
- import { AllowListIncentive as be, prepareAllowListIncentivePayload as Ie } from "./Incentives/AllowListIncentive.js";
16
- import { CGDAIncentive as fe, prepareCGDAIncentivePayload as ve } from "./Incentives/CGDAIncentive.js";
17
- import { ERC20Incentive as Ve, prepareERC20IncentivePayload as Se } from "./Incentives/ERC20Incentive.js";
18
- import { E as xe, I as Be, i as Te, p as De } from "./Incentive-BKZisyIm.js";
19
- import { ERC20VariableIncentive as Le, prepareERC20VariableIncentivePayload as he } from "./Incentives/ERC20VariableIncentive.js";
20
- import { ERC20VariableCriteriaIncentive as Me, gasRebateIncentiveCriteria as Ne, prepareERC20VariableCriteriaIncentivePayload as we } from "./Incentives/ERC20VariableCriteriaIncentive.js";
21
- import { ERC20PeggedVariableCriteriaIncentive as Ue, prepareERC20PeggedVariableCriteriaIncentivePayload as We } from "./Incentives/ERC20PeggedVariableCriteriaIncentive.js";
22
- import { ERC20VariableCriteriaIncentiveV2 as ke, gasRebateIncentiveCriteriaV2 as ze, prepareERC20VariableCriteriaIncentiveV2Payload as qe } from "./Incentives/ERC20VariableCriteriaIncentiveV2.js";
23
- import { ERC20PeggedVariableCriteriaIncentiveV2 as je, prepareERC20PeggedVariableCriteriaIncentiveV2Payload as He } from "./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js";
24
- import { PointsIncentive as Ke, preparePointsIncentivePayload as Qe } from "./Incentives/PointsIncentive.js";
25
- import { SignerValidator as Ze, prepareSignerValidatorClaimDataPayload as $e, prepareSignerValidatorInputParams as er, prepareSignerValidatorPayload as rr } from "./Validators/SignerValidator.js";
26
- import { LimitedSignerValidator as ir, prepareLimitedSignerValidatorClaimDataPayload as or, prepareLimitedSignerValidatorInputParams as tr, prepareLimitedSignerValidatorPayload as nr } from "./Validators/LimitedSignerValidator.js";
27
- import { B as lr, P as pr, V as sr, d as cr, p as gr, a as mr, b as Ar, v as yr } from "./Validator-ztOItKpP.js";
28
- import { BoostCoreNoIdentifierEmitted as Cr, BoostNotFoundError as br, BudgetMustAuthorizeBoostCore as Ir, ContractAddressRequiredError as Pr, DecodedArgsError as fr, DecodedArgsMalformedError as vr, DeployableAlreadyDeployedError as ur, DeployableBuildParametersUnspecifiedError as Vr, DeployableMissingPayloadError as Sr, DeployableUnknownOwnerProvidedError as Rr, DeployableWagmiConfigurationRequiredError as xr, FieldActionValidationError as Br, FieldValueNotComparableError as Tr, FieldValueUndefinedError as Dr, FunctionDataDecodeError as Fr, IncentiveCriteriaNotFoundError as Lr, IncentiveNotCloneableError as hr, InvalidComponentInterfaceError as Or, InvalidCriteriaTypeError as Mr, InvalidNumericalCriteriaError as Nr, InvalidProtocolChainIdError as wr, InvalidTupleDecodingError as _r, InvalidTupleEncodingError as Ur, MustInitializeBudgetError as Wr, NoConnectedChainIdError as Gr, NoContractAddressUponReceiptError as kr, NoEventActionStepsProvidedError as zr, NoMatchingLogsError as qr, TooManyEventActionStepsProvidedError as Yr, UnknownTransferPayloadSupplied as jr, UnparseableAbiParamError as Hr, UnrecognizedFilterTypeError as Jr, ValidationAbiMissingError as Kr } from "./errors.js";
29
- import { CheatCodes as Xr, RegistryType as Zr, TRANSFER_SIGNATURE as $r, assertValidAddressByChainId as ea, awaitResult as ra, bytes4 as aa, getDeployedContractAddress as ia, getErc20Balance as oa } from "./utils.js";
30
- import { StrategyType as na, prepareClaimPayload as da } from "./claiming.js";
31
- import { AssetType as pa, prepareERC1155Payload as sa, prepareERC1155Transfer as ca, prepareFungiblePayload as ga, prepareFungibleTransfer as ma, prepareTransferPayload as Aa } from "./transfers.js";
32
- import { PassthroughAuth as Ea } from "./Auth/PassthroughAuth.js";
33
- import { q as ba, a as Ia, R as Pa, z as fa, T as va, g as ua, y as Va, d as Sa, c as Ra, m as xa, O as Ba, G as Ta, C as Da, p as Fa, r as La, M as ha, e as Oa, _ as Ma, H as Na, D as wa, j as _a, S as Ua, P as Wa, b as Ga } from "./generated-B6mEIx8i.js";
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
- M as AllowListByComponentInterface,
37
- be as AllowListIncentive,
38
- pa as AssetType,
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
- Cr as BoostCoreNoIdentifierEmitted,
46
- br as BoostNotFoundError,
45
+ Pr as BoostCoreNoIdentifierEmitted,
46
+ fr as BoostNotFoundError,
47
47
  o as BoostRegistry,
48
- lr as BoostValidatorEOA,
49
- J as BudgetByComponentInterface,
50
- Ir as BudgetMustAuthorizeBoostCore,
51
- fe as CGDAIncentive,
52
- Xr as CheatCodes,
53
- ce as Contract,
54
- Pr as ContractAddressRequiredError,
55
- fr as DecodedArgsError,
56
- vr as DecodedArgsMalformedError,
57
- pe as Deployable,
58
- ur as DeployableAlreadyDeployedError,
59
- Vr as DeployableBuildParametersUnspecifiedError,
60
- Sr as DeployableMissingPayloadError,
61
- me as DeployableTarget,
62
- ye as DeployableTargetWithRBAC,
63
- Rr as DeployableUnknownOwnerProvidedError,
64
- xr as DeployableWagmiConfigurationRequiredError,
65
- Ve as ERC20Incentive,
66
- xe as ERC20PeggedIncentive,
67
- Ue as ERC20PeggedVariableCriteriaIncentive,
68
- je as ERC20PeggedVariableCriteriaIncentiveV2,
69
- Me as ERC20VariableCriteriaIncentive,
70
- ke as ERC20VariableCriteriaIncentiveV2,
71
- Le as ERC20VariableIncentive,
72
- C as EventAction,
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
- Br as FieldActionValidationError,
75
- Tr as FieldValueNotComparableError,
76
- Dr as FieldValueUndefinedError,
74
+ Fr as FieldActionValidationError,
75
+ Lr as FieldValueNotComparableError,
76
+ hr as FieldValueUndefinedError,
77
77
  b as FilterType,
78
- Fr as FunctionDataDecodeError,
79
- Be as IncentiveByComponentInterface,
80
- Lr as IncentiveCriteriaNotFoundError,
81
- hr as IncentiveNotCloneableError,
82
- Or as InvalidComponentInterfaceError,
83
- Mr as InvalidCriteriaTypeError,
84
- Nr as InvalidNumericalCriteriaError,
85
- wr as InvalidProtocolChainIdError,
86
- _r as InvalidTupleDecodingError,
87
- Ur as InvalidTupleEncodingError,
88
- G as LIST_MANAGER_ROLE,
89
- ir as LimitedSignerValidator,
90
- ae as ManagedBudget,
91
- ie as ManagedBudgetRoles,
92
- K as ManagedBudgetWithFees,
93
- Q as ManagedBudgetWithFeesV2,
94
- Wr as MustInitializeBudgetError,
95
- Gr as NoConnectedChainIdError,
96
- kr as NoContractAddressUponReceiptError,
97
- zr as NoEventActionStepsProvidedError,
98
- qr as NoMatchingLogsError,
99
- N as OffchainAccessList,
100
- w as OpenAllowList,
101
- Ea as PassthroughAuth,
102
- pr as PayableLimitedSignerValidator,
103
- Ke as PointsIncentive,
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
- Zr as RegistryType,
106
- Ee as Roles,
105
+ ra as RegistryType,
106
+ Ie as Roles,
107
107
  P as SignatureType,
108
- Ze as SignerValidator,
109
- k as SimpleAllowList,
110
- Y as SimpleDenyList,
111
- na as StrategyType,
112
- $r as TRANSFER_SIGNATURE,
113
- Yr as TooManyEventActionStepsProvidedError,
114
- X as TransparentBudget,
115
- jr as UnknownTransferPayloadSupplied,
116
- Hr as UnparseableAbiParamError,
117
- Jr as UnrecognizedFilterTypeError,
118
- Kr as ValidationAbiMissingError,
119
- sr as ValidatorByComponentInterface,
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
- _ as allowListFromAddress,
123
- ba as allowListIncentiveAbi,
124
- v as anyActionParameter,
125
- ea as assertValidAddressByChainId,
126
- ra as awaitResult,
127
- Ia as boostCoreAbi,
128
- Pa as boostRegistryAbi,
129
- Z as budgetFromAddress,
130
- aa as bytes4,
131
- fa as cgdaIncentiveAbi,
132
- u as decodeAndReorderLogArgs,
133
- cr as decodeClaimData,
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
- va as erc20IncentiveAbi,
136
- ua as erc20PeggedIncentiveAbi,
137
- Va as erc20PeggedVariableCriteriaIncentiveAbi,
138
- Sa as erc20PeggedVariableCriteriaIncentiveV2Abi,
139
- Ra as erc20VariableCriteriaIncentiveAbi,
140
- xa as erc20VariableCriteriaIncentiveV2Abi,
141
- Ba as erc20VariableIncentiveAbi,
142
- Ne as gasRebateIncentiveCriteria,
143
- ze as gasRebateIncentiveCriteriaV2,
144
- ia as getDeployedContractAddress,
145
- oa as getErc20Balance,
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
- Te as incentiveFromAddress,
148
- R as isCriteriaFieldIndexTuple,
149
- oe as isERC1155TransferPayload,
150
- x as isEventActionPayloadSimple,
151
- te as isFungibleTransfer,
152
- Ta as limitedSignerValidatorAbi,
153
- Da as managedBudgetAbi,
154
- Fa as managedBudgetWithFeesAbi,
155
- La as managedBudgetWithFeesV2Abi,
156
- ha as offchainAccessListAbi,
157
- B as packCriteriaFieldIndexes,
158
- T as packFieldIndexes,
159
- Oa as passthroughAuthAbi,
160
- Ma as payableLimitedSignerValidatorAbi,
161
- Na as pointsIncentiveAbi,
162
- Ie as prepareAllowListIncentivePayload,
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
- ve as prepareCGDAIncentivePayload,
165
- da as prepareClaimPayload,
166
- sa as prepareERC1155Payload,
167
- ca as prepareERC1155Transfer,
168
- Se as prepareERC20IncentivePayload,
169
- De as prepareERC20PeggedIncentivePayload,
170
- We as prepareERC20PeggedVariableCriteriaIncentivePayload,
171
- He as prepareERC20PeggedVariableCriteriaIncentiveV2Payload,
172
- we as prepareERC20VariableCriteriaIncentivePayload,
173
- qe as prepareERC20VariableCriteriaIncentiveV2Payload,
174
- he as prepareERC20VariableIncentivePayload,
175
- D as prepareEventActionPayload,
176
- ga as prepareFungiblePayload,
177
- ma as prepareFungibleTransfer,
178
- or as prepareLimitedSignerValidatorClaimDataPayload,
179
- tr as prepareLimitedSignerValidatorInputParams,
180
- nr as prepareLimitedSignerValidatorPayload,
181
- ne as prepareManagedBudgetPayload,
182
- $ as prepareManagedBudgetWithFeesPayload,
183
- ee as prepareManagedBudgetWithFeesV2Payload,
184
- U as prepareOffchainAccessListPayload,
185
- gr as preparePayableLimitedSignerValidatorClaimDataPayload,
186
- mr as preparePayableLimitedSignerValidatorInputParams,
187
- Ar as preparePayableLimitedSignerValidatorPayload,
188
- Qe as preparePointsIncentivePayload,
189
- $e as prepareSignerValidatorClaimDataPayload,
190
- er as prepareSignerValidatorInputParams,
191
- rr as prepareSignerValidatorPayload,
192
- z as prepareSimpleAllowListPayload,
193
- j as prepareSimpleDenyListPayload,
194
- de as prepareTransfer,
195
- Aa as prepareTransferPayload,
196
- wa as rbacAbi,
197
- _a as signerValidatorAbi,
198
- Ua as simpleAllowListAbi,
199
- Wa as simpleDenyListAbi,
200
- F as transactionSenderClaimant,
201
- Ga as transparentBudgetAbi,
202
- L as unpackCriteriaFieldIndexes,
203
- h as unpackFieldIndexes,
204
- yr as validatorFromAddress
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostxyz/sdk",
3
- "version": "7.6.0",
3
+ "version": "7.8.0",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [
@@ -44,7 +44,9 @@ import {
44
44
  packCriteriaFieldIndexes,
45
45
  unpackCriteriaFieldIndexes,
46
46
  isCriteriaFieldIndexTuple,
47
- decodeAndReorderLogArgs
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
- !logOrFnData ||
676
- !Array.isArray(logOrFnData?.args) ||
677
- logOrFnData?.args.length <= claimant.fieldIndex
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.