@boostxyz/sdk 5.3.0 → 5.5.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 +13 -5
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +1745 -379
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +154 -153
- package/package.json +1 -1
- package/src/Actions/EventAction.test.ts +9 -0
- package/src/Actions/EventAction.ts +117 -70
package/dist/index.js
CHANGED
|
@@ -1,177 +1,178 @@
|
|
|
1
1
|
import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as i } from "./BoostRegistry.js";
|
|
2
|
-
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as
|
|
3
|
-
import { Boost as c, prepareBoostPayload as
|
|
4
|
-
import { ActionByComponentInterface as
|
|
5
|
-
import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as v, decodeAndReorderLogArgs as P,
|
|
6
|
-
import { AllowListByComponentInterface 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 Ee, prepareERC20IncentivePayload as
|
|
18
|
-
import { E as
|
|
19
|
-
import { ERC20VariableIncentive as
|
|
20
|
-
import { ERC20VariableCriteriaIncentive as
|
|
21
|
-
import { PointsIncentive as
|
|
22
|
-
import { SignerValidator as
|
|
23
|
-
import { LimitedSignerValidator as
|
|
24
|
-
import { BoostValidatorEOA as
|
|
25
|
-
import { BoostCoreNoIdentifierEmitted as
|
|
26
|
-
import { CheatCodes as
|
|
27
|
-
import { StrategyType as
|
|
28
|
-
import { AssetType as
|
|
29
|
-
import { PassthroughAuth as
|
|
30
|
-
import { B as
|
|
2
|
+
import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as p, FEE_DENOMINATOR as l } from "./BoostCore.js";
|
|
3
|
+
import { Boost as c, prepareBoostPayload as g } from "./Boost.js";
|
|
4
|
+
import { ActionByComponentInterface as E, actionFromAddress as A } from "./Actions/Action.js";
|
|
5
|
+
import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as v, decodeAndReorderLogArgs as P, detectSignatureType as R, isEventActionPayloadSimple as S, packFieldIndexes as u, prepareEventActionPayload as B, transactionSenderClaimant as x, unpackFieldIndexes as D } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as V, OpenAllowList as F, allowListFromAddress as L } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as N, SimpleAllowList as O, prepareSimpleAllowListPayload as M } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as _, p as U } from "./SimpleDenyList-ByAr4X1r.js";
|
|
9
|
+
import { B as W, M as k, b as z, p as q } from "./Budget-DYIV9iNK.js";
|
|
10
|
+
import { ManagedBudget as H, ManagedBudgetRoles as j, isERC1155TransferPayload as J, isFungibleTransfer as K, prepareManagedBudgetPayload as Q, prepareTransfer as X } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as $ } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as re } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as oe } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { DeployableTargetWithRBAC as te, Roles as ne } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
15
|
+
import { AllowListIncentive as pe, prepareAllowListIncentivePayload as le } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as ce, prepareCGDAIncentivePayload as ge } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as Ee, prepareERC20IncentivePayload as Ae } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { E as Ce, a as Ie, I as be, i as fe, p as ve, b as Pe } from "./Incentive-qlnv5kQB.js";
|
|
19
|
+
import { ERC20VariableIncentive as Se, prepareERC20VariableIncentivePayload as ue } from "./Incentives/ERC20VariableIncentive.js";
|
|
20
|
+
import { ERC20VariableCriteriaIncentive as xe, gasRebateIncentiveCriteria as De, prepareERC20VariableCriteriaIncentivePayload as Te } from "./Incentives/ERC20VariableCriteriaIncentive.js";
|
|
21
|
+
import { PointsIncentive as Fe, preparePointsIncentivePayload as Le } from "./Incentives/PointsIncentive.js";
|
|
22
|
+
import { SignerValidator as Ne, prepareSignerValidatorClaimDataPayload as Oe, prepareSignerValidatorInputParams as Me, prepareSignerValidatorPayload as we } from "./Validators/SignerValidator.js";
|
|
23
|
+
import { LimitedSignerValidator as Ue, prepareLimitedSignerValidatorClaimDataPayload as Ge, prepareLimitedSignerValidatorInputParams as We, prepareLimitedSignerValidatorPayload as ke } from "./Validators/LimitedSignerValidator.js";
|
|
24
|
+
import { BoostValidatorEOA as qe, ValidatorByComponentInterface as Ye, decodeClaimData as He, validatorFromAddress as je } from "./Validators/Validator.js";
|
|
25
|
+
import { BoostCoreNoIdentifierEmitted as Ke, BoostNotFoundError as Qe, BudgetMustAuthorizeBoostCore as Xe, ContractAddressRequiredError as Ze, DecodedArgsError as $e, DecodedArgsMalformedError as er, DeployableAlreadyDeployedError as rr, DeployableBuildParametersUnspecifiedError as ar, DeployableMissingPayloadError as or, DeployableUnknownOwnerProvidedError as ir, DeployableWagmiConfigurationRequiredError as tr, FieldActionValidationError as nr, FieldValueNotComparableError as dr, FieldValueUndefinedError as pr, FunctionDataDecodeError as lr, IncentiveCriteriaNotFoundError as sr, IncentiveNotCloneableError as cr, InvalidComponentInterfaceError as gr, InvalidCriteriaTypeError as mr, InvalidNumericalCriteriaError as Er, InvalidProtocolChainIdError as Ar, InvalidTupleDecodingError as yr, InvalidTupleEncodingError as Cr, MustInitializeBudgetError as Ir, NoConnectedChainIdError as br, NoContractAddressUponReceiptError as fr, NoEventActionStepsProvidedError as vr, NoMatchingLogsError as Pr, TooManyEventActionStepsProvidedError as Rr, UnknownTransferPayloadSupplied as Sr, UnparseableAbiParamError as ur, UnrecognizedFilterTypeError as Br, ValidationAbiMissingError as xr } from "./errors.js";
|
|
26
|
+
import { CheatCodes as Tr, RegistryType as Vr, TRANSFER_SIGNATURE as Fr, assertValidAddressByChainId as Lr, awaitResult as hr, bytes4 as Nr, getDeployedContractAddress as Or, getErc20Balance as Mr } from "./utils.js";
|
|
27
|
+
import { StrategyType as _r, prepareClaimPayload as Ur } from "./claiming.js";
|
|
28
|
+
import { AssetType as Wr, prepareERC1155Payload as kr, prepareERC1155Transfer as zr, prepareFungiblePayload as qr, prepareFungibleTransfer as Yr, prepareTransferPayload as Hr } from "./transfers.js";
|
|
29
|
+
import { PassthroughAuth as Jr } from "./Auth/PassthroughAuth.js";
|
|
30
|
+
import { B as Qr, I as Xr, c as Zr, A as $r, f as ea, v as ra, l as aa, d as oa, g as ia, V as ta, w as na, o as da, W as pa, N as la, H as sa, k as ca, C as ga, E as ma } from "./generated-Cyvr_Tjx.js";
|
|
31
31
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
E as ActionByComponentInterface,
|
|
33
|
+
V as AllowListByComponentInterface,
|
|
34
|
+
pe as AllowListIncentive,
|
|
35
|
+
Wr as AssetType,
|
|
36
36
|
n as BOOST_CORE_ADDRESS,
|
|
37
37
|
d as BOOST_CORE_ADDRESSES,
|
|
38
38
|
a as BOOST_REGISTRY_ADDRESS,
|
|
39
39
|
o as BOOST_REGISTRY_ADDRESSES,
|
|
40
40
|
c as Boost,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
p as BoostCore,
|
|
42
|
+
Ke as BoostCoreNoIdentifierEmitted,
|
|
43
|
+
Qe as BoostNotFoundError,
|
|
44
44
|
i as BoostRegistry,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
qe as BoostValidatorEOA,
|
|
46
|
+
W as BudgetByComponentInterface,
|
|
47
|
+
Xe as BudgetMustAuthorizeBoostCore,
|
|
48
|
+
ce as CGDAIncentive,
|
|
49
|
+
Tr as CheatCodes,
|
|
50
|
+
re as Contract,
|
|
51
|
+
Ze as ContractAddressRequiredError,
|
|
52
|
+
$e as DecodedArgsError,
|
|
53
|
+
er as DecodedArgsMalformedError,
|
|
54
|
+
$ as Deployable,
|
|
55
|
+
rr as DeployableAlreadyDeployedError,
|
|
56
|
+
ar as DeployableBuildParametersUnspecifiedError,
|
|
57
|
+
or as DeployableMissingPayloadError,
|
|
58
|
+
oe as DeployableTarget,
|
|
59
|
+
te as DeployableTargetWithRBAC,
|
|
60
|
+
ir as DeployableUnknownOwnerProvidedError,
|
|
61
|
+
tr as DeployableWagmiConfigurationRequiredError,
|
|
62
62
|
Ee as ERC20Incentive,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
Ce as ERC20PeggedIncentive,
|
|
64
|
+
Ie as ERC20PeggedVariableCriteriaIncentive,
|
|
65
|
+
xe as ERC20VariableCriteriaIncentive,
|
|
66
|
+
Se as ERC20VariableIncentive,
|
|
67
67
|
C as EventAction,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
l as FEE_DENOMINATOR,
|
|
69
|
+
nr as FieldActionValidationError,
|
|
70
|
+
dr as FieldValueNotComparableError,
|
|
71
|
+
pr as FieldValueUndefinedError,
|
|
72
72
|
I as FilterType,
|
|
73
73
|
lr as FunctionDataDecodeError,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
be as IncentiveByComponentInterface,
|
|
75
|
+
sr as IncentiveCriteriaNotFoundError,
|
|
76
|
+
cr as IncentiveNotCloneableError,
|
|
77
|
+
gr as InvalidComponentInterfaceError,
|
|
78
78
|
mr as InvalidCriteriaTypeError,
|
|
79
79
|
Er as InvalidNumericalCriteriaError,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
Ar as InvalidProtocolChainIdError,
|
|
81
|
+
yr as InvalidTupleDecodingError,
|
|
82
|
+
Cr as InvalidTupleEncodingError,
|
|
83
|
+
N as LIST_MANAGER_ROLE,
|
|
84
|
+
Ue as LimitedSignerValidator,
|
|
85
|
+
H as ManagedBudget,
|
|
86
|
+
j as ManagedBudgetRoles,
|
|
87
|
+
k as ManagedBudgetWithFees,
|
|
88
|
+
Ir as MustInitializeBudgetError,
|
|
89
|
+
br as NoConnectedChainIdError,
|
|
90
|
+
fr as NoContractAddressUponReceiptError,
|
|
91
|
+
vr as NoEventActionStepsProvidedError,
|
|
92
|
+
Pr as NoMatchingLogsError,
|
|
93
|
+
F as OpenAllowList,
|
|
94
|
+
Jr as PassthroughAuth,
|
|
95
|
+
Fe as PointsIncentive,
|
|
96
96
|
b as PrimitiveType,
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
Vr as RegistryType,
|
|
98
|
+
ne as Roles,
|
|
99
99
|
f as SignatureType,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
Ne as SignerValidator,
|
|
101
|
+
O as SimpleAllowList,
|
|
102
|
+
_ as SimpleDenyList,
|
|
103
|
+
_r as StrategyType,
|
|
104
|
+
Fr as TRANSFER_SIGNATURE,
|
|
105
|
+
Rr as TooManyEventActionStepsProvidedError,
|
|
106
|
+
Sr as UnknownTransferPayloadSupplied,
|
|
107
|
+
ur as UnparseableAbiParamError,
|
|
108
|
+
Br as UnrecognizedFilterTypeError,
|
|
109
|
+
xr as ValidationAbiMissingError,
|
|
110
|
+
Ye as ValidatorByComponentInterface,
|
|
111
111
|
A as actionFromAddress,
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
L as allowListFromAddress,
|
|
113
|
+
Qr as allowListIncentiveAbi,
|
|
114
114
|
v as anyActionParameter,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
Lr as assertValidAddressByChainId,
|
|
116
|
+
hr as awaitResult,
|
|
117
|
+
Xr as boostCoreAbi,
|
|
118
|
+
Zr as boostRegistryAbi,
|
|
119
|
+
z as budgetFromAddress,
|
|
120
|
+
Nr as bytes4,
|
|
121
|
+
$r as cgdaIncentiveAbi,
|
|
122
122
|
P as decodeAndReorderLogArgs,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
ea as
|
|
126
|
-
ra as
|
|
127
|
-
aa as
|
|
128
|
-
oa as
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Or as
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
ta as
|
|
138
|
-
na as
|
|
139
|
-
|
|
140
|
-
|
|
123
|
+
He as decodeClaimData,
|
|
124
|
+
R as detectSignatureType,
|
|
125
|
+
ea as erc20IncentiveAbi,
|
|
126
|
+
ra as erc20PeggedIncentiveAbi,
|
|
127
|
+
aa as erc20PeggedVariableCriteriaIncentiveAbi,
|
|
128
|
+
oa as erc20VariableCriteriaIncentiveAbi,
|
|
129
|
+
ia as erc20VariableIncentiveAbi,
|
|
130
|
+
De as gasRebateIncentiveCriteria,
|
|
131
|
+
Or as getDeployedContractAddress,
|
|
132
|
+
Mr as getErc20Balance,
|
|
133
|
+
fe as incentiveFromAddress,
|
|
134
|
+
J as isERC1155TransferPayload,
|
|
135
|
+
S as isEventActionPayloadSimple,
|
|
136
|
+
K as isFungibleTransfer,
|
|
137
|
+
ta as limitedSignerValidatorAbi,
|
|
138
|
+
na as managedBudgetAbi,
|
|
139
|
+
da as managedBudgetWithFeesAbi,
|
|
140
|
+
u as packFieldIndexes,
|
|
141
|
+
pa as passthroughAuthAbi,
|
|
141
142
|
la as pointsIncentiveAbi,
|
|
142
143
|
le as prepareAllowListIncentivePayload,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
144
|
+
g as prepareBoostPayload,
|
|
145
|
+
ge as prepareCGDAIncentivePayload,
|
|
146
|
+
Ur as prepareClaimPayload,
|
|
147
|
+
kr as prepareERC1155Payload,
|
|
148
|
+
zr as prepareERC1155Transfer,
|
|
149
|
+
Ae as prepareERC20IncentivePayload,
|
|
150
|
+
ve as prepareERC20PeggedIncentivePayload,
|
|
151
|
+
Pe as prepareERC20PeggedVariableCriteriaIncentivePayload,
|
|
152
|
+
Te as prepareERC20VariableCriteriaIncentivePayload,
|
|
153
|
+
ue as prepareERC20VariableIncentivePayload,
|
|
154
|
+
B as prepareEventActionPayload,
|
|
155
|
+
qr as prepareFungiblePayload,
|
|
156
|
+
Yr as prepareFungibleTransfer,
|
|
157
|
+
Ge as prepareLimitedSignerValidatorClaimDataPayload,
|
|
158
|
+
We as prepareLimitedSignerValidatorInputParams,
|
|
159
|
+
ke as prepareLimitedSignerValidatorPayload,
|
|
160
|
+
Q as prepareManagedBudgetPayload,
|
|
161
|
+
q as prepareManagedBudgetWithFeesPayload,
|
|
162
|
+
Le as preparePointsIncentivePayload,
|
|
163
|
+
Oe as prepareSignerValidatorClaimDataPayload,
|
|
164
|
+
Me as prepareSignerValidatorInputParams,
|
|
165
|
+
we as prepareSignerValidatorPayload,
|
|
166
|
+
M as prepareSimpleAllowListPayload,
|
|
167
|
+
U as prepareSimpleDenyListPayload,
|
|
168
|
+
X as prepareTransfer,
|
|
169
|
+
Hr as prepareTransferPayload,
|
|
170
|
+
sa as rbacAbi,
|
|
171
|
+
ca as signerValidatorAbi,
|
|
172
|
+
ga as simpleAllowListAbi,
|
|
172
173
|
ma as simpleDenyListAbi,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
x as transactionSenderClaimant,
|
|
175
|
+
D as unpackFieldIndexes,
|
|
176
|
+
je as validatorFromAddress
|
|
176
177
|
};
|
|
177
178
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1241,6 +1241,15 @@ describe("Tuple & bitpacked fieldIndex support", () => {
|
|
|
1241
1241
|
expect(result).toEqual(resultIndexes);
|
|
1242
1242
|
});
|
|
1243
1243
|
|
|
1244
|
+
test("packs 3 indexes with the automatic addition of a terminator and unpacks them correctly", () => {
|
|
1245
|
+
const indexes = [0, 3, 5]; // sample indexes
|
|
1246
|
+
const packed = packFieldIndexes(indexes);
|
|
1247
|
+
const result = unpackFieldIndexes(packed);
|
|
1248
|
+
const resultIndexes = [0, 3, 5]; // should terminate on it's own even if a terminator isn't passed in
|
|
1249
|
+
|
|
1250
|
+
expect(result).toEqual(resultIndexes);
|
|
1251
|
+
});
|
|
1252
|
+
|
|
1244
1253
|
test("throws if more than five indexes are provided", () => {
|
|
1245
1254
|
expect(() => packFieldIndexes([1, 2, 3, 4, 5, 6])).toThrowError(
|
|
1246
1255
|
"Can only pack up to 5 indexes.",
|