@boostxyz/sdk 0.0.0-alpha.2
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/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +27 -0
- package/dist/Actions/ContractAction.d.ts +327 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +486 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +1 -0
- package/dist/Actions/EventAction.d.ts +433 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +211 -0
- package/dist/AllowLists/AllowList.cjs +1 -0
- package/dist/AllowLists/AllowList.d.ts +33 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +28 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +452 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +138 -0
- package/dist/AllowLists/SimpleDenyList.cjs +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +306 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +202 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +4 -0
- package/dist/Auth/PassthroughAuth.cjs +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +38 -0
- package/dist/Boost.cjs +1 -0
- package/dist/Boost.d.ts +142 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +15 -0
- package/dist/BoostCore.cjs +2 -0
- package/dist/BoostCore.d.ts +460 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1105 -0
- package/dist/BoostRegistry.cjs +1 -0
- package/dist/BoostRegistry.d.ts +229 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +250 -0
- package/dist/Budgets/Budget.cjs +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +27 -0
- package/dist/Budgets/ManagedBudget.cjs +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1065 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +498 -0
- package/dist/Budgets/SimpleBudget.d.ts +793 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +726 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +149 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.d.ts +155 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +124 -0
- package/dist/Deployable/DeployableTarget.cjs +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +115 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +128 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +483 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +188 -0
- package/dist/Incentives/CGDAIncentive.cjs +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +560 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +249 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +652 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +622 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +292 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +545 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +1 -0
- package/dist/Incentives/Incentive.d.ts +39 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +280 -0
- package/dist/Incentives/PointsIncentive.cjs +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +615 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +197 -0
- package/dist/Validators/SignerValidator.cjs +1 -0
- package/dist/Validators/SignerValidator.d.ts +452 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +167 -0
- package/dist/Validators/Validator.cjs +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +25 -0
- package/dist/errors.cjs +1 -0
- package/dist/errors.d.ts +257 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +161 -0
- package/dist/generated-BaaleHW-.cjs +2 -0
- package/dist/generated-x_abr3Yv.js +6228 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1355 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +1454 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +643 -0
- package/package.json +197 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { signerValidatorAbi } from '@boostxyz/evm';
|
|
2
|
+
import type { Address, ContractEventName } from 'viem';
|
|
3
|
+
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
|
+
import { DeployableTarget } from '../Deployable/DeployableTarget';
|
|
5
|
+
import { type GenericLog, type ReadParams, RegistryType, type SignerValidatorPayload, type SignerValidatorSignaturePayload, type SignerValidatorValidatePayload, type WriteParams } from '../utils';
|
|
6
|
+
export { signerValidatorAbi };
|
|
7
|
+
export type { SignerValidatorPayload };
|
|
8
|
+
/**
|
|
9
|
+
* A generic `viem.Log` event with support for `BoostCore` event types.
|
|
10
|
+
*
|
|
11
|
+
* @export
|
|
12
|
+
* @typedef {SignerValidatorLog}
|
|
13
|
+
* @template {ContractEventName<
|
|
14
|
+
* typeof signerValidatorAbi
|
|
15
|
+
* >} [event=ContractEventName<typeof signerValidatorAbi>]
|
|
16
|
+
*/
|
|
17
|
+
export type SignerValidatorLog<event extends ContractEventName<typeof signerValidatorAbi> = ContractEventName<typeof signerValidatorAbi>> = GenericLog<typeof signerValidatorAbi, event>;
|
|
18
|
+
/**
|
|
19
|
+
* A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @class SignerValidator
|
|
23
|
+
* @typedef {SignerValidator}
|
|
24
|
+
* @extends {DeployableTarget<SignerValidatorPayload>}
|
|
25
|
+
*/
|
|
26
|
+
export declare class SignerValidator extends DeployableTarget<SignerValidatorPayload, typeof signerValidatorAbi> {
|
|
27
|
+
readonly abi: readonly [{
|
|
28
|
+
readonly type: "constructor";
|
|
29
|
+
readonly inputs: readonly [];
|
|
30
|
+
readonly stateMutability: "nonpayable";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "error";
|
|
33
|
+
readonly inputs: readonly [];
|
|
34
|
+
readonly name: "AlreadyInitialized";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "error";
|
|
37
|
+
readonly inputs: readonly [];
|
|
38
|
+
readonly name: "CloneAlreadyInitialized";
|
|
39
|
+
}, {
|
|
40
|
+
readonly type: "error";
|
|
41
|
+
readonly inputs: readonly [];
|
|
42
|
+
readonly name: "InitializerNotImplemented";
|
|
43
|
+
}, {
|
|
44
|
+
readonly type: "error";
|
|
45
|
+
readonly inputs: readonly [{
|
|
46
|
+
readonly name: "available";
|
|
47
|
+
readonly internalType: "uint8";
|
|
48
|
+
readonly type: "uint8";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "id";
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
readonly type: "uint256";
|
|
53
|
+
}];
|
|
54
|
+
readonly name: "InvalidIncentive";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "error";
|
|
57
|
+
readonly inputs: readonly [];
|
|
58
|
+
readonly name: "InvalidInitialization";
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "error";
|
|
61
|
+
readonly inputs: readonly [];
|
|
62
|
+
readonly name: "InvalidInitializationData";
|
|
63
|
+
}, {
|
|
64
|
+
readonly type: "error";
|
|
65
|
+
readonly inputs: readonly [];
|
|
66
|
+
readonly name: "LengthMismatch";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "error";
|
|
69
|
+
readonly inputs: readonly [];
|
|
70
|
+
readonly name: "NewOwnerIsZeroAddress";
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "error";
|
|
73
|
+
readonly inputs: readonly [];
|
|
74
|
+
readonly name: "NoHandoverRequest";
|
|
75
|
+
}, {
|
|
76
|
+
readonly type: "error";
|
|
77
|
+
readonly inputs: readonly [];
|
|
78
|
+
readonly name: "NotInitializing";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "error";
|
|
81
|
+
readonly inputs: readonly [];
|
|
82
|
+
readonly name: "Unauthorized";
|
|
83
|
+
}, {
|
|
84
|
+
readonly type: "error";
|
|
85
|
+
readonly inputs: readonly [];
|
|
86
|
+
readonly name: "Unauthorized";
|
|
87
|
+
}, {
|
|
88
|
+
readonly type: "event";
|
|
89
|
+
readonly anonymous: false;
|
|
90
|
+
readonly inputs: readonly [{
|
|
91
|
+
readonly name: "version";
|
|
92
|
+
readonly internalType: "uint64";
|
|
93
|
+
readonly type: "uint64";
|
|
94
|
+
readonly indexed: false;
|
|
95
|
+
}];
|
|
96
|
+
readonly name: "Initialized";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "event";
|
|
99
|
+
readonly anonymous: false;
|
|
100
|
+
readonly inputs: readonly [{
|
|
101
|
+
readonly name: "pendingOwner";
|
|
102
|
+
readonly internalType: "address";
|
|
103
|
+
readonly type: "address";
|
|
104
|
+
readonly indexed: true;
|
|
105
|
+
}];
|
|
106
|
+
readonly name: "OwnershipHandoverCanceled";
|
|
107
|
+
}, {
|
|
108
|
+
readonly type: "event";
|
|
109
|
+
readonly anonymous: false;
|
|
110
|
+
readonly inputs: readonly [{
|
|
111
|
+
readonly name: "pendingOwner";
|
|
112
|
+
readonly internalType: "address";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
readonly indexed: true;
|
|
115
|
+
}];
|
|
116
|
+
readonly name: "OwnershipHandoverRequested";
|
|
117
|
+
}, {
|
|
118
|
+
readonly type: "event";
|
|
119
|
+
readonly anonymous: false;
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "oldOwner";
|
|
122
|
+
readonly internalType: "address";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
readonly indexed: true;
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "newOwner";
|
|
127
|
+
readonly internalType: "address";
|
|
128
|
+
readonly type: "address";
|
|
129
|
+
readonly indexed: true;
|
|
130
|
+
}];
|
|
131
|
+
readonly name: "OwnershipTransferred";
|
|
132
|
+
}, {
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
readonly inputs: readonly [];
|
|
135
|
+
readonly name: "cancelOwnershipHandover";
|
|
136
|
+
readonly outputs: readonly [];
|
|
137
|
+
readonly stateMutability: "payable";
|
|
138
|
+
}, {
|
|
139
|
+
readonly type: "function";
|
|
140
|
+
readonly inputs: readonly [{
|
|
141
|
+
readonly name: "pendingOwner";
|
|
142
|
+
readonly internalType: "address";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}];
|
|
145
|
+
readonly name: "completeOwnershipHandover";
|
|
146
|
+
readonly outputs: readonly [];
|
|
147
|
+
readonly stateMutability: "payable";
|
|
148
|
+
}, {
|
|
149
|
+
readonly type: "function";
|
|
150
|
+
readonly inputs: readonly [];
|
|
151
|
+
readonly name: "eip712Domain";
|
|
152
|
+
readonly outputs: readonly [{
|
|
153
|
+
readonly name: "fields";
|
|
154
|
+
readonly internalType: "bytes1";
|
|
155
|
+
readonly type: "bytes1";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "name";
|
|
158
|
+
readonly internalType: "string";
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "version";
|
|
162
|
+
readonly internalType: "string";
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "chainId";
|
|
166
|
+
readonly internalType: "uint256";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "verifyingContract";
|
|
170
|
+
readonly internalType: "address";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
}, {
|
|
173
|
+
readonly name: "salt";
|
|
174
|
+
readonly internalType: "bytes32";
|
|
175
|
+
readonly type: "bytes32";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "extensions";
|
|
178
|
+
readonly internalType: "uint256[]";
|
|
179
|
+
readonly type: "uint256[]";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "view";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
readonly inputs: readonly [];
|
|
185
|
+
readonly name: "getComponentInterface";
|
|
186
|
+
readonly outputs: readonly [{
|
|
187
|
+
readonly name: "";
|
|
188
|
+
readonly internalType: "bytes4";
|
|
189
|
+
readonly type: "bytes4";
|
|
190
|
+
}];
|
|
191
|
+
readonly stateMutability: "pure";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "function";
|
|
194
|
+
readonly inputs: readonly [{
|
|
195
|
+
readonly name: "boostId";
|
|
196
|
+
readonly internalType: "uint256";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "incentiveQuantity";
|
|
200
|
+
readonly internalType: "uint8";
|
|
201
|
+
readonly type: "uint8";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "claimant";
|
|
204
|
+
readonly internalType: "address";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "incentiveData";
|
|
208
|
+
readonly internalType: "bytes";
|
|
209
|
+
readonly type: "bytes";
|
|
210
|
+
}];
|
|
211
|
+
readonly name: "hashSignerData";
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly name: "hashedSignerData";
|
|
214
|
+
readonly internalType: "bytes32";
|
|
215
|
+
readonly type: "bytes32";
|
|
216
|
+
}];
|
|
217
|
+
readonly stateMutability: "view";
|
|
218
|
+
}, {
|
|
219
|
+
readonly type: "function";
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly name: "data_";
|
|
222
|
+
readonly internalType: "bytes";
|
|
223
|
+
readonly type: "bytes";
|
|
224
|
+
}];
|
|
225
|
+
readonly name: "initialize";
|
|
226
|
+
readonly outputs: readonly [];
|
|
227
|
+
readonly stateMutability: "nonpayable";
|
|
228
|
+
}, {
|
|
229
|
+
readonly type: "function";
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
readonly name: "owner";
|
|
232
|
+
readonly outputs: readonly [{
|
|
233
|
+
readonly name: "result";
|
|
234
|
+
readonly internalType: "address";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
}];
|
|
237
|
+
readonly stateMutability: "view";
|
|
238
|
+
}, {
|
|
239
|
+
readonly type: "function";
|
|
240
|
+
readonly inputs: readonly [{
|
|
241
|
+
readonly name: "pendingOwner";
|
|
242
|
+
readonly internalType: "address";
|
|
243
|
+
readonly type: "address";
|
|
244
|
+
}];
|
|
245
|
+
readonly name: "ownershipHandoverExpiresAt";
|
|
246
|
+
readonly outputs: readonly [{
|
|
247
|
+
readonly name: "result";
|
|
248
|
+
readonly internalType: "uint256";
|
|
249
|
+
readonly type: "uint256";
|
|
250
|
+
}];
|
|
251
|
+
readonly stateMutability: "view";
|
|
252
|
+
}, {
|
|
253
|
+
readonly type: "function";
|
|
254
|
+
readonly inputs: readonly [];
|
|
255
|
+
readonly name: "renounceOwnership";
|
|
256
|
+
readonly outputs: readonly [];
|
|
257
|
+
readonly stateMutability: "payable";
|
|
258
|
+
}, {
|
|
259
|
+
readonly type: "function";
|
|
260
|
+
readonly inputs: readonly [];
|
|
261
|
+
readonly name: "requestOwnershipHandover";
|
|
262
|
+
readonly outputs: readonly [];
|
|
263
|
+
readonly stateMutability: "payable";
|
|
264
|
+
}, {
|
|
265
|
+
readonly type: "function";
|
|
266
|
+
readonly inputs: readonly [{
|
|
267
|
+
readonly name: "signers_";
|
|
268
|
+
readonly internalType: "address[]";
|
|
269
|
+
readonly type: "address[]";
|
|
270
|
+
}, {
|
|
271
|
+
readonly name: "authorized_";
|
|
272
|
+
readonly internalType: "bool[]";
|
|
273
|
+
readonly type: "bool[]";
|
|
274
|
+
}];
|
|
275
|
+
readonly name: "setAuthorized";
|
|
276
|
+
readonly outputs: readonly [];
|
|
277
|
+
readonly stateMutability: "nonpayable";
|
|
278
|
+
}, {
|
|
279
|
+
readonly type: "function";
|
|
280
|
+
readonly inputs: readonly [{
|
|
281
|
+
readonly name: "newCaller";
|
|
282
|
+
readonly internalType: "address";
|
|
283
|
+
readonly type: "address";
|
|
284
|
+
}];
|
|
285
|
+
readonly name: "setValidatorCaller";
|
|
286
|
+
readonly outputs: readonly [];
|
|
287
|
+
readonly stateMutability: "nonpayable";
|
|
288
|
+
}, {
|
|
289
|
+
readonly type: "function";
|
|
290
|
+
readonly inputs: readonly [{
|
|
291
|
+
readonly name: "";
|
|
292
|
+
readonly internalType: "address";
|
|
293
|
+
readonly type: "address";
|
|
294
|
+
}];
|
|
295
|
+
readonly name: "signers";
|
|
296
|
+
readonly outputs: readonly [{
|
|
297
|
+
readonly name: "";
|
|
298
|
+
readonly internalType: "bool";
|
|
299
|
+
readonly type: "bool";
|
|
300
|
+
}];
|
|
301
|
+
readonly stateMutability: "view";
|
|
302
|
+
}, {
|
|
303
|
+
readonly type: "function";
|
|
304
|
+
readonly inputs: readonly [{
|
|
305
|
+
readonly name: "interfaceId";
|
|
306
|
+
readonly internalType: "bytes4";
|
|
307
|
+
readonly type: "bytes4";
|
|
308
|
+
}];
|
|
309
|
+
readonly name: "supportsInterface";
|
|
310
|
+
readonly outputs: readonly [{
|
|
311
|
+
readonly name: "";
|
|
312
|
+
readonly internalType: "bool";
|
|
313
|
+
readonly type: "bool";
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
316
|
+
}, {
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
readonly inputs: readonly [{
|
|
319
|
+
readonly name: "newOwner";
|
|
320
|
+
readonly internalType: "address";
|
|
321
|
+
readonly type: "address";
|
|
322
|
+
}];
|
|
323
|
+
readonly name: "transferOwnership";
|
|
324
|
+
readonly outputs: readonly [];
|
|
325
|
+
readonly stateMutability: "payable";
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "function";
|
|
328
|
+
readonly inputs: readonly [{
|
|
329
|
+
readonly name: "boostId";
|
|
330
|
+
readonly internalType: "uint256";
|
|
331
|
+
readonly type: "uint256";
|
|
332
|
+
}, {
|
|
333
|
+
readonly name: "incentiveId";
|
|
334
|
+
readonly internalType: "uint256";
|
|
335
|
+
readonly type: "uint256";
|
|
336
|
+
}, {
|
|
337
|
+
readonly name: "claimant";
|
|
338
|
+
readonly internalType: "address";
|
|
339
|
+
readonly type: "address";
|
|
340
|
+
}, {
|
|
341
|
+
readonly name: "claimData";
|
|
342
|
+
readonly internalType: "bytes";
|
|
343
|
+
readonly type: "bytes";
|
|
344
|
+
}];
|
|
345
|
+
readonly name: "validate";
|
|
346
|
+
readonly outputs: readonly [{
|
|
347
|
+
readonly name: "";
|
|
348
|
+
readonly internalType: "bool";
|
|
349
|
+
readonly type: "bool";
|
|
350
|
+
}];
|
|
351
|
+
readonly stateMutability: "nonpayable";
|
|
352
|
+
}];
|
|
353
|
+
/**
|
|
354
|
+
* @inheritdoc
|
|
355
|
+
*
|
|
356
|
+
* @public
|
|
357
|
+
* @static
|
|
358
|
+
* @type {Address}
|
|
359
|
+
*/
|
|
360
|
+
static base: Address;
|
|
361
|
+
/**
|
|
362
|
+
* @inheritdoc
|
|
363
|
+
*
|
|
364
|
+
* @public
|
|
365
|
+
* @static
|
|
366
|
+
* @type {RegistryType}
|
|
367
|
+
*/
|
|
368
|
+
static registryType: RegistryType;
|
|
369
|
+
/**
|
|
370
|
+
* The set of authorized signers
|
|
371
|
+
*
|
|
372
|
+
* @public
|
|
373
|
+
* @async
|
|
374
|
+
* @param {Address} address
|
|
375
|
+
* @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]
|
|
376
|
+
* @returns {unknown}
|
|
377
|
+
*/
|
|
378
|
+
signers(address: Address, params?: ReadParams<typeof signerValidatorAbi, 'signers'>): Promise<boolean>;
|
|
379
|
+
/**
|
|
380
|
+
* Retrieve the hash and signer data for a given hash
|
|
381
|
+
*
|
|
382
|
+
* @public
|
|
383
|
+
* @async
|
|
384
|
+
* @param {SignerValidatorSignaturePayload} payload
|
|
385
|
+
* @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]
|
|
386
|
+
* @returns {unknown}
|
|
387
|
+
*/
|
|
388
|
+
hashSignerData(payload: SignerValidatorSignaturePayload, params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>): Promise<`0x${string}`>;
|
|
389
|
+
/**
|
|
390
|
+
* Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
* @async
|
|
394
|
+
* @param {SignerValidatorValidatePayload} payload
|
|
395
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
|
|
396
|
+
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
397
|
+
*/
|
|
398
|
+
validate(payload: SignerValidatorValidatePayload, params?: WriteParams<typeof signerValidatorAbi, 'validate'>): Promise<boolean>;
|
|
399
|
+
/**
|
|
400
|
+
* Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
|
|
401
|
+
*
|
|
402
|
+
* @public
|
|
403
|
+
* @async
|
|
404
|
+
* @param {SignerValidatorValidatePayload} payload
|
|
405
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
|
|
406
|
+
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
407
|
+
*/
|
|
408
|
+
validateRaw(payload: SignerValidatorValidatePayload, params?: ReadParams<typeof signerValidatorAbi, 'validate'>): Promise<{
|
|
409
|
+
hash: `0x${string}`;
|
|
410
|
+
result: boolean;
|
|
411
|
+
}>;
|
|
412
|
+
/**
|
|
413
|
+
* Set the authorized status of a signer
|
|
414
|
+
*
|
|
415
|
+
* @public
|
|
416
|
+
* @async
|
|
417
|
+
* @param {Address[]} addresses - The list of signers to update
|
|
418
|
+
* @param {boolean[]} allowed - The authorized status of each signer
|
|
419
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
|
|
420
|
+
* @returns {unknown}
|
|
421
|
+
*/
|
|
422
|
+
setAuthorized(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>): Promise<void>;
|
|
423
|
+
/**
|
|
424
|
+
* Set the authorized status of a signer
|
|
425
|
+
*
|
|
426
|
+
* @public
|
|
427
|
+
* @async
|
|
428
|
+
* @param {Address[]} addresses - The list of signers to update
|
|
429
|
+
* @param {boolean[]} allowed - The authorized status of each signer
|
|
430
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
|
|
431
|
+
* @returns {unknown}
|
|
432
|
+
*/
|
|
433
|
+
setAuthorizedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>): Promise<{
|
|
434
|
+
hash: `0x${string}`;
|
|
435
|
+
result: void;
|
|
436
|
+
}>;
|
|
437
|
+
setValidatorCallerRaw(address: Address, params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>): Promise<{
|
|
438
|
+
hash: `0x${string}`;
|
|
439
|
+
result: void;
|
|
440
|
+
}>;
|
|
441
|
+
setValidatorCaller(address: Address, params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>): Promise<void>;
|
|
442
|
+
/**
|
|
443
|
+
* @inheritdoc
|
|
444
|
+
*
|
|
445
|
+
* @public
|
|
446
|
+
* @param {?SignerValidatorPayload} [_payload]
|
|
447
|
+
* @param {?DeployableOptions} [_options]
|
|
448
|
+
* @returns {GenericDeployableParams}
|
|
449
|
+
*/
|
|
450
|
+
buildParameters(_payload?: SignerValidatorPayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=SignerValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignerValidator.d.ts","sourceRoot":"","sources":["../../src/Validators/SignerValidator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { aS as t, aT as i, aU as r, aV as n, aW as o, aX as h, aY as l, aZ as u, a_ as g } from "../generated-x_abr3Yv.js";
|
|
2
|
+
import { DeployableTarget as A } from "../Deployable/DeployableTarget.js";
|
|
3
|
+
import { RegistryType as w, prepareSignerValidatorPayload as y } from "../utils.js";
|
|
4
|
+
const m = "0x610120604052348015610010575f80fd5b503073ffffffffffffffffffffffffffffffffffffffff16608081815250504660a0818152505060608061004861013960201b60201c565b6100635761005a61014160201b60201c565b80925081935050505b5f61007261013960201b60201c565b610083578280519060200120610087565b5f801b5b90505f61009861013960201b60201c565b6100a95782805190602001206100ad565b5f801b5b90508160c081815250508060e081815250505f6100ce61013960201b60201c565b610118576040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815283602082015282604082015246606082015230608082015260a081209150505b80610100818152505050505050506101346101b860201b60201c565b61024d565b5f6001905090565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f6101c761022460201b60201c565b9050805460018116156101e15763f92ee8a95f526004601cfd5b8160c01c808260011c1461021f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805160a05160c05160e05161010051611ecc61028a5f395f610f6101525f6110a001525f61107d01525f61110f01525f6111330152611ecc5ff3fe6080604052600436106100f2575f3560e01c8063736c0d5b11610089578063d3de6e7511610058578063d3de6e75146102c4578063f04e283e14610300578063f2fde38b1461031c578063fee81cf414610338576100f2565b8063736c0d5b1461020657806384b0196e146102425780638da5cb5b14610272578063a1d2756f1461029c576100f2565b8063439fab91116100c5578063439fab911461018e57806354d1f13d146101b6578063703b6900146101c0578063715018a6146101fc576100f2565b806301ffc9a7146100f6578063256929621461013257806328d6183b1461013c5780634359d28a14610166575b5f80fd5b348015610101575f80fd5b5061011c60048036038101906101179190611232565b610374565b6040516101299190611277565b60405180910390f35b61013a6103ed565b005b348015610147575f80fd5b5061015061043e565b60405161015d919061129f565b60405180910390f35b348015610171575f80fd5b5061018c6004803603810190610187919061136e565b610465565b005b348015610199575f80fd5b506101b460048036038101906101af9190611441565b61056e565b005b6101be6106e5565b005b3480156101cb575f80fd5b506101e660048036038101906101e19190611519565b61071e565b6040516101f39190611277565b60405180910390f35b610204610911565b005b348015610211575f80fd5b5061022c6004803603810190610227919061159d565b610924565b6040516102399190611277565b60405180910390f35b34801561024d575f80fd5b50610256610940565b604051610269979695949392919061175f565b60405180910390f35b34801561027d575f80fd5b5061028661098b565b60405161029391906117e1565b60405180910390f35b3480156102a7575f80fd5b506102c260048036038101906102bd919061159d565b6109b3565b005b3480156102cf575f80fd5b506102ea60048036038101906102e59190611958565b6109fe565b6040516102f791906119d8565b60405180910390f35b61031a6004803603810190610315919061159d565b610a67565b005b6103366004803603810190610331919061159d565b610aa5565b005b348015610343575f80fd5b5061035e6004803603810190610359919061159d565b610ace565b60405161036b91906119f1565b60405180910390f35b5f7fb8ce7b22000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103e657506103e582610ae7565b5b9050919050565b5f6103f6610b60565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fb8ce7b2200000000000000000000000000000000000000000000000000000000905090565b61046d610b6a565b8181905084849050146104ac576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610567578282828181106104cc576104cb611a0a565b5b90506020020160208101906104e19190611a61565b5f808787858181106104f6576104f5611a0a565b5b905060200201602081019061050b919061159d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b5050505050565b5f610577610ba1565b905080546003825580156105a95760018160011c14303b106105a05763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906105bb9190611b87565b915091506105e2825f815181106105d5576105d4611a0a565b5b6020026020010151610bca565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f5b82518110156106a85760015f8085848151811061064457610643611a0a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610624565b50505080156106e0576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83838101906107b59190611c6e565b90505f815f01518060200190518101906107cf9190611dc8565b90505f6107e68983604001518986602001516109fe565b905087826040015160ff1611610839578160400151886040517f17c66bc7000000000000000000000000000000000000000000000000000000008152600401610830929190611e1e565b60405180910390fd5b5f80835f015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166108bb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108d181896001610ca09092919063ffffffff16565b610903818360200151845f015173ffffffffffffffffffffffffffffffffffffffff16610d029092919063ffffffff16565b935050505095945050505050565b610919610b6a565b6109225f610e05565b565b5f602052805f5260405f205f915054906101000a900460ff1681565b5f6060805f805f60607f0f000000000000000000000000000000000000000000000000000000000000009650610974610ecb565b809650819750505046935030925090919293949596565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b6109bb610b6a565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f610a5d7ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f8686868680519060200120604051602001610a42959493929190611e45565b60405160208183030381529060405280519060200120610f42565b9050949350505050565b610a6f610b6a565b63389a75e1600c52805f526020600c208054421115610a9557636f5e88185f526004601cfd5b5f815550610aa281610e05565b50565b610aad610b6a565b8060601b610ac257637448fbae5f526004601cfd5b610acb81610e05565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5912b89c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b595750610b5882610fbe565b5b9050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610b9f576382b429005f526004601cfd5b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd2611037565b15610c4a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0c57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f633f57fc5c60e01b90505f634de1225a60e01b90506007831115610ccb57815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001188015610cf557835f528560045260245ffd5b8183555050505050505050565b5f8360601b60601c93508315610dfe57604051835f5260208301516040526040835103610d6f576040830151601b8160ff1c016020528060011b60011c6060526020600160805f60015afa805187183d1517610d6c57600193505f60605282604052505050610dfe565b50505b6041835103610db55760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610db357600192505f606052816040525050610dfe565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa5060208260443d01868b5afa83835114169450505050505b9392505050565b610e0d611037565b15610e72577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610ec8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f610f4b61103b565b15610f5f57610f58611043565b9050610f9b565b7f00000000000000000000000000000000000000000000000000000000000000009050610f8a61110b565b15610f9a57610f97611043565b90505b5b6719010000000000005f5280601a5281603a52604260182090505f603a52919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611030575061102f82611163565b5b9050919050565b5f90565b5f6001905090565b5f8061104d61103b565b1561107b575f8061105c610ecb565b91509150818051906020012093508080519060200120925050506110c2565b7f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090505b6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815282602082015281604082015246606082015230608082015260a081209250505090565b5f807f000000000000000000000000000000000000000000000000000000000000000090505f7f0000000000000000000000000000000000000000000000000000000000000000905080301482461416159250505090565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611211816111dd565b811461121b575f80fd5b50565b5f8135905061122c81611208565b92915050565b5f60208284031215611247576112466111d5565b5b5f6112548482850161121e565b91505092915050565b5f8115159050919050565b6112718161125d565b82525050565b5f60208201905061128a5f830184611268565b92915050565b611299816111dd565b82525050565b5f6020820190506112b25f830184611290565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d9576112d86112b8565b5b8235905067ffffffffffffffff8111156112f6576112f56112bc565b5b602083019150836020820283011115611312576113116112c0565b5b9250929050565b5f8083601f84011261132e5761132d6112b8565b5b8235905067ffffffffffffffff81111561134b5761134a6112bc565b5b602083019150836020820283011115611367576113666112c0565b5b9250929050565b5f805f8060408587031215611386576113856111d5565b5b5f85013567ffffffffffffffff8111156113a3576113a26111d9565b5b6113af878288016112c4565b9450945050602085013567ffffffffffffffff8111156113d2576113d16111d9565b5b6113de87828801611319565b925092505092959194509250565b5f8083601f840112611401576114006112b8565b5b8235905067ffffffffffffffff81111561141e5761141d6112bc565b5b60208301915083600182028301111561143a576114396112c0565b5b9250929050565b5f8060208385031215611457576114566111d5565b5b5f83013567ffffffffffffffff811115611474576114736111d9565b5b611480858286016113ec565b92509250509250929050565b5f819050919050565b61149e8161148c565b81146114a8575f80fd5b50565b5f813590506114b981611495565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114e8826114bf565b9050919050565b6114f8816114de565b8114611502575f80fd5b50565b5f81359050611513816114ef565b92915050565b5f805f805f60808688031215611532576115316111d5565b5b5f61153f888289016114ab565b9550506020611550888289016114ab565b945050604061156188828901611505565b935050606086013567ffffffffffffffff811115611582576115816111d9565b5b61158e888289016113ec565b92509250509295509295909350565b5f602082840312156115b2576115b16111d5565b5b5f6115bf84828501611505565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6115fc816115c8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61164482611602565b61164e818561160c565b935061165e81856020860161161c565b6116678161162a565b840191505092915050565b61167b8161148c565b82525050565b61168a816114de565b82525050565b5f819050919050565b6116a281611690565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116da8161148c565b82525050565b5f6116eb83836116d1565b60208301905092915050565b5f602082019050919050565b5f61170d826116a8565b61171781856116b2565b9350611722836116c2565b805f5b8381101561175257815161173988826116e0565b9750611744836116f7565b925050600181019050611725565b5085935050505092915050565b5f60e0820190506117725f83018a6115f3565b8181036020830152611784818961163a565b90508181036040830152611798818861163a565b90506117a76060830187611672565b6117b46080830186611681565b6117c160a0830185611699565b81810360c08301526117d38184611703565b905098975050505050505050565b5f6020820190506117f45f830184611681565b92915050565b5f60ff82169050919050565b61180f816117fa565b8114611819575f80fd5b50565b5f8135905061182a81611806565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61186a8261162a565b810181811067ffffffffffffffff8211171561188957611888611834565b5b80604052505050565b5f61189b6111cc565b90506118a78282611861565b919050565b5f67ffffffffffffffff8211156118c6576118c5611834565b5b6118cf8261162a565b9050602081019050919050565b828183375f83830152505050565b5f6118fc6118f7846118ac565b611892565b90508281526020810184848401111561191857611917611830565b5b6119238482856118dc565b509392505050565b5f82601f83011261193f5761193e6112b8565b5b813561194f8482602086016118ea565b91505092915050565b5f805f80608085870312156119705761196f6111d5565b5b5f61197d878288016114ab565b945050602061198e8782880161181c565b935050604061199f87828801611505565b925050606085013567ffffffffffffffff8111156119c0576119bf6111d9565b5b6119cc8782880161192b565b91505092959194509250565b5f6020820190506119eb5f830184611699565b92915050565b5f602082019050611a045f830184611672565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b611a408161125d565b8114611a4a575f80fd5b50565b5f81359050611a5b81611a37565b92915050565b5f60208284031215611a7657611a756111d5565b5b5f611a8384828501611a4d565b91505092915050565b5f67ffffffffffffffff821115611aa657611aa5611834565b5b602082029050602081019050919050565b5f611ac9611ac484611a8c565b611892565b90508083825260208201905060208402830185811115611aec57611aeb6112c0565b5b835b81811015611b155780611b018882611505565b845260208401935050602081019050611aee565b5050509392505050565b5f82601f830112611b3357611b326112b8565b5b8135611b43848260208601611ab7565b91505092915050565b5f611b56826114bf565b9050919050565b611b6681611b4c565b8114611b70575f80fd5b50565b5f81359050611b8181611b5d565b92915050565b5f8060408385031215611b9d57611b9c6111d5565b5b5f83013567ffffffffffffffff811115611bba57611bb96111d9565b5b611bc685828601611b1f565b9250506020611bd785828601611b73565b9150509250929050565b5f80fd5b5f80fd5b5f60408284031215611bfe57611bfd611be1565b5b611c086040611892565b90505f82013567ffffffffffffffff811115611c2757611c26611be5565b5b611c338482850161192b565b5f83015250602082013567ffffffffffffffff811115611c5657611c55611be5565b5b611c628482850161192b565b60208301525092915050565b5f60208284031215611c8357611c826111d5565b5b5f82013567ffffffffffffffff811115611ca057611c9f6111d9565b5b611cac84828501611be9565b91505092915050565b5f81519050611cc3816114ef565b92915050565b5f611cdb611cd6846118ac565b611892565b905082815260208101848484011115611cf757611cf6611830565b5b611d0284828561161c565b509392505050565b5f82601f830112611d1e57611d1d6112b8565b5b8151611d2e848260208601611cc9565b91505092915050565b5f81519050611d4581611806565b92915050565b5f60608284031215611d6057611d5f611be1565b5b611d6a6060611892565b90505f611d7984828501611cb5565b5f83015250602082015167ffffffffffffffff811115611d9c57611d9b611be5565b5b611da884828501611d0a565b6020830152506040611dbc84828501611d37565b60408301525092915050565b5f60208284031215611ddd57611ddc6111d5565b5b5f82015167ffffffffffffffff811115611dfa57611df96111d9565b5b611e0684828501611d4b565b91505092915050565b611e18816117fa565b82525050565b5f604082019050611e315f830185611e0f565b611e3e6020830184611672565b9392505050565b5f60a082019050611e585f830188611699565b611e656020830187611672565b611e726040830186611e0f565b611e7f6060830185611681565b611e8c6080830184611699565b969550505050505056fea26469706673582212205fce26f05c322d5e151f6b16e70e28b485c147f70dd352b6a7a116eaca9f369f64736f6c634300081a0033", e = class e extends A {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments), this.abi = t;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The set of authorized signers
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
* @async
|
|
13
|
+
* @param {Address} address
|
|
14
|
+
* @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]
|
|
15
|
+
* @returns {unknown}
|
|
16
|
+
*/
|
|
17
|
+
async signers(f, b) {
|
|
18
|
+
return i(this._config, {
|
|
19
|
+
address: this.assertValidAddress(),
|
|
20
|
+
args: [f],
|
|
21
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
22
|
+
...b
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve the hash and signer data for a given hash
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
* @async
|
|
30
|
+
* @param {SignerValidatorSignaturePayload} payload
|
|
31
|
+
* @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]
|
|
32
|
+
* @returns {unknown}
|
|
33
|
+
*/
|
|
34
|
+
async hashSignerData(f, b) {
|
|
35
|
+
return r(this._config, {
|
|
36
|
+
address: this.assertValidAddress(),
|
|
37
|
+
args: [
|
|
38
|
+
f.boostId,
|
|
39
|
+
f.incentiveQuantity,
|
|
40
|
+
f.claimant,
|
|
41
|
+
f.incentiveData
|
|
42
|
+
],
|
|
43
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
44
|
+
...b
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
* @async
|
|
52
|
+
* @param {SignerValidatorValidatePayload} payload
|
|
53
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
|
|
54
|
+
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
55
|
+
*/
|
|
56
|
+
async validate(f, b) {
|
|
57
|
+
return this.awaitResult(this.validateRaw(f, b));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
* @async
|
|
64
|
+
* @param {SignerValidatorValidatePayload} payload
|
|
65
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
|
|
66
|
+
* @returns {Promise<boolean>} - True if the action has been validated based on the data payload
|
|
67
|
+
*/
|
|
68
|
+
async validateRaw(f, b) {
|
|
69
|
+
const { request: a, result: c } = await n(
|
|
70
|
+
this._config,
|
|
71
|
+
{
|
|
72
|
+
address: this.assertValidAddress(),
|
|
73
|
+
args: [
|
|
74
|
+
f.boostId,
|
|
75
|
+
f.incentiveId,
|
|
76
|
+
f.claimant,
|
|
77
|
+
f.claimData
|
|
78
|
+
],
|
|
79
|
+
...this.optionallyAttachAccount(),
|
|
80
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
81
|
+
...b
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
return { hash: await o(this._config, a), result: c };
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Set the authorized status of a signer
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
* @async
|
|
91
|
+
* @param {Address[]} addresses - The list of signers to update
|
|
92
|
+
* @param {boolean[]} allowed - The authorized status of each signer
|
|
93
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
|
|
94
|
+
* @returns {unknown}
|
|
95
|
+
*/
|
|
96
|
+
async setAuthorized(f, b, a) {
|
|
97
|
+
return this.awaitResult(this.setAuthorizedRaw(f, b, a));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Set the authorized status of a signer
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
* @async
|
|
104
|
+
* @param {Address[]} addresses - The list of signers to update
|
|
105
|
+
* @param {boolean[]} allowed - The authorized status of each signer
|
|
106
|
+
* @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
|
|
107
|
+
* @returns {unknown}
|
|
108
|
+
*/
|
|
109
|
+
async setAuthorizedRaw(f, b, a) {
|
|
110
|
+
const { request: c, result: d } = await h(
|
|
111
|
+
this._config,
|
|
112
|
+
{
|
|
113
|
+
address: this.assertValidAddress(),
|
|
114
|
+
args: [f, b],
|
|
115
|
+
...this.optionallyAttachAccount(),
|
|
116
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
117
|
+
...a
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
return { hash: await l(this._config, c), result: d };
|
|
121
|
+
}
|
|
122
|
+
async setValidatorCallerRaw(f, b) {
|
|
123
|
+
const { request: a, result: c } = await u(
|
|
124
|
+
this._config,
|
|
125
|
+
{
|
|
126
|
+
address: this.assertValidAddress(),
|
|
127
|
+
args: [f],
|
|
128
|
+
...this.optionallyAttachAccount(),
|
|
129
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
130
|
+
...b
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
return { hash: await g(
|
|
134
|
+
this._config,
|
|
135
|
+
a
|
|
136
|
+
), result: c };
|
|
137
|
+
}
|
|
138
|
+
async setValidatorCaller(f, b) {
|
|
139
|
+
return this.awaitResult(this.setValidatorCallerRaw(f, b));
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @inheritdoc
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
* @param {?SignerValidatorPayload} [_payload]
|
|
146
|
+
* @param {?DeployableOptions} [_options]
|
|
147
|
+
* @returns {GenericDeployableParams}
|
|
148
|
+
*/
|
|
149
|
+
buildParameters(f, b) {
|
|
150
|
+
const [a, c] = this.validateDeploymentConfig(
|
|
151
|
+
f,
|
|
152
|
+
b
|
|
153
|
+
);
|
|
154
|
+
return {
|
|
155
|
+
abi: t,
|
|
156
|
+
bytecode: m,
|
|
157
|
+
args: [y(a)],
|
|
158
|
+
...this.optionallyAttachAccount(c.account)
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
e.base = "0x749c6fDd62727E11e3200571de7CfBb61DFbA93b", e.registryType = w.VALIDATOR;
|
|
163
|
+
let s = e;
|
|
164
|
+
export {
|
|
165
|
+
s as SignerValidator,
|
|
166
|
+
t as signerValidatorAbi
|
|
167
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-BaaleHW-.cjs"),c=require("@wagmi/core"),d=require("../errors.cjs"),a=require("./SignerValidator.cjs"),e={"0xb8ce7b22":a.SignerValidator};async function s(r,t){const n=await c.readContract(r.config,{abi:i.re,functionName:"getComponentInterface",address:t}),o=e[n];if(!o)throw new d.InvalidComponentInterfaceError(Object.keys(e),n);return new o(r,t)}exports.SignerValidator=a.SignerValidator;exports.ValidatorByComponentInterface=e;exports.validatorFromAddress=s;
|