@gitmyabi-stg/ens--resolver-contracts 0.0.1
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/README.md +108 -0
- package/contracts/PublicResolver_json.d.ts +1627 -0
- package/contracts/PublicResolver_json.js +1777 -0
- package/contracts/PublicResolver_json.ts +2145 -0
- package/contracts/UniversalResolver_json.d.ts +794 -0
- package/contracts/UniversalResolver_json.js +1005 -0
- package/contracts/UniversalResolver_json.ts +1081 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* CCIPBatcher.Batch struct type
|
|
4
|
+
*/
|
|
5
|
+
export type CCIPBatcher_Batch = {
|
|
6
|
+
lookups: CCIPBatcher_Lookup[];
|
|
7
|
+
gateways: string[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* CCIPBatcher.Lookup struct type
|
|
11
|
+
*/
|
|
12
|
+
export type CCIPBatcher_Lookup = {
|
|
13
|
+
target: `0x${string}`;
|
|
14
|
+
call: `0x${string}`;
|
|
15
|
+
data: `0x${string}`;
|
|
16
|
+
flags: bigint;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* AbstractUniversalResolver.ResolverInfo struct type
|
|
20
|
+
*/
|
|
21
|
+
export type AbstractUniversalResolver_ResolverInfo = {
|
|
22
|
+
name: `0x${string}`;
|
|
23
|
+
offset: bigint;
|
|
24
|
+
node: `0x${string}`;
|
|
25
|
+
resolver: `0x${string}`;
|
|
26
|
+
extended: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* UniversalResolver_json ABI
|
|
30
|
+
*
|
|
31
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
32
|
+
*/
|
|
33
|
+
export declare const UniversalResolver_jsonAbi: readonly [{
|
|
34
|
+
readonly inputs: readonly [{
|
|
35
|
+
readonly internalType: "address";
|
|
36
|
+
readonly name: "owner";
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
}, {
|
|
39
|
+
readonly internalType: "contract ENS";
|
|
40
|
+
readonly name: "ens";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
}, {
|
|
43
|
+
readonly internalType: "contract IGatewayProvider";
|
|
44
|
+
readonly name: "batchGatewayProvider";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}];
|
|
47
|
+
readonly stateMutability: "nonpayable";
|
|
48
|
+
readonly type: "constructor";
|
|
49
|
+
}, {
|
|
50
|
+
readonly inputs: readonly [{
|
|
51
|
+
readonly internalType: "bytes";
|
|
52
|
+
readonly name: "dns";
|
|
53
|
+
readonly type: "bytes";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "DNSDecodingFailed";
|
|
56
|
+
readonly type: "error";
|
|
57
|
+
}, {
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly internalType: "string";
|
|
60
|
+
readonly name: "ens";
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
}];
|
|
63
|
+
readonly name: "DNSEncodingFailed";
|
|
64
|
+
readonly type: "error";
|
|
65
|
+
}, {
|
|
66
|
+
readonly inputs: readonly [];
|
|
67
|
+
readonly name: "EmptyAddress";
|
|
68
|
+
readonly type: "error";
|
|
69
|
+
}, {
|
|
70
|
+
readonly inputs: readonly [{
|
|
71
|
+
readonly internalType: "uint16";
|
|
72
|
+
readonly name: "status";
|
|
73
|
+
readonly type: "uint16";
|
|
74
|
+
}, {
|
|
75
|
+
readonly internalType: "string";
|
|
76
|
+
readonly name: "message";
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
}];
|
|
79
|
+
readonly name: "HttpError";
|
|
80
|
+
readonly type: "error";
|
|
81
|
+
}, {
|
|
82
|
+
readonly inputs: readonly [];
|
|
83
|
+
readonly name: "InvalidBatchGatewayResponse";
|
|
84
|
+
readonly type: "error";
|
|
85
|
+
}, {
|
|
86
|
+
readonly inputs: readonly [{
|
|
87
|
+
readonly internalType: "address";
|
|
88
|
+
readonly name: "sender";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly internalType: "string[]";
|
|
92
|
+
readonly name: "urls";
|
|
93
|
+
readonly type: "string[]";
|
|
94
|
+
}, {
|
|
95
|
+
readonly internalType: "bytes";
|
|
96
|
+
readonly name: "callData";
|
|
97
|
+
readonly type: "bytes";
|
|
98
|
+
}, {
|
|
99
|
+
readonly internalType: "bytes4";
|
|
100
|
+
readonly name: "callbackFunction";
|
|
101
|
+
readonly type: "bytes4";
|
|
102
|
+
}, {
|
|
103
|
+
readonly internalType: "bytes";
|
|
104
|
+
readonly name: "extraData";
|
|
105
|
+
readonly type: "bytes";
|
|
106
|
+
}];
|
|
107
|
+
readonly name: "OffchainLookup";
|
|
108
|
+
readonly type: "error";
|
|
109
|
+
}, {
|
|
110
|
+
readonly inputs: readonly [{
|
|
111
|
+
readonly internalType: "uint256";
|
|
112
|
+
readonly name: "offset";
|
|
113
|
+
readonly type: "uint256";
|
|
114
|
+
}, {
|
|
115
|
+
readonly internalType: "uint256";
|
|
116
|
+
readonly name: "length";
|
|
117
|
+
readonly type: "uint256";
|
|
118
|
+
}];
|
|
119
|
+
readonly name: "OffsetOutOfBoundsError";
|
|
120
|
+
readonly type: "error";
|
|
121
|
+
}, {
|
|
122
|
+
readonly inputs: readonly [{
|
|
123
|
+
readonly internalType: "bytes";
|
|
124
|
+
readonly name: "errorData";
|
|
125
|
+
readonly type: "bytes";
|
|
126
|
+
}];
|
|
127
|
+
readonly name: "ResolverError";
|
|
128
|
+
readonly type: "error";
|
|
129
|
+
}, {
|
|
130
|
+
readonly inputs: readonly [{
|
|
131
|
+
readonly internalType: "bytes";
|
|
132
|
+
readonly name: "name";
|
|
133
|
+
readonly type: "bytes";
|
|
134
|
+
}, {
|
|
135
|
+
readonly internalType: "address";
|
|
136
|
+
readonly name: "resolver";
|
|
137
|
+
readonly type: "address";
|
|
138
|
+
}];
|
|
139
|
+
readonly name: "ResolverNotContract";
|
|
140
|
+
readonly type: "error";
|
|
141
|
+
}, {
|
|
142
|
+
readonly inputs: readonly [{
|
|
143
|
+
readonly internalType: "bytes";
|
|
144
|
+
readonly name: "name";
|
|
145
|
+
readonly type: "bytes";
|
|
146
|
+
}];
|
|
147
|
+
readonly name: "ResolverNotFound";
|
|
148
|
+
readonly type: "error";
|
|
149
|
+
}, {
|
|
150
|
+
readonly inputs: readonly [{
|
|
151
|
+
readonly internalType: "string";
|
|
152
|
+
readonly name: "primary";
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
}, {
|
|
155
|
+
readonly internalType: "bytes";
|
|
156
|
+
readonly name: "primaryAddress";
|
|
157
|
+
readonly type: "bytes";
|
|
158
|
+
}];
|
|
159
|
+
readonly name: "ReverseAddressMismatch";
|
|
160
|
+
readonly type: "error";
|
|
161
|
+
}, {
|
|
162
|
+
readonly inputs: readonly [{
|
|
163
|
+
readonly internalType: "bytes4";
|
|
164
|
+
readonly name: "selector";
|
|
165
|
+
readonly type: "bytes4";
|
|
166
|
+
}];
|
|
167
|
+
readonly name: "UnsupportedResolverProfile";
|
|
168
|
+
readonly type: "error";
|
|
169
|
+
}, {
|
|
170
|
+
readonly inputs: readonly [];
|
|
171
|
+
readonly name: "batchGatewayProvider";
|
|
172
|
+
readonly outputs: readonly [{
|
|
173
|
+
readonly internalType: "contract IGatewayProvider";
|
|
174
|
+
readonly name: "";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
}];
|
|
177
|
+
readonly stateMutability: "view";
|
|
178
|
+
readonly type: "function";
|
|
179
|
+
}, {
|
|
180
|
+
readonly inputs: readonly [{
|
|
181
|
+
readonly components: readonly [{
|
|
182
|
+
readonly components: readonly [{
|
|
183
|
+
readonly internalType: "address";
|
|
184
|
+
readonly name: "target";
|
|
185
|
+
readonly type: "address";
|
|
186
|
+
}, {
|
|
187
|
+
readonly internalType: "bytes";
|
|
188
|
+
readonly name: "call";
|
|
189
|
+
readonly type: "bytes";
|
|
190
|
+
}, {
|
|
191
|
+
readonly internalType: "bytes";
|
|
192
|
+
readonly name: "data";
|
|
193
|
+
readonly type: "bytes";
|
|
194
|
+
}, {
|
|
195
|
+
readonly internalType: "uint256";
|
|
196
|
+
readonly name: "flags";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
}];
|
|
199
|
+
readonly internalType: "struct CCIPBatcher.Lookup[]";
|
|
200
|
+
readonly name: "lookups";
|
|
201
|
+
readonly type: "tuple[]";
|
|
202
|
+
}, {
|
|
203
|
+
readonly internalType: "string[]";
|
|
204
|
+
readonly name: "gateways";
|
|
205
|
+
readonly type: "string[]";
|
|
206
|
+
}];
|
|
207
|
+
readonly internalType: "struct CCIPBatcher.Batch";
|
|
208
|
+
readonly name: "batch";
|
|
209
|
+
readonly type: "tuple";
|
|
210
|
+
}];
|
|
211
|
+
readonly name: "ccipBatch";
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly components: readonly [{
|
|
214
|
+
readonly components: readonly [{
|
|
215
|
+
readonly internalType: "address";
|
|
216
|
+
readonly name: "target";
|
|
217
|
+
readonly type: "address";
|
|
218
|
+
}, {
|
|
219
|
+
readonly internalType: "bytes";
|
|
220
|
+
readonly name: "call";
|
|
221
|
+
readonly type: "bytes";
|
|
222
|
+
}, {
|
|
223
|
+
readonly internalType: "bytes";
|
|
224
|
+
readonly name: "data";
|
|
225
|
+
readonly type: "bytes";
|
|
226
|
+
}, {
|
|
227
|
+
readonly internalType: "uint256";
|
|
228
|
+
readonly name: "flags";
|
|
229
|
+
readonly type: "uint256";
|
|
230
|
+
}];
|
|
231
|
+
readonly internalType: "struct CCIPBatcher.Lookup[]";
|
|
232
|
+
readonly name: "lookups";
|
|
233
|
+
readonly type: "tuple[]";
|
|
234
|
+
}, {
|
|
235
|
+
readonly internalType: "string[]";
|
|
236
|
+
readonly name: "gateways";
|
|
237
|
+
readonly type: "string[]";
|
|
238
|
+
}];
|
|
239
|
+
readonly internalType: "struct CCIPBatcher.Batch";
|
|
240
|
+
readonly name: "";
|
|
241
|
+
readonly type: "tuple";
|
|
242
|
+
}];
|
|
243
|
+
readonly stateMutability: "view";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly internalType: "bytes";
|
|
248
|
+
readonly name: "response";
|
|
249
|
+
readonly type: "bytes";
|
|
250
|
+
}, {
|
|
251
|
+
readonly internalType: "bytes";
|
|
252
|
+
readonly name: "extraData";
|
|
253
|
+
readonly type: "bytes";
|
|
254
|
+
}];
|
|
255
|
+
readonly name: "ccipBatchCallback";
|
|
256
|
+
readonly outputs: readonly [{
|
|
257
|
+
readonly components: readonly [{
|
|
258
|
+
readonly components: readonly [{
|
|
259
|
+
readonly internalType: "address";
|
|
260
|
+
readonly name: "target";
|
|
261
|
+
readonly type: "address";
|
|
262
|
+
}, {
|
|
263
|
+
readonly internalType: "bytes";
|
|
264
|
+
readonly name: "call";
|
|
265
|
+
readonly type: "bytes";
|
|
266
|
+
}, {
|
|
267
|
+
readonly internalType: "bytes";
|
|
268
|
+
readonly name: "data";
|
|
269
|
+
readonly type: "bytes";
|
|
270
|
+
}, {
|
|
271
|
+
readonly internalType: "uint256";
|
|
272
|
+
readonly name: "flags";
|
|
273
|
+
readonly type: "uint256";
|
|
274
|
+
}];
|
|
275
|
+
readonly internalType: "struct CCIPBatcher.Lookup[]";
|
|
276
|
+
readonly name: "lookups";
|
|
277
|
+
readonly type: "tuple[]";
|
|
278
|
+
}, {
|
|
279
|
+
readonly internalType: "string[]";
|
|
280
|
+
readonly name: "gateways";
|
|
281
|
+
readonly type: "string[]";
|
|
282
|
+
}];
|
|
283
|
+
readonly internalType: "struct CCIPBatcher.Batch";
|
|
284
|
+
readonly name: "batch";
|
|
285
|
+
readonly type: "tuple";
|
|
286
|
+
}];
|
|
287
|
+
readonly stateMutability: "view";
|
|
288
|
+
readonly type: "function";
|
|
289
|
+
}, {
|
|
290
|
+
readonly inputs: readonly [{
|
|
291
|
+
readonly internalType: "bytes";
|
|
292
|
+
readonly name: "response";
|
|
293
|
+
readonly type: "bytes";
|
|
294
|
+
}, {
|
|
295
|
+
readonly internalType: "bytes";
|
|
296
|
+
readonly name: "extraData";
|
|
297
|
+
readonly type: "bytes";
|
|
298
|
+
}];
|
|
299
|
+
readonly name: "ccipReadCallback";
|
|
300
|
+
readonly outputs: readonly [];
|
|
301
|
+
readonly stateMutability: "view";
|
|
302
|
+
readonly type: "function";
|
|
303
|
+
}, {
|
|
304
|
+
readonly inputs: readonly [{
|
|
305
|
+
readonly internalType: "bytes";
|
|
306
|
+
readonly name: "name";
|
|
307
|
+
readonly type: "bytes";
|
|
308
|
+
}];
|
|
309
|
+
readonly name: "findResolver";
|
|
310
|
+
readonly outputs: readonly [{
|
|
311
|
+
readonly internalType: "address";
|
|
312
|
+
readonly name: "";
|
|
313
|
+
readonly type: "address";
|
|
314
|
+
}, {
|
|
315
|
+
readonly internalType: "bytes32";
|
|
316
|
+
readonly name: "";
|
|
317
|
+
readonly type: "bytes32";
|
|
318
|
+
}, {
|
|
319
|
+
readonly internalType: "uint256";
|
|
320
|
+
readonly name: "";
|
|
321
|
+
readonly type: "uint256";
|
|
322
|
+
}];
|
|
323
|
+
readonly stateMutability: "view";
|
|
324
|
+
readonly type: "function";
|
|
325
|
+
}, {
|
|
326
|
+
readonly inputs: readonly [];
|
|
327
|
+
readonly name: "registry";
|
|
328
|
+
readonly outputs: readonly [{
|
|
329
|
+
readonly internalType: "contract ENS";
|
|
330
|
+
readonly name: "";
|
|
331
|
+
readonly type: "address";
|
|
332
|
+
}];
|
|
333
|
+
readonly stateMutability: "view";
|
|
334
|
+
readonly type: "function";
|
|
335
|
+
}, {
|
|
336
|
+
readonly inputs: readonly [{
|
|
337
|
+
readonly internalType: "bytes";
|
|
338
|
+
readonly name: "name";
|
|
339
|
+
readonly type: "bytes";
|
|
340
|
+
}];
|
|
341
|
+
readonly name: "requireResolver";
|
|
342
|
+
readonly outputs: readonly [{
|
|
343
|
+
readonly components: readonly [{
|
|
344
|
+
readonly internalType: "bytes";
|
|
345
|
+
readonly name: "name";
|
|
346
|
+
readonly type: "bytes";
|
|
347
|
+
}, {
|
|
348
|
+
readonly internalType: "uint256";
|
|
349
|
+
readonly name: "offset";
|
|
350
|
+
readonly type: "uint256";
|
|
351
|
+
}, {
|
|
352
|
+
readonly internalType: "bytes32";
|
|
353
|
+
readonly name: "node";
|
|
354
|
+
readonly type: "bytes32";
|
|
355
|
+
}, {
|
|
356
|
+
readonly internalType: "address";
|
|
357
|
+
readonly name: "resolver";
|
|
358
|
+
readonly type: "address";
|
|
359
|
+
}, {
|
|
360
|
+
readonly internalType: "bool";
|
|
361
|
+
readonly name: "extended";
|
|
362
|
+
readonly type: "bool";
|
|
363
|
+
}];
|
|
364
|
+
readonly internalType: "struct AbstractUniversalResolver.ResolverInfo";
|
|
365
|
+
readonly name: "info";
|
|
366
|
+
readonly type: "tuple";
|
|
367
|
+
}];
|
|
368
|
+
readonly stateMutability: "view";
|
|
369
|
+
readonly type: "function";
|
|
370
|
+
}, {
|
|
371
|
+
readonly inputs: readonly [{
|
|
372
|
+
readonly internalType: "bytes";
|
|
373
|
+
readonly name: "name";
|
|
374
|
+
readonly type: "bytes";
|
|
375
|
+
}, {
|
|
376
|
+
readonly internalType: "bytes";
|
|
377
|
+
readonly name: "data";
|
|
378
|
+
readonly type: "bytes";
|
|
379
|
+
}];
|
|
380
|
+
readonly name: "resolve";
|
|
381
|
+
readonly outputs: readonly [{
|
|
382
|
+
readonly internalType: "bytes";
|
|
383
|
+
readonly name: "";
|
|
384
|
+
readonly type: "bytes";
|
|
385
|
+
}, {
|
|
386
|
+
readonly internalType: "address";
|
|
387
|
+
readonly name: "";
|
|
388
|
+
readonly type: "address";
|
|
389
|
+
}];
|
|
390
|
+
readonly stateMutability: "view";
|
|
391
|
+
readonly type: "function";
|
|
392
|
+
}, {
|
|
393
|
+
readonly inputs: readonly [{
|
|
394
|
+
readonly internalType: "bytes";
|
|
395
|
+
readonly name: "response";
|
|
396
|
+
readonly type: "bytes";
|
|
397
|
+
}, {
|
|
398
|
+
readonly internalType: "bytes";
|
|
399
|
+
readonly name: "extraData";
|
|
400
|
+
readonly type: "bytes";
|
|
401
|
+
}];
|
|
402
|
+
readonly name: "resolveBatchCallback";
|
|
403
|
+
readonly outputs: readonly [];
|
|
404
|
+
readonly stateMutability: "view";
|
|
405
|
+
readonly type: "function";
|
|
406
|
+
}, {
|
|
407
|
+
readonly inputs: readonly [{
|
|
408
|
+
readonly internalType: "bytes";
|
|
409
|
+
readonly name: "response";
|
|
410
|
+
readonly type: "bytes";
|
|
411
|
+
}, {
|
|
412
|
+
readonly internalType: "bytes";
|
|
413
|
+
readonly name: "extraData";
|
|
414
|
+
readonly type: "bytes";
|
|
415
|
+
}];
|
|
416
|
+
readonly name: "resolveCallback";
|
|
417
|
+
readonly outputs: readonly [{
|
|
418
|
+
readonly internalType: "bytes";
|
|
419
|
+
readonly name: "";
|
|
420
|
+
readonly type: "bytes";
|
|
421
|
+
}, {
|
|
422
|
+
readonly internalType: "address";
|
|
423
|
+
readonly name: "";
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
}];
|
|
426
|
+
readonly stateMutability: "pure";
|
|
427
|
+
readonly type: "function";
|
|
428
|
+
}, {
|
|
429
|
+
readonly inputs: readonly [{
|
|
430
|
+
readonly internalType: "bytes";
|
|
431
|
+
readonly name: "response";
|
|
432
|
+
readonly type: "bytes";
|
|
433
|
+
}, {
|
|
434
|
+
readonly internalType: "bytes";
|
|
435
|
+
readonly name: "extraData";
|
|
436
|
+
readonly type: "bytes";
|
|
437
|
+
}];
|
|
438
|
+
readonly name: "resolveDirectCallback";
|
|
439
|
+
readonly outputs: readonly [];
|
|
440
|
+
readonly stateMutability: "view";
|
|
441
|
+
readonly type: "function";
|
|
442
|
+
}, {
|
|
443
|
+
readonly inputs: readonly [{
|
|
444
|
+
readonly internalType: "bytes";
|
|
445
|
+
readonly name: "response";
|
|
446
|
+
readonly type: "bytes";
|
|
447
|
+
}, {
|
|
448
|
+
readonly internalType: "bytes";
|
|
449
|
+
readonly name: "";
|
|
450
|
+
readonly type: "bytes";
|
|
451
|
+
}];
|
|
452
|
+
readonly name: "resolveDirectCallbackError";
|
|
453
|
+
readonly outputs: readonly [];
|
|
454
|
+
readonly stateMutability: "pure";
|
|
455
|
+
readonly type: "function";
|
|
456
|
+
}, {
|
|
457
|
+
readonly inputs: readonly [{
|
|
458
|
+
readonly internalType: "bytes";
|
|
459
|
+
readonly name: "name";
|
|
460
|
+
readonly type: "bytes";
|
|
461
|
+
}, {
|
|
462
|
+
readonly internalType: "bytes";
|
|
463
|
+
readonly name: "data";
|
|
464
|
+
readonly type: "bytes";
|
|
465
|
+
}, {
|
|
466
|
+
readonly internalType: "string[]";
|
|
467
|
+
readonly name: "gateways";
|
|
468
|
+
readonly type: "string[]";
|
|
469
|
+
}];
|
|
470
|
+
readonly name: "resolveWithGateways";
|
|
471
|
+
readonly outputs: readonly [{
|
|
472
|
+
readonly internalType: "bytes";
|
|
473
|
+
readonly name: "result";
|
|
474
|
+
readonly type: "bytes";
|
|
475
|
+
}, {
|
|
476
|
+
readonly internalType: "address";
|
|
477
|
+
readonly name: "resolver";
|
|
478
|
+
readonly type: "address";
|
|
479
|
+
}];
|
|
480
|
+
readonly stateMutability: "view";
|
|
481
|
+
readonly type: "function";
|
|
482
|
+
}, {
|
|
483
|
+
readonly inputs: readonly [{
|
|
484
|
+
readonly internalType: "address";
|
|
485
|
+
readonly name: "resolver";
|
|
486
|
+
readonly type: "address";
|
|
487
|
+
}, {
|
|
488
|
+
readonly internalType: "bytes";
|
|
489
|
+
readonly name: "name";
|
|
490
|
+
readonly type: "bytes";
|
|
491
|
+
}, {
|
|
492
|
+
readonly internalType: "bytes";
|
|
493
|
+
readonly name: "data";
|
|
494
|
+
readonly type: "bytes";
|
|
495
|
+
}, {
|
|
496
|
+
readonly internalType: "string[]";
|
|
497
|
+
readonly name: "gateways";
|
|
498
|
+
readonly type: "string[]";
|
|
499
|
+
}];
|
|
500
|
+
readonly name: "resolveWithResolver";
|
|
501
|
+
readonly outputs: readonly [{
|
|
502
|
+
readonly internalType: "bytes";
|
|
503
|
+
readonly name: "";
|
|
504
|
+
readonly type: "bytes";
|
|
505
|
+
}];
|
|
506
|
+
readonly stateMutability: "view";
|
|
507
|
+
readonly type: "function";
|
|
508
|
+
}, {
|
|
509
|
+
readonly inputs: readonly [{
|
|
510
|
+
readonly internalType: "bytes";
|
|
511
|
+
readonly name: "lookupAddress";
|
|
512
|
+
readonly type: "bytes";
|
|
513
|
+
}, {
|
|
514
|
+
readonly internalType: "uint256";
|
|
515
|
+
readonly name: "coinType";
|
|
516
|
+
readonly type: "uint256";
|
|
517
|
+
}];
|
|
518
|
+
readonly name: "reverse";
|
|
519
|
+
readonly outputs: readonly [{
|
|
520
|
+
readonly internalType: "string";
|
|
521
|
+
readonly name: "";
|
|
522
|
+
readonly type: "string";
|
|
523
|
+
}, {
|
|
524
|
+
readonly internalType: "address";
|
|
525
|
+
readonly name: "";
|
|
526
|
+
readonly type: "address";
|
|
527
|
+
}, {
|
|
528
|
+
readonly internalType: "address";
|
|
529
|
+
readonly name: "";
|
|
530
|
+
readonly type: "address";
|
|
531
|
+
}];
|
|
532
|
+
readonly stateMutability: "view";
|
|
533
|
+
readonly type: "function";
|
|
534
|
+
}, {
|
|
535
|
+
readonly inputs: readonly [{
|
|
536
|
+
readonly internalType: "bytes";
|
|
537
|
+
readonly name: "response";
|
|
538
|
+
readonly type: "bytes";
|
|
539
|
+
}, {
|
|
540
|
+
readonly internalType: "bytes";
|
|
541
|
+
readonly name: "extraData";
|
|
542
|
+
readonly type: "bytes";
|
|
543
|
+
}];
|
|
544
|
+
readonly name: "reverseAddressCallback";
|
|
545
|
+
readonly outputs: readonly [{
|
|
546
|
+
readonly internalType: "string";
|
|
547
|
+
readonly name: "primary";
|
|
548
|
+
readonly type: "string";
|
|
549
|
+
}, {
|
|
550
|
+
readonly internalType: "address";
|
|
551
|
+
readonly name: "resolver";
|
|
552
|
+
readonly type: "address";
|
|
553
|
+
}, {
|
|
554
|
+
readonly internalType: "address";
|
|
555
|
+
readonly name: "reverseResolver";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}];
|
|
558
|
+
readonly stateMutability: "pure";
|
|
559
|
+
readonly type: "function";
|
|
560
|
+
}, {
|
|
561
|
+
readonly inputs: readonly [{
|
|
562
|
+
readonly internalType: "bytes";
|
|
563
|
+
readonly name: "response";
|
|
564
|
+
readonly type: "bytes";
|
|
565
|
+
}, {
|
|
566
|
+
readonly internalType: "bytes";
|
|
567
|
+
readonly name: "extraData";
|
|
568
|
+
readonly type: "bytes";
|
|
569
|
+
}];
|
|
570
|
+
readonly name: "reverseNameCallback";
|
|
571
|
+
readonly outputs: readonly [{
|
|
572
|
+
readonly internalType: "string";
|
|
573
|
+
readonly name: "primary";
|
|
574
|
+
readonly type: "string";
|
|
575
|
+
}, {
|
|
576
|
+
readonly internalType: "address";
|
|
577
|
+
readonly name: "";
|
|
578
|
+
readonly type: "address";
|
|
579
|
+
}, {
|
|
580
|
+
readonly internalType: "address";
|
|
581
|
+
readonly name: "";
|
|
582
|
+
readonly type: "address";
|
|
583
|
+
}];
|
|
584
|
+
readonly stateMutability: "view";
|
|
585
|
+
readonly type: "function";
|
|
586
|
+
}, {
|
|
587
|
+
readonly inputs: readonly [{
|
|
588
|
+
readonly internalType: "bytes";
|
|
589
|
+
readonly name: "lookupAddress";
|
|
590
|
+
readonly type: "bytes";
|
|
591
|
+
}, {
|
|
592
|
+
readonly internalType: "uint256";
|
|
593
|
+
readonly name: "coinType";
|
|
594
|
+
readonly type: "uint256";
|
|
595
|
+
}, {
|
|
596
|
+
readonly internalType: "string[]";
|
|
597
|
+
readonly name: "gateways";
|
|
598
|
+
readonly type: "string[]";
|
|
599
|
+
}];
|
|
600
|
+
readonly name: "reverseWithGateways";
|
|
601
|
+
readonly outputs: readonly [{
|
|
602
|
+
readonly internalType: "string";
|
|
603
|
+
readonly name: "primary";
|
|
604
|
+
readonly type: "string";
|
|
605
|
+
}, {
|
|
606
|
+
readonly internalType: "address";
|
|
607
|
+
readonly name: "resolver";
|
|
608
|
+
readonly type: "address";
|
|
609
|
+
}, {
|
|
610
|
+
readonly internalType: "address";
|
|
611
|
+
readonly name: "reverseResolver";
|
|
612
|
+
readonly type: "address";
|
|
613
|
+
}];
|
|
614
|
+
readonly stateMutability: "view";
|
|
615
|
+
readonly type: "function";
|
|
616
|
+
}, {
|
|
617
|
+
readonly inputs: readonly [{
|
|
618
|
+
readonly internalType: "bytes4";
|
|
619
|
+
readonly name: "interfaceId";
|
|
620
|
+
readonly type: "bytes4";
|
|
621
|
+
}];
|
|
622
|
+
readonly name: "supportsInterface";
|
|
623
|
+
readonly outputs: readonly [{
|
|
624
|
+
readonly internalType: "bool";
|
|
625
|
+
readonly name: "";
|
|
626
|
+
readonly type: "bool";
|
|
627
|
+
}];
|
|
628
|
+
readonly stateMutability: "view";
|
|
629
|
+
readonly type: "function";
|
|
630
|
+
}];
|
|
631
|
+
/**
|
|
632
|
+
* Type-safe ABI for UniversalResolver_json
|
|
633
|
+
*/
|
|
634
|
+
export type UniversalResolver_jsonAbi = typeof UniversalResolver_jsonAbi;
|
|
635
|
+
/**
|
|
636
|
+
* Contract instance type for UniversalResolver_json
|
|
637
|
+
*/
|
|
638
|
+
export type UniversalResolver_jsonContract = any;
|
|
639
|
+
/**
|
|
640
|
+
* UniversalResolver_json Contract Class
|
|
641
|
+
*
|
|
642
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
643
|
+
*
|
|
644
|
+
* @example
|
|
645
|
+
* ```typescript
|
|
646
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
647
|
+
* import { mainnet } from 'viem/chains';
|
|
648
|
+
* import { UniversalResolver_json } from 'UniversalResolver_json';
|
|
649
|
+
*
|
|
650
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
651
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
652
|
+
*
|
|
653
|
+
* const contract = new UniversalResolver_json('0x...', { publicClient, walletClient });
|
|
654
|
+
*
|
|
655
|
+
* // Read functions
|
|
656
|
+
* const result = await contract.balanceOf('0x...');
|
|
657
|
+
*
|
|
658
|
+
* // Write functions
|
|
659
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
660
|
+
*
|
|
661
|
+
* // Simulate transactions (dry-run)
|
|
662
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
663
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
664
|
+
*
|
|
665
|
+
* // Watch events
|
|
666
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
667
|
+
* console.log('Transfer event:', event);
|
|
668
|
+
* });
|
|
669
|
+
* ```
|
|
670
|
+
*/
|
|
671
|
+
export declare class UniversalResolver_json {
|
|
672
|
+
private contract;
|
|
673
|
+
private contractAddress;
|
|
674
|
+
private publicClient;
|
|
675
|
+
constructor(address: Address, clients: {
|
|
676
|
+
publicClient: PublicClient;
|
|
677
|
+
walletClient?: WalletClient;
|
|
678
|
+
});
|
|
679
|
+
/**
|
|
680
|
+
* Get the contract address
|
|
681
|
+
*/
|
|
682
|
+
get address(): Address;
|
|
683
|
+
/**
|
|
684
|
+
* Get the underlying viem contract instance
|
|
685
|
+
*/
|
|
686
|
+
getContract(): UniversalResolver_jsonContract;
|
|
687
|
+
/**
|
|
688
|
+
* batchGatewayProvider
|
|
689
|
+
* view
|
|
690
|
+
*/
|
|
691
|
+
batchGatewayProvider(): Promise<`0x${string}`>;
|
|
692
|
+
/**
|
|
693
|
+
* ccipBatch
|
|
694
|
+
* view
|
|
695
|
+
*/
|
|
696
|
+
ccipBatch(batch: CCIPBatcher_Batch): Promise<CCIPBatcher_Batch>;
|
|
697
|
+
/**
|
|
698
|
+
* ccipBatchCallback
|
|
699
|
+
* view
|
|
700
|
+
*/
|
|
701
|
+
ccipBatchCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<CCIPBatcher_Batch>;
|
|
702
|
+
/**
|
|
703
|
+
* ccipReadCallback
|
|
704
|
+
* view
|
|
705
|
+
*/
|
|
706
|
+
ccipReadCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<void>;
|
|
707
|
+
/**
|
|
708
|
+
* findResolver
|
|
709
|
+
* view
|
|
710
|
+
*/
|
|
711
|
+
findResolver(name: `0x${string}`): Promise<[`0x${string}`, `0x${string}`, bigint]>;
|
|
712
|
+
/**
|
|
713
|
+
* registry
|
|
714
|
+
* view
|
|
715
|
+
*/
|
|
716
|
+
registry(): Promise<`0x${string}`>;
|
|
717
|
+
/**
|
|
718
|
+
* requireResolver
|
|
719
|
+
* view
|
|
720
|
+
*/
|
|
721
|
+
requireResolver(name: `0x${string}`): Promise<AbstractUniversalResolver_ResolverInfo>;
|
|
722
|
+
/**
|
|
723
|
+
* resolve
|
|
724
|
+
* view
|
|
725
|
+
*/
|
|
726
|
+
resolve(name: `0x${string}`, data: `0x${string}`): Promise<[`0x${string}`, `0x${string}`]>;
|
|
727
|
+
/**
|
|
728
|
+
* resolveBatchCallback
|
|
729
|
+
* view
|
|
730
|
+
*/
|
|
731
|
+
resolveBatchCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<void>;
|
|
732
|
+
/**
|
|
733
|
+
* resolveCallback
|
|
734
|
+
* pure
|
|
735
|
+
*/
|
|
736
|
+
resolveCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<[`0x${string}`, `0x${string}`]>;
|
|
737
|
+
/**
|
|
738
|
+
* resolveDirectCallback
|
|
739
|
+
* view
|
|
740
|
+
*/
|
|
741
|
+
resolveDirectCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<void>;
|
|
742
|
+
/**
|
|
743
|
+
* resolveDirectCallbackError
|
|
744
|
+
* pure
|
|
745
|
+
*/
|
|
746
|
+
resolveDirectCallbackError(response: `0x${string}`, arg1: `0x${string}`): Promise<void>;
|
|
747
|
+
/**
|
|
748
|
+
* resolveWithGateways
|
|
749
|
+
* view
|
|
750
|
+
*/
|
|
751
|
+
resolveWithGateways(name: `0x${string}`, data: `0x${string}`, gateways: string[]): Promise<[`0x${string}`, `0x${string}`]>;
|
|
752
|
+
/**
|
|
753
|
+
* resolveWithResolver
|
|
754
|
+
* view
|
|
755
|
+
*/
|
|
756
|
+
resolveWithResolver(resolver: `0x${string}`, name: `0x${string}`, data: `0x${string}`, gateways: string[]): Promise<`0x${string}`>;
|
|
757
|
+
/**
|
|
758
|
+
* reverse
|
|
759
|
+
* view
|
|
760
|
+
*/
|
|
761
|
+
reverse(lookupAddress: `0x${string}`, coinType: bigint): Promise<[string, `0x${string}`, `0x${string}`]>;
|
|
762
|
+
/**
|
|
763
|
+
* reverseAddressCallback
|
|
764
|
+
* pure
|
|
765
|
+
*/
|
|
766
|
+
reverseAddressCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<[string, `0x${string}`, `0x${string}`]>;
|
|
767
|
+
/**
|
|
768
|
+
* reverseNameCallback
|
|
769
|
+
* view
|
|
770
|
+
*/
|
|
771
|
+
reverseNameCallback(response: `0x${string}`, extraData: `0x${string}`): Promise<[string, `0x${string}`, `0x${string}`]>;
|
|
772
|
+
/**
|
|
773
|
+
* reverseWithGateways
|
|
774
|
+
* view
|
|
775
|
+
*/
|
|
776
|
+
reverseWithGateways(lookupAddress: `0x${string}`, coinType: bigint, gateways: string[]): Promise<[string, `0x${string}`, `0x${string}`]>;
|
|
777
|
+
/**
|
|
778
|
+
* supportsInterface
|
|
779
|
+
* view
|
|
780
|
+
*/
|
|
781
|
+
supportsInterface(interfaceId: `0x${string}`): Promise<boolean>;
|
|
782
|
+
/**
|
|
783
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
784
|
+
*
|
|
785
|
+
* Note: This contract has no write functions, so simulate returns an empty object.
|
|
786
|
+
*/
|
|
787
|
+
get simulate(): {};
|
|
788
|
+
/**
|
|
789
|
+
* Watch contract events
|
|
790
|
+
*
|
|
791
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
792
|
+
*/
|
|
793
|
+
get watch(): {};
|
|
794
|
+
}
|