quantumswap 0.0.5 → 0.0.7

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.
@@ -1,847 +1,847 @@
1
- // Auto-generated by sdkgen
2
- const { Contract } = require("quantumcoin");
3
-
4
- /**
5
- * QuantumSwapV2Pair - A typed contract interface for QuantumSwapV2Pair
6
- */
7
- class QuantumSwapV2Pair extends Contract {
8
- static abi = [
9
- {
10
- "inputs": [],
11
- "stateMutability": "nonpayable",
12
- "type": "constructor"
13
- },
14
- {
15
- "anonymous": false,
16
- "inputs": [
17
- {
18
- "indexed": true,
19
- "internalType": "address",
20
- "name": "owner",
21
- "type": "address"
22
- },
23
- {
24
- "indexed": true,
25
- "internalType": "address",
26
- "name": "spender",
27
- "type": "address"
28
- },
29
- {
30
- "indexed": false,
31
- "internalType": "uint256",
32
- "name": "value",
33
- "type": "uint256"
34
- }
35
- ],
36
- "name": "Approval",
37
- "type": "event"
38
- },
39
- {
40
- "anonymous": false,
41
- "inputs": [
42
- {
43
- "indexed": true,
44
- "internalType": "address",
45
- "name": "sender",
46
- "type": "address"
47
- },
48
- {
49
- "indexed": false,
50
- "internalType": "uint256",
51
- "name": "amount0",
52
- "type": "uint256"
53
- },
54
- {
55
- "indexed": false,
56
- "internalType": "uint256",
57
- "name": "amount1",
58
- "type": "uint256"
59
- },
60
- {
61
- "indexed": true,
62
- "internalType": "address",
63
- "name": "to",
64
- "type": "address"
65
- }
66
- ],
67
- "name": "Burn",
68
- "type": "event"
69
- },
70
- {
71
- "anonymous": false,
72
- "inputs": [
73
- {
74
- "indexed": true,
75
- "internalType": "address",
76
- "name": "sender",
77
- "type": "address"
78
- },
79
- {
80
- "indexed": false,
81
- "internalType": "uint256",
82
- "name": "amount0",
83
- "type": "uint256"
84
- },
85
- {
86
- "indexed": false,
87
- "internalType": "uint256",
88
- "name": "amount1",
89
- "type": "uint256"
90
- }
91
- ],
92
- "name": "Mint",
93
- "type": "event"
94
- },
95
- {
96
- "anonymous": false,
97
- "inputs": [
98
- {
99
- "indexed": true,
100
- "internalType": "address",
101
- "name": "sender",
102
- "type": "address"
103
- },
104
- {
105
- "indexed": false,
106
- "internalType": "uint256",
107
- "name": "amount0In",
108
- "type": "uint256"
109
- },
110
- {
111
- "indexed": false,
112
- "internalType": "uint256",
113
- "name": "amount1In",
114
- "type": "uint256"
115
- },
116
- {
117
- "indexed": false,
118
- "internalType": "uint256",
119
- "name": "amount0Out",
120
- "type": "uint256"
121
- },
122
- {
123
- "indexed": false,
124
- "internalType": "uint256",
125
- "name": "amount1Out",
126
- "type": "uint256"
127
- },
128
- {
129
- "indexed": true,
130
- "internalType": "address",
131
- "name": "to",
132
- "type": "address"
133
- }
134
- ],
135
- "name": "Swap",
136
- "type": "event"
137
- },
138
- {
139
- "anonymous": false,
140
- "inputs": [
141
- {
142
- "indexed": false,
143
- "internalType": "uint112",
144
- "name": "reserve0",
145
- "type": "uint112"
146
- },
147
- {
148
- "indexed": false,
149
- "internalType": "uint112",
150
- "name": "reserve1",
151
- "type": "uint112"
152
- }
153
- ],
154
- "name": "Sync",
155
- "type": "event"
156
- },
157
- {
158
- "anonymous": false,
159
- "inputs": [
160
- {
161
- "indexed": true,
162
- "internalType": "address",
163
- "name": "from",
164
- "type": "address"
165
- },
166
- {
167
- "indexed": true,
168
- "internalType": "address",
169
- "name": "to",
170
- "type": "address"
171
- },
172
- {
173
- "indexed": false,
174
- "internalType": "uint256",
175
- "name": "value",
176
- "type": "uint256"
177
- }
178
- ],
179
- "name": "Transfer",
180
- "type": "event"
181
- },
182
- {
183
- "inputs": [],
184
- "name": "MINIMUM_LIQUIDITY",
185
- "outputs": [
186
- {
187
- "internalType": "uint256",
188
- "name": "",
189
- "type": "uint256"
190
- }
191
- ],
192
- "stateMutability": "view",
193
- "type": "function"
194
- },
195
- {
196
- "inputs": [
197
- {
198
- "internalType": "address",
199
- "name": "",
200
- "type": "address"
201
- },
202
- {
203
- "internalType": "address",
204
- "name": "",
205
- "type": "address"
206
- }
207
- ],
208
- "name": "allowance",
209
- "outputs": [
210
- {
211
- "internalType": "uint256",
212
- "name": "",
213
- "type": "uint256"
214
- }
215
- ],
216
- "stateMutability": "view",
217
- "type": "function"
218
- },
219
- {
220
- "inputs": [
221
- {
222
- "internalType": "address",
223
- "name": "spender",
224
- "type": "address"
225
- },
226
- {
227
- "internalType": "uint256",
228
- "name": "value",
229
- "type": "uint256"
230
- }
231
- ],
232
- "name": "approve",
233
- "outputs": [
234
- {
235
- "internalType": "bool",
236
- "name": "",
237
- "type": "bool"
238
- }
239
- ],
240
- "stateMutability": "nonpayable",
241
- "type": "function"
242
- },
243
- {
244
- "inputs": [
245
- {
246
- "internalType": "address",
247
- "name": "",
248
- "type": "address"
249
- }
250
- ],
251
- "name": "balanceOf",
252
- "outputs": [
253
- {
254
- "internalType": "uint256",
255
- "name": "",
256
- "type": "uint256"
257
- }
258
- ],
259
- "stateMutability": "view",
260
- "type": "function"
261
- },
262
- {
263
- "inputs": [
264
- {
265
- "internalType": "address",
266
- "name": "to",
267
- "type": "address"
268
- }
269
- ],
270
- "name": "burn",
271
- "outputs": [
272
- {
273
- "internalType": "uint256",
274
- "name": "amount0",
275
- "type": "uint256"
276
- },
277
- {
278
- "internalType": "uint256",
279
- "name": "amount1",
280
- "type": "uint256"
281
- }
282
- ],
283
- "stateMutability": "nonpayable",
284
- "type": "function"
285
- },
286
- {
287
- "inputs": [],
288
- "name": "decimals",
289
- "outputs": [
290
- {
291
- "internalType": "uint8",
292
- "name": "",
293
- "type": "uint8"
294
- }
295
- ],
296
- "stateMutability": "view",
297
- "type": "function"
298
- },
299
- {
300
- "inputs": [],
301
- "name": "factory",
302
- "outputs": [
303
- {
304
- "internalType": "address",
305
- "name": "",
306
- "type": "address"
307
- }
308
- ],
309
- "stateMutability": "view",
310
- "type": "function"
311
- },
312
- {
313
- "inputs": [],
314
- "name": "getReserves",
315
- "outputs": [
316
- {
317
- "internalType": "uint112",
318
- "name": "_reserve0",
319
- "type": "uint112"
320
- },
321
- {
322
- "internalType": "uint112",
323
- "name": "_reserve1",
324
- "type": "uint112"
325
- },
326
- {
327
- "internalType": "uint32",
328
- "name": "_blockTimestampLast",
329
- "type": "uint32"
330
- }
331
- ],
332
- "stateMutability": "view",
333
- "type": "function"
334
- },
335
- {
336
- "inputs": [
337
- {
338
- "internalType": "address",
339
- "name": "_token0",
340
- "type": "address"
341
- },
342
- {
343
- "internalType": "address",
344
- "name": "_token1",
345
- "type": "address"
346
- }
347
- ],
348
- "name": "initialize",
349
- "outputs": [],
350
- "stateMutability": "nonpayable",
351
- "type": "function"
352
- },
353
- {
354
- "inputs": [],
355
- "name": "kLast",
356
- "outputs": [
357
- {
358
- "internalType": "uint256",
359
- "name": "",
360
- "type": "uint256"
361
- }
362
- ],
363
- "stateMutability": "view",
364
- "type": "function"
365
- },
366
- {
367
- "inputs": [
368
- {
369
- "internalType": "address",
370
- "name": "to",
371
- "type": "address"
372
- }
373
- ],
374
- "name": "mint",
375
- "outputs": [
376
- {
377
- "internalType": "uint256",
378
- "name": "liquidity",
379
- "type": "uint256"
380
- }
381
- ],
382
- "stateMutability": "nonpayable",
383
- "type": "function"
384
- },
385
- {
386
- "inputs": [],
387
- "name": "name",
388
- "outputs": [
389
- {
390
- "internalType": "string",
391
- "name": "",
392
- "type": "string"
393
- }
394
- ],
395
- "stateMutability": "view",
396
- "type": "function"
397
- },
398
- {
399
- "inputs": [],
400
- "name": "price0CumulativeLast",
401
- "outputs": [
402
- {
403
- "internalType": "uint256",
404
- "name": "",
405
- "type": "uint256"
406
- }
407
- ],
408
- "stateMutability": "view",
409
- "type": "function"
410
- },
411
- {
412
- "inputs": [],
413
- "name": "price1CumulativeLast",
414
- "outputs": [
415
- {
416
- "internalType": "uint256",
417
- "name": "",
418
- "type": "uint256"
419
- }
420
- ],
421
- "stateMutability": "view",
422
- "type": "function"
423
- },
424
- {
425
- "inputs": [
426
- {
427
- "internalType": "address",
428
- "name": "to",
429
- "type": "address"
430
- }
431
- ],
432
- "name": "skim",
433
- "outputs": [],
434
- "stateMutability": "nonpayable",
435
- "type": "function"
436
- },
437
- {
438
- "inputs": [
439
- {
440
- "internalType": "uint256",
441
- "name": "amount0Out",
442
- "type": "uint256"
443
- },
444
- {
445
- "internalType": "uint256",
446
- "name": "amount1Out",
447
- "type": "uint256"
448
- },
449
- {
450
- "internalType": "address",
451
- "name": "to",
452
- "type": "address"
453
- },
454
- {
455
- "internalType": "bytes",
456
- "name": "data",
457
- "type": "bytes"
458
- }
459
- ],
460
- "name": "swap",
461
- "outputs": [],
462
- "stateMutability": "nonpayable",
463
- "type": "function"
464
- },
465
- {
466
- "inputs": [],
467
- "name": "symbol",
468
- "outputs": [
469
- {
470
- "internalType": "string",
471
- "name": "",
472
- "type": "string"
473
- }
474
- ],
475
- "stateMutability": "view",
476
- "type": "function"
477
- },
478
- {
479
- "inputs": [],
480
- "name": "sync",
481
- "outputs": [],
482
- "stateMutability": "nonpayable",
483
- "type": "function"
484
- },
485
- {
486
- "inputs": [],
487
- "name": "token0",
488
- "outputs": [
489
- {
490
- "internalType": "address",
491
- "name": "",
492
- "type": "address"
493
- }
494
- ],
495
- "stateMutability": "view",
496
- "type": "function"
497
- },
498
- {
499
- "inputs": [],
500
- "name": "token1",
501
- "outputs": [
502
- {
503
- "internalType": "address",
504
- "name": "",
505
- "type": "address"
506
- }
507
- ],
508
- "stateMutability": "view",
509
- "type": "function"
510
- },
511
- {
512
- "inputs": [],
513
- "name": "totalSupply",
514
- "outputs": [
515
- {
516
- "internalType": "uint256",
517
- "name": "",
518
- "type": "uint256"
519
- }
520
- ],
521
- "stateMutability": "view",
522
- "type": "function"
523
- },
524
- {
525
- "inputs": [
526
- {
527
- "internalType": "address",
528
- "name": "to",
529
- "type": "address"
530
- },
531
- {
532
- "internalType": "uint256",
533
- "name": "value",
534
- "type": "uint256"
535
- }
536
- ],
537
- "name": "transfer",
538
- "outputs": [
539
- {
540
- "internalType": "bool",
541
- "name": "",
542
- "type": "bool"
543
- }
544
- ],
545
- "stateMutability": "nonpayable",
546
- "type": "function"
547
- },
548
- {
549
- "inputs": [
550
- {
551
- "internalType": "address",
552
- "name": "from",
553
- "type": "address"
554
- },
555
- {
556
- "internalType": "address",
557
- "name": "to",
558
- "type": "address"
559
- },
560
- {
561
- "internalType": "uint256",
562
- "name": "value",
563
- "type": "uint256"
564
- }
565
- ],
566
- "name": "transferFrom",
567
- "outputs": [
568
- {
569
- "internalType": "bool",
570
- "name": "",
571
- "type": "bool"
572
- }
573
- ],
574
- "stateMutability": "nonpayable",
575
- "type": "function"
576
- }
577
- ];
578
- static bytecode = "0x60806040526001600a5534801561001557600080fd5b50600046905050336003819055506128a7806100326000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80636a627842116100c3578063ba9a7a561161007c578063ba9a7a56146105f1578063bc25cf771461060f578063c45a01551461063d578063d21220a71461065b578063dd62ed3e14610679578063fff6cae9146106c55761014d565b80636a6278421461043557806370a08231146104775780637464fc3d146104b957806389afcb44146104d757806395d89b4114610520578063a9059cbb146105a35761014d565b806318160ddd1161011557806318160ddd1461032a57806323b872dd14610348578063313ce567146103a0578063485cc955146103c15780635909c0d5146103f95780635a3d5493146104175761014d565b8063022c0d9f1461015257806306fdde03146101e95780630902f1ac1461026c578063095ea7b3146102be5780630dfe16811461030c575b600080fd5b6101e76004803603608081101561016857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001906401000000008111156101a357600080fd5b8201836020820111156101b557600080fd5b803590602001918460018302840111640100000000831117156101d757600080fd5b90919293919293905050506106cf565b005b6101f1610d32565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610231578082015181840152602081019050610216565b50505050905090810190601f16801561025e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610274610d6b565b60405180846dffffffffffffffffffffffffffff168152602001836dffffffffffffffffffffffffffff1681526020018263ffffffff168152602001935050505060405180910390f35b6102f4600480360360408110156102d457600080fd5b810190808035906020019092919080359060200190929190505050610dc8565b60405180821515815260200191505060405180910390f35b610314610ddf565b6040518082815260200191505060405180910390f35b610332610de5565b6040518082815260200191505060405180910390f35b6103886004803603606081101561035e57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610deb565b60405180821515815260200191505060405180910390f35b6103a8610eae565b604051808260ff16815260200191505060405180910390f35b6103f7600480360360408110156103d757600080fd5b810190808035906020019092919080359060200190929190505050610eb3565b005b610401610f3c565b6040518082815260200191505060405180910390f35b61041f610f42565b6040518082815260200191505060405180910390f35b6104616004803603602081101561044b57600080fd5b8101908080359060200190929190505050610f48565b6040518082815260200191505060405180910390f35b6104a36004803603602081101561048d57600080fd5b810190808035906020019092919050505061131f565b6040518082815260200191505060405180910390f35b6104c1611337565b6040518082815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b810190808035906020019092919050505061133d565b604051808381526020018281526020019250505060405180910390f35b61052861178a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561056857808201518184015260208101905061054d565b50505050905090810190601f1680156105955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105d9600480360360408110156105b957600080fd5b8101908080359060200190929190803590602001909291905050506117c3565b60405180821515815260200191505060405180910390f35b6105f96117da565b6040518082815260200191505060405180910390f35b61063b6004803603602081101561062557600080fd5b81019080803590602001909291905050506117e0565b005b6106456119f7565b6040518082815260200191505060405180910390f35b6106636119fd565b6040518082815260200191505060405180910390f35b6106af6004803603604081101561068f57600080fd5b810190808035906020019092919080359060200190929190505050611a03565b6040518082815260200191505060405180910390f35b6106cd611a28565b005b6001600a5414610747576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600085118061075e5750600084115b6107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806127b86025913960400191505060405180910390fd5b6000806107be610d6b565b5091509150816dffffffffffffffffffffffffffff16871080156107f15750806dffffffffffffffffffffffffffff1686105b610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128016021913960400191505060405180910390fd5b60008060006004549050600060055490508189141580156108675750808914155b6108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f556e697377617056323a20494e56414c49445f544f000000000000000000000081525060200191505060405180910390fd5b60008b11156108ee576108ed828a8d611be4565b5b60008a111561090357610902818a8c611be4565b5b60008888905011156109a957886310d1e85c338d8d8c8c6040518663ffffffff1660e01b815260040180868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561099057600080fd5b505af11580156109a4573d6000803e3d6000fd5b505050505b816370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b81019080805190602001909291905050509350806370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610a5c57600080fd5b505afa158015610a70573d6000803e3d6000fd5b505050506040513d6020811015610a8657600080fd5b810190808051906020019092919050505092505050600089856dffffffffffffffffffffffffffff16038311610abd576000610ad3565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610af7576000610b0d565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b1e5750600081115b610b73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806127dd6024913960400191505060405180910390fd5b6000610baf610b8c600385611dee90919063ffffffff16565b610ba16103e888611dee90919063ffffffff16565b611e8390919063ffffffff16565b90506000610bed610bca600385611dee90919063ffffffff16565b610bdf6103e888611dee90919063ffffffff16565b611e8390919063ffffffff16565b9050610c37620f4240610c29896dffffffffffffffffffffffffffff168b6dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b611dee90919063ffffffff16565b610c4a8284611dee90919063ffffffff16565b1015610cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e697377617056323a204b000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050610ccc84848888611f06565b88337fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d82284848f8f6040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050505050506001600a819055505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6000806000600660009054906101000a90046dffffffffffffffffffffffffffff1692506006600e9054906101000a90046dffffffffffffffffffffffffffff1691506006601c9054906101000a900463ffffffff169050909192565b6000610dd5338484612264565b6001905092915050565b60045481565b60005481565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6002600086815260200190815260200160002060003381526020019081526020016000205414610e9857610e6f8260026000878152602001908152602001600020600033815260200190815260200160002054611e8390919063ffffffff16565b600260008681526020019081526020016000206000338152602001908152602001600020819055505b610ea38484846122cb565b600190509392505050565b601281565b6003543314610f2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f556e697377617056323a20464f5242494444454e00000000000000000000000081525060200191505060405180910390fd5b81600481905550806005819055505050565b60075481565b60085481565b60006001600a5414610fc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600080610fd5610d6b565b509150915060006004546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561101957600080fd5b505afa15801561102d573d6000803e3d6000fd5b505050506040513d602081101561104357600080fd5b8101908080519060200190929190505050905060006005546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561109557600080fd5b505afa1580156110a9573d6000803e3d6000fd5b505050506040513d60208110156110bf57600080fd5b8101908080519060200190929190505050905060006110f7856dffffffffffffffffffffffffffff1684611e8390919063ffffffff16565b9050600061111e856dffffffffffffffffffffffffffff1684611e8390919063ffffffff16565b9050600061112c8787612383565b905060008054905060008114156111805761116c6103e861115e6111598688611dee90919063ffffffff16565b612502565b611e8390919063ffffffff16565b985061117b60006103e8612564565b6111e3565b6111e0886dffffffffffffffffffffffffffff166111a78387611dee90919063ffffffff16565b816111ae57fe5b04886dffffffffffffffffffffffffffff166111d38487611dee90919063ffffffff16565b816111da57fe5b046125fa565b98505b6000891161123c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061284a6028913960400191505060405180910390fd5b6112468a8a612564565b61125286868a8a611f06565b81156112ca576112c36006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b6009819055505b337f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8585604051808381526020018281526020019250505060405180910390a250505050505050506001600a81905550919050565b60016020528060005260406000206000915090505481565b60095481565b6000806001600a54146113b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a819055506000806113cb610d6b565b509150915060006004549050600060055490506000826370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561141b57600080fd5b505afa15801561142f573d6000803e3d6000fd5b505050506040513d602081101561144557600080fd5b810190808051906020019092919050505090506000826370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561149557600080fd5b505afa1580156114a9573d6000803e3d6000fd5b505050506040513d60208110156114bf57600080fd5b8101908080519060200190929190505050905060006001600030815260200190815260200160002054905060006114f68888612383565b9050600080549050806115128685611dee90919063ffffffff16565b8161151957fe5b049a50806115308585611dee90919063ffffffff16565b8161153757fe5b04995060008b11801561154a575060008a115b61159f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806128226028913960400191505060405180910390fd5b6115a93084612613565b6115b4878d8d611be4565b6115bf868d8c611be4565b866370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156115fa57600080fd5b505afa15801561160e573d6000803e3d6000fd5b505050506040513d602081101561162457600080fd5b81019080805190602001909291905050509450856370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561167257600080fd5b505afa158015611686573d6000803e3d6000fd5b505050506040513d602081101561169c57600080fd5b810190808051906020019092919050505093506116bb85858b8b611f06565b81156117335761172c6006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b6009819055505b8b337fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d819364968d8d604051808381526020018281526020019250505060405180910390a35050505050505050506001600a81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b60006117d03384846122cb565b6001905092915050565b6103e881565b6001600a5414611858576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600060045490506000600554905061192c8284611927600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16866370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156118de57600080fd5b505afa1580156118f2573d6000803e3d6000fd5b505050506040513d602081101561190857600080fd5b8101908080519060200190929190505050611e8390919063ffffffff16565b611be4565b6119ea81846119e56006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16856370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561199c57600080fd5b505afa1580156119b0573d6000803e3d6000fd5b505050506040513d60208110156119c657600080fd5b8101908080519060200190929190505050611e8390919063ffffffff16565b611be4565b50506001600a8190555050565b60035481565b60055481565b6002602052816000526040600020602052806000526040600020600091509150505481565b6001600a5414611aa0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550611bda6004546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b505050506040513d6020811015611b1257600080fd5b81019080805190602001909291905050506005546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b6057600080fd5b505afa158015611b74573d6000803e3d6000fd5b505050506040513d6020811015611b8a57600080fd5b8101908080519060200190929190505050600660009054906101000a90046dffffffffffffffffffffffffffff166006600e9054906101000a90046dffffffffffffffffffffffffffff16611f06565b6001600a81905550565b600080846040518060400160405280601981526020017f7472616e7366657228616464726573732c75696e7432353629000000000000008152508051906020012085856040516024018083815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611cce5780518252602082019150602081019050602083039250611cab565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611d30576040519150601f19603f3d011682016040523d82523d6000602084013e611d35565b606091505b5091509150818015611d755750600081511480611d745750808060200190516020811015611d6257600080fd5b81019080805190602001909291905050505b5b611de7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f556e697377617056323a205452414e534645525f4641494c454400000000000081525060200191505060405180910390fd5b5050505050565b600080821480611e0b5750828283850292508281611e0857fe5b04145b611e7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b6000828284039150811115611f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168411158015611f7657507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168311155b611fe8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f556e697377617056323a204f564552464c4f570000000000000000000000000081525060200191505060405180910390fd5b60006401000000004281611ff857fe5b06905060006006601c9054906101000a900463ffffffff168203905060008163ffffffff1611801561203b57506000846dffffffffffffffffffffffffffff1614155b801561205857506000836dffffffffffffffffffffffffffff1614155b1561213a578063ffffffff1661209d85612071866126a9565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166126d490919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16026007600082825401925050819055508063ffffffff1661210b846120df876126a9565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166126d490919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16026008600082825401925050819055505b85600660006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550846006600e6101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550816006601c6101000a81548163ffffffff021916908363ffffffff1602179055507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1600660009054906101000a90046dffffffffffffffffffffffffffff166006600e9054906101000a90046dffffffffffffffffffffffffffff1660405180836dffffffffffffffffffffffffffff168152602001826dffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050505050565b806002600085815260200190815260200160002060008481526020019081526020016000208190555081837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6122f1816001600086815260200190815260200160002054611e8390919063ffffffff16565b600160008581526020019081526020016000208190555061232e81600160008581526020019081526020016000205461273490919063ffffffff16565b600160008481526020019081526020016000208190555081837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008060035463017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b1580156123b857600080fd5b505afa1580156123cc573d6000803e3d6000fd5b505050506040513d60208110156123e257600080fd5b81019080805190602001909291905050509050600081141591506000600954905082156124e857600081146124e357600061244e612449866dffffffffffffffffffffffffffff16886dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b612502565b9050600061245b83612502565b9050808211156124e057600061248e61247d8385611e8390919063ffffffff16565b600054611dee90919063ffffffff16565b905060006124b8836124aa600587611dee90919063ffffffff16565b61273490919063ffffffff16565b905060008183816124c557fe5b04905060008111156124dc576124db8782612564565b5b5050505b50505b6124fa565b600081146124f95760006009819055505b5b505092915050565b6000600382111561255157819050600060016002848161251e57fe5b040190505b8181101561254b5780915060028182858161253a57fe5b04018161254357fe5b049050612523565b5061255f565b6000821461255e57600190505b5b919050565b6125798160005461273490919063ffffffff16565b6000819055506125a581600160008581526020019081526020016000205461273490919063ffffffff16565b60016000848152602001908152602001600020819055508160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000818310612609578161260b565b825b905092915050565b612639816001600085815260200190815260200160002054611e8390919063ffffffff16565b600160008481526020019081526020016000208190555061266581600054611e8390919063ffffffff16565b6000819055506000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60006e010000000000000000000000000000826dffffffffffffffffffffffffffff16029050919050565b6000816dffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168161272b57fe5b04905092915050565b60008282840191508110156127b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b9291505056fe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a26469706673582212208806423f0561522375d4d15ba3785948c0b250d0817eaf87b4f8edb4afe4b90864736f6c63430007060033";
579
-
580
- static connect(address, runner) {
581
- return new QuantumSwapV2Pair(address, runner);
582
- }
583
-
584
- constructor(address, runner, _deployTx) {
585
- super(address, QuantumSwapV2Pair.abi, runner, QuantumSwapV2Pair.bytecode);
586
- this._deployTx = _deployTx;
587
-
588
- // Typed populateTransaction helpers (offline signing / sendRawTransaction flows)
589
- this.populateTransaction = {
590
- approve: async (spender, value, overrides) => {
591
- const data = this.interface.encodeFunctionData("approve", [spender, value]);
592
- return { to: this.address, data, ...(overrides || {}) };
593
- },
594
- burn: async (to, overrides) => {
595
- const data = this.interface.encodeFunctionData("burn", [to]);
596
- return { to: this.address, data, ...(overrides || {}) };
597
- },
598
- initialize: async (_token0, _token1, overrides) => {
599
- const data = this.interface.encodeFunctionData("initialize", [_token0, _token1]);
600
- return { to: this.address, data, ...(overrides || {}) };
601
- },
602
- mint: async (to, overrides) => {
603
- const data = this.interface.encodeFunctionData("mint", [to]);
604
- return { to: this.address, data, ...(overrides || {}) };
605
- },
606
- skim: async (to, overrides) => {
607
- const data = this.interface.encodeFunctionData("skim", [to]);
608
- return { to: this.address, data, ...(overrides || {}) };
609
- },
610
- swap: async (amount0Out, amount1Out, to, data, overrides) => {
611
- const dataEnc = this.interface.encodeFunctionData("swap", [amount0Out, amount1Out, to, data]);
612
- return { to: this.address, data: dataEnc, ...(overrides || {}) };
613
- },
614
- sync: async (overrides) => {
615
- const data = this.interface.encodeFunctionData("sync", []);
616
- return { to: this.address, data, ...(overrides || {}) };
617
- },
618
- transfer: async (to, value, overrides) => {
619
- const data = this.interface.encodeFunctionData("transfer", [to, value]);
620
- return { to: this.address, data, ...(overrides || {}) };
621
- },
622
- transferFrom: async (from, to, value, overrides) => {
623
- const data = this.interface.encodeFunctionData("transferFrom", [from, to, value]);
624
- return { to: this.address, data, ...(overrides || {}) };
625
- },
626
- };
627
- }
628
-
629
- /**
630
- * MINIMUM_LIQUIDITY
631
- * @returns {Promise<import("quantumcoin/types").Uint256>}
632
- */
633
- async MINIMUM_LIQUIDITY() {
634
- const res = await this.call("MINIMUM_LIQUIDITY", []);
635
- return Array.isArray(res) ? res[0] : res;
636
- }
637
-
638
- /**
639
- * allowance
640
- * @param {import("quantumcoin/types").AddressLike} arg
641
- * @param {import("quantumcoin/types").AddressLike} arg
642
- * @returns {Promise<import("quantumcoin/types").Uint256>}
643
- */
644
- async allowance(arg0, arg1) {
645
- const res = await this.call("allowance", [arg0, arg1]);
646
- return Array.isArray(res) ? res[0] : res;
647
- }
648
-
649
- /**
650
- * approve
651
- * @param {import("quantumcoin/types").AddressLike} spender
652
- * @param {import("quantumcoin/types").Uint256Like} value
653
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
654
- */
655
- async approve(spender, value, overrides) {
656
- return this.send("approve", [spender, value], overrides);
657
- }
658
-
659
- /**
660
- * balanceOf
661
- * @param {import("quantumcoin/types").AddressLike} arg
662
- * @returns {Promise<import("quantumcoin/types").Uint256>}
663
- */
664
- async balanceOf(arg0) {
665
- const res = await this.call("balanceOf", [arg0]);
666
- return Array.isArray(res) ? res[0] : res;
667
- }
668
-
669
- /**
670
- * burn
671
- * @param {import("quantumcoin/types").AddressLike} to
672
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
673
- */
674
- async burn(to, overrides) {
675
- return this.send("burn", [to], overrides);
676
- }
677
-
678
- /**
679
- * decimals
680
- * @returns {Promise<import("quantumcoin/types").Uint8>}
681
- */
682
- async decimals() {
683
- const res = await this.call("decimals", []);
684
- return Array.isArray(res) ? res[0] : res;
685
- }
686
-
687
- /**
688
- * factory
689
- * @returns {Promise<import("quantumcoin/types").SolAddress>}
690
- */
691
- async factory() {
692
- const res = await this.call("factory", []);
693
- return Array.isArray(res) ? res[0] : res;
694
- }
695
-
696
- /**
697
- * getReserves
698
- * @returns {Promise<[import("quantumcoin/types").Uint112, import("quantumcoin/types").Uint112, import("quantumcoin/types").Uint32]>}
699
- */
700
- async getReserves() {
701
- const res = await this.call("getReserves", []);
702
- return res;
703
- }
704
-
705
- /**
706
- * initialize
707
- * @param {import("quantumcoin/types").AddressLike} _token0
708
- * @param {import("quantumcoin/types").AddressLike} _token1
709
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
710
- */
711
- async initialize(_token0, _token1, overrides) {
712
- return this.send("initialize", [_token0, _token1], overrides);
713
- }
714
-
715
- /**
716
- * kLast
717
- * @returns {Promise<import("quantumcoin/types").Uint256>}
718
- */
719
- async kLast() {
720
- const res = await this.call("kLast", []);
721
- return Array.isArray(res) ? res[0] : res;
722
- }
723
-
724
- /**
725
- * mint
726
- * @param {import("quantumcoin/types").AddressLike} to
727
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
728
- */
729
- async mint(to, overrides) {
730
- return this.send("mint", [to], overrides);
731
- }
732
-
733
- /**
734
- * name
735
- * @returns {Promise<string>}
736
- */
737
- async name() {
738
- const res = await this.call("name", []);
739
- return Array.isArray(res) ? res[0] : res;
740
- }
741
-
742
- /**
743
- * price0CumulativeLast
744
- * @returns {Promise<import("quantumcoin/types").Uint256>}
745
- */
746
- async price0CumulativeLast() {
747
- const res = await this.call("price0CumulativeLast", []);
748
- return Array.isArray(res) ? res[0] : res;
749
- }
750
-
751
- /**
752
- * price1CumulativeLast
753
- * @returns {Promise<import("quantumcoin/types").Uint256>}
754
- */
755
- async price1CumulativeLast() {
756
- const res = await this.call("price1CumulativeLast", []);
757
- return Array.isArray(res) ? res[0] : res;
758
- }
759
-
760
- /**
761
- * skim
762
- * @param {import("quantumcoin/types").AddressLike} to
763
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
764
- */
765
- async skim(to, overrides) {
766
- return this.send("skim", [to], overrides);
767
- }
768
-
769
- /**
770
- * swap
771
- * @param {import("quantumcoin/types").Uint256Like} amount0Out
772
- * @param {import("quantumcoin/types").Uint256Like} amount1Out
773
- * @param {import("quantumcoin/types").AddressLike} to
774
- * @param {import("quantumcoin/types").BytesLike} data
775
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
776
- */
777
- async swap(amount0Out, amount1Out, to, data, overrides) {
778
- return this.send("swap", [amount0Out, amount1Out, to, data], overrides);
779
- }
780
-
781
- /**
782
- * symbol
783
- * @returns {Promise<string>}
784
- */
785
- async symbol() {
786
- const res = await this.call("symbol", []);
787
- return Array.isArray(res) ? res[0] : res;
788
- }
789
-
790
- /**
791
- * sync
792
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
793
- */
794
- async sync(overrides) {
795
- return this.send("sync", [], overrides);
796
- }
797
-
798
- /**
799
- * token0
800
- * @returns {Promise<import("quantumcoin/types").SolAddress>}
801
- */
802
- async token0() {
803
- const res = await this.call("token0", []);
804
- return Array.isArray(res) ? res[0] : res;
805
- }
806
-
807
- /**
808
- * token1
809
- * @returns {Promise<import("quantumcoin/types").SolAddress>}
810
- */
811
- async token1() {
812
- const res = await this.call("token1", []);
813
- return Array.isArray(res) ? res[0] : res;
814
- }
815
-
816
- /**
817
- * totalSupply
818
- * @returns {Promise<import("quantumcoin/types").Uint256>}
819
- */
820
- async totalSupply() {
821
- const res = await this.call("totalSupply", []);
822
- return Array.isArray(res) ? res[0] : res;
823
- }
824
-
825
- /**
826
- * transfer
827
- * @param {import("quantumcoin/types").AddressLike} to
828
- * @param {import("quantumcoin/types").Uint256Like} value
829
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
830
- */
831
- async transfer(to, value, overrides) {
832
- return this.send("transfer", [to, value], overrides);
833
- }
834
-
835
- /**
836
- * transferFrom
837
- * @param {import("quantumcoin/types").AddressLike} from
838
- * @param {import("quantumcoin/types").AddressLike} to
839
- * @param {import("quantumcoin/types").Uint256Like} value
840
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
841
- */
842
- async transferFrom(from, to, value, overrides) {
843
- return this.send("transferFrom", [from, to, value], overrides);
844
- }
845
- }
846
-
847
- module.exports = { QuantumSwapV2Pair };
1
+ // Auto-generated by sdkgen
2
+ const { Contract } = require("quantumcoin");
3
+
4
+ /**
5
+ * QuantumSwapV2Pair - A typed contract interface for QuantumSwapV2Pair
6
+ */
7
+ class QuantumSwapV2Pair extends Contract {
8
+ static abi = [
9
+ {
10
+ "inputs": [],
11
+ "stateMutability": "nonpayable",
12
+ "type": "constructor"
13
+ },
14
+ {
15
+ "anonymous": false,
16
+ "inputs": [
17
+ {
18
+ "indexed": true,
19
+ "internalType": "address",
20
+ "name": "owner",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "indexed": true,
25
+ "internalType": "address",
26
+ "name": "spender",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "indexed": false,
31
+ "internalType": "uint256",
32
+ "name": "value",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "Approval",
37
+ "type": "event"
38
+ },
39
+ {
40
+ "anonymous": false,
41
+ "inputs": [
42
+ {
43
+ "indexed": true,
44
+ "internalType": "address",
45
+ "name": "sender",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "indexed": false,
50
+ "internalType": "uint256",
51
+ "name": "amount0",
52
+ "type": "uint256"
53
+ },
54
+ {
55
+ "indexed": false,
56
+ "internalType": "uint256",
57
+ "name": "amount1",
58
+ "type": "uint256"
59
+ },
60
+ {
61
+ "indexed": true,
62
+ "internalType": "address",
63
+ "name": "to",
64
+ "type": "address"
65
+ }
66
+ ],
67
+ "name": "Burn",
68
+ "type": "event"
69
+ },
70
+ {
71
+ "anonymous": false,
72
+ "inputs": [
73
+ {
74
+ "indexed": true,
75
+ "internalType": "address",
76
+ "name": "sender",
77
+ "type": "address"
78
+ },
79
+ {
80
+ "indexed": false,
81
+ "internalType": "uint256",
82
+ "name": "amount0",
83
+ "type": "uint256"
84
+ },
85
+ {
86
+ "indexed": false,
87
+ "internalType": "uint256",
88
+ "name": "amount1",
89
+ "type": "uint256"
90
+ }
91
+ ],
92
+ "name": "Mint",
93
+ "type": "event"
94
+ },
95
+ {
96
+ "anonymous": false,
97
+ "inputs": [
98
+ {
99
+ "indexed": true,
100
+ "internalType": "address",
101
+ "name": "sender",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "indexed": false,
106
+ "internalType": "uint256",
107
+ "name": "amount0In",
108
+ "type": "uint256"
109
+ },
110
+ {
111
+ "indexed": false,
112
+ "internalType": "uint256",
113
+ "name": "amount1In",
114
+ "type": "uint256"
115
+ },
116
+ {
117
+ "indexed": false,
118
+ "internalType": "uint256",
119
+ "name": "amount0Out",
120
+ "type": "uint256"
121
+ },
122
+ {
123
+ "indexed": false,
124
+ "internalType": "uint256",
125
+ "name": "amount1Out",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "indexed": true,
130
+ "internalType": "address",
131
+ "name": "to",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "Swap",
136
+ "type": "event"
137
+ },
138
+ {
139
+ "anonymous": false,
140
+ "inputs": [
141
+ {
142
+ "indexed": false,
143
+ "internalType": "uint112",
144
+ "name": "reserve0",
145
+ "type": "uint112"
146
+ },
147
+ {
148
+ "indexed": false,
149
+ "internalType": "uint112",
150
+ "name": "reserve1",
151
+ "type": "uint112"
152
+ }
153
+ ],
154
+ "name": "Sync",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "from",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "indexed": true,
168
+ "internalType": "address",
169
+ "name": "to",
170
+ "type": "address"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "uint256",
175
+ "name": "value",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "Transfer",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "MINIMUM_LIQUIDITY",
185
+ "outputs": [
186
+ {
187
+ "internalType": "uint256",
188
+ "name": "",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [
197
+ {
198
+ "internalType": "address",
199
+ "name": "",
200
+ "type": "address"
201
+ },
202
+ {
203
+ "internalType": "address",
204
+ "name": "",
205
+ "type": "address"
206
+ }
207
+ ],
208
+ "name": "allowance",
209
+ "outputs": [
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "",
213
+ "type": "uint256"
214
+ }
215
+ ],
216
+ "stateMutability": "view",
217
+ "type": "function"
218
+ },
219
+ {
220
+ "inputs": [
221
+ {
222
+ "internalType": "address",
223
+ "name": "spender",
224
+ "type": "address"
225
+ },
226
+ {
227
+ "internalType": "uint256",
228
+ "name": "value",
229
+ "type": "uint256"
230
+ }
231
+ ],
232
+ "name": "approve",
233
+ "outputs": [
234
+ {
235
+ "internalType": "bool",
236
+ "name": "",
237
+ "type": "bool"
238
+ }
239
+ ],
240
+ "stateMutability": "nonpayable",
241
+ "type": "function"
242
+ },
243
+ {
244
+ "inputs": [
245
+ {
246
+ "internalType": "address",
247
+ "name": "",
248
+ "type": "address"
249
+ }
250
+ ],
251
+ "name": "balanceOf",
252
+ "outputs": [
253
+ {
254
+ "internalType": "uint256",
255
+ "name": "",
256
+ "type": "uint256"
257
+ }
258
+ ],
259
+ "stateMutability": "view",
260
+ "type": "function"
261
+ },
262
+ {
263
+ "inputs": [
264
+ {
265
+ "internalType": "address",
266
+ "name": "to",
267
+ "type": "address"
268
+ }
269
+ ],
270
+ "name": "burn",
271
+ "outputs": [
272
+ {
273
+ "internalType": "uint256",
274
+ "name": "amount0",
275
+ "type": "uint256"
276
+ },
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "amount1",
280
+ "type": "uint256"
281
+ }
282
+ ],
283
+ "stateMutability": "nonpayable",
284
+ "type": "function"
285
+ },
286
+ {
287
+ "inputs": [],
288
+ "name": "decimals",
289
+ "outputs": [
290
+ {
291
+ "internalType": "uint8",
292
+ "name": "",
293
+ "type": "uint8"
294
+ }
295
+ ],
296
+ "stateMutability": "view",
297
+ "type": "function"
298
+ },
299
+ {
300
+ "inputs": [],
301
+ "name": "factory",
302
+ "outputs": [
303
+ {
304
+ "internalType": "address",
305
+ "name": "",
306
+ "type": "address"
307
+ }
308
+ ],
309
+ "stateMutability": "view",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [],
314
+ "name": "getReserves",
315
+ "outputs": [
316
+ {
317
+ "internalType": "uint112",
318
+ "name": "_reserve0",
319
+ "type": "uint112"
320
+ },
321
+ {
322
+ "internalType": "uint112",
323
+ "name": "_reserve1",
324
+ "type": "uint112"
325
+ },
326
+ {
327
+ "internalType": "uint32",
328
+ "name": "_blockTimestampLast",
329
+ "type": "uint32"
330
+ }
331
+ ],
332
+ "stateMutability": "view",
333
+ "type": "function"
334
+ },
335
+ {
336
+ "inputs": [
337
+ {
338
+ "internalType": "address",
339
+ "name": "_token0",
340
+ "type": "address"
341
+ },
342
+ {
343
+ "internalType": "address",
344
+ "name": "_token1",
345
+ "type": "address"
346
+ }
347
+ ],
348
+ "name": "initialize",
349
+ "outputs": [],
350
+ "stateMutability": "nonpayable",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [],
355
+ "name": "kLast",
356
+ "outputs": [
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "to",
371
+ "type": "address"
372
+ }
373
+ ],
374
+ "name": "mint",
375
+ "outputs": [
376
+ {
377
+ "internalType": "uint256",
378
+ "name": "liquidity",
379
+ "type": "uint256"
380
+ }
381
+ ],
382
+ "stateMutability": "nonpayable",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "inputs": [],
387
+ "name": "name",
388
+ "outputs": [
389
+ {
390
+ "internalType": "string",
391
+ "name": "",
392
+ "type": "string"
393
+ }
394
+ ],
395
+ "stateMutability": "view",
396
+ "type": "function"
397
+ },
398
+ {
399
+ "inputs": [],
400
+ "name": "price0CumulativeLast",
401
+ "outputs": [
402
+ {
403
+ "internalType": "uint256",
404
+ "name": "",
405
+ "type": "uint256"
406
+ }
407
+ ],
408
+ "stateMutability": "view",
409
+ "type": "function"
410
+ },
411
+ {
412
+ "inputs": [],
413
+ "name": "price1CumulativeLast",
414
+ "outputs": [
415
+ {
416
+ "internalType": "uint256",
417
+ "name": "",
418
+ "type": "uint256"
419
+ }
420
+ ],
421
+ "stateMutability": "view",
422
+ "type": "function"
423
+ },
424
+ {
425
+ "inputs": [
426
+ {
427
+ "internalType": "address",
428
+ "name": "to",
429
+ "type": "address"
430
+ }
431
+ ],
432
+ "name": "skim",
433
+ "outputs": [],
434
+ "stateMutability": "nonpayable",
435
+ "type": "function"
436
+ },
437
+ {
438
+ "inputs": [
439
+ {
440
+ "internalType": "uint256",
441
+ "name": "amount0Out",
442
+ "type": "uint256"
443
+ },
444
+ {
445
+ "internalType": "uint256",
446
+ "name": "amount1Out",
447
+ "type": "uint256"
448
+ },
449
+ {
450
+ "internalType": "address",
451
+ "name": "to",
452
+ "type": "address"
453
+ },
454
+ {
455
+ "internalType": "bytes",
456
+ "name": "data",
457
+ "type": "bytes"
458
+ }
459
+ ],
460
+ "name": "swap",
461
+ "outputs": [],
462
+ "stateMutability": "nonpayable",
463
+ "type": "function"
464
+ },
465
+ {
466
+ "inputs": [],
467
+ "name": "symbol",
468
+ "outputs": [
469
+ {
470
+ "internalType": "string",
471
+ "name": "",
472
+ "type": "string"
473
+ }
474
+ ],
475
+ "stateMutability": "view",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [],
480
+ "name": "sync",
481
+ "outputs": [],
482
+ "stateMutability": "nonpayable",
483
+ "type": "function"
484
+ },
485
+ {
486
+ "inputs": [],
487
+ "name": "token0",
488
+ "outputs": [
489
+ {
490
+ "internalType": "address",
491
+ "name": "",
492
+ "type": "address"
493
+ }
494
+ ],
495
+ "stateMutability": "view",
496
+ "type": "function"
497
+ },
498
+ {
499
+ "inputs": [],
500
+ "name": "token1",
501
+ "outputs": [
502
+ {
503
+ "internalType": "address",
504
+ "name": "",
505
+ "type": "address"
506
+ }
507
+ ],
508
+ "stateMutability": "view",
509
+ "type": "function"
510
+ },
511
+ {
512
+ "inputs": [],
513
+ "name": "totalSupply",
514
+ "outputs": [
515
+ {
516
+ "internalType": "uint256",
517
+ "name": "",
518
+ "type": "uint256"
519
+ }
520
+ ],
521
+ "stateMutability": "view",
522
+ "type": "function"
523
+ },
524
+ {
525
+ "inputs": [
526
+ {
527
+ "internalType": "address",
528
+ "name": "to",
529
+ "type": "address"
530
+ },
531
+ {
532
+ "internalType": "uint256",
533
+ "name": "value",
534
+ "type": "uint256"
535
+ }
536
+ ],
537
+ "name": "transfer",
538
+ "outputs": [
539
+ {
540
+ "internalType": "bool",
541
+ "name": "",
542
+ "type": "bool"
543
+ }
544
+ ],
545
+ "stateMutability": "nonpayable",
546
+ "type": "function"
547
+ },
548
+ {
549
+ "inputs": [
550
+ {
551
+ "internalType": "address",
552
+ "name": "from",
553
+ "type": "address"
554
+ },
555
+ {
556
+ "internalType": "address",
557
+ "name": "to",
558
+ "type": "address"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "value",
563
+ "type": "uint256"
564
+ }
565
+ ],
566
+ "name": "transferFrom",
567
+ "outputs": [
568
+ {
569
+ "internalType": "bool",
570
+ "name": "",
571
+ "type": "bool"
572
+ }
573
+ ],
574
+ "stateMutability": "nonpayable",
575
+ "type": "function"
576
+ }
577
+ ];
578
+ static bytecode = "0x60806040526001600a5534801561001557600080fd5b50600046905050336003819055506128a7806100326000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80636a627842116100c3578063ba9a7a561161007c578063ba9a7a56146105f1578063bc25cf771461060f578063c45a01551461063d578063d21220a71461065b578063dd62ed3e14610679578063fff6cae9146106c55761014d565b80636a6278421461043557806370a08231146104775780637464fc3d146104b957806389afcb44146104d757806395d89b4114610520578063a9059cbb146105a35761014d565b806318160ddd1161011557806318160ddd1461032a57806323b872dd14610348578063313ce567146103a0578063485cc955146103c15780635909c0d5146103f95780635a3d5493146104175761014d565b8063022c0d9f1461015257806306fdde03146101e95780630902f1ac1461026c578063095ea7b3146102be5780630dfe16811461030c575b600080fd5b6101e76004803603608081101561016857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001906401000000008111156101a357600080fd5b8201836020820111156101b557600080fd5b803590602001918460018302840111640100000000831117156101d757600080fd5b90919293919293905050506106cf565b005b6101f1610d32565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610231578082015181840152602081019050610216565b50505050905090810190601f16801561025e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610274610d6b565b60405180846dffffffffffffffffffffffffffff168152602001836dffffffffffffffffffffffffffff1681526020018263ffffffff168152602001935050505060405180910390f35b6102f4600480360360408110156102d457600080fd5b810190808035906020019092919080359060200190929190505050610dc8565b60405180821515815260200191505060405180910390f35b610314610ddf565b6040518082815260200191505060405180910390f35b610332610de5565b6040518082815260200191505060405180910390f35b6103886004803603606081101561035e57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610deb565b60405180821515815260200191505060405180910390f35b6103a8610eae565b604051808260ff16815260200191505060405180910390f35b6103f7600480360360408110156103d757600080fd5b810190808035906020019092919080359060200190929190505050610eb3565b005b610401610f3c565b6040518082815260200191505060405180910390f35b61041f610f42565b6040518082815260200191505060405180910390f35b6104616004803603602081101561044b57600080fd5b8101908080359060200190929190505050610f48565b6040518082815260200191505060405180910390f35b6104a36004803603602081101561048d57600080fd5b810190808035906020019092919050505061131f565b6040518082815260200191505060405180910390f35b6104c1611337565b6040518082815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b810190808035906020019092919050505061133d565b604051808381526020018281526020019250505060405180910390f35b61052861178a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561056857808201518184015260208101905061054d565b50505050905090810190601f1680156105955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105d9600480360360408110156105b957600080fd5b8101908080359060200190929190803590602001909291905050506117c3565b60405180821515815260200191505060405180910390f35b6105f96117da565b6040518082815260200191505060405180910390f35b61063b6004803603602081101561062557600080fd5b81019080803590602001909291905050506117e0565b005b6106456119f7565b6040518082815260200191505060405180910390f35b6106636119fd565b6040518082815260200191505060405180910390f35b6106af6004803603604081101561068f57600080fd5b810190808035906020019092919080359060200190929190505050611a03565b6040518082815260200191505060405180910390f35b6106cd611a28565b005b6001600a5414610747576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600085118061075e5750600084115b6107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806127b86025913960400191505060405180910390fd5b6000806107be610d6b565b5091509150816dffffffffffffffffffffffffffff16871080156107f15750806dffffffffffffffffffffffffffff1686105b610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128016021913960400191505060405180910390fd5b60008060006004549050600060055490508189141580156108675750808914155b6108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f556e697377617056323a20494e56414c49445f544f000000000000000000000081525060200191505060405180910390fd5b60008b11156108ee576108ed828a8d611be4565b5b60008a111561090357610902818a8c611be4565b5b60008888905011156109a957886310d1e85c338d8d8c8c6040518663ffffffff1660e01b815260040180868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561099057600080fd5b505af11580156109a4573d6000803e3d6000fd5b505050505b816370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b81019080805190602001909291905050509350806370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610a5c57600080fd5b505afa158015610a70573d6000803e3d6000fd5b505050506040513d6020811015610a8657600080fd5b810190808051906020019092919050505092505050600089856dffffffffffffffffffffffffffff16038311610abd576000610ad3565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610af7576000610b0d565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b1e5750600081115b610b73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806127dd6024913960400191505060405180910390fd5b6000610baf610b8c600385611dee90919063ffffffff16565b610ba16103e888611dee90919063ffffffff16565b611e8390919063ffffffff16565b90506000610bed610bca600385611dee90919063ffffffff16565b610bdf6103e888611dee90919063ffffffff16565b611e8390919063ffffffff16565b9050610c37620f4240610c29896dffffffffffffffffffffffffffff168b6dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b611dee90919063ffffffff16565b610c4a8284611dee90919063ffffffff16565b1015610cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e697377617056323a204b000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050610ccc84848888611f06565b88337fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d82284848f8f6040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050505050506001600a819055505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6000806000600660009054906101000a90046dffffffffffffffffffffffffffff1692506006600e9054906101000a90046dffffffffffffffffffffffffffff1691506006601c9054906101000a900463ffffffff169050909192565b6000610dd5338484612264565b6001905092915050565b60045481565b60005481565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6002600086815260200190815260200160002060003381526020019081526020016000205414610e9857610e6f8260026000878152602001908152602001600020600033815260200190815260200160002054611e8390919063ffffffff16565b600260008681526020019081526020016000206000338152602001908152602001600020819055505b610ea38484846122cb565b600190509392505050565b601281565b6003543314610f2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f556e697377617056323a20464f5242494444454e00000000000000000000000081525060200191505060405180910390fd5b81600481905550806005819055505050565b60075481565b60085481565b60006001600a5414610fc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600080610fd5610d6b565b509150915060006004546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561101957600080fd5b505afa15801561102d573d6000803e3d6000fd5b505050506040513d602081101561104357600080fd5b8101908080519060200190929190505050905060006005546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561109557600080fd5b505afa1580156110a9573d6000803e3d6000fd5b505050506040513d60208110156110bf57600080fd5b8101908080519060200190929190505050905060006110f7856dffffffffffffffffffffffffffff1684611e8390919063ffffffff16565b9050600061111e856dffffffffffffffffffffffffffff1684611e8390919063ffffffff16565b9050600061112c8787612383565b905060008054905060008114156111805761116c6103e861115e6111598688611dee90919063ffffffff16565b612502565b611e8390919063ffffffff16565b985061117b60006103e8612564565b6111e3565b6111e0886dffffffffffffffffffffffffffff166111a78387611dee90919063ffffffff16565b816111ae57fe5b04886dffffffffffffffffffffffffffff166111d38487611dee90919063ffffffff16565b816111da57fe5b046125fa565b98505b6000891161123c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061284a6028913960400191505060405180910390fd5b6112468a8a612564565b61125286868a8a611f06565b81156112ca576112c36006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b6009819055505b337f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8585604051808381526020018281526020019250505060405180910390a250505050505050506001600a81905550919050565b60016020528060005260406000206000915090505481565b60095481565b6000806001600a54146113b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a819055506000806113cb610d6b565b509150915060006004549050600060055490506000826370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561141b57600080fd5b505afa15801561142f573d6000803e3d6000fd5b505050506040513d602081101561144557600080fd5b810190808051906020019092919050505090506000826370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561149557600080fd5b505afa1580156114a9573d6000803e3d6000fd5b505050506040513d60208110156114bf57600080fd5b8101908080519060200190929190505050905060006001600030815260200190815260200160002054905060006114f68888612383565b9050600080549050806115128685611dee90919063ffffffff16565b8161151957fe5b049a50806115308585611dee90919063ffffffff16565b8161153757fe5b04995060008b11801561154a575060008a115b61159f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806128226028913960400191505060405180910390fd5b6115a93084612613565b6115b4878d8d611be4565b6115bf868d8c611be4565b866370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156115fa57600080fd5b505afa15801561160e573d6000803e3d6000fd5b505050506040513d602081101561162457600080fd5b81019080805190602001909291905050509450856370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561167257600080fd5b505afa158015611686573d6000803e3d6000fd5b505050506040513d602081101561169c57600080fd5b810190808051906020019092919050505093506116bb85858b8b611f06565b81156117335761172c6006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b6009819055505b8b337fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d819364968d8d604051808381526020018281526020019250505060405180910390a35050505050505050506001600a81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b60006117d03384846122cb565b6001905092915050565b6103e881565b6001600a5414611858576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550600060045490506000600554905061192c8284611927600660009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16866370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156118de57600080fd5b505afa1580156118f2573d6000803e3d6000fd5b505050506040513d602081101561190857600080fd5b8101908080519060200190929190505050611e8390919063ffffffff16565b611be4565b6119ea81846119e56006600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16856370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561199c57600080fd5b505afa1580156119b0573d6000803e3d6000fd5b505050506040513d60208110156119c657600080fd5b8101908080519060200190929190505050611e8390919063ffffffff16565b611be4565b50506001600a8190555050565b60035481565b60055481565b6002602052816000526040600020602052806000526040600020600091509150505481565b6001600a5414611aa0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f556e697377617056323a204c4f434b454400000000000000000000000000000081525060200191505060405180910390fd5b6000600a81905550611bda6004546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b505050506040513d6020811015611b1257600080fd5b81019080805190602001909291905050506005546370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b6057600080fd5b505afa158015611b74573d6000803e3d6000fd5b505050506040513d6020811015611b8a57600080fd5b8101908080519060200190929190505050600660009054906101000a90046dffffffffffffffffffffffffffff166006600e9054906101000a90046dffffffffffffffffffffffffffff16611f06565b6001600a81905550565b600080846040518060400160405280601981526020017f7472616e7366657228616464726573732c75696e7432353629000000000000008152508051906020012085856040516024018083815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310611cce5780518252602082019150602081019050602083039250611cab565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611d30576040519150601f19603f3d011682016040523d82523d6000602084013e611d35565b606091505b5091509150818015611d755750600081511480611d745750808060200190516020811015611d6257600080fd5b81019080805190602001909291905050505b5b611de7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f556e697377617056323a205452414e534645525f4641494c454400000000000081525060200191505060405180910390fd5b5050505050565b600080821480611e0b5750828283850292508281611e0857fe5b04145b611e7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b6000828284039150811115611f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168411158015611f7657507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff168311155b611fe8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f556e697377617056323a204f564552464c4f570000000000000000000000000081525060200191505060405180910390fd5b60006401000000004281611ff857fe5b06905060006006601c9054906101000a900463ffffffff168203905060008163ffffffff1611801561203b57506000846dffffffffffffffffffffffffffff1614155b801561205857506000836dffffffffffffffffffffffffffff1614155b1561213a578063ffffffff1661209d85612071866126a9565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166126d490919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16026007600082825401925050819055508063ffffffff1661210b846120df876126a9565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166126d490919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16026008600082825401925050819055505b85600660006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550846006600e6101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550816006601c6101000a81548163ffffffff021916908363ffffffff1602179055507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1600660009054906101000a90046dffffffffffffffffffffffffffff166006600e9054906101000a90046dffffffffffffffffffffffffffff1660405180836dffffffffffffffffffffffffffff168152602001826dffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050505050565b806002600085815260200190815260200160002060008481526020019081526020016000208190555081837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6122f1816001600086815260200190815260200160002054611e8390919063ffffffff16565b600160008581526020019081526020016000208190555061232e81600160008581526020019081526020016000205461273490919063ffffffff16565b600160008481526020019081526020016000208190555081837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008060035463017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b1580156123b857600080fd5b505afa1580156123cc573d6000803e3d6000fd5b505050506040513d60208110156123e257600080fd5b81019080805190602001909291905050509050600081141591506000600954905082156124e857600081146124e357600061244e612449866dffffffffffffffffffffffffffff16886dffffffffffffffffffffffffffff16611dee90919063ffffffff16565b612502565b9050600061245b83612502565b9050808211156124e057600061248e61247d8385611e8390919063ffffffff16565b600054611dee90919063ffffffff16565b905060006124b8836124aa600587611dee90919063ffffffff16565b61273490919063ffffffff16565b905060008183816124c557fe5b04905060008111156124dc576124db8782612564565b5b5050505b50505b6124fa565b600081146124f95760006009819055505b5b505092915050565b6000600382111561255157819050600060016002848161251e57fe5b040190505b8181101561254b5780915060028182858161253a57fe5b04018161254357fe5b049050612523565b5061255f565b6000821461255e57600190505b5b919050565b6125798160005461273490919063ffffffff16565b6000819055506125a581600160008581526020019081526020016000205461273490919063ffffffff16565b60016000848152602001908152602001600020819055508160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000818310612609578161260b565b825b905092915050565b612639816001600085815260200190815260200160002054611e8390919063ffffffff16565b600160008481526020019081526020016000208190555061266581600054611e8390919063ffffffff16565b6000819055506000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60006e010000000000000000000000000000826dffffffffffffffffffffffffffff16029050919050565b6000816dffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168161272b57fe5b04905092915050565b60008282840191508110156127b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b9291505056fe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a26469706673582212208806423f0561522375d4d15ba3785948c0b250d0817eaf87b4f8edb4afe4b90864736f6c63430007060033";
579
+
580
+ static connect(address, runner) {
581
+ return new QuantumSwapV2Pair(address, runner);
582
+ }
583
+
584
+ constructor(address, runner, _deployTx) {
585
+ super(address, QuantumSwapV2Pair.abi, runner, QuantumSwapV2Pair.bytecode);
586
+ this._deployTx = _deployTx;
587
+
588
+ // Typed populateTransaction helpers (offline signing / sendRawTransaction flows)
589
+ this.populateTransaction = {
590
+ approve: async (spender, value, overrides) => {
591
+ const data = this.interface.encodeFunctionData("approve", [spender, value]);
592
+ return { to: this.address, data, ...(overrides || {}) };
593
+ },
594
+ burn: async (to, overrides) => {
595
+ const data = this.interface.encodeFunctionData("burn", [to]);
596
+ return { to: this.address, data, ...(overrides || {}) };
597
+ },
598
+ initialize: async (_token0, _token1, overrides) => {
599
+ const data = this.interface.encodeFunctionData("initialize", [_token0, _token1]);
600
+ return { to: this.address, data, ...(overrides || {}) };
601
+ },
602
+ mint: async (to, overrides) => {
603
+ const data = this.interface.encodeFunctionData("mint", [to]);
604
+ return { to: this.address, data, ...(overrides || {}) };
605
+ },
606
+ skim: async (to, overrides) => {
607
+ const data = this.interface.encodeFunctionData("skim", [to]);
608
+ return { to: this.address, data, ...(overrides || {}) };
609
+ },
610
+ swap: async (amount0Out, amount1Out, to, data, overrides) => {
611
+ const dataEnc = this.interface.encodeFunctionData("swap", [amount0Out, amount1Out, to, data]);
612
+ return { to: this.address, data: dataEnc, ...(overrides || {}) };
613
+ },
614
+ sync: async (overrides) => {
615
+ const data = this.interface.encodeFunctionData("sync", []);
616
+ return { to: this.address, data, ...(overrides || {}) };
617
+ },
618
+ transfer: async (to, value, overrides) => {
619
+ const data = this.interface.encodeFunctionData("transfer", [to, value]);
620
+ return { to: this.address, data, ...(overrides || {}) };
621
+ },
622
+ transferFrom: async (from, to, value, overrides) => {
623
+ const data = this.interface.encodeFunctionData("transferFrom", [from, to, value]);
624
+ return { to: this.address, data, ...(overrides || {}) };
625
+ },
626
+ };
627
+ }
628
+
629
+ /**
630
+ * MINIMUM_LIQUIDITY
631
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
632
+ */
633
+ async MINIMUM_LIQUIDITY() {
634
+ const res = await this.call("MINIMUM_LIQUIDITY", []);
635
+ return Array.isArray(res) ? res[0] : res;
636
+ }
637
+
638
+ /**
639
+ * allowance
640
+ * @param {import("quantumcoin/types").AddressLike} arg
641
+ * @param {import("quantumcoin/types").AddressLike} arg
642
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
643
+ */
644
+ async allowance(arg0, arg1) {
645
+ const res = await this.call("allowance", [arg0, arg1]);
646
+ return Array.isArray(res) ? res[0] : res;
647
+ }
648
+
649
+ /**
650
+ * approve
651
+ * @param {import("quantumcoin/types").AddressLike} spender
652
+ * @param {import("quantumcoin/types").Uint256Like} value
653
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
654
+ */
655
+ async approve(spender, value, overrides) {
656
+ return this.send("approve", [spender, value], overrides);
657
+ }
658
+
659
+ /**
660
+ * balanceOf
661
+ * @param {import("quantumcoin/types").AddressLike} arg
662
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
663
+ */
664
+ async balanceOf(arg0) {
665
+ const res = await this.call("balanceOf", [arg0]);
666
+ return Array.isArray(res) ? res[0] : res;
667
+ }
668
+
669
+ /**
670
+ * burn
671
+ * @param {import("quantumcoin/types").AddressLike} to
672
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
673
+ */
674
+ async burn(to, overrides) {
675
+ return this.send("burn", [to], overrides);
676
+ }
677
+
678
+ /**
679
+ * decimals
680
+ * @returns {Promise<import("quantumcoin/types").Uint8>}
681
+ */
682
+ async decimals() {
683
+ const res = await this.call("decimals", []);
684
+ return Array.isArray(res) ? res[0] : res;
685
+ }
686
+
687
+ /**
688
+ * factory
689
+ * @returns {Promise<import("quantumcoin/types").SolAddress>}
690
+ */
691
+ async factory() {
692
+ const res = await this.call("factory", []);
693
+ return Array.isArray(res) ? res[0] : res;
694
+ }
695
+
696
+ /**
697
+ * getReserves
698
+ * @returns {Promise<[import("quantumcoin/types").Uint112, import("quantumcoin/types").Uint112, import("quantumcoin/types").Uint32]>}
699
+ */
700
+ async getReserves() {
701
+ const res = await this.call("getReserves", []);
702
+ return res;
703
+ }
704
+
705
+ /**
706
+ * initialize
707
+ * @param {import("quantumcoin/types").AddressLike} _token0
708
+ * @param {import("quantumcoin/types").AddressLike} _token1
709
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
710
+ */
711
+ async initialize(_token0, _token1, overrides) {
712
+ return this.send("initialize", [_token0, _token1], overrides);
713
+ }
714
+
715
+ /**
716
+ * kLast
717
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
718
+ */
719
+ async kLast() {
720
+ const res = await this.call("kLast", []);
721
+ return Array.isArray(res) ? res[0] : res;
722
+ }
723
+
724
+ /**
725
+ * mint
726
+ * @param {import("quantumcoin/types").AddressLike} to
727
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
728
+ */
729
+ async mint(to, overrides) {
730
+ return this.send("mint", [to], overrides);
731
+ }
732
+
733
+ /**
734
+ * name
735
+ * @returns {Promise<string>}
736
+ */
737
+ async name() {
738
+ const res = await this.call("name", []);
739
+ return Array.isArray(res) ? res[0] : res;
740
+ }
741
+
742
+ /**
743
+ * price0CumulativeLast
744
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
745
+ */
746
+ async price0CumulativeLast() {
747
+ const res = await this.call("price0CumulativeLast", []);
748
+ return Array.isArray(res) ? res[0] : res;
749
+ }
750
+
751
+ /**
752
+ * price1CumulativeLast
753
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
754
+ */
755
+ async price1CumulativeLast() {
756
+ const res = await this.call("price1CumulativeLast", []);
757
+ return Array.isArray(res) ? res[0] : res;
758
+ }
759
+
760
+ /**
761
+ * skim
762
+ * @param {import("quantumcoin/types").AddressLike} to
763
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
764
+ */
765
+ async skim(to, overrides) {
766
+ return this.send("skim", [to], overrides);
767
+ }
768
+
769
+ /**
770
+ * swap
771
+ * @param {import("quantumcoin/types").Uint256Like} amount0Out
772
+ * @param {import("quantumcoin/types").Uint256Like} amount1Out
773
+ * @param {import("quantumcoin/types").AddressLike} to
774
+ * @param {import("quantumcoin/types").BytesLike} data
775
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
776
+ */
777
+ async swap(amount0Out, amount1Out, to, data, overrides) {
778
+ return this.send("swap", [amount0Out, amount1Out, to, data], overrides);
779
+ }
780
+
781
+ /**
782
+ * symbol
783
+ * @returns {Promise<string>}
784
+ */
785
+ async symbol() {
786
+ const res = await this.call("symbol", []);
787
+ return Array.isArray(res) ? res[0] : res;
788
+ }
789
+
790
+ /**
791
+ * sync
792
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
793
+ */
794
+ async sync(overrides) {
795
+ return this.send("sync", [], overrides);
796
+ }
797
+
798
+ /**
799
+ * token0
800
+ * @returns {Promise<import("quantumcoin/types").SolAddress>}
801
+ */
802
+ async token0() {
803
+ const res = await this.call("token0", []);
804
+ return Array.isArray(res) ? res[0] : res;
805
+ }
806
+
807
+ /**
808
+ * token1
809
+ * @returns {Promise<import("quantumcoin/types").SolAddress>}
810
+ */
811
+ async token1() {
812
+ const res = await this.call("token1", []);
813
+ return Array.isArray(res) ? res[0] : res;
814
+ }
815
+
816
+ /**
817
+ * totalSupply
818
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
819
+ */
820
+ async totalSupply() {
821
+ const res = await this.call("totalSupply", []);
822
+ return Array.isArray(res) ? res[0] : res;
823
+ }
824
+
825
+ /**
826
+ * transfer
827
+ * @param {import("quantumcoin/types").AddressLike} to
828
+ * @param {import("quantumcoin/types").Uint256Like} value
829
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
830
+ */
831
+ async transfer(to, value, overrides) {
832
+ return this.send("transfer", [to, value], overrides);
833
+ }
834
+
835
+ /**
836
+ * transferFrom
837
+ * @param {import("quantumcoin/types").AddressLike} from
838
+ * @param {import("quantumcoin/types").AddressLike} to
839
+ * @param {import("quantumcoin/types").Uint256Like} value
840
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
841
+ */
842
+ async transferFrom(from, to, value, overrides) {
843
+ return this.send("transferFrom", [from, to, value], overrides);
844
+ }
845
+ }
846
+
847
+ module.exports = { QuantumSwapV2Pair };