@gitmyabi-stg/pieverse 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/PieverseOFT.d.ts +2584 -0
- package/contracts/PieverseOFT.js +2834 -0
- package/contracts/PieverseOFT.ts +3425 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,3425 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* EnforcedOptionParam struct type
|
|
7
|
+
*/
|
|
8
|
+
export type EnforcedOptionParam = {
|
|
9
|
+
eid: bigint;
|
|
10
|
+
msgType: bigint;
|
|
11
|
+
options: `0x${string}`;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Origin struct type
|
|
16
|
+
*/
|
|
17
|
+
export type Origin = {
|
|
18
|
+
srcEid: bigint;
|
|
19
|
+
sender: `0x${string}`;
|
|
20
|
+
nonce: bigint;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* InboundPacket struct type
|
|
25
|
+
*/
|
|
26
|
+
export type InboundPacket = {
|
|
27
|
+
origin: Origin;
|
|
28
|
+
dstEid: bigint;
|
|
29
|
+
receiver: `0x${string}`;
|
|
30
|
+
guid: `0x${string}`;
|
|
31
|
+
value: bigint;
|
|
32
|
+
executor: `0x${string}`;
|
|
33
|
+
message: `0x${string}`;
|
|
34
|
+
extraData: `0x${string}`;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* SendParam struct type
|
|
39
|
+
*/
|
|
40
|
+
export type SendParam = {
|
|
41
|
+
dstEid: bigint;
|
|
42
|
+
to: `0x${string}`;
|
|
43
|
+
amountLD: bigint;
|
|
44
|
+
minAmountLD: bigint;
|
|
45
|
+
extraOptions: `0x${string}`;
|
|
46
|
+
composeMsg: `0x${string}`;
|
|
47
|
+
oftCmd: `0x${string}`;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* OFTLimit struct type
|
|
52
|
+
*/
|
|
53
|
+
export type OFTLimit = {
|
|
54
|
+
minAmountLD: bigint;
|
|
55
|
+
maxAmountLD: bigint;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* OFTFeeDetail struct type
|
|
60
|
+
*/
|
|
61
|
+
export type OFTFeeDetail = {
|
|
62
|
+
feeAmountLD: bigint;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* OFTReceipt struct type
|
|
68
|
+
*/
|
|
69
|
+
export type OFTReceipt = {
|
|
70
|
+
amountSentLD: bigint;
|
|
71
|
+
amountReceivedLD: bigint;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* MessagingFee struct type
|
|
76
|
+
*/
|
|
77
|
+
export type MessagingFee = {
|
|
78
|
+
nativeFee: bigint;
|
|
79
|
+
lzTokenFee: bigint;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* MessagingReceipt struct type
|
|
84
|
+
*/
|
|
85
|
+
export type MessagingReceipt = {
|
|
86
|
+
guid: `0x${string}`;
|
|
87
|
+
nonce: bigint;
|
|
88
|
+
fee: MessagingFee;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* PieverseOFT ABI
|
|
92
|
+
*
|
|
93
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
94
|
+
*/
|
|
95
|
+
export const PieverseOFTAbi = [
|
|
96
|
+
{
|
|
97
|
+
"inputs": [
|
|
98
|
+
{
|
|
99
|
+
"internalType": "string",
|
|
100
|
+
"name": "_name",
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"internalType": "string",
|
|
105
|
+
"name": "_symbol",
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"internalType": "address",
|
|
110
|
+
"name": "_lzEndpoint",
|
|
111
|
+
"type": "address"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"internalType": "address",
|
|
115
|
+
"name": "_owner",
|
|
116
|
+
"type": "address"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"internalType": "address",
|
|
120
|
+
"name": "_multisig",
|
|
121
|
+
"type": "address"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"internalType": "uint256",
|
|
125
|
+
"name": "_transferAllowedTime",
|
|
126
|
+
"type": "uint256"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"stateMutability": "nonpayable",
|
|
130
|
+
"type": "constructor"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"inputs": [
|
|
134
|
+
{
|
|
135
|
+
"internalType": "uint256",
|
|
136
|
+
"name": "amountSD",
|
|
137
|
+
"type": "uint256"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"name": "AmountSDOverflowed",
|
|
141
|
+
"type": "error"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [
|
|
145
|
+
{
|
|
146
|
+
"internalType": "address",
|
|
147
|
+
"name": "spender",
|
|
148
|
+
"type": "address"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"internalType": "uint256",
|
|
152
|
+
"name": "allowance",
|
|
153
|
+
"type": "uint256"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"internalType": "uint256",
|
|
157
|
+
"name": "needed",
|
|
158
|
+
"type": "uint256"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"name": "ERC20InsufficientAllowance",
|
|
162
|
+
"type": "error"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"inputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "address",
|
|
168
|
+
"name": "sender",
|
|
169
|
+
"type": "address"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"internalType": "uint256",
|
|
173
|
+
"name": "balance",
|
|
174
|
+
"type": "uint256"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"internalType": "uint256",
|
|
178
|
+
"name": "needed",
|
|
179
|
+
"type": "uint256"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"name": "ERC20InsufficientBalance",
|
|
183
|
+
"type": "error"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"inputs": [
|
|
187
|
+
{
|
|
188
|
+
"internalType": "address",
|
|
189
|
+
"name": "approver",
|
|
190
|
+
"type": "address"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"name": "ERC20InvalidApprover",
|
|
194
|
+
"type": "error"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"inputs": [
|
|
198
|
+
{
|
|
199
|
+
"internalType": "address",
|
|
200
|
+
"name": "receiver",
|
|
201
|
+
"type": "address"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"name": "ERC20InvalidReceiver",
|
|
205
|
+
"type": "error"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"inputs": [
|
|
209
|
+
{
|
|
210
|
+
"internalType": "address",
|
|
211
|
+
"name": "sender",
|
|
212
|
+
"type": "address"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"name": "ERC20InvalidSender",
|
|
216
|
+
"type": "error"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"inputs": [
|
|
220
|
+
{
|
|
221
|
+
"internalType": "address",
|
|
222
|
+
"name": "spender",
|
|
223
|
+
"type": "address"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"name": "ERC20InvalidSpender",
|
|
227
|
+
"type": "error"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"inputs": [],
|
|
231
|
+
"name": "InvalidDelegate",
|
|
232
|
+
"type": "error"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"inputs": [],
|
|
236
|
+
"name": "InvalidEndpointCall",
|
|
237
|
+
"type": "error"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"inputs": [],
|
|
241
|
+
"name": "InvalidLocalDecimals",
|
|
242
|
+
"type": "error"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"inputs": [
|
|
246
|
+
{
|
|
247
|
+
"internalType": "bytes",
|
|
248
|
+
"name": "options",
|
|
249
|
+
"type": "bytes"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"name": "InvalidOptions",
|
|
253
|
+
"type": "error"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"inputs": [],
|
|
257
|
+
"name": "LzTokenUnavailable",
|
|
258
|
+
"type": "error"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"inputs": [
|
|
262
|
+
{
|
|
263
|
+
"internalType": "uint32",
|
|
264
|
+
"name": "eid",
|
|
265
|
+
"type": "uint32"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"name": "NoPeer",
|
|
269
|
+
"type": "error"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"inputs": [
|
|
273
|
+
{
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "msgValue",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"name": "NotEnoughNative",
|
|
280
|
+
"type": "error"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"inputs": [
|
|
284
|
+
{
|
|
285
|
+
"internalType": "address",
|
|
286
|
+
"name": "addr",
|
|
287
|
+
"type": "address"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"name": "OnlyEndpoint",
|
|
291
|
+
"type": "error"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"inputs": [
|
|
295
|
+
{
|
|
296
|
+
"internalType": "uint32",
|
|
297
|
+
"name": "eid",
|
|
298
|
+
"type": "uint32"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"internalType": "bytes32",
|
|
302
|
+
"name": "sender",
|
|
303
|
+
"type": "bytes32"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"name": "OnlyPeer",
|
|
307
|
+
"type": "error"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [],
|
|
311
|
+
"name": "OnlySelf",
|
|
312
|
+
"type": "error"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"inputs": [
|
|
316
|
+
{
|
|
317
|
+
"internalType": "address",
|
|
318
|
+
"name": "owner",
|
|
319
|
+
"type": "address"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"name": "OwnableInvalidOwner",
|
|
323
|
+
"type": "error"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"inputs": [
|
|
327
|
+
{
|
|
328
|
+
"internalType": "address",
|
|
329
|
+
"name": "account",
|
|
330
|
+
"type": "address"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"name": "OwnableUnauthorizedAccount",
|
|
334
|
+
"type": "error"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"inputs": [
|
|
338
|
+
{
|
|
339
|
+
"internalType": "address",
|
|
340
|
+
"name": "token",
|
|
341
|
+
"type": "address"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"name": "SafeERC20FailedOperation",
|
|
345
|
+
"type": "error"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"inputs": [
|
|
349
|
+
{
|
|
350
|
+
"internalType": "bytes",
|
|
351
|
+
"name": "result",
|
|
352
|
+
"type": "bytes"
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"name": "SimulationResult",
|
|
356
|
+
"type": "error"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"inputs": [
|
|
360
|
+
{
|
|
361
|
+
"internalType": "uint256",
|
|
362
|
+
"name": "amountLD",
|
|
363
|
+
"type": "uint256"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"internalType": "uint256",
|
|
367
|
+
"name": "minAmountLD",
|
|
368
|
+
"type": "uint256"
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"name": "SlippageExceeded",
|
|
372
|
+
"type": "error"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"anonymous": false,
|
|
376
|
+
"inputs": [
|
|
377
|
+
{
|
|
378
|
+
"indexed": true,
|
|
379
|
+
"internalType": "address",
|
|
380
|
+
"name": "owner",
|
|
381
|
+
"type": "address"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"indexed": true,
|
|
385
|
+
"internalType": "address",
|
|
386
|
+
"name": "spender",
|
|
387
|
+
"type": "address"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"indexed": false,
|
|
391
|
+
"internalType": "uint256",
|
|
392
|
+
"name": "value",
|
|
393
|
+
"type": "uint256"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"name": "Approval",
|
|
397
|
+
"type": "event"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"anonymous": false,
|
|
401
|
+
"inputs": [
|
|
402
|
+
{
|
|
403
|
+
"components": [
|
|
404
|
+
{
|
|
405
|
+
"internalType": "uint32",
|
|
406
|
+
"name": "eid",
|
|
407
|
+
"type": "uint32"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"internalType": "uint16",
|
|
411
|
+
"name": "msgType",
|
|
412
|
+
"type": "uint16"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"internalType": "bytes",
|
|
416
|
+
"name": "options",
|
|
417
|
+
"type": "bytes"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"indexed": false,
|
|
421
|
+
"internalType": "struct EnforcedOptionParam[]",
|
|
422
|
+
"name": "_enforcedOptions",
|
|
423
|
+
"type": "tuple[]"
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
"name": "EnforcedOptionSet",
|
|
427
|
+
"type": "event"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"anonymous": false,
|
|
431
|
+
"inputs": [
|
|
432
|
+
{
|
|
433
|
+
"indexed": true,
|
|
434
|
+
"internalType": "address",
|
|
435
|
+
"name": "account",
|
|
436
|
+
"type": "address"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"indexed": false,
|
|
440
|
+
"internalType": "bool",
|
|
441
|
+
"name": "value",
|
|
442
|
+
"type": "bool"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"name": "MinterUpdated",
|
|
446
|
+
"type": "event"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"anonymous": false,
|
|
450
|
+
"inputs": [
|
|
451
|
+
{
|
|
452
|
+
"indexed": false,
|
|
453
|
+
"internalType": "address",
|
|
454
|
+
"name": "inspector",
|
|
455
|
+
"type": "address"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"name": "MsgInspectorSet",
|
|
459
|
+
"type": "event"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"anonymous": false,
|
|
463
|
+
"inputs": [
|
|
464
|
+
{
|
|
465
|
+
"indexed": true,
|
|
466
|
+
"internalType": "bytes32",
|
|
467
|
+
"name": "guid",
|
|
468
|
+
"type": "bytes32"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"indexed": false,
|
|
472
|
+
"internalType": "uint32",
|
|
473
|
+
"name": "srcEid",
|
|
474
|
+
"type": "uint32"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"indexed": true,
|
|
478
|
+
"internalType": "address",
|
|
479
|
+
"name": "toAddress",
|
|
480
|
+
"type": "address"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"indexed": false,
|
|
484
|
+
"internalType": "uint256",
|
|
485
|
+
"name": "amountReceivedLD",
|
|
486
|
+
"type": "uint256"
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"name": "OFTReceived",
|
|
490
|
+
"type": "event"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"anonymous": false,
|
|
494
|
+
"inputs": [
|
|
495
|
+
{
|
|
496
|
+
"indexed": true,
|
|
497
|
+
"internalType": "bytes32",
|
|
498
|
+
"name": "guid",
|
|
499
|
+
"type": "bytes32"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"indexed": false,
|
|
503
|
+
"internalType": "uint32",
|
|
504
|
+
"name": "dstEid",
|
|
505
|
+
"type": "uint32"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"indexed": true,
|
|
509
|
+
"internalType": "address",
|
|
510
|
+
"name": "fromAddress",
|
|
511
|
+
"type": "address"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"indexed": false,
|
|
515
|
+
"internalType": "uint256",
|
|
516
|
+
"name": "amountSentLD",
|
|
517
|
+
"type": "uint256"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"indexed": false,
|
|
521
|
+
"internalType": "uint256",
|
|
522
|
+
"name": "amountReceivedLD",
|
|
523
|
+
"type": "uint256"
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
"name": "OFTSent",
|
|
527
|
+
"type": "event"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"anonymous": false,
|
|
531
|
+
"inputs": [
|
|
532
|
+
{
|
|
533
|
+
"indexed": true,
|
|
534
|
+
"internalType": "address",
|
|
535
|
+
"name": "previousOwner",
|
|
536
|
+
"type": "address"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"indexed": true,
|
|
540
|
+
"internalType": "address",
|
|
541
|
+
"name": "newOwner",
|
|
542
|
+
"type": "address"
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"name": "OwnershipTransferred",
|
|
546
|
+
"type": "event"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"anonymous": false,
|
|
550
|
+
"inputs": [
|
|
551
|
+
{
|
|
552
|
+
"indexed": false,
|
|
553
|
+
"internalType": "uint32",
|
|
554
|
+
"name": "eid",
|
|
555
|
+
"type": "uint32"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"indexed": false,
|
|
559
|
+
"internalType": "bytes32",
|
|
560
|
+
"name": "peer",
|
|
561
|
+
"type": "bytes32"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"name": "PeerSet",
|
|
565
|
+
"type": "event"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"anonymous": false,
|
|
569
|
+
"inputs": [
|
|
570
|
+
{
|
|
571
|
+
"indexed": false,
|
|
572
|
+
"internalType": "address",
|
|
573
|
+
"name": "preCrimeAddress",
|
|
574
|
+
"type": "address"
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"name": "PreCrimeSet",
|
|
578
|
+
"type": "event"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"anonymous": false,
|
|
582
|
+
"inputs": [
|
|
583
|
+
{
|
|
584
|
+
"indexed": true,
|
|
585
|
+
"internalType": "address",
|
|
586
|
+
"name": "to",
|
|
587
|
+
"type": "address"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"indexed": false,
|
|
591
|
+
"internalType": "uint256",
|
|
592
|
+
"name": "amount",
|
|
593
|
+
"type": "uint256"
|
|
594
|
+
}
|
|
595
|
+
],
|
|
596
|
+
"name": "TokensMinted",
|
|
597
|
+
"type": "event"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"anonymous": false,
|
|
601
|
+
"inputs": [
|
|
602
|
+
{
|
|
603
|
+
"indexed": true,
|
|
604
|
+
"internalType": "address",
|
|
605
|
+
"name": "from",
|
|
606
|
+
"type": "address"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"indexed": true,
|
|
610
|
+
"internalType": "address",
|
|
611
|
+
"name": "to",
|
|
612
|
+
"type": "address"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"indexed": false,
|
|
616
|
+
"internalType": "uint256",
|
|
617
|
+
"name": "value",
|
|
618
|
+
"type": "uint256"
|
|
619
|
+
}
|
|
620
|
+
],
|
|
621
|
+
"name": "Transfer",
|
|
622
|
+
"type": "event"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"anonymous": false,
|
|
626
|
+
"inputs": [
|
|
627
|
+
{
|
|
628
|
+
"indexed": false,
|
|
629
|
+
"internalType": "uint256",
|
|
630
|
+
"name": "newTimestamp",
|
|
631
|
+
"type": "uint256"
|
|
632
|
+
}
|
|
633
|
+
],
|
|
634
|
+
"name": "TransferAllowedTimeUpdated",
|
|
635
|
+
"type": "event"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"anonymous": false,
|
|
639
|
+
"inputs": [
|
|
640
|
+
{
|
|
641
|
+
"indexed": true,
|
|
642
|
+
"internalType": "address",
|
|
643
|
+
"name": "account",
|
|
644
|
+
"type": "address"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"indexed": false,
|
|
648
|
+
"internalType": "bool",
|
|
649
|
+
"name": "value",
|
|
650
|
+
"type": "bool"
|
|
651
|
+
}
|
|
652
|
+
],
|
|
653
|
+
"name": "WhitelistUpdated",
|
|
654
|
+
"type": "event"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"inputs": [],
|
|
658
|
+
"name": "ETA",
|
|
659
|
+
"outputs": [
|
|
660
|
+
{
|
|
661
|
+
"internalType": "uint256",
|
|
662
|
+
"name": "",
|
|
663
|
+
"type": "uint256"
|
|
664
|
+
}
|
|
665
|
+
],
|
|
666
|
+
"stateMutability": "view",
|
|
667
|
+
"type": "function"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"inputs": [],
|
|
671
|
+
"name": "MAX_SUPPLY",
|
|
672
|
+
"outputs": [
|
|
673
|
+
{
|
|
674
|
+
"internalType": "uint256",
|
|
675
|
+
"name": "",
|
|
676
|
+
"type": "uint256"
|
|
677
|
+
}
|
|
678
|
+
],
|
|
679
|
+
"stateMutability": "view",
|
|
680
|
+
"type": "function"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"inputs": [],
|
|
684
|
+
"name": "SEND",
|
|
685
|
+
"outputs": [
|
|
686
|
+
{
|
|
687
|
+
"internalType": "uint16",
|
|
688
|
+
"name": "",
|
|
689
|
+
"type": "uint16"
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
"stateMutability": "view",
|
|
693
|
+
"type": "function"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"inputs": [],
|
|
697
|
+
"name": "SEND_AND_CALL",
|
|
698
|
+
"outputs": [
|
|
699
|
+
{
|
|
700
|
+
"internalType": "uint16",
|
|
701
|
+
"name": "",
|
|
702
|
+
"type": "uint16"
|
|
703
|
+
}
|
|
704
|
+
],
|
|
705
|
+
"stateMutability": "view",
|
|
706
|
+
"type": "function"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"inputs": [
|
|
710
|
+
{
|
|
711
|
+
"components": [
|
|
712
|
+
{
|
|
713
|
+
"internalType": "uint32",
|
|
714
|
+
"name": "srcEid",
|
|
715
|
+
"type": "uint32"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"internalType": "bytes32",
|
|
719
|
+
"name": "sender",
|
|
720
|
+
"type": "bytes32"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"internalType": "uint64",
|
|
724
|
+
"name": "nonce",
|
|
725
|
+
"type": "uint64"
|
|
726
|
+
}
|
|
727
|
+
],
|
|
728
|
+
"internalType": "struct Origin",
|
|
729
|
+
"name": "origin",
|
|
730
|
+
"type": "tuple"
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"name": "allowInitializePath",
|
|
734
|
+
"outputs": [
|
|
735
|
+
{
|
|
736
|
+
"internalType": "bool",
|
|
737
|
+
"name": "",
|
|
738
|
+
"type": "bool"
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
"stateMutability": "view",
|
|
742
|
+
"type": "function"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"inputs": [
|
|
746
|
+
{
|
|
747
|
+
"internalType": "address",
|
|
748
|
+
"name": "owner",
|
|
749
|
+
"type": "address"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"internalType": "address",
|
|
753
|
+
"name": "spender",
|
|
754
|
+
"type": "address"
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
"name": "allowance",
|
|
758
|
+
"outputs": [
|
|
759
|
+
{
|
|
760
|
+
"internalType": "uint256",
|
|
761
|
+
"name": "",
|
|
762
|
+
"type": "uint256"
|
|
763
|
+
}
|
|
764
|
+
],
|
|
765
|
+
"stateMutability": "view",
|
|
766
|
+
"type": "function"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"inputs": [],
|
|
770
|
+
"name": "approvalRequired",
|
|
771
|
+
"outputs": [
|
|
772
|
+
{
|
|
773
|
+
"internalType": "bool",
|
|
774
|
+
"name": "",
|
|
775
|
+
"type": "bool"
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
"stateMutability": "pure",
|
|
779
|
+
"type": "function"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"inputs": [
|
|
783
|
+
{
|
|
784
|
+
"internalType": "address",
|
|
785
|
+
"name": "spender",
|
|
786
|
+
"type": "address"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"internalType": "uint256",
|
|
790
|
+
"name": "value",
|
|
791
|
+
"type": "uint256"
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
"name": "approve",
|
|
795
|
+
"outputs": [
|
|
796
|
+
{
|
|
797
|
+
"internalType": "bool",
|
|
798
|
+
"name": "",
|
|
799
|
+
"type": "bool"
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
"stateMutability": "nonpayable",
|
|
803
|
+
"type": "function"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"inputs": [],
|
|
807
|
+
"name": "areTransfersAllowed",
|
|
808
|
+
"outputs": [
|
|
809
|
+
{
|
|
810
|
+
"internalType": "bool",
|
|
811
|
+
"name": "",
|
|
812
|
+
"type": "bool"
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
"stateMutability": "view",
|
|
816
|
+
"type": "function"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"inputs": [
|
|
820
|
+
{
|
|
821
|
+
"internalType": "address",
|
|
822
|
+
"name": "account",
|
|
823
|
+
"type": "address"
|
|
824
|
+
}
|
|
825
|
+
],
|
|
826
|
+
"name": "balanceOf",
|
|
827
|
+
"outputs": [
|
|
828
|
+
{
|
|
829
|
+
"internalType": "uint256",
|
|
830
|
+
"name": "",
|
|
831
|
+
"type": "uint256"
|
|
832
|
+
}
|
|
833
|
+
],
|
|
834
|
+
"stateMutability": "view",
|
|
835
|
+
"type": "function"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"inputs": [
|
|
839
|
+
{
|
|
840
|
+
"internalType": "uint32",
|
|
841
|
+
"name": "_eid",
|
|
842
|
+
"type": "uint32"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"internalType": "uint16",
|
|
846
|
+
"name": "_msgType",
|
|
847
|
+
"type": "uint16"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"internalType": "bytes",
|
|
851
|
+
"name": "_extraOptions",
|
|
852
|
+
"type": "bytes"
|
|
853
|
+
}
|
|
854
|
+
],
|
|
855
|
+
"name": "combineOptions",
|
|
856
|
+
"outputs": [
|
|
857
|
+
{
|
|
858
|
+
"internalType": "bytes",
|
|
859
|
+
"name": "",
|
|
860
|
+
"type": "bytes"
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
"stateMutability": "view",
|
|
864
|
+
"type": "function"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"inputs": [],
|
|
868
|
+
"name": "decimalConversionRate",
|
|
869
|
+
"outputs": [
|
|
870
|
+
{
|
|
871
|
+
"internalType": "uint256",
|
|
872
|
+
"name": "",
|
|
873
|
+
"type": "uint256"
|
|
874
|
+
}
|
|
875
|
+
],
|
|
876
|
+
"stateMutability": "view",
|
|
877
|
+
"type": "function"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"inputs": [],
|
|
881
|
+
"name": "decimals",
|
|
882
|
+
"outputs": [
|
|
883
|
+
{
|
|
884
|
+
"internalType": "uint8",
|
|
885
|
+
"name": "",
|
|
886
|
+
"type": "uint8"
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
"stateMutability": "view",
|
|
890
|
+
"type": "function"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"inputs": [],
|
|
894
|
+
"name": "endpoint",
|
|
895
|
+
"outputs": [
|
|
896
|
+
{
|
|
897
|
+
"internalType": "contract ILayerZeroEndpointV2",
|
|
898
|
+
"name": "",
|
|
899
|
+
"type": "address"
|
|
900
|
+
}
|
|
901
|
+
],
|
|
902
|
+
"stateMutability": "view",
|
|
903
|
+
"type": "function"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"inputs": [
|
|
907
|
+
{
|
|
908
|
+
"internalType": "uint32",
|
|
909
|
+
"name": "eid",
|
|
910
|
+
"type": "uint32"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"internalType": "uint16",
|
|
914
|
+
"name": "msgType",
|
|
915
|
+
"type": "uint16"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
918
|
+
"name": "enforcedOptions",
|
|
919
|
+
"outputs": [
|
|
920
|
+
{
|
|
921
|
+
"internalType": "bytes",
|
|
922
|
+
"name": "enforcedOption",
|
|
923
|
+
"type": "bytes"
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"stateMutability": "view",
|
|
927
|
+
"type": "function"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"inputs": [
|
|
931
|
+
{
|
|
932
|
+
"components": [
|
|
933
|
+
{
|
|
934
|
+
"internalType": "uint32",
|
|
935
|
+
"name": "srcEid",
|
|
936
|
+
"type": "uint32"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"internalType": "bytes32",
|
|
940
|
+
"name": "sender",
|
|
941
|
+
"type": "bytes32"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"internalType": "uint64",
|
|
945
|
+
"name": "nonce",
|
|
946
|
+
"type": "uint64"
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
"internalType": "struct Origin",
|
|
950
|
+
"name": "",
|
|
951
|
+
"type": "tuple"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"internalType": "bytes",
|
|
955
|
+
"name": "",
|
|
956
|
+
"type": "bytes"
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
"internalType": "address",
|
|
960
|
+
"name": "_sender",
|
|
961
|
+
"type": "address"
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
"name": "isComposeMsgSender",
|
|
965
|
+
"outputs": [
|
|
966
|
+
{
|
|
967
|
+
"internalType": "bool",
|
|
968
|
+
"name": "",
|
|
969
|
+
"type": "bool"
|
|
970
|
+
}
|
|
971
|
+
],
|
|
972
|
+
"stateMutability": "view",
|
|
973
|
+
"type": "function"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"inputs": [
|
|
977
|
+
{
|
|
978
|
+
"internalType": "address",
|
|
979
|
+
"name": "",
|
|
980
|
+
"type": "address"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
"name": "isMinter",
|
|
984
|
+
"outputs": [
|
|
985
|
+
{
|
|
986
|
+
"internalType": "bool",
|
|
987
|
+
"name": "",
|
|
988
|
+
"type": "bool"
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"stateMutability": "view",
|
|
992
|
+
"type": "function"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"inputs": [
|
|
996
|
+
{
|
|
997
|
+
"internalType": "uint32",
|
|
998
|
+
"name": "_eid",
|
|
999
|
+
"type": "uint32"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"internalType": "bytes32",
|
|
1003
|
+
"name": "_peer",
|
|
1004
|
+
"type": "bytes32"
|
|
1005
|
+
}
|
|
1006
|
+
],
|
|
1007
|
+
"name": "isPeer",
|
|
1008
|
+
"outputs": [
|
|
1009
|
+
{
|
|
1010
|
+
"internalType": "bool",
|
|
1011
|
+
"name": "",
|
|
1012
|
+
"type": "bool"
|
|
1013
|
+
}
|
|
1014
|
+
],
|
|
1015
|
+
"stateMutability": "view",
|
|
1016
|
+
"type": "function"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"inputs": [
|
|
1020
|
+
{
|
|
1021
|
+
"internalType": "address",
|
|
1022
|
+
"name": "",
|
|
1023
|
+
"type": "address"
|
|
1024
|
+
}
|
|
1025
|
+
],
|
|
1026
|
+
"name": "isWhitelisted",
|
|
1027
|
+
"outputs": [
|
|
1028
|
+
{
|
|
1029
|
+
"internalType": "bool",
|
|
1030
|
+
"name": "",
|
|
1031
|
+
"type": "bool"
|
|
1032
|
+
}
|
|
1033
|
+
],
|
|
1034
|
+
"stateMutability": "view",
|
|
1035
|
+
"type": "function"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"inputs": [
|
|
1039
|
+
{
|
|
1040
|
+
"components": [
|
|
1041
|
+
{
|
|
1042
|
+
"internalType": "uint32",
|
|
1043
|
+
"name": "srcEid",
|
|
1044
|
+
"type": "uint32"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"internalType": "bytes32",
|
|
1048
|
+
"name": "sender",
|
|
1049
|
+
"type": "bytes32"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"internalType": "uint64",
|
|
1053
|
+
"name": "nonce",
|
|
1054
|
+
"type": "uint64"
|
|
1055
|
+
}
|
|
1056
|
+
],
|
|
1057
|
+
"internalType": "struct Origin",
|
|
1058
|
+
"name": "_origin",
|
|
1059
|
+
"type": "tuple"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"internalType": "bytes32",
|
|
1063
|
+
"name": "_guid",
|
|
1064
|
+
"type": "bytes32"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"internalType": "bytes",
|
|
1068
|
+
"name": "_message",
|
|
1069
|
+
"type": "bytes"
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"internalType": "address",
|
|
1073
|
+
"name": "_executor",
|
|
1074
|
+
"type": "address"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"internalType": "bytes",
|
|
1078
|
+
"name": "_extraData",
|
|
1079
|
+
"type": "bytes"
|
|
1080
|
+
}
|
|
1081
|
+
],
|
|
1082
|
+
"name": "lzReceive",
|
|
1083
|
+
"outputs": [],
|
|
1084
|
+
"stateMutability": "payable",
|
|
1085
|
+
"type": "function"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"inputs": [
|
|
1089
|
+
{
|
|
1090
|
+
"components": [
|
|
1091
|
+
{
|
|
1092
|
+
"components": [
|
|
1093
|
+
{
|
|
1094
|
+
"internalType": "uint32",
|
|
1095
|
+
"name": "srcEid",
|
|
1096
|
+
"type": "uint32"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"internalType": "bytes32",
|
|
1100
|
+
"name": "sender",
|
|
1101
|
+
"type": "bytes32"
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"internalType": "uint64",
|
|
1105
|
+
"name": "nonce",
|
|
1106
|
+
"type": "uint64"
|
|
1107
|
+
}
|
|
1108
|
+
],
|
|
1109
|
+
"internalType": "struct Origin",
|
|
1110
|
+
"name": "origin",
|
|
1111
|
+
"type": "tuple"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"internalType": "uint32",
|
|
1115
|
+
"name": "dstEid",
|
|
1116
|
+
"type": "uint32"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"internalType": "address",
|
|
1120
|
+
"name": "receiver",
|
|
1121
|
+
"type": "address"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"internalType": "bytes32",
|
|
1125
|
+
"name": "guid",
|
|
1126
|
+
"type": "bytes32"
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"internalType": "uint256",
|
|
1130
|
+
"name": "value",
|
|
1131
|
+
"type": "uint256"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
"internalType": "address",
|
|
1135
|
+
"name": "executor",
|
|
1136
|
+
"type": "address"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"internalType": "bytes",
|
|
1140
|
+
"name": "message",
|
|
1141
|
+
"type": "bytes"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"internalType": "bytes",
|
|
1145
|
+
"name": "extraData",
|
|
1146
|
+
"type": "bytes"
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
"internalType": "struct InboundPacket[]",
|
|
1150
|
+
"name": "_packets",
|
|
1151
|
+
"type": "tuple[]"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
"name": "lzReceiveAndRevert",
|
|
1155
|
+
"outputs": [],
|
|
1156
|
+
"stateMutability": "payable",
|
|
1157
|
+
"type": "function"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"inputs": [
|
|
1161
|
+
{
|
|
1162
|
+
"components": [
|
|
1163
|
+
{
|
|
1164
|
+
"internalType": "uint32",
|
|
1165
|
+
"name": "srcEid",
|
|
1166
|
+
"type": "uint32"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
"internalType": "bytes32",
|
|
1170
|
+
"name": "sender",
|
|
1171
|
+
"type": "bytes32"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"internalType": "uint64",
|
|
1175
|
+
"name": "nonce",
|
|
1176
|
+
"type": "uint64"
|
|
1177
|
+
}
|
|
1178
|
+
],
|
|
1179
|
+
"internalType": "struct Origin",
|
|
1180
|
+
"name": "_origin",
|
|
1181
|
+
"type": "tuple"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"internalType": "bytes32",
|
|
1185
|
+
"name": "_guid",
|
|
1186
|
+
"type": "bytes32"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"internalType": "bytes",
|
|
1190
|
+
"name": "_message",
|
|
1191
|
+
"type": "bytes"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"internalType": "address",
|
|
1195
|
+
"name": "_executor",
|
|
1196
|
+
"type": "address"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"internalType": "bytes",
|
|
1200
|
+
"name": "_extraData",
|
|
1201
|
+
"type": "bytes"
|
|
1202
|
+
}
|
|
1203
|
+
],
|
|
1204
|
+
"name": "lzReceiveSimulate",
|
|
1205
|
+
"outputs": [],
|
|
1206
|
+
"stateMutability": "payable",
|
|
1207
|
+
"type": "function"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"inputs": [
|
|
1211
|
+
{
|
|
1212
|
+
"internalType": "address",
|
|
1213
|
+
"name": "_to",
|
|
1214
|
+
"type": "address"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"internalType": "uint256",
|
|
1218
|
+
"name": "_amount",
|
|
1219
|
+
"type": "uint256"
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
"name": "mint",
|
|
1223
|
+
"outputs": [],
|
|
1224
|
+
"stateMutability": "nonpayable",
|
|
1225
|
+
"type": "function"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"inputs": [],
|
|
1229
|
+
"name": "msgInspector",
|
|
1230
|
+
"outputs": [
|
|
1231
|
+
{
|
|
1232
|
+
"internalType": "address",
|
|
1233
|
+
"name": "",
|
|
1234
|
+
"type": "address"
|
|
1235
|
+
}
|
|
1236
|
+
],
|
|
1237
|
+
"stateMutability": "view",
|
|
1238
|
+
"type": "function"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"inputs": [],
|
|
1242
|
+
"name": "multisig",
|
|
1243
|
+
"outputs": [
|
|
1244
|
+
{
|
|
1245
|
+
"internalType": "address",
|
|
1246
|
+
"name": "",
|
|
1247
|
+
"type": "address"
|
|
1248
|
+
}
|
|
1249
|
+
],
|
|
1250
|
+
"stateMutability": "view",
|
|
1251
|
+
"type": "function"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"inputs": [],
|
|
1255
|
+
"name": "name",
|
|
1256
|
+
"outputs": [
|
|
1257
|
+
{
|
|
1258
|
+
"internalType": "string",
|
|
1259
|
+
"name": "",
|
|
1260
|
+
"type": "string"
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
"stateMutability": "view",
|
|
1264
|
+
"type": "function"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"inputs": [
|
|
1268
|
+
{
|
|
1269
|
+
"internalType": "uint32",
|
|
1270
|
+
"name": "",
|
|
1271
|
+
"type": "uint32"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"internalType": "bytes32",
|
|
1275
|
+
"name": "",
|
|
1276
|
+
"type": "bytes32"
|
|
1277
|
+
}
|
|
1278
|
+
],
|
|
1279
|
+
"name": "nextNonce",
|
|
1280
|
+
"outputs": [
|
|
1281
|
+
{
|
|
1282
|
+
"internalType": "uint64",
|
|
1283
|
+
"name": "nonce",
|
|
1284
|
+
"type": "uint64"
|
|
1285
|
+
}
|
|
1286
|
+
],
|
|
1287
|
+
"stateMutability": "view",
|
|
1288
|
+
"type": "function"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"inputs": [],
|
|
1292
|
+
"name": "oApp",
|
|
1293
|
+
"outputs": [
|
|
1294
|
+
{
|
|
1295
|
+
"internalType": "address",
|
|
1296
|
+
"name": "",
|
|
1297
|
+
"type": "address"
|
|
1298
|
+
}
|
|
1299
|
+
],
|
|
1300
|
+
"stateMutability": "view",
|
|
1301
|
+
"type": "function"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"inputs": [],
|
|
1305
|
+
"name": "oAppVersion",
|
|
1306
|
+
"outputs": [
|
|
1307
|
+
{
|
|
1308
|
+
"internalType": "uint64",
|
|
1309
|
+
"name": "senderVersion",
|
|
1310
|
+
"type": "uint64"
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"internalType": "uint64",
|
|
1314
|
+
"name": "receiverVersion",
|
|
1315
|
+
"type": "uint64"
|
|
1316
|
+
}
|
|
1317
|
+
],
|
|
1318
|
+
"stateMutability": "pure",
|
|
1319
|
+
"type": "function"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"inputs": [],
|
|
1323
|
+
"name": "oftVersion",
|
|
1324
|
+
"outputs": [
|
|
1325
|
+
{
|
|
1326
|
+
"internalType": "bytes4",
|
|
1327
|
+
"name": "interfaceId",
|
|
1328
|
+
"type": "bytes4"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"internalType": "uint64",
|
|
1332
|
+
"name": "version",
|
|
1333
|
+
"type": "uint64"
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"stateMutability": "pure",
|
|
1337
|
+
"type": "function"
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"inputs": [],
|
|
1341
|
+
"name": "owner",
|
|
1342
|
+
"outputs": [
|
|
1343
|
+
{
|
|
1344
|
+
"internalType": "address",
|
|
1345
|
+
"name": "",
|
|
1346
|
+
"type": "address"
|
|
1347
|
+
}
|
|
1348
|
+
],
|
|
1349
|
+
"stateMutability": "view",
|
|
1350
|
+
"type": "function"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"inputs": [
|
|
1354
|
+
{
|
|
1355
|
+
"internalType": "uint32",
|
|
1356
|
+
"name": "eid",
|
|
1357
|
+
"type": "uint32"
|
|
1358
|
+
}
|
|
1359
|
+
],
|
|
1360
|
+
"name": "peers",
|
|
1361
|
+
"outputs": [
|
|
1362
|
+
{
|
|
1363
|
+
"internalType": "bytes32",
|
|
1364
|
+
"name": "peer",
|
|
1365
|
+
"type": "bytes32"
|
|
1366
|
+
}
|
|
1367
|
+
],
|
|
1368
|
+
"stateMutability": "view",
|
|
1369
|
+
"type": "function"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"inputs": [],
|
|
1373
|
+
"name": "preCrime",
|
|
1374
|
+
"outputs": [
|
|
1375
|
+
{
|
|
1376
|
+
"internalType": "address",
|
|
1377
|
+
"name": "",
|
|
1378
|
+
"type": "address"
|
|
1379
|
+
}
|
|
1380
|
+
],
|
|
1381
|
+
"stateMutability": "view",
|
|
1382
|
+
"type": "function"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"inputs": [
|
|
1386
|
+
{
|
|
1387
|
+
"components": [
|
|
1388
|
+
{
|
|
1389
|
+
"internalType": "uint32",
|
|
1390
|
+
"name": "dstEid",
|
|
1391
|
+
"type": "uint32"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"internalType": "bytes32",
|
|
1395
|
+
"name": "to",
|
|
1396
|
+
"type": "bytes32"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"internalType": "uint256",
|
|
1400
|
+
"name": "amountLD",
|
|
1401
|
+
"type": "uint256"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"internalType": "uint256",
|
|
1405
|
+
"name": "minAmountLD",
|
|
1406
|
+
"type": "uint256"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"internalType": "bytes",
|
|
1410
|
+
"name": "extraOptions",
|
|
1411
|
+
"type": "bytes"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"internalType": "bytes",
|
|
1415
|
+
"name": "composeMsg",
|
|
1416
|
+
"type": "bytes"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"internalType": "bytes",
|
|
1420
|
+
"name": "oftCmd",
|
|
1421
|
+
"type": "bytes"
|
|
1422
|
+
}
|
|
1423
|
+
],
|
|
1424
|
+
"internalType": "struct SendParam",
|
|
1425
|
+
"name": "_sendParam",
|
|
1426
|
+
"type": "tuple"
|
|
1427
|
+
}
|
|
1428
|
+
],
|
|
1429
|
+
"name": "quoteOFT",
|
|
1430
|
+
"outputs": [
|
|
1431
|
+
{
|
|
1432
|
+
"components": [
|
|
1433
|
+
{
|
|
1434
|
+
"internalType": "uint256",
|
|
1435
|
+
"name": "minAmountLD",
|
|
1436
|
+
"type": "uint256"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"internalType": "uint256",
|
|
1440
|
+
"name": "maxAmountLD",
|
|
1441
|
+
"type": "uint256"
|
|
1442
|
+
}
|
|
1443
|
+
],
|
|
1444
|
+
"internalType": "struct OFTLimit",
|
|
1445
|
+
"name": "oftLimit",
|
|
1446
|
+
"type": "tuple"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"components": [
|
|
1450
|
+
{
|
|
1451
|
+
"internalType": "int256",
|
|
1452
|
+
"name": "feeAmountLD",
|
|
1453
|
+
"type": "int256"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"internalType": "string",
|
|
1457
|
+
"name": "description",
|
|
1458
|
+
"type": "string"
|
|
1459
|
+
}
|
|
1460
|
+
],
|
|
1461
|
+
"internalType": "struct OFTFeeDetail[]",
|
|
1462
|
+
"name": "oftFeeDetails",
|
|
1463
|
+
"type": "tuple[]"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"components": [
|
|
1467
|
+
{
|
|
1468
|
+
"internalType": "uint256",
|
|
1469
|
+
"name": "amountSentLD",
|
|
1470
|
+
"type": "uint256"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"internalType": "uint256",
|
|
1474
|
+
"name": "amountReceivedLD",
|
|
1475
|
+
"type": "uint256"
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
"internalType": "struct OFTReceipt",
|
|
1479
|
+
"name": "oftReceipt",
|
|
1480
|
+
"type": "tuple"
|
|
1481
|
+
}
|
|
1482
|
+
],
|
|
1483
|
+
"stateMutability": "view",
|
|
1484
|
+
"type": "function"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"inputs": [
|
|
1488
|
+
{
|
|
1489
|
+
"components": [
|
|
1490
|
+
{
|
|
1491
|
+
"internalType": "uint32",
|
|
1492
|
+
"name": "dstEid",
|
|
1493
|
+
"type": "uint32"
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
"internalType": "bytes32",
|
|
1497
|
+
"name": "to",
|
|
1498
|
+
"type": "bytes32"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"internalType": "uint256",
|
|
1502
|
+
"name": "amountLD",
|
|
1503
|
+
"type": "uint256"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
"internalType": "uint256",
|
|
1507
|
+
"name": "minAmountLD",
|
|
1508
|
+
"type": "uint256"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"internalType": "bytes",
|
|
1512
|
+
"name": "extraOptions",
|
|
1513
|
+
"type": "bytes"
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"internalType": "bytes",
|
|
1517
|
+
"name": "composeMsg",
|
|
1518
|
+
"type": "bytes"
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
"internalType": "bytes",
|
|
1522
|
+
"name": "oftCmd",
|
|
1523
|
+
"type": "bytes"
|
|
1524
|
+
}
|
|
1525
|
+
],
|
|
1526
|
+
"internalType": "struct SendParam",
|
|
1527
|
+
"name": "_sendParam",
|
|
1528
|
+
"type": "tuple"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"internalType": "bool",
|
|
1532
|
+
"name": "_payInLzToken",
|
|
1533
|
+
"type": "bool"
|
|
1534
|
+
}
|
|
1535
|
+
],
|
|
1536
|
+
"name": "quoteSend",
|
|
1537
|
+
"outputs": [
|
|
1538
|
+
{
|
|
1539
|
+
"components": [
|
|
1540
|
+
{
|
|
1541
|
+
"internalType": "uint256",
|
|
1542
|
+
"name": "nativeFee",
|
|
1543
|
+
"type": "uint256"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"internalType": "uint256",
|
|
1547
|
+
"name": "lzTokenFee",
|
|
1548
|
+
"type": "uint256"
|
|
1549
|
+
}
|
|
1550
|
+
],
|
|
1551
|
+
"internalType": "struct MessagingFee",
|
|
1552
|
+
"name": "msgFee",
|
|
1553
|
+
"type": "tuple"
|
|
1554
|
+
}
|
|
1555
|
+
],
|
|
1556
|
+
"stateMutability": "view",
|
|
1557
|
+
"type": "function"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"inputs": [],
|
|
1561
|
+
"name": "renounceOwnership",
|
|
1562
|
+
"outputs": [],
|
|
1563
|
+
"stateMutability": "nonpayable",
|
|
1564
|
+
"type": "function"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"inputs": [
|
|
1568
|
+
{
|
|
1569
|
+
"components": [
|
|
1570
|
+
{
|
|
1571
|
+
"internalType": "uint32",
|
|
1572
|
+
"name": "dstEid",
|
|
1573
|
+
"type": "uint32"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"internalType": "bytes32",
|
|
1577
|
+
"name": "to",
|
|
1578
|
+
"type": "bytes32"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"internalType": "uint256",
|
|
1582
|
+
"name": "amountLD",
|
|
1583
|
+
"type": "uint256"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"internalType": "uint256",
|
|
1587
|
+
"name": "minAmountLD",
|
|
1588
|
+
"type": "uint256"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"internalType": "bytes",
|
|
1592
|
+
"name": "extraOptions",
|
|
1593
|
+
"type": "bytes"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"internalType": "bytes",
|
|
1597
|
+
"name": "composeMsg",
|
|
1598
|
+
"type": "bytes"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"internalType": "bytes",
|
|
1602
|
+
"name": "oftCmd",
|
|
1603
|
+
"type": "bytes"
|
|
1604
|
+
}
|
|
1605
|
+
],
|
|
1606
|
+
"internalType": "struct SendParam",
|
|
1607
|
+
"name": "_sendParam",
|
|
1608
|
+
"type": "tuple"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"components": [
|
|
1612
|
+
{
|
|
1613
|
+
"internalType": "uint256",
|
|
1614
|
+
"name": "nativeFee",
|
|
1615
|
+
"type": "uint256"
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
"internalType": "uint256",
|
|
1619
|
+
"name": "lzTokenFee",
|
|
1620
|
+
"type": "uint256"
|
|
1621
|
+
}
|
|
1622
|
+
],
|
|
1623
|
+
"internalType": "struct MessagingFee",
|
|
1624
|
+
"name": "_fee",
|
|
1625
|
+
"type": "tuple"
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"internalType": "address",
|
|
1629
|
+
"name": "_refundAddress",
|
|
1630
|
+
"type": "address"
|
|
1631
|
+
}
|
|
1632
|
+
],
|
|
1633
|
+
"name": "send",
|
|
1634
|
+
"outputs": [
|
|
1635
|
+
{
|
|
1636
|
+
"components": [
|
|
1637
|
+
{
|
|
1638
|
+
"internalType": "bytes32",
|
|
1639
|
+
"name": "guid",
|
|
1640
|
+
"type": "bytes32"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"internalType": "uint64",
|
|
1644
|
+
"name": "nonce",
|
|
1645
|
+
"type": "uint64"
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
"components": [
|
|
1649
|
+
{
|
|
1650
|
+
"internalType": "uint256",
|
|
1651
|
+
"name": "nativeFee",
|
|
1652
|
+
"type": "uint256"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"internalType": "uint256",
|
|
1656
|
+
"name": "lzTokenFee",
|
|
1657
|
+
"type": "uint256"
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"internalType": "struct MessagingFee",
|
|
1661
|
+
"name": "fee",
|
|
1662
|
+
"type": "tuple"
|
|
1663
|
+
}
|
|
1664
|
+
],
|
|
1665
|
+
"internalType": "struct MessagingReceipt",
|
|
1666
|
+
"name": "msgReceipt",
|
|
1667
|
+
"type": "tuple"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
"components": [
|
|
1671
|
+
{
|
|
1672
|
+
"internalType": "uint256",
|
|
1673
|
+
"name": "amountSentLD",
|
|
1674
|
+
"type": "uint256"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"internalType": "uint256",
|
|
1678
|
+
"name": "amountReceivedLD",
|
|
1679
|
+
"type": "uint256"
|
|
1680
|
+
}
|
|
1681
|
+
],
|
|
1682
|
+
"internalType": "struct OFTReceipt",
|
|
1683
|
+
"name": "oftReceipt",
|
|
1684
|
+
"type": "tuple"
|
|
1685
|
+
}
|
|
1686
|
+
],
|
|
1687
|
+
"stateMutability": "payable",
|
|
1688
|
+
"type": "function"
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"inputs": [
|
|
1692
|
+
{
|
|
1693
|
+
"internalType": "address",
|
|
1694
|
+
"name": "_delegate",
|
|
1695
|
+
"type": "address"
|
|
1696
|
+
}
|
|
1697
|
+
],
|
|
1698
|
+
"name": "setDelegate",
|
|
1699
|
+
"outputs": [],
|
|
1700
|
+
"stateMutability": "nonpayable",
|
|
1701
|
+
"type": "function"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"inputs": [
|
|
1705
|
+
{
|
|
1706
|
+
"components": [
|
|
1707
|
+
{
|
|
1708
|
+
"internalType": "uint32",
|
|
1709
|
+
"name": "eid",
|
|
1710
|
+
"type": "uint32"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"internalType": "uint16",
|
|
1714
|
+
"name": "msgType",
|
|
1715
|
+
"type": "uint16"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"internalType": "bytes",
|
|
1719
|
+
"name": "options",
|
|
1720
|
+
"type": "bytes"
|
|
1721
|
+
}
|
|
1722
|
+
],
|
|
1723
|
+
"internalType": "struct EnforcedOptionParam[]",
|
|
1724
|
+
"name": "_enforcedOptions",
|
|
1725
|
+
"type": "tuple[]"
|
|
1726
|
+
}
|
|
1727
|
+
],
|
|
1728
|
+
"name": "setEnforcedOptions",
|
|
1729
|
+
"outputs": [],
|
|
1730
|
+
"stateMutability": "nonpayable",
|
|
1731
|
+
"type": "function"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"inputs": [
|
|
1735
|
+
{
|
|
1736
|
+
"internalType": "address",
|
|
1737
|
+
"name": "_address",
|
|
1738
|
+
"type": "address"
|
|
1739
|
+
}
|
|
1740
|
+
],
|
|
1741
|
+
"name": "setMinter",
|
|
1742
|
+
"outputs": [],
|
|
1743
|
+
"stateMutability": "nonpayable",
|
|
1744
|
+
"type": "function"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"inputs": [
|
|
1748
|
+
{
|
|
1749
|
+
"internalType": "address",
|
|
1750
|
+
"name": "_msgInspector",
|
|
1751
|
+
"type": "address"
|
|
1752
|
+
}
|
|
1753
|
+
],
|
|
1754
|
+
"name": "setMsgInspector",
|
|
1755
|
+
"outputs": [],
|
|
1756
|
+
"stateMutability": "nonpayable",
|
|
1757
|
+
"type": "function"
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"inputs": [
|
|
1761
|
+
{
|
|
1762
|
+
"internalType": "uint32",
|
|
1763
|
+
"name": "_eid",
|
|
1764
|
+
"type": "uint32"
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"internalType": "bytes32",
|
|
1768
|
+
"name": "_peer",
|
|
1769
|
+
"type": "bytes32"
|
|
1770
|
+
}
|
|
1771
|
+
],
|
|
1772
|
+
"name": "setPeer",
|
|
1773
|
+
"outputs": [],
|
|
1774
|
+
"stateMutability": "nonpayable",
|
|
1775
|
+
"type": "function"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"inputs": [
|
|
1779
|
+
{
|
|
1780
|
+
"internalType": "address",
|
|
1781
|
+
"name": "_preCrime",
|
|
1782
|
+
"type": "address"
|
|
1783
|
+
}
|
|
1784
|
+
],
|
|
1785
|
+
"name": "setPreCrime",
|
|
1786
|
+
"outputs": [],
|
|
1787
|
+
"stateMutability": "nonpayable",
|
|
1788
|
+
"type": "function"
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"inputs": [
|
|
1792
|
+
{
|
|
1793
|
+
"internalType": "uint256",
|
|
1794
|
+
"name": "newTimestamp",
|
|
1795
|
+
"type": "uint256"
|
|
1796
|
+
}
|
|
1797
|
+
],
|
|
1798
|
+
"name": "setTransferAllowedTime",
|
|
1799
|
+
"outputs": [],
|
|
1800
|
+
"stateMutability": "nonpayable",
|
|
1801
|
+
"type": "function"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"inputs": [
|
|
1805
|
+
{
|
|
1806
|
+
"internalType": "address",
|
|
1807
|
+
"name": "_address",
|
|
1808
|
+
"type": "address"
|
|
1809
|
+
}
|
|
1810
|
+
],
|
|
1811
|
+
"name": "setWhitelisted",
|
|
1812
|
+
"outputs": [],
|
|
1813
|
+
"stateMutability": "nonpayable",
|
|
1814
|
+
"type": "function"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"inputs": [],
|
|
1818
|
+
"name": "sharedDecimals",
|
|
1819
|
+
"outputs": [
|
|
1820
|
+
{
|
|
1821
|
+
"internalType": "uint8",
|
|
1822
|
+
"name": "",
|
|
1823
|
+
"type": "uint8"
|
|
1824
|
+
}
|
|
1825
|
+
],
|
|
1826
|
+
"stateMutability": "view",
|
|
1827
|
+
"type": "function"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"inputs": [],
|
|
1831
|
+
"name": "supplyAllChains",
|
|
1832
|
+
"outputs": [
|
|
1833
|
+
{
|
|
1834
|
+
"internalType": "uint256",
|
|
1835
|
+
"name": "",
|
|
1836
|
+
"type": "uint256"
|
|
1837
|
+
}
|
|
1838
|
+
],
|
|
1839
|
+
"stateMutability": "view",
|
|
1840
|
+
"type": "function"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
"inputs": [],
|
|
1844
|
+
"name": "symbol",
|
|
1845
|
+
"outputs": [
|
|
1846
|
+
{
|
|
1847
|
+
"internalType": "string",
|
|
1848
|
+
"name": "",
|
|
1849
|
+
"type": "string"
|
|
1850
|
+
}
|
|
1851
|
+
],
|
|
1852
|
+
"stateMutability": "view",
|
|
1853
|
+
"type": "function"
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"inputs": [
|
|
1857
|
+
{
|
|
1858
|
+
"internalType": "uint256",
|
|
1859
|
+
"name": "_newSupply",
|
|
1860
|
+
"type": "uint256"
|
|
1861
|
+
}
|
|
1862
|
+
],
|
|
1863
|
+
"name": "syncSupplyAllChains",
|
|
1864
|
+
"outputs": [],
|
|
1865
|
+
"stateMutability": "nonpayable",
|
|
1866
|
+
"type": "function"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"inputs": [],
|
|
1870
|
+
"name": "token",
|
|
1871
|
+
"outputs": [
|
|
1872
|
+
{
|
|
1873
|
+
"internalType": "address",
|
|
1874
|
+
"name": "",
|
|
1875
|
+
"type": "address"
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1878
|
+
"stateMutability": "view",
|
|
1879
|
+
"type": "function"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"inputs": [],
|
|
1883
|
+
"name": "totalSupply",
|
|
1884
|
+
"outputs": [
|
|
1885
|
+
{
|
|
1886
|
+
"internalType": "uint256",
|
|
1887
|
+
"name": "",
|
|
1888
|
+
"type": "uint256"
|
|
1889
|
+
}
|
|
1890
|
+
],
|
|
1891
|
+
"stateMutability": "view",
|
|
1892
|
+
"type": "function"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
"inputs": [
|
|
1896
|
+
{
|
|
1897
|
+
"internalType": "address",
|
|
1898
|
+
"name": "to",
|
|
1899
|
+
"type": "address"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
"internalType": "uint256",
|
|
1903
|
+
"name": "value",
|
|
1904
|
+
"type": "uint256"
|
|
1905
|
+
}
|
|
1906
|
+
],
|
|
1907
|
+
"name": "transfer",
|
|
1908
|
+
"outputs": [
|
|
1909
|
+
{
|
|
1910
|
+
"internalType": "bool",
|
|
1911
|
+
"name": "",
|
|
1912
|
+
"type": "bool"
|
|
1913
|
+
}
|
|
1914
|
+
],
|
|
1915
|
+
"stateMutability": "nonpayable",
|
|
1916
|
+
"type": "function"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"inputs": [],
|
|
1920
|
+
"name": "transferAllowedTime",
|
|
1921
|
+
"outputs": [
|
|
1922
|
+
{
|
|
1923
|
+
"internalType": "uint256",
|
|
1924
|
+
"name": "",
|
|
1925
|
+
"type": "uint256"
|
|
1926
|
+
}
|
|
1927
|
+
],
|
|
1928
|
+
"stateMutability": "view",
|
|
1929
|
+
"type": "function"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
"inputs": [
|
|
1933
|
+
{
|
|
1934
|
+
"internalType": "address",
|
|
1935
|
+
"name": "from",
|
|
1936
|
+
"type": "address"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"internalType": "address",
|
|
1940
|
+
"name": "to",
|
|
1941
|
+
"type": "address"
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"internalType": "uint256",
|
|
1945
|
+
"name": "value",
|
|
1946
|
+
"type": "uint256"
|
|
1947
|
+
}
|
|
1948
|
+
],
|
|
1949
|
+
"name": "transferFrom",
|
|
1950
|
+
"outputs": [
|
|
1951
|
+
{
|
|
1952
|
+
"internalType": "bool",
|
|
1953
|
+
"name": "",
|
|
1954
|
+
"type": "bool"
|
|
1955
|
+
}
|
|
1956
|
+
],
|
|
1957
|
+
"stateMutability": "nonpayable",
|
|
1958
|
+
"type": "function"
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"inputs": [
|
|
1962
|
+
{
|
|
1963
|
+
"internalType": "address",
|
|
1964
|
+
"name": "newOwner",
|
|
1965
|
+
"type": "address"
|
|
1966
|
+
}
|
|
1967
|
+
],
|
|
1968
|
+
"name": "transferOwnership",
|
|
1969
|
+
"outputs": [],
|
|
1970
|
+
"stateMutability": "nonpayable",
|
|
1971
|
+
"type": "function"
|
|
1972
|
+
}
|
|
1973
|
+
] as const satisfies Abi;
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Type-safe ABI for PieverseOFT
|
|
1977
|
+
*/
|
|
1978
|
+
export type PieverseOFTAbi = typeof PieverseOFTAbi;
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* Contract instance type for PieverseOFT
|
|
1982
|
+
*/
|
|
1983
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1984
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1985
|
+
export type PieverseOFTContract = any;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* PieverseOFT Contract Class
|
|
1989
|
+
*
|
|
1990
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1991
|
+
*
|
|
1992
|
+
* @example
|
|
1993
|
+
* ```typescript
|
|
1994
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1995
|
+
* import { mainnet } from 'viem/chains';
|
|
1996
|
+
* import { PieverseOFT } from 'PieverseOFT';
|
|
1997
|
+
*
|
|
1998
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1999
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
2000
|
+
*
|
|
2001
|
+
* const contract = new PieverseOFT('0x...', { publicClient, walletClient });
|
|
2002
|
+
*
|
|
2003
|
+
* // Read functions
|
|
2004
|
+
* const result = await contract.balanceOf('0x...');
|
|
2005
|
+
*
|
|
2006
|
+
* // Write functions
|
|
2007
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
2008
|
+
*
|
|
2009
|
+
* // Simulate transactions (dry-run)
|
|
2010
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
2011
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
2012
|
+
*
|
|
2013
|
+
* // Watch events
|
|
2014
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2015
|
+
* console.log('Transfer event:', event);
|
|
2016
|
+
* });
|
|
2017
|
+
* ```
|
|
2018
|
+
*/
|
|
2019
|
+
export class PieverseOFT {
|
|
2020
|
+
private contract: PieverseOFTContract;
|
|
2021
|
+
private contractAddress: Address;
|
|
2022
|
+
private publicClient: PublicClient;
|
|
2023
|
+
|
|
2024
|
+
constructor(
|
|
2025
|
+
address: Address,
|
|
2026
|
+
clients: {
|
|
2027
|
+
publicClient: PublicClient;
|
|
2028
|
+
walletClient?: WalletClient;
|
|
2029
|
+
}
|
|
2030
|
+
) {
|
|
2031
|
+
this.contractAddress = address;
|
|
2032
|
+
this.publicClient = clients.publicClient;
|
|
2033
|
+
this.contract = getContract({
|
|
2034
|
+
address,
|
|
2035
|
+
abi: PieverseOFTAbi,
|
|
2036
|
+
client: {
|
|
2037
|
+
public: clients.publicClient,
|
|
2038
|
+
wallet: clients.walletClient,
|
|
2039
|
+
},
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* Get the contract address
|
|
2045
|
+
*/
|
|
2046
|
+
get address(): Address {
|
|
2047
|
+
return this.contractAddress;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* Get the underlying viem contract instance.
|
|
2052
|
+
*/
|
|
2053
|
+
getContract(): PieverseOFTContract {
|
|
2054
|
+
return this.contract;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* ETA
|
|
2059
|
+
* view
|
|
2060
|
+
*/
|
|
2061
|
+
async ETA(): Promise<bigint> {
|
|
2062
|
+
return this.contract.read.ETA() as Promise<bigint>;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* MAX_SUPPLY
|
|
2067
|
+
* view
|
|
2068
|
+
*/
|
|
2069
|
+
async MAX_SUPPLY(): Promise<bigint> {
|
|
2070
|
+
return this.contract.read.MAX_SUPPLY() as Promise<bigint>;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* SEND
|
|
2075
|
+
* view
|
|
2076
|
+
*/
|
|
2077
|
+
async SEND(): Promise<bigint> {
|
|
2078
|
+
return this.contract.read.SEND() as Promise<bigint>;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* SEND_AND_CALL
|
|
2083
|
+
* view
|
|
2084
|
+
*/
|
|
2085
|
+
async SEND_AND_CALL(): Promise<bigint> {
|
|
2086
|
+
return this.contract.read.SEND_AND_CALL() as Promise<bigint>;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* allowInitializePath
|
|
2091
|
+
* view
|
|
2092
|
+
*/
|
|
2093
|
+
async allowInitializePath(origin: Origin): Promise<boolean> {
|
|
2094
|
+
return this.contract.read.allowInitializePath([origin] as const) as Promise<boolean>;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* allowance
|
|
2099
|
+
* view
|
|
2100
|
+
*/
|
|
2101
|
+
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
2102
|
+
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* approvalRequired
|
|
2107
|
+
* pure
|
|
2108
|
+
*/
|
|
2109
|
+
async approvalRequired(): Promise<boolean> {
|
|
2110
|
+
return this.contract.read.approvalRequired() as Promise<boolean>;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* areTransfersAllowed
|
|
2115
|
+
* view
|
|
2116
|
+
*/
|
|
2117
|
+
async areTransfersAllowed(): Promise<boolean> {
|
|
2118
|
+
return this.contract.read.areTransfersAllowed() as Promise<boolean>;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* balanceOf
|
|
2123
|
+
* view
|
|
2124
|
+
*/
|
|
2125
|
+
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
2126
|
+
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* combineOptions
|
|
2131
|
+
* view
|
|
2132
|
+
*/
|
|
2133
|
+
async combineOptions(_eid: bigint, _msgType: bigint, _extraOptions: `0x${string}`): Promise<`0x${string}`> {
|
|
2134
|
+
return this.contract.read.combineOptions([_eid, _msgType, _extraOptions] as const) as Promise<`0x${string}`>;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
/**
|
|
2138
|
+
* decimalConversionRate
|
|
2139
|
+
* view
|
|
2140
|
+
*/
|
|
2141
|
+
async decimalConversionRate(): Promise<bigint> {
|
|
2142
|
+
return this.contract.read.decimalConversionRate() as Promise<bigint>;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* decimals
|
|
2147
|
+
* view
|
|
2148
|
+
*/
|
|
2149
|
+
async decimals(): Promise<bigint> {
|
|
2150
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
/**
|
|
2154
|
+
* endpoint
|
|
2155
|
+
* view
|
|
2156
|
+
*/
|
|
2157
|
+
async endpoint(): Promise<`0x${string}`> {
|
|
2158
|
+
return this.contract.read.endpoint() as Promise<`0x${string}`>;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* enforcedOptions
|
|
2163
|
+
* view
|
|
2164
|
+
*/
|
|
2165
|
+
async enforcedOptions(eid: bigint, msgType: bigint): Promise<`0x${string}`> {
|
|
2166
|
+
return this.contract.read.enforcedOptions([eid, msgType] as const) as Promise<`0x${string}`>;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
/**
|
|
2170
|
+
* isComposeMsgSender
|
|
2171
|
+
* view
|
|
2172
|
+
*/
|
|
2173
|
+
async isComposeMsgSender(arg0: Origin, arg1: `0x${string}`, _sender: `0x${string}`): Promise<boolean> {
|
|
2174
|
+
return this.contract.read.isComposeMsgSender([arg0, arg1, _sender] as const) as Promise<boolean>;
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* isMinter
|
|
2179
|
+
* view
|
|
2180
|
+
*/
|
|
2181
|
+
async isMinter(arg0: `0x${string}`): Promise<boolean> {
|
|
2182
|
+
return this.contract.read.isMinter([arg0] as const) as Promise<boolean>;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* isPeer
|
|
2187
|
+
* view
|
|
2188
|
+
*/
|
|
2189
|
+
async isPeer(_eid: bigint, _peer: `0x${string}`): Promise<boolean> {
|
|
2190
|
+
return this.contract.read.isPeer([_eid, _peer] as const) as Promise<boolean>;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* isWhitelisted
|
|
2195
|
+
* view
|
|
2196
|
+
*/
|
|
2197
|
+
async isWhitelisted(arg0: `0x${string}`): Promise<boolean> {
|
|
2198
|
+
return this.contract.read.isWhitelisted([arg0] as const) as Promise<boolean>;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* msgInspector
|
|
2203
|
+
* view
|
|
2204
|
+
*/
|
|
2205
|
+
async msgInspector(): Promise<`0x${string}`> {
|
|
2206
|
+
return this.contract.read.msgInspector() as Promise<`0x${string}`>;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* multisig
|
|
2211
|
+
* view
|
|
2212
|
+
*/
|
|
2213
|
+
async multisig(): Promise<`0x${string}`> {
|
|
2214
|
+
return this.contract.read.multisig() as Promise<`0x${string}`>;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* name
|
|
2219
|
+
* view
|
|
2220
|
+
*/
|
|
2221
|
+
async name(): Promise<string> {
|
|
2222
|
+
return this.contract.read.name() as Promise<string>;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* nextNonce
|
|
2227
|
+
* view
|
|
2228
|
+
*/
|
|
2229
|
+
async nextNonce(arg0: bigint, arg1: `0x${string}`): Promise<bigint> {
|
|
2230
|
+
return this.contract.read.nextNonce([arg0, arg1] as const) as Promise<bigint>;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* oApp
|
|
2235
|
+
* view
|
|
2236
|
+
*/
|
|
2237
|
+
async oApp(): Promise<`0x${string}`> {
|
|
2238
|
+
return this.contract.read.oApp() as Promise<`0x${string}`>;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
/**
|
|
2242
|
+
* oAppVersion
|
|
2243
|
+
* pure
|
|
2244
|
+
*/
|
|
2245
|
+
async oAppVersion(): Promise<[bigint, bigint]> {
|
|
2246
|
+
return this.contract.read.oAppVersion() as Promise<[bigint, bigint]>;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* oftVersion
|
|
2251
|
+
* pure
|
|
2252
|
+
*/
|
|
2253
|
+
async oftVersion(): Promise<[`0x${string}`, bigint]> {
|
|
2254
|
+
return this.contract.read.oftVersion() as Promise<[`0x${string}`, bigint]>;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* owner
|
|
2259
|
+
* view
|
|
2260
|
+
*/
|
|
2261
|
+
async owner(): Promise<`0x${string}`> {
|
|
2262
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
/**
|
|
2266
|
+
* peers
|
|
2267
|
+
* view
|
|
2268
|
+
*/
|
|
2269
|
+
async peers(eid: bigint): Promise<`0x${string}`> {
|
|
2270
|
+
return this.contract.read.peers([eid] as const) as Promise<`0x${string}`>;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
/**
|
|
2274
|
+
* preCrime
|
|
2275
|
+
* view
|
|
2276
|
+
*/
|
|
2277
|
+
async preCrime(): Promise<`0x${string}`> {
|
|
2278
|
+
return this.contract.read.preCrime() as Promise<`0x${string}`>;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* quoteOFT
|
|
2283
|
+
* view
|
|
2284
|
+
*/
|
|
2285
|
+
async quoteOFT(_sendParam: SendParam): Promise<[OFTLimit, OFTFeeDetail[], OFTReceipt]> {
|
|
2286
|
+
return this.contract.read.quoteOFT([_sendParam] as const) as Promise<[OFTLimit, OFTFeeDetail[], OFTReceipt]>;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* quoteSend
|
|
2291
|
+
* view
|
|
2292
|
+
*/
|
|
2293
|
+
async quoteSend(_sendParam: SendParam, _payInLzToken: boolean): Promise<MessagingFee> {
|
|
2294
|
+
return this.contract.read.quoteSend([_sendParam, _payInLzToken] as const) as Promise<MessagingFee>;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* sharedDecimals
|
|
2299
|
+
* view
|
|
2300
|
+
*/
|
|
2301
|
+
async sharedDecimals(): Promise<bigint> {
|
|
2302
|
+
return this.contract.read.sharedDecimals() as Promise<bigint>;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
/**
|
|
2306
|
+
* supplyAllChains
|
|
2307
|
+
* view
|
|
2308
|
+
*/
|
|
2309
|
+
async supplyAllChains(): Promise<bigint> {
|
|
2310
|
+
return this.contract.read.supplyAllChains() as Promise<bigint>;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* symbol
|
|
2315
|
+
* view
|
|
2316
|
+
*/
|
|
2317
|
+
async symbol(): Promise<string> {
|
|
2318
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* token
|
|
2323
|
+
* view
|
|
2324
|
+
*/
|
|
2325
|
+
async token(): Promise<`0x${string}`> {
|
|
2326
|
+
return this.contract.read.token() as Promise<`0x${string}`>;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
/**
|
|
2330
|
+
* totalSupply
|
|
2331
|
+
* view
|
|
2332
|
+
*/
|
|
2333
|
+
async totalSupply(): Promise<bigint> {
|
|
2334
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
/**
|
|
2338
|
+
* transferAllowedTime
|
|
2339
|
+
* view
|
|
2340
|
+
*/
|
|
2341
|
+
async transferAllowedTime(): Promise<bigint> {
|
|
2342
|
+
return this.contract.read.transferAllowedTime() as Promise<bigint>;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
/**
|
|
2346
|
+
* approve
|
|
2347
|
+
* nonpayable
|
|
2348
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2349
|
+
*/
|
|
2350
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
2351
|
+
accessList?: import('viem').AccessList;
|
|
2352
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2353
|
+
chain?: import('viem').Chain | null;
|
|
2354
|
+
dataSuffix?: `0x${string}`;
|
|
2355
|
+
gas?: bigint;
|
|
2356
|
+
gasPrice?: bigint;
|
|
2357
|
+
maxFeePerGas?: bigint;
|
|
2358
|
+
maxPriorityFeePerGas?: bigint;
|
|
2359
|
+
nonce?: number;
|
|
2360
|
+
value?: bigint;
|
|
2361
|
+
}): Promise<`0x${string}`> {
|
|
2362
|
+
if (!this.contract.write) {
|
|
2363
|
+
throw new Error('Wallet client is required for write operations');
|
|
2364
|
+
}
|
|
2365
|
+
return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* lzReceive
|
|
2370
|
+
* payable
|
|
2371
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2372
|
+
*/
|
|
2373
|
+
async lzReceive(_origin: Origin, _guid: `0x${string}`, _message: `0x${string}`, _executor: `0x${string}`, _extraData: `0x${string}`, options?: {
|
|
2374
|
+
accessList?: import('viem').AccessList;
|
|
2375
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2376
|
+
chain?: import('viem').Chain | null;
|
|
2377
|
+
dataSuffix?: `0x${string}`;
|
|
2378
|
+
gas?: bigint;
|
|
2379
|
+
gasPrice?: bigint;
|
|
2380
|
+
maxFeePerGas?: bigint;
|
|
2381
|
+
maxPriorityFeePerGas?: bigint;
|
|
2382
|
+
nonce?: number;
|
|
2383
|
+
value?: bigint;
|
|
2384
|
+
}): Promise<`0x${string}`> {
|
|
2385
|
+
if (!this.contract.write) {
|
|
2386
|
+
throw new Error('Wallet client is required for write operations');
|
|
2387
|
+
}
|
|
2388
|
+
return this.contract.write.lzReceive([_origin, _guid, _message, _executor, _extraData] as const, options) as Promise<`0x${string}`>;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
/**
|
|
2392
|
+
* lzReceiveAndRevert
|
|
2393
|
+
* payable
|
|
2394
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2395
|
+
*/
|
|
2396
|
+
async lzReceiveAndRevert(_packets: InboundPacket[], options?: {
|
|
2397
|
+
accessList?: import('viem').AccessList;
|
|
2398
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2399
|
+
chain?: import('viem').Chain | null;
|
|
2400
|
+
dataSuffix?: `0x${string}`;
|
|
2401
|
+
gas?: bigint;
|
|
2402
|
+
gasPrice?: bigint;
|
|
2403
|
+
maxFeePerGas?: bigint;
|
|
2404
|
+
maxPriorityFeePerGas?: bigint;
|
|
2405
|
+
nonce?: number;
|
|
2406
|
+
value?: bigint;
|
|
2407
|
+
}): Promise<`0x${string}`> {
|
|
2408
|
+
if (!this.contract.write) {
|
|
2409
|
+
throw new Error('Wallet client is required for write operations');
|
|
2410
|
+
}
|
|
2411
|
+
return this.contract.write.lzReceiveAndRevert([_packets] as const, options) as Promise<`0x${string}`>;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
/**
|
|
2415
|
+
* lzReceiveSimulate
|
|
2416
|
+
* payable
|
|
2417
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2418
|
+
*/
|
|
2419
|
+
async lzReceiveSimulate(_origin: Origin, _guid: `0x${string}`, _message: `0x${string}`, _executor: `0x${string}`, _extraData: `0x${string}`, options?: {
|
|
2420
|
+
accessList?: import('viem').AccessList;
|
|
2421
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2422
|
+
chain?: import('viem').Chain | null;
|
|
2423
|
+
dataSuffix?: `0x${string}`;
|
|
2424
|
+
gas?: bigint;
|
|
2425
|
+
gasPrice?: bigint;
|
|
2426
|
+
maxFeePerGas?: bigint;
|
|
2427
|
+
maxPriorityFeePerGas?: bigint;
|
|
2428
|
+
nonce?: number;
|
|
2429
|
+
value?: bigint;
|
|
2430
|
+
}): Promise<`0x${string}`> {
|
|
2431
|
+
if (!this.contract.write) {
|
|
2432
|
+
throw new Error('Wallet client is required for write operations');
|
|
2433
|
+
}
|
|
2434
|
+
return this.contract.write.lzReceiveSimulate([_origin, _guid, _message, _executor, _extraData] as const, options) as Promise<`0x${string}`>;
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* mint
|
|
2439
|
+
* nonpayable
|
|
2440
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2441
|
+
*/
|
|
2442
|
+
async mint(_to: `0x${string}`, _amount: bigint, options?: {
|
|
2443
|
+
accessList?: import('viem').AccessList;
|
|
2444
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2445
|
+
chain?: import('viem').Chain | null;
|
|
2446
|
+
dataSuffix?: `0x${string}`;
|
|
2447
|
+
gas?: bigint;
|
|
2448
|
+
gasPrice?: bigint;
|
|
2449
|
+
maxFeePerGas?: bigint;
|
|
2450
|
+
maxPriorityFeePerGas?: bigint;
|
|
2451
|
+
nonce?: number;
|
|
2452
|
+
value?: bigint;
|
|
2453
|
+
}): Promise<`0x${string}`> {
|
|
2454
|
+
if (!this.contract.write) {
|
|
2455
|
+
throw new Error('Wallet client is required for write operations');
|
|
2456
|
+
}
|
|
2457
|
+
return this.contract.write.mint([_to, _amount] as const, options) as Promise<`0x${string}`>;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* renounceOwnership
|
|
2462
|
+
* nonpayable
|
|
2463
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2464
|
+
*/
|
|
2465
|
+
async renounceOwnership(options?: {
|
|
2466
|
+
accessList?: import('viem').AccessList;
|
|
2467
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2468
|
+
chain?: import('viem').Chain | null;
|
|
2469
|
+
dataSuffix?: `0x${string}`;
|
|
2470
|
+
gas?: bigint;
|
|
2471
|
+
gasPrice?: bigint;
|
|
2472
|
+
maxFeePerGas?: bigint;
|
|
2473
|
+
maxPriorityFeePerGas?: bigint;
|
|
2474
|
+
nonce?: number;
|
|
2475
|
+
value?: bigint;
|
|
2476
|
+
}): Promise<`0x${string}`> {
|
|
2477
|
+
if (!this.contract.write) {
|
|
2478
|
+
throw new Error('Wallet client is required for write operations');
|
|
2479
|
+
}
|
|
2480
|
+
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* send
|
|
2485
|
+
* payable
|
|
2486
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2487
|
+
*/
|
|
2488
|
+
async send(_sendParam: SendParam, _fee: MessagingFee, _refundAddress: `0x${string}`, options?: {
|
|
2489
|
+
accessList?: import('viem').AccessList;
|
|
2490
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2491
|
+
chain?: import('viem').Chain | null;
|
|
2492
|
+
dataSuffix?: `0x${string}`;
|
|
2493
|
+
gas?: bigint;
|
|
2494
|
+
gasPrice?: bigint;
|
|
2495
|
+
maxFeePerGas?: bigint;
|
|
2496
|
+
maxPriorityFeePerGas?: bigint;
|
|
2497
|
+
nonce?: number;
|
|
2498
|
+
value?: bigint;
|
|
2499
|
+
}): Promise<`0x${string}`> {
|
|
2500
|
+
if (!this.contract.write) {
|
|
2501
|
+
throw new Error('Wallet client is required for write operations');
|
|
2502
|
+
}
|
|
2503
|
+
return this.contract.write.send([_sendParam, _fee, _refundAddress] as const, options) as Promise<`0x${string}`>;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* setDelegate
|
|
2508
|
+
* nonpayable
|
|
2509
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2510
|
+
*/
|
|
2511
|
+
async setDelegate(_delegate: `0x${string}`, options?: {
|
|
2512
|
+
accessList?: import('viem').AccessList;
|
|
2513
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2514
|
+
chain?: import('viem').Chain | null;
|
|
2515
|
+
dataSuffix?: `0x${string}`;
|
|
2516
|
+
gas?: bigint;
|
|
2517
|
+
gasPrice?: bigint;
|
|
2518
|
+
maxFeePerGas?: bigint;
|
|
2519
|
+
maxPriorityFeePerGas?: bigint;
|
|
2520
|
+
nonce?: number;
|
|
2521
|
+
value?: bigint;
|
|
2522
|
+
}): Promise<`0x${string}`> {
|
|
2523
|
+
if (!this.contract.write) {
|
|
2524
|
+
throw new Error('Wallet client is required for write operations');
|
|
2525
|
+
}
|
|
2526
|
+
return this.contract.write.setDelegate([_delegate] as const, options) as Promise<`0x${string}`>;
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
/**
|
|
2530
|
+
* setEnforcedOptions
|
|
2531
|
+
* nonpayable
|
|
2532
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2533
|
+
*/
|
|
2534
|
+
async setEnforcedOptions(_enforcedOptions: EnforcedOptionParam[], options?: {
|
|
2535
|
+
accessList?: import('viem').AccessList;
|
|
2536
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2537
|
+
chain?: import('viem').Chain | null;
|
|
2538
|
+
dataSuffix?: `0x${string}`;
|
|
2539
|
+
gas?: bigint;
|
|
2540
|
+
gasPrice?: bigint;
|
|
2541
|
+
maxFeePerGas?: bigint;
|
|
2542
|
+
maxPriorityFeePerGas?: bigint;
|
|
2543
|
+
nonce?: number;
|
|
2544
|
+
value?: bigint;
|
|
2545
|
+
}): Promise<`0x${string}`> {
|
|
2546
|
+
if (!this.contract.write) {
|
|
2547
|
+
throw new Error('Wallet client is required for write operations');
|
|
2548
|
+
}
|
|
2549
|
+
return this.contract.write.setEnforcedOptions([_enforcedOptions] as const, options) as Promise<`0x${string}`>;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
* setMinter
|
|
2554
|
+
* nonpayable
|
|
2555
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2556
|
+
*/
|
|
2557
|
+
async setMinter(_address: `0x${string}`, options?: {
|
|
2558
|
+
accessList?: import('viem').AccessList;
|
|
2559
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2560
|
+
chain?: import('viem').Chain | null;
|
|
2561
|
+
dataSuffix?: `0x${string}`;
|
|
2562
|
+
gas?: bigint;
|
|
2563
|
+
gasPrice?: bigint;
|
|
2564
|
+
maxFeePerGas?: bigint;
|
|
2565
|
+
maxPriorityFeePerGas?: bigint;
|
|
2566
|
+
nonce?: number;
|
|
2567
|
+
value?: bigint;
|
|
2568
|
+
}): Promise<`0x${string}`> {
|
|
2569
|
+
if (!this.contract.write) {
|
|
2570
|
+
throw new Error('Wallet client is required for write operations');
|
|
2571
|
+
}
|
|
2572
|
+
return this.contract.write.setMinter([_address] as const, options) as Promise<`0x${string}`>;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* setMsgInspector
|
|
2577
|
+
* nonpayable
|
|
2578
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2579
|
+
*/
|
|
2580
|
+
async setMsgInspector(_msgInspector: `0x${string}`, options?: {
|
|
2581
|
+
accessList?: import('viem').AccessList;
|
|
2582
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2583
|
+
chain?: import('viem').Chain | null;
|
|
2584
|
+
dataSuffix?: `0x${string}`;
|
|
2585
|
+
gas?: bigint;
|
|
2586
|
+
gasPrice?: bigint;
|
|
2587
|
+
maxFeePerGas?: bigint;
|
|
2588
|
+
maxPriorityFeePerGas?: bigint;
|
|
2589
|
+
nonce?: number;
|
|
2590
|
+
value?: bigint;
|
|
2591
|
+
}): Promise<`0x${string}`> {
|
|
2592
|
+
if (!this.contract.write) {
|
|
2593
|
+
throw new Error('Wallet client is required for write operations');
|
|
2594
|
+
}
|
|
2595
|
+
return this.contract.write.setMsgInspector([_msgInspector] as const, options) as Promise<`0x${string}`>;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* setPeer
|
|
2600
|
+
* nonpayable
|
|
2601
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2602
|
+
*/
|
|
2603
|
+
async setPeer(_eid: bigint, _peer: `0x${string}`, options?: {
|
|
2604
|
+
accessList?: import('viem').AccessList;
|
|
2605
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2606
|
+
chain?: import('viem').Chain | null;
|
|
2607
|
+
dataSuffix?: `0x${string}`;
|
|
2608
|
+
gas?: bigint;
|
|
2609
|
+
gasPrice?: bigint;
|
|
2610
|
+
maxFeePerGas?: bigint;
|
|
2611
|
+
maxPriorityFeePerGas?: bigint;
|
|
2612
|
+
nonce?: number;
|
|
2613
|
+
value?: bigint;
|
|
2614
|
+
}): Promise<`0x${string}`> {
|
|
2615
|
+
if (!this.contract.write) {
|
|
2616
|
+
throw new Error('Wallet client is required for write operations');
|
|
2617
|
+
}
|
|
2618
|
+
return this.contract.write.setPeer([_eid, _peer] as const, options) as Promise<`0x${string}`>;
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
/**
|
|
2622
|
+
* setPreCrime
|
|
2623
|
+
* nonpayable
|
|
2624
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2625
|
+
*/
|
|
2626
|
+
async setPreCrime(_preCrime: `0x${string}`, options?: {
|
|
2627
|
+
accessList?: import('viem').AccessList;
|
|
2628
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2629
|
+
chain?: import('viem').Chain | null;
|
|
2630
|
+
dataSuffix?: `0x${string}`;
|
|
2631
|
+
gas?: bigint;
|
|
2632
|
+
gasPrice?: bigint;
|
|
2633
|
+
maxFeePerGas?: bigint;
|
|
2634
|
+
maxPriorityFeePerGas?: bigint;
|
|
2635
|
+
nonce?: number;
|
|
2636
|
+
value?: bigint;
|
|
2637
|
+
}): Promise<`0x${string}`> {
|
|
2638
|
+
if (!this.contract.write) {
|
|
2639
|
+
throw new Error('Wallet client is required for write operations');
|
|
2640
|
+
}
|
|
2641
|
+
return this.contract.write.setPreCrime([_preCrime] as const, options) as Promise<`0x${string}`>;
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* setTransferAllowedTime
|
|
2646
|
+
* nonpayable
|
|
2647
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2648
|
+
*/
|
|
2649
|
+
async setTransferAllowedTime(newTimestamp: bigint, options?: {
|
|
2650
|
+
accessList?: import('viem').AccessList;
|
|
2651
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2652
|
+
chain?: import('viem').Chain | null;
|
|
2653
|
+
dataSuffix?: `0x${string}`;
|
|
2654
|
+
gas?: bigint;
|
|
2655
|
+
gasPrice?: bigint;
|
|
2656
|
+
maxFeePerGas?: bigint;
|
|
2657
|
+
maxPriorityFeePerGas?: bigint;
|
|
2658
|
+
nonce?: number;
|
|
2659
|
+
value?: bigint;
|
|
2660
|
+
}): Promise<`0x${string}`> {
|
|
2661
|
+
if (!this.contract.write) {
|
|
2662
|
+
throw new Error('Wallet client is required for write operations');
|
|
2663
|
+
}
|
|
2664
|
+
return this.contract.write.setTransferAllowedTime([newTimestamp] as const, options) as Promise<`0x${string}`>;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
/**
|
|
2668
|
+
* setWhitelisted
|
|
2669
|
+
* nonpayable
|
|
2670
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2671
|
+
*/
|
|
2672
|
+
async setWhitelisted(_address: `0x${string}`, options?: {
|
|
2673
|
+
accessList?: import('viem').AccessList;
|
|
2674
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2675
|
+
chain?: import('viem').Chain | null;
|
|
2676
|
+
dataSuffix?: `0x${string}`;
|
|
2677
|
+
gas?: bigint;
|
|
2678
|
+
gasPrice?: bigint;
|
|
2679
|
+
maxFeePerGas?: bigint;
|
|
2680
|
+
maxPriorityFeePerGas?: bigint;
|
|
2681
|
+
nonce?: number;
|
|
2682
|
+
value?: bigint;
|
|
2683
|
+
}): Promise<`0x${string}`> {
|
|
2684
|
+
if (!this.contract.write) {
|
|
2685
|
+
throw new Error('Wallet client is required for write operations');
|
|
2686
|
+
}
|
|
2687
|
+
return this.contract.write.setWhitelisted([_address] as const, options) as Promise<`0x${string}`>;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* syncSupplyAllChains
|
|
2692
|
+
* nonpayable
|
|
2693
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2694
|
+
*/
|
|
2695
|
+
async syncSupplyAllChains(_newSupply: bigint, options?: {
|
|
2696
|
+
accessList?: import('viem').AccessList;
|
|
2697
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2698
|
+
chain?: import('viem').Chain | null;
|
|
2699
|
+
dataSuffix?: `0x${string}`;
|
|
2700
|
+
gas?: bigint;
|
|
2701
|
+
gasPrice?: bigint;
|
|
2702
|
+
maxFeePerGas?: bigint;
|
|
2703
|
+
maxPriorityFeePerGas?: bigint;
|
|
2704
|
+
nonce?: number;
|
|
2705
|
+
value?: bigint;
|
|
2706
|
+
}): Promise<`0x${string}`> {
|
|
2707
|
+
if (!this.contract.write) {
|
|
2708
|
+
throw new Error('Wallet client is required for write operations');
|
|
2709
|
+
}
|
|
2710
|
+
return this.contract.write.syncSupplyAllChains([_newSupply] as const, options) as Promise<`0x${string}`>;
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
/**
|
|
2714
|
+
* transfer
|
|
2715
|
+
* nonpayable
|
|
2716
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2717
|
+
*/
|
|
2718
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
2719
|
+
accessList?: import('viem').AccessList;
|
|
2720
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2721
|
+
chain?: import('viem').Chain | null;
|
|
2722
|
+
dataSuffix?: `0x${string}`;
|
|
2723
|
+
gas?: bigint;
|
|
2724
|
+
gasPrice?: bigint;
|
|
2725
|
+
maxFeePerGas?: bigint;
|
|
2726
|
+
maxPriorityFeePerGas?: bigint;
|
|
2727
|
+
nonce?: number;
|
|
2728
|
+
value?: bigint;
|
|
2729
|
+
}): Promise<`0x${string}`> {
|
|
2730
|
+
if (!this.contract.write) {
|
|
2731
|
+
throw new Error('Wallet client is required for write operations');
|
|
2732
|
+
}
|
|
2733
|
+
return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* transferFrom
|
|
2738
|
+
* nonpayable
|
|
2739
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2740
|
+
*/
|
|
2741
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
2742
|
+
accessList?: import('viem').AccessList;
|
|
2743
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2744
|
+
chain?: import('viem').Chain | null;
|
|
2745
|
+
dataSuffix?: `0x${string}`;
|
|
2746
|
+
gas?: bigint;
|
|
2747
|
+
gasPrice?: bigint;
|
|
2748
|
+
maxFeePerGas?: bigint;
|
|
2749
|
+
maxPriorityFeePerGas?: bigint;
|
|
2750
|
+
nonce?: number;
|
|
2751
|
+
value?: bigint;
|
|
2752
|
+
}): Promise<`0x${string}`> {
|
|
2753
|
+
if (!this.contract.write) {
|
|
2754
|
+
throw new Error('Wallet client is required for write operations');
|
|
2755
|
+
}
|
|
2756
|
+
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* transferOwnership
|
|
2761
|
+
* nonpayable
|
|
2762
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2763
|
+
*/
|
|
2764
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
2765
|
+
accessList?: import('viem').AccessList;
|
|
2766
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2767
|
+
chain?: import('viem').Chain | null;
|
|
2768
|
+
dataSuffix?: `0x${string}`;
|
|
2769
|
+
gas?: bigint;
|
|
2770
|
+
gasPrice?: bigint;
|
|
2771
|
+
maxFeePerGas?: bigint;
|
|
2772
|
+
maxPriorityFeePerGas?: bigint;
|
|
2773
|
+
nonce?: number;
|
|
2774
|
+
value?: bigint;
|
|
2775
|
+
}): Promise<`0x${string}`> {
|
|
2776
|
+
if (!this.contract.write) {
|
|
2777
|
+
throw new Error('Wallet client is required for write operations');
|
|
2778
|
+
}
|
|
2779
|
+
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
2786
|
+
*
|
|
2787
|
+
* @example
|
|
2788
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2789
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
2790
|
+
* console.log('Would succeed:', result.result);
|
|
2791
|
+
*/
|
|
2792
|
+
get simulate() {
|
|
2793
|
+
const contract = this.contract;
|
|
2794
|
+
if (!contract.simulate) {
|
|
2795
|
+
throw new Error('Public client is required for simulation');
|
|
2796
|
+
}
|
|
2797
|
+
return {
|
|
2798
|
+
/**
|
|
2799
|
+
* Simulate approve
|
|
2800
|
+
* Returns gas estimate and result without sending transaction
|
|
2801
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2802
|
+
*/
|
|
2803
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
2804
|
+
accessList?: import('viem').AccessList;
|
|
2805
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2806
|
+
chain?: import('viem').Chain | null;
|
|
2807
|
+
dataSuffix?: `0x${string}`;
|
|
2808
|
+
gas?: bigint;
|
|
2809
|
+
gasPrice?: bigint;
|
|
2810
|
+
maxFeePerGas?: bigint;
|
|
2811
|
+
maxPriorityFeePerGas?: bigint;
|
|
2812
|
+
nonce?: number;
|
|
2813
|
+
value?: bigint;
|
|
2814
|
+
}): Promise<boolean> {
|
|
2815
|
+
return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
|
|
2816
|
+
},
|
|
2817
|
+
/**
|
|
2818
|
+
* Simulate lzReceive
|
|
2819
|
+
* Returns gas estimate and result without sending transaction
|
|
2820
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2821
|
+
*/
|
|
2822
|
+
async lzReceive(_origin: Origin, _guid: `0x${string}`, _message: `0x${string}`, _executor: `0x${string}`, _extraData: `0x${string}`, options?: {
|
|
2823
|
+
accessList?: import('viem').AccessList;
|
|
2824
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2825
|
+
chain?: import('viem').Chain | null;
|
|
2826
|
+
dataSuffix?: `0x${string}`;
|
|
2827
|
+
gas?: bigint;
|
|
2828
|
+
gasPrice?: bigint;
|
|
2829
|
+
maxFeePerGas?: bigint;
|
|
2830
|
+
maxPriorityFeePerGas?: bigint;
|
|
2831
|
+
nonce?: number;
|
|
2832
|
+
value?: bigint;
|
|
2833
|
+
}): Promise<void> {
|
|
2834
|
+
return contract.simulate.lzReceive([_origin, _guid, _message, _executor, _extraData] as const, options) as Promise<void>;
|
|
2835
|
+
},
|
|
2836
|
+
/**
|
|
2837
|
+
* Simulate lzReceiveAndRevert
|
|
2838
|
+
* Returns gas estimate and result without sending transaction
|
|
2839
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2840
|
+
*/
|
|
2841
|
+
async lzReceiveAndRevert(_packets: InboundPacket[], options?: {
|
|
2842
|
+
accessList?: import('viem').AccessList;
|
|
2843
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2844
|
+
chain?: import('viem').Chain | null;
|
|
2845
|
+
dataSuffix?: `0x${string}`;
|
|
2846
|
+
gas?: bigint;
|
|
2847
|
+
gasPrice?: bigint;
|
|
2848
|
+
maxFeePerGas?: bigint;
|
|
2849
|
+
maxPriorityFeePerGas?: bigint;
|
|
2850
|
+
nonce?: number;
|
|
2851
|
+
value?: bigint;
|
|
2852
|
+
}): Promise<void> {
|
|
2853
|
+
return contract.simulate.lzReceiveAndRevert([_packets] as const, options) as Promise<void>;
|
|
2854
|
+
},
|
|
2855
|
+
/**
|
|
2856
|
+
* Simulate lzReceiveSimulate
|
|
2857
|
+
* Returns gas estimate and result without sending transaction
|
|
2858
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2859
|
+
*/
|
|
2860
|
+
async lzReceiveSimulate(_origin: Origin, _guid: `0x${string}`, _message: `0x${string}`, _executor: `0x${string}`, _extraData: `0x${string}`, options?: {
|
|
2861
|
+
accessList?: import('viem').AccessList;
|
|
2862
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2863
|
+
chain?: import('viem').Chain | null;
|
|
2864
|
+
dataSuffix?: `0x${string}`;
|
|
2865
|
+
gas?: bigint;
|
|
2866
|
+
gasPrice?: bigint;
|
|
2867
|
+
maxFeePerGas?: bigint;
|
|
2868
|
+
maxPriorityFeePerGas?: bigint;
|
|
2869
|
+
nonce?: number;
|
|
2870
|
+
value?: bigint;
|
|
2871
|
+
}): Promise<void> {
|
|
2872
|
+
return contract.simulate.lzReceiveSimulate([_origin, _guid, _message, _executor, _extraData] as const, options) as Promise<void>;
|
|
2873
|
+
},
|
|
2874
|
+
/**
|
|
2875
|
+
* Simulate mint
|
|
2876
|
+
* Returns gas estimate and result without sending transaction
|
|
2877
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2878
|
+
*/
|
|
2879
|
+
async mint(_to: `0x${string}`, _amount: bigint, options?: {
|
|
2880
|
+
accessList?: import('viem').AccessList;
|
|
2881
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2882
|
+
chain?: import('viem').Chain | null;
|
|
2883
|
+
dataSuffix?: `0x${string}`;
|
|
2884
|
+
gas?: bigint;
|
|
2885
|
+
gasPrice?: bigint;
|
|
2886
|
+
maxFeePerGas?: bigint;
|
|
2887
|
+
maxPriorityFeePerGas?: bigint;
|
|
2888
|
+
nonce?: number;
|
|
2889
|
+
value?: bigint;
|
|
2890
|
+
}): Promise<void> {
|
|
2891
|
+
return contract.simulate.mint([_to, _amount] as const, options) as Promise<void>;
|
|
2892
|
+
},
|
|
2893
|
+
/**
|
|
2894
|
+
* Simulate renounceOwnership
|
|
2895
|
+
* Returns gas estimate and result without sending transaction
|
|
2896
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2897
|
+
*/
|
|
2898
|
+
async renounceOwnership(options?: {
|
|
2899
|
+
accessList?: import('viem').AccessList;
|
|
2900
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2901
|
+
chain?: import('viem').Chain | null;
|
|
2902
|
+
dataSuffix?: `0x${string}`;
|
|
2903
|
+
gas?: bigint;
|
|
2904
|
+
gasPrice?: bigint;
|
|
2905
|
+
maxFeePerGas?: bigint;
|
|
2906
|
+
maxPriorityFeePerGas?: bigint;
|
|
2907
|
+
nonce?: number;
|
|
2908
|
+
value?: bigint;
|
|
2909
|
+
}): Promise<void> {
|
|
2910
|
+
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
2911
|
+
},
|
|
2912
|
+
/**
|
|
2913
|
+
* Simulate send
|
|
2914
|
+
* Returns gas estimate and result without sending transaction
|
|
2915
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2916
|
+
*/
|
|
2917
|
+
async send(_sendParam: SendParam, _fee: MessagingFee, _refundAddress: `0x${string}`, options?: {
|
|
2918
|
+
accessList?: import('viem').AccessList;
|
|
2919
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2920
|
+
chain?: import('viem').Chain | null;
|
|
2921
|
+
dataSuffix?: `0x${string}`;
|
|
2922
|
+
gas?: bigint;
|
|
2923
|
+
gasPrice?: bigint;
|
|
2924
|
+
maxFeePerGas?: bigint;
|
|
2925
|
+
maxPriorityFeePerGas?: bigint;
|
|
2926
|
+
nonce?: number;
|
|
2927
|
+
value?: bigint;
|
|
2928
|
+
}): Promise<[MessagingReceipt, OFTReceipt]> {
|
|
2929
|
+
return contract.simulate.send([_sendParam, _fee, _refundAddress] as const, options) as Promise<[MessagingReceipt, OFTReceipt]>;
|
|
2930
|
+
},
|
|
2931
|
+
/**
|
|
2932
|
+
* Simulate setDelegate
|
|
2933
|
+
* Returns gas estimate and result without sending transaction
|
|
2934
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2935
|
+
*/
|
|
2936
|
+
async setDelegate(_delegate: `0x${string}`, options?: {
|
|
2937
|
+
accessList?: import('viem').AccessList;
|
|
2938
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2939
|
+
chain?: import('viem').Chain | null;
|
|
2940
|
+
dataSuffix?: `0x${string}`;
|
|
2941
|
+
gas?: bigint;
|
|
2942
|
+
gasPrice?: bigint;
|
|
2943
|
+
maxFeePerGas?: bigint;
|
|
2944
|
+
maxPriorityFeePerGas?: bigint;
|
|
2945
|
+
nonce?: number;
|
|
2946
|
+
value?: bigint;
|
|
2947
|
+
}): Promise<void> {
|
|
2948
|
+
return contract.simulate.setDelegate([_delegate] as const, options) as Promise<void>;
|
|
2949
|
+
},
|
|
2950
|
+
/**
|
|
2951
|
+
* Simulate setEnforcedOptions
|
|
2952
|
+
* Returns gas estimate and result without sending transaction
|
|
2953
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2954
|
+
*/
|
|
2955
|
+
async setEnforcedOptions(_enforcedOptions: EnforcedOptionParam[], options?: {
|
|
2956
|
+
accessList?: import('viem').AccessList;
|
|
2957
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2958
|
+
chain?: import('viem').Chain | null;
|
|
2959
|
+
dataSuffix?: `0x${string}`;
|
|
2960
|
+
gas?: bigint;
|
|
2961
|
+
gasPrice?: bigint;
|
|
2962
|
+
maxFeePerGas?: bigint;
|
|
2963
|
+
maxPriorityFeePerGas?: bigint;
|
|
2964
|
+
nonce?: number;
|
|
2965
|
+
value?: bigint;
|
|
2966
|
+
}): Promise<void> {
|
|
2967
|
+
return contract.simulate.setEnforcedOptions([_enforcedOptions] as const, options) as Promise<void>;
|
|
2968
|
+
},
|
|
2969
|
+
/**
|
|
2970
|
+
* Simulate setMinter
|
|
2971
|
+
* Returns gas estimate and result without sending transaction
|
|
2972
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2973
|
+
*/
|
|
2974
|
+
async setMinter(_address: `0x${string}`, options?: {
|
|
2975
|
+
accessList?: import('viem').AccessList;
|
|
2976
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2977
|
+
chain?: import('viem').Chain | null;
|
|
2978
|
+
dataSuffix?: `0x${string}`;
|
|
2979
|
+
gas?: bigint;
|
|
2980
|
+
gasPrice?: bigint;
|
|
2981
|
+
maxFeePerGas?: bigint;
|
|
2982
|
+
maxPriorityFeePerGas?: bigint;
|
|
2983
|
+
nonce?: number;
|
|
2984
|
+
value?: bigint;
|
|
2985
|
+
}): Promise<void> {
|
|
2986
|
+
return contract.simulate.setMinter([_address] as const, options) as Promise<void>;
|
|
2987
|
+
},
|
|
2988
|
+
/**
|
|
2989
|
+
* Simulate setMsgInspector
|
|
2990
|
+
* Returns gas estimate and result without sending transaction
|
|
2991
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2992
|
+
*/
|
|
2993
|
+
async setMsgInspector(_msgInspector: `0x${string}`, options?: {
|
|
2994
|
+
accessList?: import('viem').AccessList;
|
|
2995
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2996
|
+
chain?: import('viem').Chain | null;
|
|
2997
|
+
dataSuffix?: `0x${string}`;
|
|
2998
|
+
gas?: bigint;
|
|
2999
|
+
gasPrice?: bigint;
|
|
3000
|
+
maxFeePerGas?: bigint;
|
|
3001
|
+
maxPriorityFeePerGas?: bigint;
|
|
3002
|
+
nonce?: number;
|
|
3003
|
+
value?: bigint;
|
|
3004
|
+
}): Promise<void> {
|
|
3005
|
+
return contract.simulate.setMsgInspector([_msgInspector] as const, options) as Promise<void>;
|
|
3006
|
+
},
|
|
3007
|
+
/**
|
|
3008
|
+
* Simulate setPeer
|
|
3009
|
+
* Returns gas estimate and result without sending transaction
|
|
3010
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3011
|
+
*/
|
|
3012
|
+
async setPeer(_eid: bigint, _peer: `0x${string}`, options?: {
|
|
3013
|
+
accessList?: import('viem').AccessList;
|
|
3014
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3015
|
+
chain?: import('viem').Chain | null;
|
|
3016
|
+
dataSuffix?: `0x${string}`;
|
|
3017
|
+
gas?: bigint;
|
|
3018
|
+
gasPrice?: bigint;
|
|
3019
|
+
maxFeePerGas?: bigint;
|
|
3020
|
+
maxPriorityFeePerGas?: bigint;
|
|
3021
|
+
nonce?: number;
|
|
3022
|
+
value?: bigint;
|
|
3023
|
+
}): Promise<void> {
|
|
3024
|
+
return contract.simulate.setPeer([_eid, _peer] as const, options) as Promise<void>;
|
|
3025
|
+
},
|
|
3026
|
+
/**
|
|
3027
|
+
* Simulate setPreCrime
|
|
3028
|
+
* Returns gas estimate and result without sending transaction
|
|
3029
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3030
|
+
*/
|
|
3031
|
+
async setPreCrime(_preCrime: `0x${string}`, options?: {
|
|
3032
|
+
accessList?: import('viem').AccessList;
|
|
3033
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3034
|
+
chain?: import('viem').Chain | null;
|
|
3035
|
+
dataSuffix?: `0x${string}`;
|
|
3036
|
+
gas?: bigint;
|
|
3037
|
+
gasPrice?: bigint;
|
|
3038
|
+
maxFeePerGas?: bigint;
|
|
3039
|
+
maxPriorityFeePerGas?: bigint;
|
|
3040
|
+
nonce?: number;
|
|
3041
|
+
value?: bigint;
|
|
3042
|
+
}): Promise<void> {
|
|
3043
|
+
return contract.simulate.setPreCrime([_preCrime] as const, options) as Promise<void>;
|
|
3044
|
+
},
|
|
3045
|
+
/**
|
|
3046
|
+
* Simulate setTransferAllowedTime
|
|
3047
|
+
* Returns gas estimate and result without sending transaction
|
|
3048
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3049
|
+
*/
|
|
3050
|
+
async setTransferAllowedTime(newTimestamp: bigint, options?: {
|
|
3051
|
+
accessList?: import('viem').AccessList;
|
|
3052
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3053
|
+
chain?: import('viem').Chain | null;
|
|
3054
|
+
dataSuffix?: `0x${string}`;
|
|
3055
|
+
gas?: bigint;
|
|
3056
|
+
gasPrice?: bigint;
|
|
3057
|
+
maxFeePerGas?: bigint;
|
|
3058
|
+
maxPriorityFeePerGas?: bigint;
|
|
3059
|
+
nonce?: number;
|
|
3060
|
+
value?: bigint;
|
|
3061
|
+
}): Promise<void> {
|
|
3062
|
+
return contract.simulate.setTransferAllowedTime([newTimestamp] as const, options) as Promise<void>;
|
|
3063
|
+
},
|
|
3064
|
+
/**
|
|
3065
|
+
* Simulate setWhitelisted
|
|
3066
|
+
* Returns gas estimate and result without sending transaction
|
|
3067
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3068
|
+
*/
|
|
3069
|
+
async setWhitelisted(_address: `0x${string}`, options?: {
|
|
3070
|
+
accessList?: import('viem').AccessList;
|
|
3071
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3072
|
+
chain?: import('viem').Chain | null;
|
|
3073
|
+
dataSuffix?: `0x${string}`;
|
|
3074
|
+
gas?: bigint;
|
|
3075
|
+
gasPrice?: bigint;
|
|
3076
|
+
maxFeePerGas?: bigint;
|
|
3077
|
+
maxPriorityFeePerGas?: bigint;
|
|
3078
|
+
nonce?: number;
|
|
3079
|
+
value?: bigint;
|
|
3080
|
+
}): Promise<void> {
|
|
3081
|
+
return contract.simulate.setWhitelisted([_address] as const, options) as Promise<void>;
|
|
3082
|
+
},
|
|
3083
|
+
/**
|
|
3084
|
+
* Simulate syncSupplyAllChains
|
|
3085
|
+
* Returns gas estimate and result without sending transaction
|
|
3086
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3087
|
+
*/
|
|
3088
|
+
async syncSupplyAllChains(_newSupply: bigint, options?: {
|
|
3089
|
+
accessList?: import('viem').AccessList;
|
|
3090
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3091
|
+
chain?: import('viem').Chain | null;
|
|
3092
|
+
dataSuffix?: `0x${string}`;
|
|
3093
|
+
gas?: bigint;
|
|
3094
|
+
gasPrice?: bigint;
|
|
3095
|
+
maxFeePerGas?: bigint;
|
|
3096
|
+
maxPriorityFeePerGas?: bigint;
|
|
3097
|
+
nonce?: number;
|
|
3098
|
+
value?: bigint;
|
|
3099
|
+
}): Promise<void> {
|
|
3100
|
+
return contract.simulate.syncSupplyAllChains([_newSupply] as const, options) as Promise<void>;
|
|
3101
|
+
},
|
|
3102
|
+
/**
|
|
3103
|
+
* Simulate transfer
|
|
3104
|
+
* Returns gas estimate and result without sending transaction
|
|
3105
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3106
|
+
*/
|
|
3107
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
3108
|
+
accessList?: import('viem').AccessList;
|
|
3109
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3110
|
+
chain?: import('viem').Chain | null;
|
|
3111
|
+
dataSuffix?: `0x${string}`;
|
|
3112
|
+
gas?: bigint;
|
|
3113
|
+
gasPrice?: bigint;
|
|
3114
|
+
maxFeePerGas?: bigint;
|
|
3115
|
+
maxPriorityFeePerGas?: bigint;
|
|
3116
|
+
nonce?: number;
|
|
3117
|
+
value?: bigint;
|
|
3118
|
+
}): Promise<boolean> {
|
|
3119
|
+
return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
|
|
3120
|
+
},
|
|
3121
|
+
/**
|
|
3122
|
+
* Simulate transferFrom
|
|
3123
|
+
* Returns gas estimate and result without sending transaction
|
|
3124
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3125
|
+
*/
|
|
3126
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
3127
|
+
accessList?: import('viem').AccessList;
|
|
3128
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3129
|
+
chain?: import('viem').Chain | null;
|
|
3130
|
+
dataSuffix?: `0x${string}`;
|
|
3131
|
+
gas?: bigint;
|
|
3132
|
+
gasPrice?: bigint;
|
|
3133
|
+
maxFeePerGas?: bigint;
|
|
3134
|
+
maxPriorityFeePerGas?: bigint;
|
|
3135
|
+
nonce?: number;
|
|
3136
|
+
value?: bigint;
|
|
3137
|
+
}): Promise<boolean> {
|
|
3138
|
+
return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
|
|
3139
|
+
},
|
|
3140
|
+
/**
|
|
3141
|
+
* Simulate transferOwnership
|
|
3142
|
+
* Returns gas estimate and result without sending transaction
|
|
3143
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3144
|
+
*/
|
|
3145
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
3146
|
+
accessList?: import('viem').AccessList;
|
|
3147
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3148
|
+
chain?: import('viem').Chain | null;
|
|
3149
|
+
dataSuffix?: `0x${string}`;
|
|
3150
|
+
gas?: bigint;
|
|
3151
|
+
gasPrice?: bigint;
|
|
3152
|
+
maxFeePerGas?: bigint;
|
|
3153
|
+
maxPriorityFeePerGas?: bigint;
|
|
3154
|
+
nonce?: number;
|
|
3155
|
+
value?: bigint;
|
|
3156
|
+
}): Promise<void> {
|
|
3157
|
+
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
3158
|
+
}
|
|
3159
|
+
};
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
/**
|
|
3163
|
+
* Watch contract events
|
|
3164
|
+
*
|
|
3165
|
+
* @example
|
|
3166
|
+
* // Watch all Transfer events
|
|
3167
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
3168
|
+
* console.log('Transfer:', event);
|
|
3169
|
+
* });
|
|
3170
|
+
*
|
|
3171
|
+
* // Stop watching
|
|
3172
|
+
* unwatch();
|
|
3173
|
+
*/
|
|
3174
|
+
get watch() {
|
|
3175
|
+
return {
|
|
3176
|
+
/**
|
|
3177
|
+
* Watch Approval events
|
|
3178
|
+
* @param callback Function to call when event is emitted
|
|
3179
|
+
* @param filter Optional filter for indexed parameters
|
|
3180
|
+
* @returns Unwatch function to stop listening
|
|
3181
|
+
*/
|
|
3182
|
+
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3183
|
+
return this.publicClient.watchContractEvent({
|
|
3184
|
+
address: this.contractAddress,
|
|
3185
|
+
abi: PieverseOFTAbi,
|
|
3186
|
+
eventName: 'Approval',
|
|
3187
|
+
args: filter as any,
|
|
3188
|
+
onLogs: (logs: any[]) => {
|
|
3189
|
+
logs.forEach((log: any) => {
|
|
3190
|
+
callback(log.args as any);
|
|
3191
|
+
});
|
|
3192
|
+
},
|
|
3193
|
+
}) as () => void;
|
|
3194
|
+
},
|
|
3195
|
+
/**
|
|
3196
|
+
* Watch EnforcedOptionSet events
|
|
3197
|
+
* @param callback Function to call when event is emitted
|
|
3198
|
+
* @param filter Optional filter for indexed parameters
|
|
3199
|
+
* @returns Unwatch function to stop listening
|
|
3200
|
+
*/
|
|
3201
|
+
EnforcedOptionSet: (callback: (event: { _enforcedOptions: EnforcedOptionParam[] }) => void) => {
|
|
3202
|
+
return this.publicClient.watchContractEvent({
|
|
3203
|
+
address: this.contractAddress,
|
|
3204
|
+
abi: PieverseOFTAbi,
|
|
3205
|
+
eventName: 'EnforcedOptionSet',
|
|
3206
|
+
|
|
3207
|
+
onLogs: (logs: any[]) => {
|
|
3208
|
+
logs.forEach((log: any) => {
|
|
3209
|
+
callback(log.args as any);
|
|
3210
|
+
});
|
|
3211
|
+
},
|
|
3212
|
+
}) as () => void;
|
|
3213
|
+
},
|
|
3214
|
+
/**
|
|
3215
|
+
* Watch MinterUpdated events
|
|
3216
|
+
* @param callback Function to call when event is emitted
|
|
3217
|
+
* @param filter Optional filter for indexed parameters
|
|
3218
|
+
* @returns Unwatch function to stop listening
|
|
3219
|
+
*/
|
|
3220
|
+
MinterUpdated: (callback: (event: { account: `0x${string}`; value: boolean }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3221
|
+
return this.publicClient.watchContractEvent({
|
|
3222
|
+
address: this.contractAddress,
|
|
3223
|
+
abi: PieverseOFTAbi,
|
|
3224
|
+
eventName: 'MinterUpdated',
|
|
3225
|
+
args: filter as any,
|
|
3226
|
+
onLogs: (logs: any[]) => {
|
|
3227
|
+
logs.forEach((log: any) => {
|
|
3228
|
+
callback(log.args as any);
|
|
3229
|
+
});
|
|
3230
|
+
},
|
|
3231
|
+
}) as () => void;
|
|
3232
|
+
},
|
|
3233
|
+
/**
|
|
3234
|
+
* Watch MsgInspectorSet events
|
|
3235
|
+
* @param callback Function to call when event is emitted
|
|
3236
|
+
* @param filter Optional filter for indexed parameters
|
|
3237
|
+
* @returns Unwatch function to stop listening
|
|
3238
|
+
*/
|
|
3239
|
+
MsgInspectorSet: (callback: (event: { inspector: `0x${string}` }) => void) => {
|
|
3240
|
+
return this.publicClient.watchContractEvent({
|
|
3241
|
+
address: this.contractAddress,
|
|
3242
|
+
abi: PieverseOFTAbi,
|
|
3243
|
+
eventName: 'MsgInspectorSet',
|
|
3244
|
+
|
|
3245
|
+
onLogs: (logs: any[]) => {
|
|
3246
|
+
logs.forEach((log: any) => {
|
|
3247
|
+
callback(log.args as any);
|
|
3248
|
+
});
|
|
3249
|
+
},
|
|
3250
|
+
}) as () => void;
|
|
3251
|
+
},
|
|
3252
|
+
/**
|
|
3253
|
+
* Watch OFTReceived events
|
|
3254
|
+
* @param callback Function to call when event is emitted
|
|
3255
|
+
* @param filter Optional filter for indexed parameters
|
|
3256
|
+
* @returns Unwatch function to stop listening
|
|
3257
|
+
*/
|
|
3258
|
+
OFTReceived: (callback: (event: { guid: `0x${string}`; srcEid: bigint; toAddress: `0x${string}`; amountReceivedLD: bigint }) => void, filter?: { guid?: `0x${string}` | `0x${string}`[] | null; toAddress?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3259
|
+
return this.publicClient.watchContractEvent({
|
|
3260
|
+
address: this.contractAddress,
|
|
3261
|
+
abi: PieverseOFTAbi,
|
|
3262
|
+
eventName: 'OFTReceived',
|
|
3263
|
+
args: filter as any,
|
|
3264
|
+
onLogs: (logs: any[]) => {
|
|
3265
|
+
logs.forEach((log: any) => {
|
|
3266
|
+
callback(log.args as any);
|
|
3267
|
+
});
|
|
3268
|
+
},
|
|
3269
|
+
}) as () => void;
|
|
3270
|
+
},
|
|
3271
|
+
/**
|
|
3272
|
+
* Watch OFTSent events
|
|
3273
|
+
* @param callback Function to call when event is emitted
|
|
3274
|
+
* @param filter Optional filter for indexed parameters
|
|
3275
|
+
* @returns Unwatch function to stop listening
|
|
3276
|
+
*/
|
|
3277
|
+
OFTSent: (callback: (event: { guid: `0x${string}`; dstEid: bigint; fromAddress: `0x${string}`; amountSentLD: bigint; amountReceivedLD: bigint }) => void, filter?: { guid?: `0x${string}` | `0x${string}`[] | null; fromAddress?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3278
|
+
return this.publicClient.watchContractEvent({
|
|
3279
|
+
address: this.contractAddress,
|
|
3280
|
+
abi: PieverseOFTAbi,
|
|
3281
|
+
eventName: 'OFTSent',
|
|
3282
|
+
args: filter as any,
|
|
3283
|
+
onLogs: (logs: any[]) => {
|
|
3284
|
+
logs.forEach((log: any) => {
|
|
3285
|
+
callback(log.args as any);
|
|
3286
|
+
});
|
|
3287
|
+
},
|
|
3288
|
+
}) as () => void;
|
|
3289
|
+
},
|
|
3290
|
+
/**
|
|
3291
|
+
* Watch OwnershipTransferred events
|
|
3292
|
+
* @param callback Function to call when event is emitted
|
|
3293
|
+
* @param filter Optional filter for indexed parameters
|
|
3294
|
+
* @returns Unwatch function to stop listening
|
|
3295
|
+
*/
|
|
3296
|
+
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3297
|
+
return this.publicClient.watchContractEvent({
|
|
3298
|
+
address: this.contractAddress,
|
|
3299
|
+
abi: PieverseOFTAbi,
|
|
3300
|
+
eventName: 'OwnershipTransferred',
|
|
3301
|
+
args: filter as any,
|
|
3302
|
+
onLogs: (logs: any[]) => {
|
|
3303
|
+
logs.forEach((log: any) => {
|
|
3304
|
+
callback(log.args as any);
|
|
3305
|
+
});
|
|
3306
|
+
},
|
|
3307
|
+
}) as () => void;
|
|
3308
|
+
},
|
|
3309
|
+
/**
|
|
3310
|
+
* Watch PeerSet events
|
|
3311
|
+
* @param callback Function to call when event is emitted
|
|
3312
|
+
* @param filter Optional filter for indexed parameters
|
|
3313
|
+
* @returns Unwatch function to stop listening
|
|
3314
|
+
*/
|
|
3315
|
+
PeerSet: (callback: (event: { eid: bigint; peer: `0x${string}` }) => void) => {
|
|
3316
|
+
return this.publicClient.watchContractEvent({
|
|
3317
|
+
address: this.contractAddress,
|
|
3318
|
+
abi: PieverseOFTAbi,
|
|
3319
|
+
eventName: 'PeerSet',
|
|
3320
|
+
|
|
3321
|
+
onLogs: (logs: any[]) => {
|
|
3322
|
+
logs.forEach((log: any) => {
|
|
3323
|
+
callback(log.args as any);
|
|
3324
|
+
});
|
|
3325
|
+
},
|
|
3326
|
+
}) as () => void;
|
|
3327
|
+
},
|
|
3328
|
+
/**
|
|
3329
|
+
* Watch PreCrimeSet events
|
|
3330
|
+
* @param callback Function to call when event is emitted
|
|
3331
|
+
* @param filter Optional filter for indexed parameters
|
|
3332
|
+
* @returns Unwatch function to stop listening
|
|
3333
|
+
*/
|
|
3334
|
+
PreCrimeSet: (callback: (event: { preCrimeAddress: `0x${string}` }) => void) => {
|
|
3335
|
+
return this.publicClient.watchContractEvent({
|
|
3336
|
+
address: this.contractAddress,
|
|
3337
|
+
abi: PieverseOFTAbi,
|
|
3338
|
+
eventName: 'PreCrimeSet',
|
|
3339
|
+
|
|
3340
|
+
onLogs: (logs: any[]) => {
|
|
3341
|
+
logs.forEach((log: any) => {
|
|
3342
|
+
callback(log.args as any);
|
|
3343
|
+
});
|
|
3344
|
+
},
|
|
3345
|
+
}) as () => void;
|
|
3346
|
+
},
|
|
3347
|
+
/**
|
|
3348
|
+
* Watch TokensMinted events
|
|
3349
|
+
* @param callback Function to call when event is emitted
|
|
3350
|
+
* @param filter Optional filter for indexed parameters
|
|
3351
|
+
* @returns Unwatch function to stop listening
|
|
3352
|
+
*/
|
|
3353
|
+
TokensMinted: (callback: (event: { to: `0x${string}`; amount: bigint }) => void, filter?: { to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3354
|
+
return this.publicClient.watchContractEvent({
|
|
3355
|
+
address: this.contractAddress,
|
|
3356
|
+
abi: PieverseOFTAbi,
|
|
3357
|
+
eventName: 'TokensMinted',
|
|
3358
|
+
args: filter as any,
|
|
3359
|
+
onLogs: (logs: any[]) => {
|
|
3360
|
+
logs.forEach((log: any) => {
|
|
3361
|
+
callback(log.args as any);
|
|
3362
|
+
});
|
|
3363
|
+
},
|
|
3364
|
+
}) as () => void;
|
|
3365
|
+
},
|
|
3366
|
+
/**
|
|
3367
|
+
* Watch Transfer events
|
|
3368
|
+
* @param callback Function to call when event is emitted
|
|
3369
|
+
* @param filter Optional filter for indexed parameters
|
|
3370
|
+
* @returns Unwatch function to stop listening
|
|
3371
|
+
*/
|
|
3372
|
+
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3373
|
+
return this.publicClient.watchContractEvent({
|
|
3374
|
+
address: this.contractAddress,
|
|
3375
|
+
abi: PieverseOFTAbi,
|
|
3376
|
+
eventName: 'Transfer',
|
|
3377
|
+
args: filter as any,
|
|
3378
|
+
onLogs: (logs: any[]) => {
|
|
3379
|
+
logs.forEach((log: any) => {
|
|
3380
|
+
callback(log.args as any);
|
|
3381
|
+
});
|
|
3382
|
+
},
|
|
3383
|
+
}) as () => void;
|
|
3384
|
+
},
|
|
3385
|
+
/**
|
|
3386
|
+
* Watch TransferAllowedTimeUpdated events
|
|
3387
|
+
* @param callback Function to call when event is emitted
|
|
3388
|
+
* @param filter Optional filter for indexed parameters
|
|
3389
|
+
* @returns Unwatch function to stop listening
|
|
3390
|
+
*/
|
|
3391
|
+
TransferAllowedTimeUpdated: (callback: (event: { newTimestamp: bigint }) => void) => {
|
|
3392
|
+
return this.publicClient.watchContractEvent({
|
|
3393
|
+
address: this.contractAddress,
|
|
3394
|
+
abi: PieverseOFTAbi,
|
|
3395
|
+
eventName: 'TransferAllowedTimeUpdated',
|
|
3396
|
+
|
|
3397
|
+
onLogs: (logs: any[]) => {
|
|
3398
|
+
logs.forEach((log: any) => {
|
|
3399
|
+
callback(log.args as any);
|
|
3400
|
+
});
|
|
3401
|
+
},
|
|
3402
|
+
}) as () => void;
|
|
3403
|
+
},
|
|
3404
|
+
/**
|
|
3405
|
+
* Watch WhitelistUpdated events
|
|
3406
|
+
* @param callback Function to call when event is emitted
|
|
3407
|
+
* @param filter Optional filter for indexed parameters
|
|
3408
|
+
* @returns Unwatch function to stop listening
|
|
3409
|
+
*/
|
|
3410
|
+
WhitelistUpdated: (callback: (event: { account: `0x${string}`; value: boolean }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3411
|
+
return this.publicClient.watchContractEvent({
|
|
3412
|
+
address: this.contractAddress,
|
|
3413
|
+
abi: PieverseOFTAbi,
|
|
3414
|
+
eventName: 'WhitelistUpdated',
|
|
3415
|
+
args: filter as any,
|
|
3416
|
+
onLogs: (logs: any[]) => {
|
|
3417
|
+
logs.forEach((log: any) => {
|
|
3418
|
+
callback(log.args as any);
|
|
3419
|
+
});
|
|
3420
|
+
},
|
|
3421
|
+
}) as () => void;
|
|
3422
|
+
}
|
|
3423
|
+
};
|
|
3424
|
+
}
|
|
3425
|
+
}
|