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