@boostxyz/sdk 0.0.0-alpha.8 → 0.0.0-alpha.9
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 +1 -1
- package/dist/Actions/ContractAction.d.ts +46 -3
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +37 -10
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +257 -12
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +249 -82
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +31 -2
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +52 -37
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +41 -129
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +93 -1
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +151 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +12 -6
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +168 -166
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +4 -4
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +19 -24
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +40 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +53 -36
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +33 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +54 -2
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.js +1 -1
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.js +3 -3
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +35 -5
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +33 -21
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +89 -5
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +44 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +49 -5
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +46 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.js +48 -32
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +49 -5
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +38 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +298 -5
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +151 -26
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/{generated-Cbv8zFkf.js → generated-57_Kffpz.js} +8 -5
- package/dist/generated-57_Kffpz.js.map +1 -0
- package/dist/{generated-BzszviNp.cjs → generated-wKBNvm48.cjs} +2 -2
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -125
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1371
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +26 -653
- package/dist/utils.js.map +1 -1
- package/package.json +17 -3
- package/src/Actions/Action.test.ts +5 -4
- package/src/Actions/ContractAction.test.ts +4 -6
- package/src/Actions/ContractAction.ts +73 -10
- package/src/Actions/ERC721MintAction.test.ts +2 -2
- package/src/Actions/ERC721MintAction.ts +70 -16
- package/src/Actions/EventAction.test.ts +43 -17
- package/src/Actions/EventAction.ts +452 -35
- package/src/AllowLists/SimpleAllowList.ts +48 -5
- package/src/AllowLists/SimpleDenyList.ts +47 -109
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +136 -1
- package/src/BoostCore.test.ts +4 -11
- package/src/BoostCore.ts +39 -33
- package/src/BoostRegistry.ts +19 -22
- package/src/Budgets/ManagedBudget.ts +69 -16
- package/src/Budgets/SimpleBudget.ts +57 -14
- package/src/Budgets/VestingBudget.ts +79 -9
- package/src/Deployable/Contract.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +2 -2
- package/src/Incentives/AllowListIncentive.test.ts +2 -5
- package/src/Incentives/AllowListIncentive.ts +59 -15
- package/src/Incentives/CGDAIncentive.test.ts +3 -7
- package/src/Incentives/CGDAIncentive.ts +123 -19
- package/src/Incentives/ERC1155Incentive.test.ts +2 -13
- package/src/Incentives/ERC1155Incentive.ts +104 -22
- package/src/Incentives/ERC20Incentive.test.ts +6 -17
- package/src/Incentives/ERC20Incentive.ts +86 -21
- package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
- package/src/Incentives/ERC20VariableIncentive.ts +71 -19
- package/src/Incentives/Incentive.test.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +3 -6
- package/src/Incentives/PointsIncentive.ts +79 -17
- package/src/Validators/SignerValidator.test.ts +3 -7
- package/src/Validators/SignerValidator.ts +422 -13
- package/src/claiming.ts +56 -0
- package/src/errors.ts +1 -1
- package/src/index.ts +10 -7
- package/src/transfers.ts +284 -0
- package/src/utils.ts +3 -2052
- package/dist/generated-BzszviNp.cjs.map +0 -1
- package/dist/generated-Cbv8zFkf.js.map +0 -1
|
@@ -2,9 +2,227 @@ import { eventActionAbi } from '@boostxyz/evm';
|
|
|
2
2
|
import { type Abi, type AbiEvent, type Address, type ContractEventName, type Hex, type Log } from 'viem';
|
|
3
3
|
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
4
|
import { DeployableTarget } from '../Deployable/DeployableTarget';
|
|
5
|
-
import { type
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { type GetLogsParams, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
6
|
+
/**
|
|
7
|
+
* Filter types used to determine how criteria are evaluated.
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @enum {number}
|
|
11
|
+
*/
|
|
12
|
+
export declare enum FilterType {
|
|
13
|
+
EQUAL = 0,
|
|
14
|
+
NOT_EQUAL = 1,
|
|
15
|
+
GREATER_THAN = 2,
|
|
16
|
+
LESS_THAN = 3,
|
|
17
|
+
CONTAINS = 4
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The primitive types supported for filtering.
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @enum {number}
|
|
24
|
+
*/
|
|
25
|
+
export declare enum PrimitiveType {
|
|
26
|
+
UINT = 0,
|
|
27
|
+
ADDRESS = 1,
|
|
28
|
+
BYTES = 2,
|
|
29
|
+
STRING = 3
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Object representation of a `Criteria` struct used in event actions.
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @interface Criteria
|
|
36
|
+
* @typedef {Criteria}
|
|
37
|
+
*/
|
|
38
|
+
export interface Criteria {
|
|
39
|
+
/**
|
|
40
|
+
* The filter type used in this criteria.
|
|
41
|
+
*
|
|
42
|
+
* @type {FilterType}
|
|
43
|
+
*/
|
|
44
|
+
filterType: FilterType;
|
|
45
|
+
/**
|
|
46
|
+
* The primitive type of the field being filtered.
|
|
47
|
+
*
|
|
48
|
+
* @type {PrimitiveType}
|
|
49
|
+
*/
|
|
50
|
+
fieldType: PrimitiveType;
|
|
51
|
+
/**
|
|
52
|
+
* The index in the logs argument array where the field is located.
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
*/
|
|
56
|
+
fieldIndex: number;
|
|
57
|
+
/**
|
|
58
|
+
* The filter data used for complex filtering.
|
|
59
|
+
*
|
|
60
|
+
* @type {Hex}
|
|
61
|
+
*/
|
|
62
|
+
filterData: Hex;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether a given signature is an event or function
|
|
66
|
+
*
|
|
67
|
+
* @export
|
|
68
|
+
* @enum {number}
|
|
69
|
+
*/
|
|
70
|
+
export declare enum SignatureType {
|
|
71
|
+
EVENT = 0,
|
|
72
|
+
FUNC = 1
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The payload describing how claimants are identified
|
|
76
|
+
*
|
|
77
|
+
* @export
|
|
78
|
+
* @interface ActionClaimant
|
|
79
|
+
* @typedef {ActionClaimant}
|
|
80
|
+
*/
|
|
81
|
+
export interface ActionClaimant {
|
|
82
|
+
/**
|
|
83
|
+
* Whether claimaint is inferred from event or function
|
|
84
|
+
*
|
|
85
|
+
* @type {SignatureType}
|
|
86
|
+
*/
|
|
87
|
+
signatureType: SignatureType;
|
|
88
|
+
/**
|
|
89
|
+
* The 4 byte signature of the event or function
|
|
90
|
+
*
|
|
91
|
+
* @type {Hex}
|
|
92
|
+
*/
|
|
93
|
+
signature: Hex;
|
|
94
|
+
/**
|
|
95
|
+
* The index corresponding to claimant.
|
|
96
|
+
*
|
|
97
|
+
* @type {number}
|
|
98
|
+
*/
|
|
99
|
+
fieldIndex: number;
|
|
100
|
+
/**
|
|
101
|
+
* The address of the target contract
|
|
102
|
+
*
|
|
103
|
+
* @type {Address}
|
|
104
|
+
*/
|
|
105
|
+
targetContract: Address;
|
|
106
|
+
/**
|
|
107
|
+
* The chain id of the target contract.
|
|
108
|
+
* @type {number}
|
|
109
|
+
*/
|
|
110
|
+
chainid: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Object representation of an `ActionStep` struct used in event actions.
|
|
114
|
+
*
|
|
115
|
+
* @export
|
|
116
|
+
* @interface ActionStep
|
|
117
|
+
* @typedef {ActionStep}
|
|
118
|
+
*/
|
|
119
|
+
export interface ActionStep {
|
|
120
|
+
/**
|
|
121
|
+
* The signature of the event.
|
|
122
|
+
*
|
|
123
|
+
* @type {Hex}
|
|
124
|
+
*/
|
|
125
|
+
signature: Hex;
|
|
126
|
+
/**
|
|
127
|
+
* Whether claimaint is inferred from event or function
|
|
128
|
+
*
|
|
129
|
+
* @type {SignatureType}
|
|
130
|
+
*/
|
|
131
|
+
signatureType: SignatureType;
|
|
132
|
+
/**
|
|
133
|
+
* The type of action being performed.
|
|
134
|
+
*
|
|
135
|
+
* @type {number}
|
|
136
|
+
*/
|
|
137
|
+
actionType?: number;
|
|
138
|
+
/**
|
|
139
|
+
* The address of the target contract.
|
|
140
|
+
*
|
|
141
|
+
* @type {Address}
|
|
142
|
+
*/
|
|
143
|
+
targetContract: Address;
|
|
144
|
+
/**
|
|
145
|
+
* The chain id of the target contract.
|
|
146
|
+
* @type {number}
|
|
147
|
+
*/
|
|
148
|
+
chainid: number;
|
|
149
|
+
/**
|
|
150
|
+
* The criteria used for this action step.
|
|
151
|
+
*
|
|
152
|
+
* @type {Criteria}
|
|
153
|
+
*/
|
|
154
|
+
actionParameter: Criteria;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* You can either supply a simplified version of the payload, or one that explicitly declares action steps.
|
|
158
|
+
*
|
|
159
|
+
* @export
|
|
160
|
+
* @typedef {EventActionPayload}
|
|
161
|
+
*/
|
|
162
|
+
export type EventActionPayload = EventActionPayloadSimple | EventActionPayloadRaw;
|
|
163
|
+
export interface EventActionPayloadSimple {
|
|
164
|
+
/**
|
|
165
|
+
* The payload describing how claimants are identified
|
|
166
|
+
*
|
|
167
|
+
* @type {ActionClaimant}
|
|
168
|
+
*/
|
|
169
|
+
actionClaimant: ActionClaimant;
|
|
170
|
+
/**
|
|
171
|
+
* Up to 4 action steps.
|
|
172
|
+
* If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload
|
|
173
|
+
* Any more than 4 will throw an error.
|
|
174
|
+
*
|
|
175
|
+
* @type {ActionStep[]}
|
|
176
|
+
*/
|
|
177
|
+
actionSteps: ActionStep[];
|
|
178
|
+
}
|
|
179
|
+
export type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];
|
|
180
|
+
/**
|
|
181
|
+
* Typeguard to determine if a user is supplying a simple or raw EventActionPayload
|
|
182
|
+
*
|
|
183
|
+
* @param {*} opts
|
|
184
|
+
* @returns {opts is EventActionPayloadSimple}
|
|
185
|
+
*/
|
|
186
|
+
export declare function isEventActionPayloadSimple(opts: EventActionPayload): opts is EventActionPayloadSimple;
|
|
187
|
+
/**
|
|
188
|
+
* Object representation of an `InitPayload` struct used to initialize event actions.
|
|
189
|
+
*
|
|
190
|
+
* @export
|
|
191
|
+
* @interface EventActionPayloadRaw
|
|
192
|
+
* @typedef {EventActionPayloadRaw}
|
|
193
|
+
*/
|
|
194
|
+
export interface EventActionPayloadRaw {
|
|
195
|
+
/**
|
|
196
|
+
* The payload describing how claimants are identified
|
|
197
|
+
*
|
|
198
|
+
* @type {ActionClaimant}
|
|
199
|
+
*/
|
|
200
|
+
actionClaimant: ActionClaimant;
|
|
201
|
+
/**
|
|
202
|
+
* The first action step.
|
|
203
|
+
*
|
|
204
|
+
* @type {ActionStep}
|
|
205
|
+
*/
|
|
206
|
+
actionStepOne: ActionStep;
|
|
207
|
+
/**
|
|
208
|
+
* The second action step.
|
|
209
|
+
*
|
|
210
|
+
* @type {ActionStep}
|
|
211
|
+
*/
|
|
212
|
+
actionStepTwo: ActionStep;
|
|
213
|
+
/**
|
|
214
|
+
* The third action step.
|
|
215
|
+
*
|
|
216
|
+
* @type {ActionStep}
|
|
217
|
+
*/
|
|
218
|
+
actionStepThree: ActionStep;
|
|
219
|
+
/**
|
|
220
|
+
* The fourth action step.
|
|
221
|
+
*
|
|
222
|
+
* @type {ActionStep}
|
|
223
|
+
*/
|
|
224
|
+
actionStepFour: ActionStep;
|
|
225
|
+
}
|
|
8
226
|
/**
|
|
9
227
|
* A generic event action
|
|
10
228
|
*
|
|
@@ -146,8 +364,8 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
146
364
|
readonly type: "uint8";
|
|
147
365
|
}, {
|
|
148
366
|
readonly name: "signature";
|
|
149
|
-
readonly internalType: "
|
|
150
|
-
readonly type: "
|
|
367
|
+
readonly internalType: "bytes32";
|
|
368
|
+
readonly type: "bytes32";
|
|
151
369
|
}, {
|
|
152
370
|
readonly name: "fieldIndex";
|
|
153
371
|
readonly internalType: "uint8";
|
|
@@ -156,6 +374,10 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
156
374
|
readonly name: "targetContract";
|
|
157
375
|
readonly internalType: "address";
|
|
158
376
|
readonly type: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly name: "chainid";
|
|
379
|
+
readonly internalType: "uint256";
|
|
380
|
+
readonly type: "uint256";
|
|
159
381
|
}];
|
|
160
382
|
}];
|
|
161
383
|
readonly stateMutability: "view";
|
|
@@ -173,8 +395,8 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
173
395
|
readonly type: "tuple";
|
|
174
396
|
readonly components: readonly [{
|
|
175
397
|
readonly name: "signature";
|
|
176
|
-
readonly internalType: "
|
|
177
|
-
readonly type: "
|
|
398
|
+
readonly internalType: "bytes32";
|
|
399
|
+
readonly type: "bytes32";
|
|
178
400
|
}, {
|
|
179
401
|
readonly name: "signatureType";
|
|
180
402
|
readonly internalType: "enum AEventAction.SignatureType";
|
|
@@ -187,6 +409,10 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
187
409
|
readonly name: "targetContract";
|
|
188
410
|
readonly internalType: "address";
|
|
189
411
|
readonly type: "address";
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "chainid";
|
|
414
|
+
readonly internalType: "uint256";
|
|
415
|
+
readonly type: "uint256";
|
|
190
416
|
}, {
|
|
191
417
|
readonly name: "actionParameter";
|
|
192
418
|
readonly internalType: "struct AEventAction.Criteria";
|
|
@@ -221,8 +447,8 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
221
447
|
readonly type: "tuple[]";
|
|
222
448
|
readonly components: readonly [{
|
|
223
449
|
readonly name: "signature";
|
|
224
|
-
readonly internalType: "
|
|
225
|
-
readonly type: "
|
|
450
|
+
readonly internalType: "bytes32";
|
|
451
|
+
readonly type: "bytes32";
|
|
226
452
|
}, {
|
|
227
453
|
readonly name: "signatureType";
|
|
228
454
|
readonly internalType: "enum AEventAction.SignatureType";
|
|
@@ -235,6 +461,10 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
235
461
|
readonly name: "targetContract";
|
|
236
462
|
readonly internalType: "address";
|
|
237
463
|
readonly type: "address";
|
|
464
|
+
}, {
|
|
465
|
+
readonly name: "chainid";
|
|
466
|
+
readonly internalType: "uint256";
|
|
467
|
+
readonly type: "uint256";
|
|
238
468
|
}, {
|
|
239
469
|
readonly name: "actionParameter";
|
|
240
470
|
readonly internalType: "struct AEventAction.Criteria";
|
|
@@ -370,7 +600,11 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
370
600
|
* @param {?ReadParams<typeof eventActionAbi, 'getActionClaimant'>} [params]
|
|
371
601
|
* @returns {Promise<ActionClaimant>}
|
|
372
602
|
*/
|
|
373
|
-
getActionClaimant(params?: ReadParams<typeof eventActionAbi, 'getActionClaimant'>): Promise<ActionClaimant
|
|
603
|
+
getActionClaimant(params?: ReadParams<typeof eventActionAbi, 'getActionClaimant'>): Promise<Pick<ActionClaimant, "signatureType" | "signature" | "fieldIndex" | "targetContract"> & {
|
|
604
|
+
chainid: bigint;
|
|
605
|
+
} & {
|
|
606
|
+
chainid: number;
|
|
607
|
+
}>;
|
|
374
608
|
/**
|
|
375
609
|
* Executes a prepared event action
|
|
376
610
|
*
|
|
@@ -433,9 +667,9 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
433
667
|
*
|
|
434
668
|
* @param {Criteria} criteria - The criteria to validate against.
|
|
435
669
|
* @param {Log} log - The Viem event log.
|
|
436
|
-
* @returns {
|
|
670
|
+
* @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
|
|
437
671
|
*/
|
|
438
|
-
validateLogAgainstCriteria(criteria: Criteria, log: Log):
|
|
672
|
+
validateLogAgainstCriteria(criteria: Criteria, log: Log): boolean;
|
|
439
673
|
/**
|
|
440
674
|
* @inheritdoc
|
|
441
675
|
*
|
|
@@ -446,4 +680,15 @@ export declare class EventAction extends DeployableTarget<EventActionPayload, ty
|
|
|
446
680
|
*/
|
|
447
681
|
buildParameters(_payload?: EventActionPayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
448
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* Function to properly encode an event action payload.
|
|
685
|
+
*
|
|
686
|
+
* @param {InitPayload} param0
|
|
687
|
+
* @param {ActionStep} param0.actionStepOne - The first action step to initialize.
|
|
688
|
+
* @param {ActionStep} param0.actionStepTwo - The second action step to initialize.
|
|
689
|
+
* @param {ActionStep} param0.actionStepThree - The third action step to initialize.
|
|
690
|
+
* @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.
|
|
691
|
+
* @returns {Hex}
|
|
692
|
+
*/
|
|
693
|
+
export declare function prepareEventActionPayload({ actionClaimant, actionStepOne, actionStepTwo, actionStepThree, actionStepFour, }: EventActionPayloadRaw): `0x${string}`;
|
|
449
694
|
//# sourceMappingURL=EventAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventAction.d.ts","sourceRoot":"","sources":["../../src/Actions/EventAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAKf,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"EventAction.d.ts","sourceRoot":"","sources":["../../src/Actions/EventAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAKf,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAS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