@stargatefinance/stg-evm-sdk-v2 0.0.21 → 0.0.22

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.
Files changed (45) hide show
  1. package/deployments/arbsep-testnet/CreditMessaging.json +1441 -0
  2. package/deployments/arbsep-testnet/RewardLib.json +41 -0
  3. package/deployments/arbsep-testnet/RewardRegistryLib.json +41 -0
  4. package/deployments/arbsep-testnet/StargateMultiRewarder.json +1161 -0
  5. package/deployments/arbsep-testnet/StargateStaking.json +726 -0
  6. package/deployments/arbsep-testnet/StargateZapperV1.json +898 -0
  7. package/deployments/arbsep-testnet/TokenMessaging.json +2315 -0
  8. package/deployments/arbsep-testnet/Treasurer.json +411 -0
  9. package/deployments/bsc-testnet/CreditMessaging.json +1441 -0
  10. package/deployments/bsc-testnet/FeeLibV1USDT.json +975 -0
  11. package/deployments/bsc-testnet/RewardLib.json +41 -0
  12. package/deployments/bsc-testnet/RewardRegistryLib.json +41 -0
  13. package/deployments/bsc-testnet/StargateMultiRewarder.json +1161 -0
  14. package/deployments/bsc-testnet/StargatePoolUSDT.json +2507 -0
  15. package/deployments/bsc-testnet/StargateStaking.json +726 -0
  16. package/deployments/bsc-testnet/StargateZapperV1.json +898 -0
  17. package/deployments/bsc-testnet/TokenMessaging.json +2315 -0
  18. package/deployments/bsc-testnet/Treasurer.json +411 -0
  19. package/deployments/klaytn-testnet/CreditMessaging.json +1441 -0
  20. package/deployments/klaytn-testnet/RewardLib.json +41 -0
  21. package/deployments/klaytn-testnet/RewardRegistryLib.json +41 -0
  22. package/deployments/klaytn-testnet/StargateMultiRewarder.json +1161 -0
  23. package/deployments/klaytn-testnet/StargateStaking.json +726 -0
  24. package/deployments/klaytn-testnet/TokenMessaging.json +2315 -0
  25. package/deployments/klaytn-testnet/Treasurer.json +411 -0
  26. package/deployments/optsep-testnet/CreditMessaging.json +1441 -0
  27. package/deployments/optsep-testnet/RewardLib.json +41 -0
  28. package/deployments/optsep-testnet/RewardRegistryLib.json +41 -0
  29. package/deployments/optsep-testnet/StargateMultiRewarder.json +1161 -0
  30. package/deployments/optsep-testnet/StargateStaking.json +726 -0
  31. package/deployments/optsep-testnet/StargateZapperV1.json +898 -0
  32. package/deployments/optsep-testnet/TokenMessaging.json +2315 -0
  33. package/deployments/optsep-testnet/Treasurer.json +411 -0
  34. package/deployments/sepolia-testnet/CreditMessaging.json +1441 -0
  35. package/deployments/sepolia-testnet/FeeLibV1USDT.json +975 -0
  36. package/deployments/sepolia-testnet/PoolTokenUSDT.json +597 -0
  37. package/deployments/sepolia-testnet/RewardLib.json +41 -0
  38. package/deployments/sepolia-testnet/RewardRegistryLib.json +41 -0
  39. package/deployments/sepolia-testnet/StargateMultiRewarder.json +1161 -0
  40. package/deployments/sepolia-testnet/StargatePoolUSDT.json +2507 -0
  41. package/deployments/sepolia-testnet/StargateStaking.json +726 -0
  42. package/deployments/sepolia-testnet/StargateZapperV1.json +898 -0
  43. package/deployments/sepolia-testnet/TokenMessaging.json +2315 -0
  44. package/deployments/sepolia-testnet/Treasurer.json +411 -0
  45. package/package.json +2 -2
@@ -0,0 +1,898 @@
1
+ {
2
+ "address": "0x586da5d8f6eE05174c4fa8ee3ef47E5ac6076900",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract IStargateStaking",
8
+ "name": "_staking",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "contract IStargateV1Router",
13
+ "name": "_routerV1",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "contract IStargateEthVault",
18
+ "name": "_ethVault",
19
+ "type": "address"
20
+ }
21
+ ],
22
+ "stateMutability": "nonpayable",
23
+ "type": "constructor"
24
+ },
25
+ {
26
+ "inputs": [
27
+ {
28
+ "internalType": "uint256",
29
+ "name": "actual",
30
+ "type": "uint256"
31
+ },
32
+ {
33
+ "internalType": "uint256",
34
+ "name": "expect",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "name": "StargateZapperV1__IncorrectNative",
39
+ "type": "error"
40
+ },
41
+ {
42
+ "inputs": [
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "actual",
46
+ "type": "uint256"
47
+ },
48
+ {
49
+ "internalType": "uint256",
50
+ "name": "expect",
51
+ "type": "uint256"
52
+ }
53
+ ],
54
+ "name": "StargateZapperV1__InsufficientOutputAmount",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [
59
+ {
60
+ "internalType": "uint16",
61
+ "name": "poolId",
62
+ "type": "uint16"
63
+ }
64
+ ],
65
+ "name": "StargateZapperV1__InvalidPoolId",
66
+ "type": "error"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "StargateZapperV1__NativeTransferFailed",
71
+ "type": "error"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "StargateZapperV1__OnlyCallableByStaking",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "internalType": "contract IERC20",
82
+ "name": "lpToken",
83
+ "type": "address"
84
+ }
85
+ ],
86
+ "name": "StargateZapperV1__UnknownLpToken",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [],
91
+ "name": "StargateZapperV1__ZeroAmount",
92
+ "type": "error"
93
+ },
94
+ {
95
+ "anonymous": false,
96
+ "inputs": [
97
+ {
98
+ "indexed": true,
99
+ "internalType": "contract IERC20",
100
+ "name": "lpToken",
101
+ "type": "address"
102
+ },
103
+ {
104
+ "indexed": true,
105
+ "internalType": "contract IStargatePool",
106
+ "name": "pool",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "indexed": false,
111
+ "internalType": "contract IERC20",
112
+ "name": "asset",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "name": "LpConfigured",
117
+ "type": "event"
118
+ },
119
+ {
120
+ "anonymous": false,
121
+ "inputs": [
122
+ {
123
+ "indexed": true,
124
+ "internalType": "address",
125
+ "name": "previousOwner",
126
+ "type": "address"
127
+ },
128
+ {
129
+ "indexed": true,
130
+ "internalType": "address",
131
+ "name": "newOwner",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "OwnershipTransferred",
136
+ "type": "event"
137
+ },
138
+ {
139
+ "anonymous": false,
140
+ "inputs": [
141
+ {
142
+ "indexed": true,
143
+ "internalType": "address",
144
+ "name": "token",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "indexed": true,
149
+ "internalType": "address",
150
+ "name": "receiver",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "indexed": false,
155
+ "internalType": "uint256",
156
+ "name": "amount",
157
+ "type": "uint256"
158
+ }
159
+ ],
160
+ "name": "TokenSwept",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "anonymous": false,
165
+ "inputs": [
166
+ {
167
+ "indexed": true,
168
+ "internalType": "uint16",
169
+ "name": "poolId",
170
+ "type": "uint16"
171
+ },
172
+ {
173
+ "indexed": true,
174
+ "internalType": "contract IERC20",
175
+ "name": "v1LpToken",
176
+ "type": "address"
177
+ },
178
+ {
179
+ "indexed": true,
180
+ "internalType": "contract IERC20",
181
+ "name": "v2LpToken",
182
+ "type": "address"
183
+ }
184
+ ],
185
+ "name": "V1PoolConfigured",
186
+ "type": "event"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "contract IERC20",
192
+ "name": "lpToken",
193
+ "type": "address"
194
+ },
195
+ {
196
+ "internalType": "bool",
197
+ "name": "enabled",
198
+ "type": "bool"
199
+ }
200
+ ],
201
+ "name": "configureLpToken",
202
+ "outputs": [],
203
+ "stateMutability": "nonpayable",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [
208
+ {
209
+ "internalType": "uint16",
210
+ "name": "v1PoolId",
211
+ "type": "uint16"
212
+ },
213
+ {
214
+ "internalType": "contract IERC20",
215
+ "name": "v2LpToken",
216
+ "type": "address"
217
+ }
218
+ ],
219
+ "name": "configureV1Pool",
220
+ "outputs": [],
221
+ "stateMutability": "nonpayable",
222
+ "type": "function"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "internalType": "contract IERC20",
228
+ "name": "lpToken",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "internalType": "uint256",
233
+ "name": "assetInAmount",
234
+ "type": "uint256"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "minStakeAmount",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "name": "depositAndStake",
243
+ "outputs": [],
244
+ "stateMutability": "payable",
245
+ "type": "function"
246
+ },
247
+ {
248
+ "inputs": [
249
+ {
250
+ "internalType": "contract IERC20",
251
+ "name": "lpToken",
252
+ "type": "address"
253
+ },
254
+ {
255
+ "internalType": "uint256",
256
+ "name": "assetInAmount",
257
+ "type": "uint256"
258
+ },
259
+ {
260
+ "internalType": "uint256",
261
+ "name": "minStakeAmount",
262
+ "type": "uint256"
263
+ },
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "deadline",
267
+ "type": "uint256"
268
+ },
269
+ {
270
+ "internalType": "uint8",
271
+ "name": "v",
272
+ "type": "uint8"
273
+ },
274
+ {
275
+ "internalType": "bytes32",
276
+ "name": "r",
277
+ "type": "bytes32"
278
+ },
279
+ {
280
+ "internalType": "bytes32",
281
+ "name": "s",
282
+ "type": "bytes32"
283
+ }
284
+ ],
285
+ "name": "depositAndStakeWithPermit",
286
+ "outputs": [],
287
+ "stateMutability": "nonpayable",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [],
292
+ "name": "ethVault",
293
+ "outputs": [
294
+ {
295
+ "internalType": "contract IStargateEthVault",
296
+ "name": "",
297
+ "type": "address"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [],
305
+ "name": "factoryV1",
306
+ "outputs": [
307
+ {
308
+ "internalType": "contract IStargateV1Factory",
309
+ "name": "",
310
+ "type": "address"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [
318
+ {
319
+ "internalType": "contract IERC20",
320
+ "name": "lpToken",
321
+ "type": "address"
322
+ }
323
+ ],
324
+ "name": "lpToAsset",
325
+ "outputs": [
326
+ {
327
+ "internalType": "contract IERC20",
328
+ "name": "asset",
329
+ "type": "address"
330
+ }
331
+ ],
332
+ "stateMutability": "view",
333
+ "type": "function"
334
+ },
335
+ {
336
+ "inputs": [
337
+ {
338
+ "internalType": "contract IERC20",
339
+ "name": "lpToken",
340
+ "type": "address"
341
+ }
342
+ ],
343
+ "name": "lpToPool",
344
+ "outputs": [
345
+ {
346
+ "internalType": "contract IStargatePool",
347
+ "name": "pool",
348
+ "type": "address"
349
+ }
350
+ ],
351
+ "stateMutability": "view",
352
+ "type": "function"
353
+ },
354
+ {
355
+ "inputs": [
356
+ {
357
+ "internalType": "uint16",
358
+ "name": "poolId",
359
+ "type": "uint16"
360
+ },
361
+ {
362
+ "internalType": "uint256",
363
+ "name": "amount",
364
+ "type": "uint256"
365
+ },
366
+ {
367
+ "internalType": "uint256",
368
+ "name": "minStakeAmount",
369
+ "type": "uint256"
370
+ }
371
+ ],
372
+ "name": "migrateV1LpToV2Stake",
373
+ "outputs": [],
374
+ "stateMutability": "payable",
375
+ "type": "function"
376
+ },
377
+ {
378
+ "inputs": [
379
+ {
380
+ "internalType": "uint16",
381
+ "name": "poolId",
382
+ "type": "uint16"
383
+ },
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "amount",
387
+ "type": "uint256"
388
+ },
389
+ {
390
+ "internalType": "uint256",
391
+ "name": "minStakeAmount",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "deadline",
397
+ "type": "uint256"
398
+ },
399
+ {
400
+ "internalType": "uint8",
401
+ "name": "v",
402
+ "type": "uint8"
403
+ },
404
+ {
405
+ "internalType": "bytes32",
406
+ "name": "r",
407
+ "type": "bytes32"
408
+ },
409
+ {
410
+ "internalType": "bytes32",
411
+ "name": "s",
412
+ "type": "bytes32"
413
+ }
414
+ ],
415
+ "name": "migrateV1LpToV2StakeWithPermit",
416
+ "outputs": [],
417
+ "stateMutability": "nonpayable",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "internalType": "contract IERC20",
424
+ "name": "lpToken",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "internalType": "address",
429
+ "name": "from",
430
+ "type": "address"
431
+ },
432
+ {
433
+ "internalType": "uint256",
434
+ "name": "value",
435
+ "type": "uint256"
436
+ },
437
+ {
438
+ "internalType": "bytes",
439
+ "name": "data",
440
+ "type": "bytes"
441
+ }
442
+ ],
443
+ "name": "onWithdrawReceived",
444
+ "outputs": [
445
+ {
446
+ "internalType": "bytes4",
447
+ "name": "",
448
+ "type": "bytes4"
449
+ }
450
+ ],
451
+ "stateMutability": "nonpayable",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [],
456
+ "name": "owner",
457
+ "outputs": [
458
+ {
459
+ "internalType": "address",
460
+ "name": "",
461
+ "type": "address"
462
+ }
463
+ ],
464
+ "stateMutability": "view",
465
+ "type": "function"
466
+ },
467
+ {
468
+ "inputs": [],
469
+ "name": "renounceOwnership",
470
+ "outputs": [],
471
+ "stateMutability": "nonpayable",
472
+ "type": "function"
473
+ },
474
+ {
475
+ "inputs": [],
476
+ "name": "routerV1",
477
+ "outputs": [
478
+ {
479
+ "internalType": "contract IStargateV1Router",
480
+ "name": "",
481
+ "type": "address"
482
+ }
483
+ ],
484
+ "stateMutability": "view",
485
+ "type": "function"
486
+ },
487
+ {
488
+ "inputs": [],
489
+ "name": "staking",
490
+ "outputs": [
491
+ {
492
+ "internalType": "contract IStargateStaking",
493
+ "name": "",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "stateMutability": "view",
498
+ "type": "function"
499
+ },
500
+ {
501
+ "inputs": [
502
+ {
503
+ "internalType": "address",
504
+ "name": "token",
505
+ "type": "address"
506
+ },
507
+ {
508
+ "internalType": "address",
509
+ "name": "receiver",
510
+ "type": "address"
511
+ },
512
+ {
513
+ "internalType": "uint256",
514
+ "name": "amount",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "name": "sweep",
519
+ "outputs": [],
520
+ "stateMutability": "nonpayable",
521
+ "type": "function"
522
+ },
523
+ {
524
+ "inputs": [
525
+ {
526
+ "internalType": "address",
527
+ "name": "newOwner",
528
+ "type": "address"
529
+ }
530
+ ],
531
+ "name": "transferOwnership",
532
+ "outputs": [],
533
+ "stateMutability": "nonpayable",
534
+ "type": "function"
535
+ },
536
+ {
537
+ "inputs": [
538
+ {
539
+ "internalType": "uint16",
540
+ "name": "v1PoolId",
541
+ "type": "uint16"
542
+ }
543
+ ],
544
+ "name": "v1PidToConversionRate",
545
+ "outputs": [
546
+ {
547
+ "internalType": "uint256",
548
+ "name": "conversionRate",
549
+ "type": "uint256"
550
+ }
551
+ ],
552
+ "stateMutability": "view",
553
+ "type": "function"
554
+ },
555
+ {
556
+ "inputs": [
557
+ {
558
+ "internalType": "uint16",
559
+ "name": "v1PoolId",
560
+ "type": "uint16"
561
+ }
562
+ ],
563
+ "name": "v1PidToV1Lp",
564
+ "outputs": [
565
+ {
566
+ "internalType": "contract IERC20",
567
+ "name": "lpToken",
568
+ "type": "address"
569
+ }
570
+ ],
571
+ "stateMutability": "view",
572
+ "type": "function"
573
+ },
574
+ {
575
+ "inputs": [
576
+ {
577
+ "internalType": "uint16",
578
+ "name": "v1PoolId",
579
+ "type": "uint16"
580
+ }
581
+ ],
582
+ "name": "v1PidToV2Lp",
583
+ "outputs": [
584
+ {
585
+ "internalType": "contract IERC20",
586
+ "name": "lpToken",
587
+ "type": "address"
588
+ }
589
+ ],
590
+ "stateMutability": "view",
591
+ "type": "function"
592
+ },
593
+ {
594
+ "stateMutability": "payable",
595
+ "type": "receive"
596
+ }
597
+ ],
598
+ "transactionHash": "0x5951d0fe8f0fb3d8c7de08757122dcdadc95c1f3d64bf631c035509a75148e22",
599
+ "receipt": {
600
+ "to": null,
601
+ "from": "0x8563b504Bf705E870588002bf1e32931cD7Be5E6",
602
+ "contractAddress": "0x586da5d8f6eE05174c4fa8ee3ef47E5ac6076900",
603
+ "transactionIndex": 3,
604
+ "gasUsed": "1937878",
605
+ "logsBloom": "0x00000000000000000000000100000000000000000000000000800000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000004000000000000000200400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
606
+ "blockHash": "0xd37afda3206fb740bafaa26c160bee3af32b0fe4401cd9aa57de68e6137415a8",
607
+ "transactionHash": "0x5951d0fe8f0fb3d8c7de08757122dcdadc95c1f3d64bf631c035509a75148e22",
608
+ "logs": [
609
+ {
610
+ "transactionIndex": 3,
611
+ "blockNumber": 35439896,
612
+ "transactionHash": "0x5951d0fe8f0fb3d8c7de08757122dcdadc95c1f3d64bf631c035509a75148e22",
613
+ "address": "0x586da5d8f6eE05174c4fa8ee3ef47E5ac6076900",
614
+ "topics": [
615
+ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
616
+ "0x0000000000000000000000000000000000000000000000000000000000000000",
617
+ "0x0000000000000000000000008563b504bf705e870588002bf1e32931cd7be5e6"
618
+ ],
619
+ "data": "0x",
620
+ "logIndex": 10,
621
+ "blockHash": "0xd37afda3206fb740bafaa26c160bee3af32b0fe4401cd9aa57de68e6137415a8"
622
+ }
623
+ ],
624
+ "blockNumber": 35439896,
625
+ "cumulativeGasUsed": "3686992",
626
+ "status": 1,
627
+ "byzantium": true
628
+ },
629
+ "args": [
630
+ "0xc2Ec4755ffA5BF9aA7E3Fc2307ee72077e1a6d28",
631
+ "0x2a4C2F5ffB0E0F2dcB3f9EBBd442B8F77ECDB9Cc",
632
+ "0x860a86E5bc19a6BE6989c9c179e27C731c7CF2A9"
633
+ ],
634
+ "numDeployments": 1,
635
+ "solcInputHash": "05099c960904a3822f80e7570ab1e13b",
636
+ "metadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IStargateStaking\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"contract IStargateV1Router\",\"name\":\"_routerV1\",\"type\":\"address\"},{\"internalType\":\"contract IStargateEthVault\",\"name\":\"_ethVault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expect\",\"type\":\"uint256\"}],\"name\":\"StargateZapperV1__IncorrectNative\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expect\",\"type\":\"uint256\"}],\"name\":\"StargateZapperV1__InsufficientOutputAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"poolId\",\"type\":\"uint16\"}],\"name\":\"StargateZapperV1__InvalidPoolId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StargateZapperV1__NativeTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StargateZapperV1__OnlyCallableByStaking\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"}],\"name\":\"StargateZapperV1__UnknownLpToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StargateZapperV1__ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IStargatePool\",\"name\":\"pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"LpConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenSwept\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"poolId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"v1LpToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"v2LpToken\",\"type\":\"address\"}],\"name\":\"V1PoolConfigured\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"configureLpToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"v1PoolId\",\"type\":\"uint16\"},{\"internalType\":\"contract IERC20\",\"name\":\"v2LpToken\",\"type\":\"address\"}],\"name\":\"configureV1Pool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assetInAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStakeAmount\",\"type\":\"uint256\"}],\"name\":\"depositAndStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"assetInAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"depositAndStakeWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ethVault\",\"outputs\":[{\"internalType\":\"contract IStargateEthVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factoryV1\",\"outputs\":[{\"internalType\":\"contract IStargateV1Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"}],\"name\":\"lpToAsset\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"asset\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"}],\"name\":\"lpToPool\",\"outputs\":[{\"internalType\":\"contract IStargatePool\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"poolId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStakeAmount\",\"type\":\"uint256\"}],\"name\":\"migrateV1LpToV2Stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"poolId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"migrateV1LpToV2StakeWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onWithdrawReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerV1\",\"outputs\":[{\"internalType\":\"contract IStargateV1Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contract IStargateStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sweep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"v1PoolId\",\"type\":\"uint16\"}],\"name\":\"v1PidToConversionRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"conversionRate\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"v1PoolId\",\"type\":\"uint16\"}],\"name\":\"v1PidToV1Lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"v1PoolId\",\"type\":\"uint16\"}],\"name\":\"v1PidToV2Lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"configureLpToken(address,bool)\":{\"params\":{\"enabled\":\"Whether the pool should be enabled or not.\",\"lpToken\":\"The LP token to set the pool for.\"}},\"configureV1Pool(uint16,address)\":{\"params\":{\"v1PoolId\":\"The V1 pool ID, specified in the V1 Stargate factory/router.\",\"v2LpToken\":\"The V2 LP token to map to the V1 pool ID, or address(0) to remove the mapping.\"}},\"constructor\":{\"details\":\"Constructor for initializing the zapper.\",\"params\":{\"_ethVault\":\"The Stargate V1 ETH vault, which is the underlying token for the V1 ETH LP, can be set to zero if it does not exist. Used for migration.\",\"_routerV1\":\"The Stargate V1 Router contract. Used for migration.\",\"_staking\":\"The Stargate V2 StargateStaking contract.\"}},\"depositAndStake(address,uint256,uint256)\":{\"details\":\"Frontend must use the underlying protocol events to determine the actual amount of the asset received.The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency this rounding is not refunded. Users are still in control of not receiving less than expected by setting the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees via `sweep`.Compliant with StargatePoolNative, but requires input to be properly rounded with the shared to local decimal adjustment, eg. no dust.\",\"params\":{\"assetInAmount\":\"The amount of the underlying asset (such as USDC) to zap in.\",\"lpToken\":\"The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is transferred from the transaction sender.\",\"minStakeAmount\":\"The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as an extra check against rounding slippage and fees.\"}},\"depositAndStakeWithPermit(address,uint256,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Frontend must use the underlying protocol events to determine the actual amount of the asset received.The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency this rounding is not refunded. Users are still in control of not receiving less than expected by setting the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees via `sweep`.This function only works with tokens that support ERC-2612.Not compliant with StargatePoolNative.\",\"params\":{\"assetInAmount\":\"The amount of the underlying asset (such as USDC) to zap in.\",\"deadline\":\"The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\",\"lpToken\":\"The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is transferred from the transaction sender.\",\"minStakeAmount\":\"The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as an extra check against rounding slippage and fees.\",\"r\":\"The r-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\",\"s\":\"The s-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\",\"v\":\"The v-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\"}},\"migrateV1LpToV2Stake(uint16,uint256,uint256)\":{\"details\":\"Frontend must use the underlying protocol events to determine the actual amount of the asset received.Compliant with StargatePoolNative.\",\"params\":{\"amount\":\"The amount of the V1 LP token to migrate.\",\"minStakeAmount\":\"The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract, as an extra check against slippage and fees.\",\"poolId\":\"The V1 pool ID to migrate from.\"}},\"migrateV1LpToV2StakeWithPermit(uint16,uint256,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Frontend must use the underlying protocol events to determine the actual amount of the asset received.Not compliant with StargatePoolNative.\",\"params\":{\"amount\":\"The amount of the V1 LP token to migrate.\",\"deadline\":\"The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\",\"minStakeAmount\":\"The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract, as an extra check against slippage and fees.\",\"poolId\":\"The V1 pool ID to migrate from.\",\"r\":\"The r-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\",\"s\":\"The s-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\",\"v\":\"The v-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)\"}},\"onWithdrawReceived(address,address,uint256,bytes)\":{\"details\":\"Frontend must use the underlying protocol events to determine the actual amount of the asset received.Compliant with StargatePoolNative.The `data` provided via `withdrawToAndCall` must be `abi.encode(minTokenOut)` with `minAssetOut` an `uint256`.\",\"params\":{\"data\":\"The data provided by the `from` user to specify the minimum amount of the underlying asset to receive, this is not validated beforehand in any way.\",\"from\":\"The address that is withdrawing the LP token, validated by `StargateStaking`.\",\"lpToken\":\"The V2 LP token to redeem, validated by `StargateStaking`.\",\"value\":\"The amount of LP tokens to redeem, validated by `StargateStaking` and already sent into this contract before the `onWithdrawReceived` call.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"sweep(address,address,uint256)\":{\"params\":{\"amount\":\"amount of tokens to sweep.\",\"receiver\":\"address to receive the tokens.\",\"token\":\"address of the token to sweep.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"ethVault\":{\"details\":\"The stargate V1 eth vault, used as the underlying V1 ETH LP token.\"},\"factoryV1\":{\"details\":\"The Stargate V1 Factory contract, for migrating from V1 LPs to V2 stakes.\"},\"lpToAsset\":{\"details\":\"Mapping of V2 LP tokens to their pool's underlying asset (eg. USDC).\"},\"lpToPool\":{\"details\":\"Mapping of V2 LP tokens to their corresponding V2 StargatePool.\"},\"routerV1\":{\"details\":\"The Stargate V1 Router contract, for migrating from V1 LPs to V2 stakes.\"},\"staking\":{\"details\":\"The Stargate V2 StargateStaking contract, which the V2 LP tokens are staked into.\"},\"v1PidToConversionRate\":{\"details\":\"Mapping of V1 pool IDs to their pool's conversion rate, used for ETH migration exclusively.\"},\"v1PidToV1Lp\":{\"details\":\"Mapping of V1 pool IDs to their corresponding V1 LP tokens, used for migration.\"},\"v1PidToV2Lp\":{\"details\":\"Mapping of V1 pool IDs to their corresponding V2 LP tokens, used for migration.\"}},\"title\":\"Stargate Zapper - V1\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"configureLpToken(address,bool)\":{\"notice\":\"Whitelist a V2 stargate LP for zapping, configures storage mappings from the LP to the pool and asset for gas efficiency. Only callable by `owner`.\"},\"configureV1Pool(uint16,address)\":{\"notice\":\"Whitelist a V1 pool ID to a V2 LP token for migration, configures a storage mapping for gas efficiency. Must be called after `configureLpToken`. Only callable by `owner`.\"},\"depositAndStake(address,uint256,uint256)\":{\"notice\":\"Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Requires approval of the underlying asset of the LP pool.\"},\"depositAndStakeWithPermit(address,uint256,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Does not require approval of the underlying asset of the LP pool, instead the permit signature of `msg.sender` needs to be provided for the amount.\"},\"migrateV1LpToV2Stake(uint16,uint256,uint256)\":{\"notice\":\"Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Requires approval of the V1 LP token.\"},\"migrateV1LpToV2StakeWithPermit(uint16,uint256,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Does not require approval of the V1 LP token, instead the permit signature of `msg.sender` needs to be provided for the amount.\"},\"onWithdrawReceived(address,address,uint256,bytes)\":{\"notice\":\"Unstakes and redeems a V2 LP token to the underlying asset (such as USDC) in a single transaction. Called through `StargateStaking.withdrawToAndCall`.\"},\"sweep(address,address,uint256)\":{\"notice\":\"Callable by the owner to withdraw any tokens accidentally sent or stuck in this contract.\"}},\"notice\":\"The Stargate Zapper V1 contract allows users to zap into and out of Stargate V2 LP tokens, as well as migrate from V1 LP tokens to V2 LP tokens.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/peripheral/zapper/StargateZapperV1.sol\":\"StargateZapperV1\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":5000},\"remappings\":[]},\"sources\":{\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport { IOAppCore, ILayerZeroEndpointV2 } from \\\"./interfaces/IOAppCore.sol\\\";\\n\\n/**\\n * @title OAppCore\\n * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.\\n */\\nabstract contract OAppCore is IOAppCore, Ownable {\\n // The LayerZero endpoint associated with the given OApp\\n ILayerZeroEndpointV2 public immutable endpoint;\\n\\n // Mapping to store peers associated with corresponding endpoints\\n mapping(uint32 eid => bytes32 peer) public peers;\\n\\n /**\\n * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.\\n * @param _endpoint The address of the LOCAL Layer Zero endpoint.\\n * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\\n *\\n * @dev The delegate typically should be set as the owner of the contract.\\n */\\n constructor(address _endpoint, address _delegate) {\\n endpoint = ILayerZeroEndpointV2(_endpoint);\\n\\n if (_delegate == address(0)) revert InvalidDelegate();\\n endpoint.setDelegate(_delegate);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {\\n _setPeer(_eid, _peer);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {\\n peers[_eid] = _peer;\\n emit PeerSet(_eid, _peer);\\n }\\n\\n /**\\n * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.\\n * ie. the peer is set to bytes32(0).\\n * @param _eid The endpoint ID.\\n * @return peer The address of the peer associated with the specified endpoint.\\n */\\n function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {\\n bytes32 peer = peers[_eid];\\n if (peer == bytes32(0)) revert NoPeer(_eid);\\n return peer;\\n }\\n\\n /**\\n * @notice Sets the delegate address for the OApp.\\n * @param _delegate The address of the delegate to be set.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.\\n */\\n function setDelegate(address _delegate) public onlyOwner {\\n endpoint.setDelegate(_delegate);\\n }\\n}\\n\",\"keccak256\":\"0x13a9c2d1d2c1f086b8624f2e84c4a4702212daae36f701d92bb915b535cbe4cc\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { MessagingParams, MessagingFee, MessagingReceipt } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\nimport { OAppCore } from \\\"./OAppCore.sol\\\";\\n\\n/**\\n * @title OAppSender\\n * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.\\n */\\nabstract contract OAppSender is OAppCore {\\n using SafeERC20 for IERC20;\\n\\n // Custom error messages\\n error NotEnoughNative(uint256 msgValue);\\n error LzTokenUnavailable();\\n\\n // @dev The version of the OAppSender implementation.\\n // @dev Version is bumped when changes are made to this contract.\\n uint64 internal constant SENDER_VERSION = 1;\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n *\\n * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.\\n * ie. this is a SEND only OApp.\\n * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions\\n */\\n function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {\\n return (SENDER_VERSION, 0);\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.\\n * @return fee The calculated MessagingFee for the message.\\n * - nativeFee: The native fee for the message.\\n * - lzTokenFee: The LZ token fee for the message.\\n */\\n function _quote(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n bool _payInLzToken\\n ) internal view virtual returns (MessagingFee memory fee) {\\n return\\n endpoint.quote(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),\\n address(this)\\n );\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _fee The calculated LayerZero fee for the message.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess fee values sent to the endpoint.\\n * @return receipt The receipt for the sent message.\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function _lzSend(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n MessagingFee memory _fee,\\n address _refundAddress\\n ) internal virtual returns (MessagingReceipt memory receipt) {\\n // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.\\n uint256 messageValue = _payNative(_fee.nativeFee);\\n if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);\\n\\n return\\n // solhint-disable-next-line check-send-result\\n endpoint.send{ value: messageValue }(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),\\n _refundAddress\\n );\\n }\\n\\n /**\\n * @dev Internal function to pay the native fee associated with the message.\\n * @param _nativeFee The native fee to be paid.\\n * @return nativeFee The amount of native currency paid.\\n *\\n * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,\\n * this will need to be overridden because msg.value would contain multiple lzFees.\\n * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.\\n * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.\\n * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.\\n */\\n function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {\\n if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);\\n return _nativeFee;\\n }\\n\\n /**\\n * @dev Internal function to pay the LZ token fee associated with the message.\\n * @param _lzTokenFee The LZ token fee to be paid.\\n *\\n * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.\\n * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().\\n */\\n function _payLzToken(uint256 _lzTokenFee) internal virtual {\\n // @dev Cannot cache the token because it is not immutable in the endpoint.\\n address lzToken = endpoint.lzToken();\\n if (lzToken == address(0)) revert LzTokenUnavailable();\\n\\n // Pay LZ token fee by sending tokens to the endpoint.\\n IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);\\n }\\n}\\n\",\"keccak256\":\"0x518cf4adca601923ed4baa6619846a253ea32b8d8775f8bc1faa3dfac7f67c20\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { ILayerZeroEndpointV2 } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\n\\n/**\\n * @title IOAppCore\\n */\\ninterface IOAppCore {\\n // Custom error messages\\n error OnlyPeer(uint32 eid, bytes32 sender);\\n error NoPeer(uint32 eid);\\n error InvalidEndpointCall();\\n error InvalidDelegate();\\n\\n // Event emitted when a peer (OApp) is set for a corresponding endpoint\\n event PeerSet(uint32 eid, bytes32 peer);\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n */\\n function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);\\n\\n /**\\n * @notice Retrieves the LayerZero endpoint associated with the OApp.\\n * @return iEndpoint The LayerZero endpoint as an interface.\\n */\\n function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);\\n\\n /**\\n * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @return peer The peer address (OApp instance) associated with the corresponding endpoint.\\n */\\n function peers(uint32 _eid) external view returns (bytes32 peer);\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) external;\\n\\n /**\\n * @notice Sets the delegate address for the OApp Core.\\n * @param _delegate The address of the delegate to be set.\\n */\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0x40e49f2de74506e1da5dcaed53a39853f691647f4ceb0fccc8f49a68d3f47c58\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { MessagingReceipt, MessagingFee } from \\\"../../oapp/OAppSender.sol\\\";\\n\\n/**\\n * @dev Struct representing token parameters for the OFT send() operation.\\n */\\nstruct SendParam {\\n uint32 dstEid; // Destination endpoint ID.\\n bytes32 to; // Recipient address.\\n uint256 amountLD; // Amount to send in local decimals.\\n uint256 minAmountLD; // Minimum amount to send in local decimals.\\n bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.\\n bytes composeMsg; // The composed message for the send() operation.\\n bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.\\n}\\n\\n/**\\n * @dev Struct representing OFT limit information.\\n * @dev These amounts can change dynamically and are up the the specific oft implementation.\\n */\\nstruct OFTLimit {\\n uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.\\n uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.\\n}\\n\\n/**\\n * @dev Struct representing OFT receipt information.\\n */\\nstruct OFTReceipt {\\n uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.\\n // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.\\n uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.\\n}\\n\\n/**\\n * @dev Struct representing OFT fee details.\\n * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.\\n */\\nstruct OFTFeeDetail {\\n int256 feeAmountLD; // Amount of the fee in local decimals.\\n string description; // Description of the fee.\\n}\\n\\n/**\\n * @title IOFT\\n * @dev Interface for the OftChain (OFT) token.\\n * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.\\n * @dev This specific interface ID is '0x02e49c2c'.\\n */\\ninterface IOFT {\\n // Custom error messages\\n error InvalidLocalDecimals();\\n error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);\\n\\n // Events\\n event OFTSent(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 dstEid, // Destination Endpoint ID.\\n address indexed fromAddress, // Address of the sender on the src chain.\\n uint256 amountSentLD, // Amount of tokens sent in local decimals.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n event OFTReceived(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 srcEid, // Source Endpoint ID.\\n address indexed toAddress, // Address of the recipient on the dst chain.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n\\n /**\\n * @notice Retrieves interfaceID and the version of the OFT.\\n * @return interfaceId The interface ID.\\n * @return version The version.\\n *\\n * @dev interfaceId: This specific interface ID is '0x02e49c2c'.\\n * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.\\n * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.\\n * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)\\n */\\n function oftVersion() external view returns (bytes4 interfaceId, uint64 version);\\n\\n /**\\n * @notice Retrieves the address of the token associated with the OFT.\\n * @return token The address of the ERC20 token implementation.\\n */\\n function token() external view returns (address);\\n\\n /**\\n * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.\\n * @return requiresApproval Needs approval of the underlying token implementation.\\n *\\n * @dev Allows things like wallet implementers to determine integration requirements,\\n * without understanding the underlying token implementation.\\n */\\n function approvalRequired() external view returns (bool);\\n\\n /**\\n * @notice Retrieves the shared decimals of the OFT.\\n * @return sharedDecimals The shared decimals of the OFT.\\n */\\n function sharedDecimals() external view returns (uint8);\\n\\n /**\\n * @notice Provides a quote for OFT-related operations.\\n * @param _sendParam The parameters for the send operation.\\n * @return limit The OFT limit information.\\n * @return oftFeeDetails The details of OFT fees.\\n * @return receipt The OFT receipt information.\\n */\\n function quoteOFT(\\n SendParam calldata _sendParam\\n ) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);\\n\\n /**\\n * @notice Provides a quote for the send() operation.\\n * @param _sendParam The parameters for the send() operation.\\n * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.\\n * @return fee The calculated LayerZero messaging fee from the send() operation.\\n *\\n * @dev MessagingFee: LayerZero msg fee\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n */\\n function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);\\n\\n /**\\n * @notice Executes the send() operation.\\n * @param _sendParam The parameters for the send operation.\\n * @param _fee The fee information supplied by the caller.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess funds from fees etc. on the src.\\n * @return receipt The LayerZero messaging receipt from the send() operation.\\n * @return oftReceipt The OFT receipt information.\\n *\\n * @dev MessagingReceipt: LayerZero msg receipt\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function send(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory, OFTReceipt memory);\\n}\\n\",\"keccak256\":\"0x42431bdbe135f7cfefd0be6cd345a6a1045124f6ea707a06756ef2322140eef5\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nimport { IMessageLibManager } from \\\"./IMessageLibManager.sol\\\";\\nimport { IMessagingComposer } from \\\"./IMessagingComposer.sol\\\";\\nimport { IMessagingChannel } from \\\"./IMessagingChannel.sol\\\";\\nimport { IMessagingContext } from \\\"./IMessagingContext.sol\\\";\\n\\nstruct MessagingParams {\\n uint32 dstEid;\\n bytes32 receiver;\\n bytes message;\\n bytes options;\\n bool payInLzToken;\\n}\\n\\nstruct MessagingReceipt {\\n bytes32 guid;\\n uint64 nonce;\\n MessagingFee fee;\\n}\\n\\nstruct MessagingFee {\\n uint256 nativeFee;\\n uint256 lzTokenFee;\\n}\\n\\nstruct Origin {\\n uint32 srcEid;\\n bytes32 sender;\\n uint64 nonce;\\n}\\n\\nenum ExecutionState {\\n NotExecutable,\\n Executable,\\n Executed\\n}\\n\\ninterface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {\\n event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);\\n\\n event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);\\n\\n event PacketDelivered(Origin origin, address receiver);\\n\\n event LzReceiveAlert(\\n address indexed receiver,\\n address indexed executor,\\n Origin origin,\\n bytes32 guid,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n event LzTokenSet(address token);\\n\\n function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);\\n\\n function send(\\n MessagingParams calldata _params,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory);\\n\\n function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;\\n\\n function verifiable(\\n Origin calldata _origin,\\n address _receiver,\\n address _receiveLib,\\n bytes32 _payloadHash\\n ) external view returns (bool);\\n\\n function executable(Origin calldata _origin, address _receiver) external view returns (ExecutionState);\\n\\n function lzReceive(\\n Origin calldata _origin,\\n address _receiver,\\n bytes32 _guid,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n\\n // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order\\n function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;\\n\\n function setLzToken(address _lzToken) external;\\n\\n function lzToken() external view returns (address);\\n\\n function nativeToken() external view returns (address);\\n\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0xbc3b4a31ccf905e2f61fe248c57da6591670d286e910d634502598c490c7c671\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nstruct SetConfigParam {\\n uint32 eid;\\n uint32 configType;\\n bytes config;\\n}\\n\\ninterface IMessageLibManager {\\n struct Timeout {\\n address lib;\\n uint256 expiry;\\n }\\n\\n event LibraryRegistered(address newLib);\\n event DefaultSendLibrarySet(uint32 eid, address newLib);\\n event DefaultReceiveLibrarySet(uint32 eid, address oldLib, address newLib);\\n event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);\\n event SendLibrarySet(address sender, uint32 eid, address newLib);\\n event ReceiveLibrarySet(address receiver, uint32 eid, address oldLib, address newLib);\\n event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);\\n\\n function registerLibrary(address _lib) external;\\n\\n function isRegisteredLibrary(address _lib) external view returns (bool);\\n\\n function getRegisteredLibraries() external view returns (address[] memory);\\n\\n function setDefaultSendLibrary(uint32 _eid, address _newLib) external;\\n\\n function defaultSendLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _timeout) external;\\n\\n function defaultReceiveLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;\\n\\n function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function isSupportedEid(uint32 _eid) external view returns (bool);\\n\\n /// ------------------- OApp interfaces -------------------\\n function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;\\n\\n function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);\\n\\n function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);\\n\\n function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;\\n\\n function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);\\n\\n function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _gracePeriod) external;\\n\\n function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;\\n\\n function getConfig(\\n address _oapp,\\n address _lib,\\n uint32 _eid,\\n uint32 _configType\\n ) external view returns (bytes memory config);\\n}\\n\",\"keccak256\":\"0xe47b048f28b0705b66bdd62c62990c0d068ce0568c15962c2d6f2feed3fdf06e\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingChannel {\\n event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);\\n event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n\\n function eid() external view returns (uint32);\\n\\n // this is an emergency function if a message cannot be verified for some reasons\\n // required to provide _nextNonce to avoid race condition\\n function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;\\n\\n function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);\\n\\n function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\\n\\n function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);\\n\\n function inboundPayloadHash(\\n address _receiver,\\n uint32 _srcEid,\\n bytes32 _sender,\\n uint64 _nonce\\n ) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x37e57a48c2019d37d77913bed32a349c2958423723bac6aa75cf271b57d8ba51\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingComposer {\\n event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);\\n event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);\\n event LzComposeAlert(\\n address indexed from,\\n address indexed to,\\n address indexed executor,\\n bytes32 guid,\\n uint16 index,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n function composeQueue(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index\\n ) external view returns (bytes32 messageHash);\\n\\n function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;\\n\\n function lzCompose(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x85bc7090134529ec474866dc4bb1c48692d518c756eb0a961c82574829c51901\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingContext {\\n function isSendingMessage() external view returns (bool);\\n\\n function getSendContext() external view returns (uint32 dstEid, address sender);\\n}\\n\",\"keccak256\":\"0xff0c546c2813dae3e440882f46b377375f7461b0714efd80bd3f0c6e5cb8da4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC5267 {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0xac6c2efc64baccbde4904ae18ed45139c9aa8cff96d6888344d1e4d2eb8b659f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Permit.sol\\\";\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712.sol\\\";\\nimport \\\"../../../utils/Counters.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private constant _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n /**\\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\\n * However, to ensure consistency with the upgradeable transpiler, we will continue\\n * to reserve a slot.\\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n constructor(string memory name) EIP712(name, \\\"1\\\") {}\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @inheritdoc IERC20Permit\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0xbb16110ffe0b625944fe7dd97adcf1158e514185c956a5628bc09be90d606174\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary Counters {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0xf0018c2440fbe238dd3a8732fa8e17a0f9dce84d31451dc8a32f6d62b349c9f1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./StorageSlot.sol\\\";\\n\\n// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |\\n// | length | 0x BB |\\ntype ShortString is bytes32;\\n\\n/**\\n * @dev This library provides functions to convert short memory strings\\n * into a `ShortString` type that can be used as an immutable variable.\\n *\\n * Strings of arbitrary length can be optimized using this library if\\n * they are short enough (up to 31 bytes) by packing them with their\\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\\n * fallback mechanism can be used for every other case.\\n *\\n * Usage example:\\n *\\n * ```solidity\\n * contract Named {\\n * using ShortStrings for *;\\n *\\n * ShortString private immutable _name;\\n * string private _nameFallback;\\n *\\n * constructor(string memory contractName) {\\n * _name = contractName.toShortStringWithFallback(_nameFallback);\\n * }\\n *\\n * function name() external view returns (string memory) {\\n * return _name.toStringWithFallback(_nameFallback);\\n * }\\n * }\\n * ```\\n */\\nlibrary ShortStrings {\\n // Used as an identifier for strings longer than 31 bytes.\\n bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\\n\\n error StringTooLong(string str);\\n error InvalidShortString();\\n\\n /**\\n * @dev Encode a string of at most 31 chars into a `ShortString`.\\n *\\n * This will trigger a `StringTooLong` error is the input string is too long.\\n */\\n function toShortString(string memory str) internal pure returns (ShortString) {\\n bytes memory bstr = bytes(str);\\n if (bstr.length > 31) {\\n revert StringTooLong(str);\\n }\\n return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\\n }\\n\\n /**\\n * @dev Decode a `ShortString` back to a \\\"normal\\\" string.\\n */\\n function toString(ShortString sstr) internal pure returns (string memory) {\\n uint256 len = byteLength(sstr);\\n // using `new string(len)` would work locally but is not memory safe.\\n string memory str = new string(32);\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(str, len)\\n mstore(add(str, 0x20), sstr)\\n }\\n return str;\\n }\\n\\n /**\\n * @dev Return the length of a `ShortString`.\\n */\\n function byteLength(ShortString sstr) internal pure returns (uint256) {\\n uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\\n if (result > 31) {\\n revert InvalidShortString();\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\\n */\\n function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\\n if (bytes(value).length < 32) {\\n return toShortString(value);\\n } else {\\n StorageSlot.getStringSlot(store).value = value;\\n return ShortString.wrap(_FALLBACK_SENTINEL);\\n }\\n }\\n\\n /**\\n * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.\\n */\\n function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\\n if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\\n return toString(value);\\n } else {\\n return store;\\n }\\n }\\n\\n /**\\n * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.\\n *\\n * WARNING: This will return the \\\"byte length\\\" of the string. This may not reflect the actual length in terms of\\n * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\\n */\\n function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\\n if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\\n return byteLength(value);\\n } else {\\n return bytes(store).length;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc0e310c163edf15db45d4ff938113ab357f94fa86e61ea8e790853c4d2e13256\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```solidity\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../ShortStrings.sol\\\";\\nimport \\\"../../interfaces/IERC5267.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n */\\nabstract contract EIP712 is IERC5267 {\\n using ShortStrings for *;\\n\\n bytes32 private constant _TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _cachedDomainSeparator;\\n uint256 private immutable _cachedChainId;\\n address private immutable _cachedThis;\\n\\n bytes32 private immutable _hashedName;\\n bytes32 private immutable _hashedVersion;\\n\\n ShortString private immutable _name;\\n ShortString private immutable _version;\\n string private _nameFallback;\\n string private _versionFallback;\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n _name = name.toShortStringWithFallback(_nameFallback);\\n _version = version.toShortStringWithFallback(_versionFallback);\\n _hashedName = keccak256(bytes(name));\\n _hashedVersion = keccak256(bytes(version));\\n\\n _cachedChainId = block.chainid;\\n _cachedDomainSeparator = _buildDomainSeparator();\\n _cachedThis = address(this);\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\\n return _cachedDomainSeparator;\\n } else {\\n return _buildDomainSeparator();\\n }\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev See {EIP-5267}.\\n *\\n * _Available since v4.9._\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n override\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n return (\\n hex\\\"0f\\\", // 01111\\n _name.toStringWithFallback(_nameFallback),\\n _version.toStringWithFallback(_versionFallback),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n}\\n\",\"keccak256\":\"0x8432884527a7ad91e6eed1cfc5a0811ae2073e5bca107bd0ca442e9236b03dbd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"src/interfaces/IStargate.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n// Solidity does not support splitting import across multiple lines\\n// solhint-disable-next-line max-line-length\\nimport { IOFT, SendParam, MessagingFee, MessagingReceipt, OFTReceipt } from \\\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\\\";\\n\\nenum StargateType {\\n Pool,\\n OFT\\n}\\n\\nstruct Ticket {\\n uint56 ticketId;\\n bytes passenger;\\n}\\n\\nstruct RideBusOptions {\\n uint128 extraFare;\\n uint128 nativeDropAmount;\\n uint128 lzComposeGas;\\n uint128 lzComposeValue;\\n}\\n\\ninterface IStargate is IOFT {\\n /// @dev This function is same as `send` in OFT interface but returns the ticket data if in the bus ride mode,\\n /// which allows the caller to ride and drive the bus in the same transaction.\\n function sendToken(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt, Ticket memory ticket);\\n\\n /// @dev Quote the extra bus fare and return the ride bus options details.\\n function quoteRideBusOptions(\\n uint32 _dstEid,\\n bytes calldata _options,\\n uint256 _composeMsgSize\\n ) external view returns (RideBusOptions memory rideBusOptions);\\n\\n function stargateType() external pure returns (StargateType);\\n}\\n\",\"keccak256\":\"0xd58cc2c4ed3790297ddca463ce82c06a3dc120c734aae3d63068b23517cb0f09\",\"license\":\"BUSL-1.1\"},\"src/interfaces/IStargatePool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IStargate, SendParam, MessagingReceipt, MessagingFee, OFTReceipt } from \\\"./IStargate.sol\\\";\\n\\ninterface IStargatePool is IStargate {\\n /// @notice Deposit token into the pool\\n /// @param _receiver The account to mint the LP tokens to\\n /// @param _amountLD The amount of tokens to deposit in LD\\n /// @return amountLD The actual amount of tokens deposited in LD\\n function deposit(address _receiver, uint256 _amountLD) external payable returns (uint256 amountLD);\\n\\n /// @notice Redeem an amount of LP tokens from the senders account, claiming rewards.\\n /// @param _amountLD The amount of LP tokens to redeem\\n /// @param _receiver The account to transfer the\\n function redeem(uint256 _amountLD, address _receiver) external returns (uint256 amountLD);\\n\\n /// @notice Get how many LP tokens are redeemable for a given account\\n /// @param _owner The address of the account to check\\n /// @return amountLD The amount of LP tokens redeemable, in LD\\n function redeemable(address _owner) external view returns (uint256 amountLD);\\n\\n function redeemSend(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory receipt, OFTReceipt memory oftReceipt);\\n\\n function quoteRedeemSend(\\n SendParam calldata _sendParam,\\n bool _payInLzToken\\n ) external view returns (MessagingFee memory messagingFee);\\n\\n /// @notice Get the Total Value Locked in the pool.\\n /// @return The total value locked\\n function tvl() external view returns (uint256);\\n\\n /// @notice Get the available balance of the pool\\n function poolBalance() external view returns (uint256);\\n\\n /// @notice Get the address of the LP token\\n /// @return The address of the LP token contract.\\n function lpToken() external view returns (address);\\n}\\n\",\"keccak256\":\"0x0b7154d27d362a5c67ec5fa8ae7d1a51c3f8c082e1296416ab459a0ad2042be4\",\"license\":\"BUSL-1.1\"},\"src/peripheral/rewarder/interfaces/IRewarder.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n * @notice A rewarder is connected to the staking contract and distributes rewards whenever the staking contract\\n * updates the rewarder.\\n */\\ninterface IRewarder {\\n /**\\n * @notice This function is only callable by the staking contract.\\n */\\n error MultiRewarderUnauthorizedCaller(address caller);\\n /**\\n * @notice The rewarder cannot be reconnected to the same staking token as it would cause wrongful reward\\n * attribution through reconfiguration.\\n */\\n error RewarderAlreadyConnected(IERC20 stakingToken);\\n\\n /**\\n * @notice Emitted when the rewarder is connected to a staking token.\\n */\\n event RewarderConnected(IERC20 indexed stakingToken);\\n\\n /**\\n * @notice Informs the rewarder of an update in the staking contract, such as a deposit, withdraw or claim.\\n * @dev Emergency withdrawals draw the balance of a user to 0, and DO NOT call `onUpdate`.\\n * The rewarder logic must keep this in mind!\\n */\\n function onUpdate(IERC20 token, address user, uint256 oldStake, uint256 oldSupply, uint256 newStake) external;\\n\\n /**\\n * @notice Called by the staking contract whenever this rewarder is connected to a staking token in the staking\\n * contract. Should only be callable once per staking token to avoid wrongful reward attribution through\\n * reconfiguration.\\n */\\n function connect(IERC20 stakingToken) external;\\n}\\n\",\"keccak256\":\"0x8a190dc01c20581529de7fe951f33133e948d97de73295ac7fcfc294f5b48420\",\"license\":\"BUSL-1.1\"},\"src/peripheral/rewarder/interfaces/IStakingReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IStakingReceiver {\\n function onWithdrawReceived(\\n IERC20 token,\\n address from,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x635c1296547293e9e505344fc8c7f1648456be534beee6a88509565f7a43366b\",\"license\":\"BUSL-1.1\"},\"src/peripheral/rewarder/interfaces/IStargateStaking.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nimport { IStakingReceiver } from \\\"./IStakingReceiver.sol\\\";\\nimport { IRewarder } from \\\"./IRewarder.sol\\\";\\n\\n// @notice The interface to the staking contract for Stargate V2 LPs.\\ninterface IStargateStaking {\\n /// @notice StargateStaking renounce ownership is disabled.\\n error StargateStakingRenounceOwnershipDisabled();\\n\\n /**\\n * @notice Thrown on `depositTo` if the caller does not have bytecode, used as an anti-phishing measure to prevent\\n * users from calling `depositTo` as it's for zappers.\\n */\\n error InvalidCaller();\\n\\n /**\\n * @notice Thrown on `withdrawToAndCall` if the `to` contract does not return the magic bytes.\\n */\\n error InvalidReceiver(address receiver);\\n\\n error NonExistentPool(IERC20 token);\\n\\n event Deposit(IERC20 indexed token, address indexed from, address indexed to, uint256 amount);\\n event Withdraw(IERC20 indexed token, address indexed from, address indexed to, uint256 amount, bool withUpdate);\\n event PoolSet(IERC20 indexed token, IRewarder rewarder, bool exists);\\n\\n /**\\n * ADMIN *\\n */\\n\\n /**\\n * @notice Configures the rewarder for a pool. This will initialize the pool if it does not exist yet,\\n * whitelisting it for deposits.\\n */\\n function setPool(IERC20 token, IRewarder rewarder) external;\\n\\n /**\\n * USER *\\n */\\n\\n /**\\n * @notice Deposits `amount` of `token` into the pool. Informs the rewarder of the deposit, triggering a harvest.\\n */\\n function deposit(IERC20 token, uint256 amount) external;\\n\\n /**\\n * @notice Deposits `amount` of `token` into the pool for `to`. Informs the rewarder of the deposit, triggering a\\n * harvest. This function can only be called by a contract, as to prevent phishing by a malicious contract.\\n * @dev This function is useful for zappers, as it allows to do multiple steps ending with a deposit,\\n * without the need to do multiple transactions.\\n */\\n function depositTo(IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Withdraws `amount` of `token` from the pool. Informs the rewarder of the withdrawal, triggers a harvest.\\n function withdraw(IERC20 token, uint256 amount) external;\\n\\n /**\\n * @notice Withdraws `amount` of `token` from the pool for `to`, and subsequently calls the receipt function on the\\n * `to` contract. Informs the rewarder of the withdrawal, triggering a harvest.\\n * @dev This function is useful for zappers, as it allows to do multiple steps ending with a deposit,\\n * without the need to do multiple transactions.\\n */\\n function withdrawToAndCall(IERC20 token, IStakingReceiver to, uint256 amount, bytes calldata data) external;\\n\\n /// @notice Withdraws `amount` of `token` from the pool in an always-working fashion. The rewarder is not informed.\\n function emergencyWithdraw(IERC20 token) external;\\n\\n /// @notice Claims the rewards from the rewarder, and sends them to the caller.\\n function claim(IERC20[] calldata lpTokens) external;\\n\\n /**\\n * VIEW *\\n */\\n\\n /// @notice Returns the deposited balance of `user` in the pool of `token`.\\n function balanceOf(IERC20 token, address user) external view returns (uint256);\\n\\n /// @notice Returns the total supply of the pool of `token`.\\n function totalSupply(IERC20 token) external view returns (uint256);\\n\\n /// @notice Returns whether `token` is a pool.\\n function isPool(IERC20 token) external view returns (bool);\\n\\n /// @notice Returns the number of pools.\\n function tokensLength() external view returns (uint256);\\n\\n /// @notice Returns the list of pools, by their staking tokens.\\n function tokens() external view returns (IERC20[] memory);\\n\\n /// @notice Returns a slice of the list of pools, by their staking tokens.\\n function tokens(uint256 start, uint256 end) external view returns (IERC20[] memory);\\n\\n // @notice Returns the rewarder of the pool of `token`, responsible for distribution reward tokens.\\n function rewarder(IERC20 token) external view returns (IRewarder);\\n}\\n\",\"keccak256\":\"0x5dc0cccd37d0ad5379a031aa4b017b39d844bccb2885a758eaae650272977a52\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/StargateZapperV1.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC20Permit } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\\\";\\n\\nimport { IStargateV1Pool } from \\\"./interfaces/IStargateV1Pool.sol\\\";\\nimport { IStargateV1Router } from \\\"./interfaces/IStargateV1Router.sol\\\";\\nimport { IStargateV1Factory } from \\\"./interfaces/IStargateV1Factory.sol\\\";\\nimport { IStargateEthVault } from \\\"./interfaces/IStargateEthVault.sol\\\";\\n\\nimport { LPToken } from \\\"../../utils/LPToken.sol\\\";\\nimport { IStargateStaking } from \\\"../rewarder/interfaces/IStargateStaking.sol\\\";\\nimport { IStargatePool } from \\\"../../interfaces/IStargatePool.sol\\\";\\n\\nimport { IStargateZapperV1, IERC20 } from \\\"./interfaces/IStargateZapperV1.sol\\\";\\n\\n/**\\n * @title Stargate Zapper - V1\\n * @notice The Stargate Zapper V1 contract allows users to zap into and out of Stargate V2 LP tokens,\\n * as well as migrate from V1 LP tokens to V2 LP tokens.\\n */\\ncontract StargateZapperV1 is Ownable, IStargateZapperV1 {\\n using SafeERC20 for IERC20;\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n /// @dev The Stargate V2 StargateStaking contract, which the V2 LP tokens are staked into.\\n IStargateStaking public immutable staking;\\n /// @dev The Stargate V1 Router contract, for migrating from V1 LPs to V2 stakes.\\n IStargateV1Router public immutable routerV1;\\n /// @dev The Stargate V1 Factory contract, for migrating from V1 LPs to V2 stakes.\\n IStargateV1Factory public immutable factoryV1;\\n /// @dev The stargate V1 eth vault, used as the underlying V1 ETH LP token.\\n IStargateEthVault public immutable ethVault;\\n\\n /// @dev Mapping of V2 LP tokens to their corresponding V2 StargatePool.\\n mapping(IERC20 lpToken => IStargatePool pool) public lpToPool;\\n /// @dev Mapping of V2 LP tokens to their pool's underlying asset (eg. USDC).\\n mapping(IERC20 lpToken => IERC20 asset) public lpToAsset;\\n /// @dev Mapping of V1 pool IDs to their corresponding V2 LP tokens, used for migration.\\n mapping(uint16 v1PoolId => IERC20 lpToken) public v1PidToV2Lp;\\n /// @dev Mapping of V1 pool IDs to their corresponding V1 LP tokens, used for migration.\\n mapping(uint16 v1PoolId => IERC20 lpToken) public v1PidToV1Lp;\\n /// @dev Mapping of V1 pool IDs to their pool's conversion rate, used for ETH migration exclusively.\\n mapping(uint16 v1PoolId => uint256 conversionRate) public v1PidToConversionRate;\\n\\n /**\\n * @dev Constructor for initializing the zapper.\\n * @param _staking The Stargate V2 StargateStaking contract.\\n * @param _routerV1 The Stargate V1 Router contract. Used for migration.\\n * @param _ethVault The Stargate V1 ETH vault, which is the underlying token for the V1 ETH LP,\\n * can be set to zero if it does not exist. Used for migration.\\n */\\n constructor(IStargateStaking _staking, IStargateV1Router _routerV1, IStargateEthVault _ethVault) {\\n staking = _staking;\\n routerV1 = _routerV1;\\n factoryV1 = _routerV1.factory();\\n ethVault = _ethVault;\\n }\\n\\n /**\\n * ZAPS\\n */\\n\\n /**\\n * @notice Unstakes and redeems a V2 LP token to the underlying asset (such as USDC) in a single transaction.\\n * Called through `StargateStaking.withdrawToAndCall`.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev Compliant with StargatePoolNative.\\n * @dev The `data` provided via `withdrawToAndCall` must be `abi.encode(minTokenOut)` with\\n * `minAssetOut` an `uint256`.\\n * @param lpToken The V2 LP token to redeem, validated by `StargateStaking`.\\n * @param from The address that is withdrawing the LP token, validated by `StargateStaking`.\\n * @param value The amount of LP tokens to redeem, validated by `StargateStaking` and already sent into this\\n * contract before the `onWithdrawReceived` call.\\n * @param data The data provided by the `from` user to specify the minimum amount of the underlying asset to\\n * receive, this is not validated beforehand in any way.\\n */\\n function onWithdrawReceived(\\n IERC20 lpToken,\\n address from,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4) {\\n if (msg.sender != address(staking)) revert StargateZapperV1__OnlyCallableByStaking();\\n\\n IStargatePool pool = lpToPool[lpToken];\\n if (address(pool) == address(0)) revert StargateZapperV1__UnknownLpToken(lpToken);\\n if (value == 0) revert StargateZapperV1__ZeroAmount();\\n\\n uint256 minAssetOut = abi.decode(data, (uint256));\\n\\n uint256 redeemed = pool.redeem(value, from);\\n if (redeemed < minAssetOut) {\\n revert StargateZapperV1__InsufficientOutputAmount({ actual: redeemed, expect: minAssetOut });\\n }\\n\\n return this.onWithdrawReceived.selector;\\n }\\n\\n /**\\n * @notice Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking\\n * contract, all in a single transaction. Requires approval of the underlying asset of the LP pool.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal\\n * conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency\\n * this rounding is not refunded. Users are still in control of not receiving less than expected by setting\\n * the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees\\n * via `sweep`.\\n * @dev Compliant with StargatePoolNative, but requires input to be properly rounded with the shared to local\\n * decimal adjustment, eg. no dust.\\n * @param lpToken The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is\\n * transferred from the transaction sender.\\n * @param assetInAmount The amount of the underlying asset (such as USDC) to zap in.\\n * @param minStakeAmount The minimum amount of the LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against rounding slippage and fees.\\n */\\n function depositAndStake(IERC20 lpToken, uint256 assetInAmount, uint256 minStakeAmount) public payable {\\n IERC20 asset = lpToAsset[lpToken];\\n if (address(asset) == address(0)) revert StargateZapperV1__UnknownLpToken(lpToken);\\n if (assetInAmount == 0) revert StargateZapperV1__ZeroAmount();\\n\\n _transferInToken(asset, assetInAmount);\\n _zapToAndStake(asset, lpToken, assetInAmount, minStakeAmount);\\n }\\n\\n /**\\n * @notice Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking\\n * contract, all in a single transaction. Does not require approval of the underlying asset of the LP pool,\\n * instead the permit signature of `msg.sender` needs to be provided for the amount.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal\\n * conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency\\n * this rounding is not refunded. Users are still in control of not receiving less than expected by setting\\n * the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as\\n * fees via `sweep`.\\n * @dev This function only works with tokens that support ERC-2612.\\n * @dev Not compliant with StargatePoolNative.\\n * @param lpToken The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token\\n * is transferred from the transaction sender.\\n * @param assetInAmount The amount of the underlying asset (such as USDC) to zap in.\\n * @param minStakeAmount The minimum amount of the LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against rounding slippage and fees.\\n * @param deadline The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\\n * @param v The v-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param r The r-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param s The s-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n */\\n function depositAndStakeWithPermit(\\n IERC20 lpToken,\\n uint256 assetInAmount,\\n uint256 minStakeAmount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external {\\n IERC20Permit(address(lpToAsset[lpToken])).permit(msg.sender, address(this), assetInAmount, deadline, v, r, s);\\n depositAndStake(lpToken, assetInAmount, minStakeAmount);\\n }\\n\\n /**\\n * @notice Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract,\\n * all in a single transaction. Requires approval of the V1 LP token.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev Compliant with StargatePoolNative.\\n * @param poolId The V1 pool ID to migrate from.\\n * @param amount The amount of the V1 LP token to migrate.\\n * @param minStakeAmount The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against slippage and fees.\\n */\\n function migrateV1LpToV2Stake(uint16 poolId, uint256 amount, uint256 minStakeAmount) public payable {\\n IERC20 v1Lp = v1PidToV1Lp[poolId];\\n IERC20 v2Lp = v1PidToV2Lp[poolId];\\n IERC20 asset = lpToAsset[v2Lp];\\n if (address(v1Lp) == address(0) || address(v2Lp) == address(0) || address(asset) == address(0)) {\\n revert StargateZapperV1__InvalidPoolId(poolId);\\n }\\n if (amount == 0) revert StargateZapperV1__ZeroAmount();\\n\\n v1Lp.safeTransferFrom(msg.sender, address(this), amount);\\n v1Lp.forceApprove(address(routerV1), amount);\\n uint256 amountOut = routerV1.instantRedeemLocal(poolId, amount, address(this));\\n if (address(asset) == ETH) {\\n // Due to unlp rounding errors, we can't provide `amount` so that this `amountOut` is exactly correct.\\n // Hence we need to get rid of the dust ourselves, which can be swept by the admin.\\n amountOut -= amountOut % v1PidToConversionRate[poolId];\\n }\\n _zapToAndStake(asset, v2Lp, amountOut, minStakeAmount);\\n }\\n\\n /**\\n * @notice Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract,\\n * all in a single transaction. Does not require approval of the V1 LP token, instead the permit signature\\n * of `msg.sender` needs to be provided for the amount.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev Not compliant with StargatePoolNative.\\n * @param poolId The V1 pool ID to migrate from.\\n * @param amount The amount of the V1 LP token to migrate.\\n * @param minStakeAmount The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against slippage and fees.\\n * @param deadline The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\\n * @param v The v-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param r The r-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param s The s-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n */\\n function migrateV1LpToV2StakeWithPermit(\\n uint16 poolId,\\n uint256 amount,\\n uint256 minStakeAmount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external {\\n IERC20Permit(address(v1PidToV1Lp[poolId])).permit(msg.sender, address(this), amount, deadline, v, r, s);\\n migrateV1LpToV2Stake(poolId, amount, minStakeAmount);\\n }\\n\\n /**\\n * @dev Internal function to zap an asset into a stargate pool and stake the resulting LP token into the\\n * Stargate V2 Staking contract, requires the asset to already be in the zapper.\\n */\\n function _zapToAndStake(IERC20 asset, IERC20 lpToken, uint256 assetInAmount, uint256 minStakeAmount) internal {\\n IStargatePool pool = lpToPool[lpToken];\\n if (address(pool) == address(0)) revert StargateZapperV1__UnknownLpToken(lpToken);\\n\\n uint256 value = 0;\\n if (address(asset) == ETH) {\\n value = assetInAmount;\\n } else {\\n asset.forceApprove(address(pool), assetInAmount);\\n }\\n uint256 amountOut = pool.deposit{ value: value }(address(this), assetInAmount);\\n\\n if (amountOut < minStakeAmount) {\\n revert StargateZapperV1__InsufficientOutputAmount({ actual: amountOut, expect: minStakeAmount });\\n }\\n\\n lpToken.forceApprove(address(staking), amountOut);\\n staking.depositTo(lpToken, msg.sender, amountOut);\\n }\\n\\n function _transferInToken(IERC20 token, uint256 amount) internal {\\n if (address(token) == ETH) {\\n if (msg.value != amount) revert StargateZapperV1__IncorrectNative(msg.value, amount);\\n } else {\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n }\\n\\n /**\\n * CONFIG & OWNER FUNCTIONS\\n */\\n\\n /**\\n * @notice Whitelist a V2 stargate LP for zapping, configures storage mappings from the LP to the pool and asset\\n * for gas efficiency. Only callable by `owner`.\\n * @param lpToken The LP token to set the pool for.\\n * @param enabled Whether the pool should be enabled or not.\\n */\\n function configureLpToken(IERC20 lpToken, bool enabled) external onlyOwner {\\n IStargatePool pool = IStargatePool(enabled ? LPToken(address(lpToken)).stargate() : address(0));\\n IERC20 asset = IERC20(enabled ? pool.token() : address(0));\\n // @dev StargatePoolNative presently sets the .token() to address(0).\\n if (enabled && address(asset) == address(0)) asset = IERC20(ETH);\\n\\n lpToPool[lpToken] = pool;\\n lpToAsset[lpToken] = asset;\\n\\n emit LpConfigured(lpToken, pool, asset);\\n }\\n\\n /**\\n * @notice Whitelist a V1 pool ID to a V2 LP token for migration, configures a storage mapping for gas efficiency.\\n * Must be called after `configureLpToken`. Only callable by `owner`.\\n * @param v1PoolId The V1 pool ID, specified in the V1 Stargate factory/router.\\n * @param v2LpToken The V2 LP token to map to the V1 pool ID, or address(0) to remove the mapping.\\n */\\n function configureV1Pool(uint16 v1PoolId, IERC20 v2LpToken) external onlyOwner {\\n IStargateV1Pool v1LpToken = address(v2LpToken) != address(0)\\n ? factoryV1.getPool(v1PoolId)\\n : IStargateV1Pool(address(0));\\n\\n IERC20 asset = lpToAsset[v2LpToken];\\n IERC20 v1LpAsset = address(v2LpToken) != address(0) ? v1LpToken.token() : IERC20(address(0));\\n if (\\n address(v1LpToken) != address(0) &&\\n v1LpAsset != asset &&\\n (address(asset) != ETH || address(v1LpAsset) != address(ethVault))\\n ) {\\n revert StargateZapperV1__UnknownLpToken(v2LpToken);\\n }\\n\\n uint256 assetDecimals = address(asset) == ETH || address(asset) == address(0)\\n ? 18\\n : IERC20Metadata(address(asset)).decimals();\\n\\n v1PidToV1Lp[v1PoolId] = v1LpToken;\\n v1PidToV2Lp[v1PoolId] = v2LpToken;\\n v1PidToConversionRate[v1PoolId] = address(v2LpToken) == address(0)\\n ? 0\\n : 10 ** (assetDecimals - lpToPool[v2LpToken].sharedDecimals());\\n\\n emit V1PoolConfigured(v1PoolId, v1LpToken, v2LpToken);\\n }\\n\\n /**\\n * @notice Callable by the owner to withdraw any tokens accidentally sent or stuck in this contract.\\n * @param token address of the token to sweep.\\n * @param receiver address to receive the tokens.\\n * @param amount amount of tokens to sweep.\\n */\\n function sweep(address token, address receiver, uint256 amount) external onlyOwner {\\n if (token == ETH) {\\n (bool success, ) = receiver.call{ value: amount }(\\\"\\\");\\n if (!success) revert StargateZapperV1__NativeTransferFailed();\\n } else {\\n IERC20(token).safeTransfer(receiver, amount);\\n }\\n emit TokenSwept(token, receiver, amount);\\n }\\n\\n // @notice Used For wrapped ETH unwrapping.\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x77a76f94e69d3956860035656509e912910f445832fcd284f1937a9973a5d19f\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/interfaces/IStargateEthVault.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\ninterface IStargateEthVault {\\n function deposit() external payable;\\n function transfer(address to, uint256 value) external returns (bool);\\n function withdraw(uint256) external;\\n function approve(address guy, uint256 wad) external returns (bool);\\n function transferFrom(address src, address dst, uint256 wad) external returns (bool);\\n}\\n\",\"keccak256\":\"0xac07eb8bfa4f84ecacaca3fbcee910054c2b386923de6c7bbe5c56b6effbcefb\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/interfaces/IStargateV1Factory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IStargateV1Pool } from \\\"./IStargateV1Pool.sol\\\";\\n\\ninterface IStargateV1Factory {\\n function getPool(uint256 poolId) external view returns (IStargateV1Pool);\\n}\\n\",\"keccak256\":\"0xec93485979be5af89df9a5139c50de745c6061d3f01f06b105eafe9043078e9f\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/interfaces/IStargateV1Pool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IStargateV1Pool is IERC20 {\\n function token() external view returns (IERC20);\\n function poolId() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x192701523ea2e04f6d7adb5be9e0a776883db7726992a9319b6f6c1b8b91adb7\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/interfaces/IStargateV1Router.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IStargateV1Factory } from \\\"./IStargateV1Factory.sol\\\";\\n\\ninterface IStargateV1Router {\\n // legacy import from stgv1\\n // solhint-disable-next-line contract-name-camelcase\\n struct lzTxObj {\\n uint256 dstGasForCall;\\n uint256 dstNativeAmount;\\n bytes dstNativeAddr;\\n }\\n\\n function factory() external view returns (IStargateV1Factory);\\n\\n function addLiquidity(uint256 _poolId, uint256 _amountLD, address _to) external;\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable;\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function instantRedeemLocal(uint16 _srcPoolId, uint256 _amountLP, address _to) external returns (uint256);\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable;\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n lzTxObj memory _lzTxParams\\n ) external view returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0xbd7aad83f506bf3745523dc8341de86dd7d18025a708ada6dad74723ccbb3c79\",\"license\":\"BUSL-1.1\"},\"src/peripheral/zapper/interfaces/IStargateZapperV1.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IStakingReceiver } from \\\"../../rewarder/interfaces/IStakingReceiver.sol\\\";\\nimport { IStargatePool } from \\\"../../../interfaces/IStargatePool.sol\\\";\\n\\ninterface IStargateZapperV1 is IStakingReceiver {\\n error StargateZapperV1__NativeTransferFailed();\\n error StargateZapperV1__InsufficientOutputAmount(uint256 actual, uint256 expect);\\n error StargateZapperV1__InvalidPoolId(uint16 poolId);\\n error StargateZapperV1__UnknownLpToken(IERC20 lpToken);\\n error StargateZapperV1__OnlyCallableByStaking();\\n error StargateZapperV1__ZeroAmount();\\n error StargateZapperV1__IncorrectNative(uint256 actual, uint256 expect);\\n\\n event LpConfigured(IERC20 indexed lpToken, IStargatePool indexed pool, IERC20 asset);\\n event V1PoolConfigured(uint16 indexed poolId, IERC20 indexed v1LpToken, IERC20 indexed v2LpToken);\\n event TokenSwept(address indexed token, address indexed receiver, uint256 amount);\\n\\n /**\\n * @notice Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking\\n * contract, all in a single transaction. Requires approval of the underlying asset of the LP pool.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal\\n * conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency\\n * this rounding is not refunded. Users are still in control of not receiving less than expected by setting\\n * the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees\\n * via `sweep`.\\n * @dev Compliant with StargatePoolNative, but requires input to be properly rounded with the shared to local\\n * decimal adjustment, eg. no dust.\\n * @param lpToken The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is\\n * transferred from the transaction sender.\\n * @param assetInAmount The amount of the underlying asset (such as USDC) to zap in.\\n * @param minStakeAmount The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as\\n * an extra check against rounding slippage and fees.\\n */\\n function depositAndStake(IERC20 lpToken, uint256 assetInAmount, uint256 minStakeAmount) external payable;\\n\\n /**\\n * @notice Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking\\n * contract, all in a single transaction. Does not require approval of the underlying asset of the LP pool,\\n * instead the permit signature of `msg.sender` needs to be provided for the amount.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal\\n * conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency\\n * this rounding is not refunded. Users are still in control of not receiving less than expected by setting\\n * the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees\\n * via `sweep`.\\n * @dev This function only works with tokens that support ERC-2612.\\n * @dev Not compliant with StargatePoolNative.\\n * @param lpToken The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is\\n * transferred from the transaction sender.\\n * @param assetInAmount The amount of the underlying asset (such as USDC) to zap in.\\n * @param minStakeAmount The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as\\n * an extra check against rounding slippage and fees.\\n * @param deadline The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\\n * @param v The v-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param r The r-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param s The s-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n */\\n function depositAndStakeWithPermit(\\n IERC20 lpToken,\\n uint256 assetInAmount,\\n uint256 minStakeAmount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @notice Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract,\\n * all in a single transaction. Requires approval of the V1 LP token.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev Compliant with StargatePoolNative.\\n * @param poolId The V1 pool ID to migrate from.\\n * @param amount The amount of the V1 LP token to migrate.\\n * @param minStakeAmount The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against slippage and fees.\\n */\\n function migrateV1LpToV2Stake(uint16 poolId, uint256 amount, uint256 minStakeAmount) external payable;\\n\\n /**\\n * @notice Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract,\\n * all in a single transaction. Does not require approval of the V1 LP token, instead the permit signature\\n * of `msg.sender` needs to be provided for the amount.\\n * @dev Frontend must use the underlying protocol events to determine the actual amount of the asset received.\\n * @dev Not compliant with StargatePoolNative.\\n * @param poolId The V1 pool ID to migrate from.\\n * @param amount The amount of the V1 LP token to migrate.\\n * @param minStakeAmount The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract,\\n * as an extra check against slippage and fees.\\n * @param deadline The deadline used within the permit data signature (see ERC-2612 for the permit data structure)\\n * @param v The v-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param r The r-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n * @param s The s-component of a valid secp256k1 signature from owner of the message\\n * (see ERC-2612 for the permit data structure)\\n */\\n function migrateV1LpToV2StakeWithPermit(\\n uint16 poolId,\\n uint256 amount,\\n uint256 minStakeAmount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x56f09e12ba8ab55f5e0a46969fd94d477500f4914262ca0da531e75df6ddf6d1\",\"license\":\"BUSL-1.1\"},\"src/utils/LPToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.22;\\n\\nimport { ERC20Permit, ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol\\\";\\n\\n/// @title A contract representing an ERC20Permit used for representing liquidity pool ownership.\\ncontract LPToken is ERC20Permit {\\n address public immutable stargate;\\n uint8 internal immutable tokenDecimals;\\n\\n error LPToken_Unauthorized();\\n\\n modifier onlyStargate() {\\n if (msg.sender != stargate) revert LPToken_Unauthorized();\\n _;\\n }\\n\\n /**\\n * @notice Create a LP token to represent partial pool ownership.\\n * @dev The sender of the message is set to the Stargate role. This is because it is expected that each\\n * StargatePool will create its own LPToken.\\n * @param _name The name of the ERC20\\n * @param _symbol The symbol for the ERC20\\n * @param _decimals How many decimals does the ERC20 has\\n */\\n constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol) ERC20Permit(_name) {\\n stargate = msg.sender;\\n tokenDecimals = _decimals;\\n }\\n\\n /// @notice Mint new LP tokens and transfer them to an account.\\n /// @param _to The account to send the newly minted tokens to\\n /// @param _amount How many tokens to mint\\n function mint(address _to, uint256 _amount) external onlyStargate {\\n _mint(_to, _amount);\\n }\\n\\n /// @notice Burn tokens currently owned by an account.\\n /// @param _from The account to burn the tokens from\\n /// @param _amount How many tokens to burn\\n function burnFrom(address _from, uint256 _amount) external onlyStargate {\\n _burn(_from, _amount);\\n }\\n\\n /// @notice How many decimals are used by this token.\\n /// @return The amount of decimals\\n function decimals() public view override returns (uint8) {\\n return tokenDecimals;\\n }\\n}\\n\",\"keccak256\":\"0x21d0b77cc69414548b13b004bccb8b109b4297413279d98e617c9d91eec78d31\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
637
+ "bytecode": "0x6101006040523480156200001257600080fd5b50604051620023cc380380620023cc83398101604081905262000035916200013b565b6200004033620000d2565b6001600160a01b03808416608052821660a08190526040805163c45a015560e01b8152905163c45a0155916004808201926020929091908290030181865afa15801562000091573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b791906200018f565b6001600160a01b0390811660c0521660e05250620001b69050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200013857600080fd5b50565b6000806000606084860312156200015157600080fd5b83516200015e8162000122565b6020850151909350620001718162000122565b6040850151909250620001848162000122565b809150509250925092565b600060208284031215620001a257600080fd5b8151620001af8162000122565b9392505050565b60805160a05160c05160e0516121ab620002216000396000818161028d0152610c2f0152600081816102250152610ad00152600081816102e3015281816109310152610998015260008181610259015281816104e80152818161177401526117de01526121ab6000f3fe6080604052600436106101635760003560e01c80638da5cb5b116100c0578063d4d9f4db11610074578063e9d1153611610059578063e9d1153614610472578063f2fde38b146104a8578063fafb37f8146104c857600080fd5b8063d4d9f4db1461041c578063e53c76511461043c57600080fd5b806393152560116100a557806393152560146103a1578063976f9fae146103c15780639a7b9189146103e157600080fd5b80638da5cb5b14610363578063904b680c1461038157600080fd5b806362c0676711610117578063715018a6116100fc578063715018a61461030557806374a63c851461031a5780638a1118531461035057600080fd5b806362c06767146102af578063714981e0146102d157600080fd5b80633957f453116101485780633957f453146102135780634cf088d9146102475780635a20329c1461027b57600080fd5b8063022173c01461016f5780632d7c087e146101c557600080fd5b3661016a57005b600080fd5b34801561017b57600080fd5b5061018f61018a366004611c1b565b6104db565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b3480156101d157600080fd5b506101fb6101e0366004611cba565b6001602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101bc565b34801561021f57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561025357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561028757600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102bb57600080fd5b506102cf6102ca366004611cde565b6106ef565b005b3480156102dd57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031157600080fd5b506102cf610820565b34801561032657600080fd5b506101fb610335366004611cba565b6002602052600090815260409020546001600160a01b031681565b6102cf61035e366004611d36565b610834565b34801561036f57600080fd5b506000546001600160a01b03166101fb565b34801561038d57600080fd5b506102cf61039c366004611d69565b610a7f565b3480156103ad57600080fd5b506102cf6103bc366004611daf565b610ebe565b3480156103cd57600080fd5b506102cf6103dc366004611e23565b610f80565b3480156103ed57600080fd5b5061040e6103fc366004611e51565b60056020526000908152604090205481565b6040519081526020016101bc565b34801561042857600080fd5b506102cf610437366004611e6c565b611133565b34801561044857600080fd5b506101fb610457366004611e51565b6003602052600090815260409020546001600160a01b031681565b34801561047e57600080fd5b506101fb61048d366004611e51565b6004602052600090815260409020546001600160a01b031681565b3480156104b457600080fd5b506102cf6104c3366004611cba565b6111ee565b6102cf6104d6366004611e92565b61127e565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461053f576040517f91531a5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0380871660009081526001602052604090205416806105a1576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b03881660048201526024015b60405180910390fd5b846000036105db576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006105e984860186611eb2565b6040517f7bde82f2000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b038981166024830152919250600091841690637bde82f2906044016020604051808303816000875af1158015610657573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067b9190611ecb565b9050818110156106c1576040517fda86e6e80000000000000000000000000000000000000000000000000000000081526004810182905260248101839052604401610598565b507f022173c00000000000000000000000000000000000000000000000000000000098975050505050505050565b6106f7611331565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038416016107ba576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610774576040519150601f19603f3d011682016040523d82523d6000602084013e610779565b606091505b50509050806107b4576040517f2b5a1d8e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506107ce565b6107ce6001600160a01b038416838361138b565b816001600160a01b0316836001600160a01b03167f115d7b5114b5954762cc233b141a7c777a8f79d93f50af7216d645c87fb4883e8360405161081391815260200190565b60405180910390a3505050565b610828611331565b6108326000611457565b565b61ffff831660009081526004602090815260408083205460038352818420546001600160a01b0390811680865260029094529190932054928116921682158061088457506001600160a01b038216155b8061089657506001600160a01b038116155b156108d3576040517ff3a524c200000000000000000000000000000000000000000000000000000000815261ffff87166004820152602401610598565b8460000361090d576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109226001600160a01b0384163330886114bf565b6109566001600160a01b0384167f000000000000000000000000000000000000000000000000000000000000000087611510565b6040517fc4de93a500000000000000000000000000000000000000000000000000000000815261ffff87166004820152602481018690523060448201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c4de93a5906064016020604051808303816000875af11580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190611ecb565b90507fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b03831601610a6a5761ffff8716600090815260056020526040902054610a5d9082611ee4565b610a679082611f4e565b90505b610a76828483886115e6565b50505050505050565b610a87611331565b60006001600160a01b038216610a9e576000610b43565b6040517f068bcd8d00000000000000000000000000000000000000000000000000000000815261ffff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063068bcd8d90602401602060405180830381865afa158015610b1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b439190611f61565b6001600160a01b03808416600081815260026020526040812054939450929091169190610b71576000610bd3565b826001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611f61565b90506001600160a01b03831615801590610bff5750816001600160a01b0316816001600160a01b031614155b8015610c6457506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580610c6457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b15610ca6576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610cda57506001600160a01b038316155b610d4557826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d409190611f7e565b610d48565b60125b61ffff8716600090815260046020908152604080832080546001600160a01b03808b167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255600390935292208054928916929091168217905560ff91909116915015610e64576001600160a01b038086166000908152600160209081526040918290205482517f857749b0000000000000000000000000000000000000000000000000000000008152925193169263857749b09260048082019392918290030181865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611f7e565b610e549060ff1682611f4e565b610e5f90600a6120bb565b610e67565b60005b61ffff87166000818152600560205260408082209390935591516001600160a01b038089169390881692917f5438b0aa137ed4e67f018d14fa4b934be9f0b8c812b054dbb7e750815be320b79190a4505050505050565b61ffff87166000908152600460208190526040918290205491517fd505accf0000000000000000000000000000000000000000000000000000000081523391810191909152306024820152604481018890526064810186905260ff8516608482015260a4810184905260c481018390526001600160a01b039091169063d505accf9060e401600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050610a76878787610834565b610f88611331565b600081610f96576000610ff8565b826001600160a01b0316636c099dee6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190611f61565b905060008261100857600061106a565b816001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190611f61565b905082801561108057506001600160a01b038116155b1561109c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee5b6001600160a01b03848116600081815260016020908152604080832080548887167fffffffffffffffffffffffff00000000000000000000000000000000000000009182168117909255600284529382902080549688169690941686179093555193845290927ff6a1e7ec7fa87bb602390c6c0d2424b6eedef6ded426566b284f3a3b2ca2b13a910160405180910390a350505050565b6001600160a01b03878116600090815260026020526040908190205490517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018990526064810187905260ff8616608482015260a4810185905260c4810184905291169063d505accf9060e401600060405180830381600087803b1580156111cb57600080fd5b505af11580156111df573d6000803e3d6000fd5b50505050610a7687878761127e565b6111f6611331565b6001600160a01b0381166112725760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610598565b61127b81611457565b50565b6001600160a01b0380841660009081526002602052604090205416806112db576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b82600003611315576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61131f8184611843565b61132b818585856115e6565b50505050565b6000546001600160a01b031633146108325760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610598565b6040516001600160a01b0383166024820152604481018290526114529084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526118ce565b505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261132b9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113d0565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905261158f84826119b6565b61132b576040516001600160a01b0384166024820152600060448201526115dc9085907f095ea7b300000000000000000000000000000000000000000000000000000000906064016113d0565b61132b84826118ce565b6001600160a01b038084166000908152600160205260409020541680611643576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b60007fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b0387160161167c575082611690565b6116906001600160a01b0387168386611510565b6040517f47e7ef24000000000000000000000000000000000000000000000000000000008152306004820152602481018590526000906001600160a01b038416906347e7ef2490849060440160206040518083038185885af11580156116fa573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061171f9190611ecb565b905083811015611765576040517fda86e6e80000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401610598565b6117996001600160a01b0387167f000000000000000000000000000000000000000000000000000000000000000083611510565b6040517ff213159c0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152336024830152604482018390527f0000000000000000000000000000000000000000000000000000000000000000169063f213159c90606401600060405180830381600087803b15801561182257600080fd5b505af1158015611836573d6000803e3d6000fd5b5050505050505050505050565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038316016118b9578034146118b5576040517fbc8dad7a00000000000000000000000000000000000000000000000000000000815234600482015260248101829052604401610598565b5050565b6118b56001600160a01b0383163330846114bf565b6000611923826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a5f9092919063ffffffff16565b905080516000148061194457508080602001905181019061194491906120c7565b6114525760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610598565b6000806000846001600160a01b0316846040516119d39190612108565b6000604051808303816000865af19150503d8060008114611a10576040519150601f19603f3d011682016040523d82523d6000602084013e611a15565b606091505b5091509150818015611a3f575080511580611a3f575080806020019051810190611a3f91906120c7565b8015611a5457506001600160a01b0385163b15155b925050505b92915050565b6060611a6e8484600085611a76565b949350505050565b606082471015611aee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610598565b600080866001600160a01b03168587604051611b0a9190612108565b60006040518083038185875af1925050503d8060008114611b47576040519150601f19603f3d011682016040523d82523d6000602084013e611b4c565b606091505b5091509150611b5d87838387611b68565b979650505050505050565b60608315611bd7578251600003611bd0576001600160a01b0385163b611bd05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610598565b5081611a6e565b611a6e8383815115611bec5781518083602001fd5b8060405162461bcd60e51b81526004016105989190612124565b6001600160a01b038116811461127b57600080fd5b600080600080600060808688031215611c3357600080fd5b8535611c3e81611c06565b94506020860135611c4e81611c06565b935060408601359250606086013567ffffffffffffffff80821115611c7257600080fd5b818801915088601f830112611c8657600080fd5b813581811115611c9557600080fd5b896020828501011115611ca757600080fd5b9699959850939650602001949392505050565b600060208284031215611ccc57600080fd5b8135611cd781611c06565b9392505050565b600080600060608486031215611cf357600080fd5b8335611cfe81611c06565b92506020840135611d0e81611c06565b929592945050506040919091013590565b803561ffff81168114611d3157600080fd5b919050565b600080600060608486031215611d4b57600080fd5b611d5484611d1f565b95602085013595506040909401359392505050565b60008060408385031215611d7c57600080fd5b611d8583611d1f565b91506020830135611d9581611c06565b809150509250929050565b60ff8116811461127b57600080fd5b600080600080600080600060e0888a031215611dca57600080fd5b611dd388611d1f565b96506020880135955060408801359450606088013593506080880135611df881611da0565b9699959850939692959460a0840135945060c09093013592915050565b801515811461127b57600080fd5b60008060408385031215611e3657600080fd5b8235611e4181611c06565b91506020830135611d9581611e15565b600060208284031215611e6357600080fd5b611cd782611d1f565b600080600080600080600060e0888a031215611e8757600080fd5b8735611dd381611c06565b600080600060608486031215611ea757600080fd5b8335611d5481611c06565b600060208284031215611ec457600080fd5b5035919050565b600060208284031215611edd57600080fd5b5051919050565b600082611f1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611a5957611a59611f1f565b600060208284031215611f7357600080fd5b8151611cd781611c06565b600060208284031215611f9057600080fd5b8151611cd781611da0565b600181815b80851115611ff457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611fda57611fda611f1f565b80851615611fe757918102915b93841c9390800290611fa0565b509250929050565b60008261200b57506001611a59565b8161201857506000611a59565b816001811461202e576002811461203857612054565b6001915050611a59565b60ff84111561204957612049611f1f565b50506001821b611a59565b5060208310610133831016604e8410600b8410161715612077575081810a611a59565b6120818383611f9b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156120b3576120b3611f1f565b029392505050565b6000611cd78383611ffc565b6000602082840312156120d957600080fd5b8151611cd781611e15565b60005b838110156120ff5781810151838201526020016120e7565b50506000910152565b6000825161211a8184602087016120e4565b9190910192915050565b60208152600082518060208401526121438160408501602087016120e4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220bf2af26fd3d0c2eb62f7e34a9d2dd37049ea447a2cbbb92df9a551e238ed7ac864736f6c63430008160033",
638
+ "deployedBytecode": "0x6080604052600436106101635760003560e01c80638da5cb5b116100c0578063d4d9f4db11610074578063e9d1153611610059578063e9d1153614610472578063f2fde38b146104a8578063fafb37f8146104c857600080fd5b8063d4d9f4db1461041c578063e53c76511461043c57600080fd5b806393152560116100a557806393152560146103a1578063976f9fae146103c15780639a7b9189146103e157600080fd5b80638da5cb5b14610363578063904b680c1461038157600080fd5b806362c0676711610117578063715018a6116100fc578063715018a61461030557806374a63c851461031a5780638a1118531461035057600080fd5b806362c06767146102af578063714981e0146102d157600080fd5b80633957f453116101485780633957f453146102135780634cf088d9146102475780635a20329c1461027b57600080fd5b8063022173c01461016f5780632d7c087e146101c557600080fd5b3661016a57005b600080fd5b34801561017b57600080fd5b5061018f61018a366004611c1b565b6104db565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b3480156101d157600080fd5b506101fb6101e0366004611cba565b6001602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101bc565b34801561021f57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561025357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561028757600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102bb57600080fd5b506102cf6102ca366004611cde565b6106ef565b005b3480156102dd57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031157600080fd5b506102cf610820565b34801561032657600080fd5b506101fb610335366004611cba565b6002602052600090815260409020546001600160a01b031681565b6102cf61035e366004611d36565b610834565b34801561036f57600080fd5b506000546001600160a01b03166101fb565b34801561038d57600080fd5b506102cf61039c366004611d69565b610a7f565b3480156103ad57600080fd5b506102cf6103bc366004611daf565b610ebe565b3480156103cd57600080fd5b506102cf6103dc366004611e23565b610f80565b3480156103ed57600080fd5b5061040e6103fc366004611e51565b60056020526000908152604090205481565b6040519081526020016101bc565b34801561042857600080fd5b506102cf610437366004611e6c565b611133565b34801561044857600080fd5b506101fb610457366004611e51565b6003602052600090815260409020546001600160a01b031681565b34801561047e57600080fd5b506101fb61048d366004611e51565b6004602052600090815260409020546001600160a01b031681565b3480156104b457600080fd5b506102cf6104c3366004611cba565b6111ee565b6102cf6104d6366004611e92565b61127e565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461053f576040517f91531a5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0380871660009081526001602052604090205416806105a1576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b03881660048201526024015b60405180910390fd5b846000036105db576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006105e984860186611eb2565b6040517f7bde82f2000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b038981166024830152919250600091841690637bde82f2906044016020604051808303816000875af1158015610657573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067b9190611ecb565b9050818110156106c1576040517fda86e6e80000000000000000000000000000000000000000000000000000000081526004810182905260248101839052604401610598565b507f022173c00000000000000000000000000000000000000000000000000000000098975050505050505050565b6106f7611331565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038416016107ba576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610774576040519150601f19603f3d011682016040523d82523d6000602084013e610779565b606091505b50509050806107b4576040517f2b5a1d8e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506107ce565b6107ce6001600160a01b038416838361138b565b816001600160a01b0316836001600160a01b03167f115d7b5114b5954762cc233b141a7c777a8f79d93f50af7216d645c87fb4883e8360405161081391815260200190565b60405180910390a3505050565b610828611331565b6108326000611457565b565b61ffff831660009081526004602090815260408083205460038352818420546001600160a01b0390811680865260029094529190932054928116921682158061088457506001600160a01b038216155b8061089657506001600160a01b038116155b156108d3576040517ff3a524c200000000000000000000000000000000000000000000000000000000815261ffff87166004820152602401610598565b8460000361090d576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109226001600160a01b0384163330886114bf565b6109566001600160a01b0384167f000000000000000000000000000000000000000000000000000000000000000087611510565b6040517fc4de93a500000000000000000000000000000000000000000000000000000000815261ffff87166004820152602481018690523060448201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c4de93a5906064016020604051808303816000875af11580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190611ecb565b90507fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b03831601610a6a5761ffff8716600090815260056020526040902054610a5d9082611ee4565b610a679082611f4e565b90505b610a76828483886115e6565b50505050505050565b610a87611331565b60006001600160a01b038216610a9e576000610b43565b6040517f068bcd8d00000000000000000000000000000000000000000000000000000000815261ffff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063068bcd8d90602401602060405180830381865afa158015610b1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b439190611f61565b6001600160a01b03808416600081815260026020526040812054939450929091169190610b71576000610bd3565b826001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190611f61565b90506001600160a01b03831615801590610bff5750816001600160a01b0316816001600160a01b031614155b8015610c6457506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141580610c6457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b15610ca6576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610cda57506001600160a01b038316155b610d4557826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d409190611f7e565b610d48565b60125b61ffff8716600090815260046020908152604080832080546001600160a01b03808b167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255600390935292208054928916929091168217905560ff91909116915015610e64576001600160a01b038086166000908152600160209081526040918290205482517f857749b0000000000000000000000000000000000000000000000000000000008152925193169263857749b09260048082019392918290030181865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611f7e565b610e549060ff1682611f4e565b610e5f90600a6120bb565b610e67565b60005b61ffff87166000818152600560205260408082209390935591516001600160a01b038089169390881692917f5438b0aa137ed4e67f018d14fa4b934be9f0b8c812b054dbb7e750815be320b79190a4505050505050565b61ffff87166000908152600460208190526040918290205491517fd505accf0000000000000000000000000000000000000000000000000000000081523391810191909152306024820152604481018890526064810186905260ff8516608482015260a4810184905260c481018390526001600160a01b039091169063d505accf9060e401600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050610a76878787610834565b610f88611331565b600081610f96576000610ff8565b826001600160a01b0316636c099dee6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff89190611f61565b905060008261100857600061106a565b816001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190611f61565b905082801561108057506001600160a01b038116155b1561109c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee5b6001600160a01b03848116600081815260016020908152604080832080548887167fffffffffffffffffffffffff00000000000000000000000000000000000000009182168117909255600284529382902080549688169690941686179093555193845290927ff6a1e7ec7fa87bb602390c6c0d2424b6eedef6ded426566b284f3a3b2ca2b13a910160405180910390a350505050565b6001600160a01b03878116600090815260026020526040908190205490517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018990526064810187905260ff8616608482015260a4810185905260c4810184905291169063d505accf9060e401600060405180830381600087803b1580156111cb57600080fd5b505af11580156111df573d6000803e3d6000fd5b50505050610a7687878761127e565b6111f6611331565b6001600160a01b0381166112725760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610598565b61127b81611457565b50565b6001600160a01b0380841660009081526002602052604090205416806112db576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b82600003611315576040517f2a5b335400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61131f8184611843565b61132b818585856115e6565b50505050565b6000546001600160a01b031633146108325760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610598565b6040516001600160a01b0383166024820152604481018290526114529084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526118ce565b505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261132b9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113d0565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905261158f84826119b6565b61132b576040516001600160a01b0384166024820152600060448201526115dc9085907f095ea7b300000000000000000000000000000000000000000000000000000000906064016113d0565b61132b84826118ce565b6001600160a01b038084166000908152600160205260409020541680611643576040517f64d907060000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610598565b60007fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b0387160161167c575082611690565b6116906001600160a01b0387168386611510565b6040517f47e7ef24000000000000000000000000000000000000000000000000000000008152306004820152602481018590526000906001600160a01b038416906347e7ef2490849060440160206040518083038185885af11580156116fa573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061171f9190611ecb565b905083811015611765576040517fda86e6e80000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401610598565b6117996001600160a01b0387167f000000000000000000000000000000000000000000000000000000000000000083611510565b6040517ff213159c0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152336024830152604482018390527f0000000000000000000000000000000000000000000000000000000000000000169063f213159c90606401600060405180830381600087803b15801561182257600080fd5b505af1158015611836573d6000803e3d6000fd5b5050505050505050505050565b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b038316016118b9578034146118b5576040517fbc8dad7a00000000000000000000000000000000000000000000000000000000815234600482015260248101829052604401610598565b5050565b6118b56001600160a01b0383163330846114bf565b6000611923826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a5f9092919063ffffffff16565b905080516000148061194457508080602001905181019061194491906120c7565b6114525760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610598565b6000806000846001600160a01b0316846040516119d39190612108565b6000604051808303816000865af19150503d8060008114611a10576040519150601f19603f3d011682016040523d82523d6000602084013e611a15565b606091505b5091509150818015611a3f575080511580611a3f575080806020019051810190611a3f91906120c7565b8015611a5457506001600160a01b0385163b15155b925050505b92915050565b6060611a6e8484600085611a76565b949350505050565b606082471015611aee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610598565b600080866001600160a01b03168587604051611b0a9190612108565b60006040518083038185875af1925050503d8060008114611b47576040519150601f19603f3d011682016040523d82523d6000602084013e611b4c565b606091505b5091509150611b5d87838387611b68565b979650505050505050565b60608315611bd7578251600003611bd0576001600160a01b0385163b611bd05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610598565b5081611a6e565b611a6e8383815115611bec5781518083602001fd5b8060405162461bcd60e51b81526004016105989190612124565b6001600160a01b038116811461127b57600080fd5b600080600080600060808688031215611c3357600080fd5b8535611c3e81611c06565b94506020860135611c4e81611c06565b935060408601359250606086013567ffffffffffffffff80821115611c7257600080fd5b818801915088601f830112611c8657600080fd5b813581811115611c9557600080fd5b896020828501011115611ca757600080fd5b9699959850939650602001949392505050565b600060208284031215611ccc57600080fd5b8135611cd781611c06565b9392505050565b600080600060608486031215611cf357600080fd5b8335611cfe81611c06565b92506020840135611d0e81611c06565b929592945050506040919091013590565b803561ffff81168114611d3157600080fd5b919050565b600080600060608486031215611d4b57600080fd5b611d5484611d1f565b95602085013595506040909401359392505050565b60008060408385031215611d7c57600080fd5b611d8583611d1f565b91506020830135611d9581611c06565b809150509250929050565b60ff8116811461127b57600080fd5b600080600080600080600060e0888a031215611dca57600080fd5b611dd388611d1f565b96506020880135955060408801359450606088013593506080880135611df881611da0565b9699959850939692959460a0840135945060c09093013592915050565b801515811461127b57600080fd5b60008060408385031215611e3657600080fd5b8235611e4181611c06565b91506020830135611d9581611e15565b600060208284031215611e6357600080fd5b611cd782611d1f565b600080600080600080600060e0888a031215611e8757600080fd5b8735611dd381611c06565b600080600060608486031215611ea757600080fd5b8335611d5481611c06565b600060208284031215611ec457600080fd5b5035919050565b600060208284031215611edd57600080fd5b5051919050565b600082611f1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611a5957611a59611f1f565b600060208284031215611f7357600080fd5b8151611cd781611c06565b600060208284031215611f9057600080fd5b8151611cd781611da0565b600181815b80851115611ff457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611fda57611fda611f1f565b80851615611fe757918102915b93841c9390800290611fa0565b509250929050565b60008261200b57506001611a59565b8161201857506000611a59565b816001811461202e576002811461203857612054565b6001915050611a59565b60ff84111561204957612049611f1f565b50506001821b611a59565b5060208310610133831016604e8410600b8410161715612077575081810a611a59565b6120818383611f9b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156120b3576120b3611f1f565b029392505050565b6000611cd78383611ffc565b6000602082840312156120d957600080fd5b8151611cd781611e15565b60005b838110156120ff5781810151838201526020016120e7565b50506000910152565b6000825161211a8184602087016120e4565b9190910192915050565b60208152600082518060208401526121438160408501602087016120e4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220bf2af26fd3d0c2eb62f7e34a9d2dd37049ea447a2cbbb92df9a551e238ed7ac864736f6c63430008160033",
639
+ "devdoc": {
640
+ "kind": "dev",
641
+ "methods": {
642
+ "configureLpToken(address,bool)": {
643
+ "params": {
644
+ "enabled": "Whether the pool should be enabled or not.",
645
+ "lpToken": "The LP token to set the pool for."
646
+ }
647
+ },
648
+ "configureV1Pool(uint16,address)": {
649
+ "params": {
650
+ "v1PoolId": "The V1 pool ID, specified in the V1 Stargate factory/router.",
651
+ "v2LpToken": "The V2 LP token to map to the V1 pool ID, or address(0) to remove the mapping."
652
+ }
653
+ },
654
+ "constructor": {
655
+ "details": "Constructor for initializing the zapper.",
656
+ "params": {
657
+ "_ethVault": "The Stargate V1 ETH vault, which is the underlying token for the V1 ETH LP, can be set to zero if it does not exist. Used for migration.",
658
+ "_routerV1": "The Stargate V1 Router contract. Used for migration.",
659
+ "_staking": "The Stargate V2 StargateStaking contract."
660
+ }
661
+ },
662
+ "depositAndStake(address,uint256,uint256)": {
663
+ "details": "Frontend must use the underlying protocol events to determine the actual amount of the asset received.The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency this rounding is not refunded. Users are still in control of not receiving less than expected by setting the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees via `sweep`.Compliant with StargatePoolNative, but requires input to be properly rounded with the shared to local decimal adjustment, eg. no dust.",
664
+ "params": {
665
+ "assetInAmount": "The amount of the underlying asset (such as USDC) to zap in.",
666
+ "lpToken": "The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is transferred from the transaction sender.",
667
+ "minStakeAmount": "The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as an extra check against rounding slippage and fees."
668
+ }
669
+ },
670
+ "depositAndStakeWithPermit(address,uint256,uint256,uint256,uint8,bytes32,bytes32)": {
671
+ "details": "Frontend must use the underlying protocol events to determine the actual amount of the asset received.The `StargatePool` might round down the input amount slightly due to the local decimal to shared decimal conversion. The frontend must take care of providing properly rounded input amounts as for gas efficiency this rounding is not refunded. Users are still in control of not receiving less than expected by setting the minimum received param. If these tokens ever add up to anything, the `owner` can take them out as fees via `sweep`.This function only works with tokens that support ERC-2612.Not compliant with StargatePoolNative.",
672
+ "params": {
673
+ "assetInAmount": "The amount of the underlying asset (such as USDC) to zap in.",
674
+ "deadline": "The deadline used within the permit data signature (see ERC-2612 for the permit data structure)",
675
+ "lpToken": "The V2 LP token to zap into and stake, the underlying asset (such as USDC) of this LP token is transferred from the transaction sender.",
676
+ "minStakeAmount": "The minimum amount of the LP token to stake into the Stargate V2 Staking contract, as an extra check against rounding slippage and fees.",
677
+ "r": "The r-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)",
678
+ "s": "The s-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)",
679
+ "v": "The v-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)"
680
+ }
681
+ },
682
+ "migrateV1LpToV2Stake(uint16,uint256,uint256)": {
683
+ "details": "Frontend must use the underlying protocol events to determine the actual amount of the asset received.Compliant with StargatePoolNative.",
684
+ "params": {
685
+ "amount": "The amount of the V1 LP token to migrate.",
686
+ "minStakeAmount": "The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract, as an extra check against slippage and fees.",
687
+ "poolId": "The V1 pool ID to migrate from."
688
+ }
689
+ },
690
+ "migrateV1LpToV2StakeWithPermit(uint16,uint256,uint256,uint256,uint8,bytes32,bytes32)": {
691
+ "details": "Frontend must use the underlying protocol events to determine the actual amount of the asset received.Not compliant with StargatePoolNative.",
692
+ "params": {
693
+ "amount": "The amount of the V1 LP token to migrate.",
694
+ "deadline": "The deadline used within the permit data signature (see ERC-2612 for the permit data structure)",
695
+ "minStakeAmount": "The minimum amount of the V2 LP token to stake into the Stargate V2 Staking contract, as an extra check against slippage and fees.",
696
+ "poolId": "The V1 pool ID to migrate from.",
697
+ "r": "The r-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)",
698
+ "s": "The s-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)",
699
+ "v": "The v-component of a valid secp256k1 signature from owner of the message (see ERC-2612 for the permit data structure)"
700
+ }
701
+ },
702
+ "onWithdrawReceived(address,address,uint256,bytes)": {
703
+ "details": "Frontend must use the underlying protocol events to determine the actual amount of the asset received.Compliant with StargatePoolNative.The `data` provided via `withdrawToAndCall` must be `abi.encode(minTokenOut)` with `minAssetOut` an `uint256`.",
704
+ "params": {
705
+ "data": "The data provided by the `from` user to specify the minimum amount of the underlying asset to receive, this is not validated beforehand in any way.",
706
+ "from": "The address that is withdrawing the LP token, validated by `StargateStaking`.",
707
+ "lpToken": "The V2 LP token to redeem, validated by `StargateStaking`.",
708
+ "value": "The amount of LP tokens to redeem, validated by `StargateStaking` and already sent into this contract before the `onWithdrawReceived` call."
709
+ }
710
+ },
711
+ "owner()": {
712
+ "details": "Returns the address of the current owner."
713
+ },
714
+ "renounceOwnership()": {
715
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
716
+ },
717
+ "sweep(address,address,uint256)": {
718
+ "params": {
719
+ "amount": "amount of tokens to sweep.",
720
+ "receiver": "address to receive the tokens.",
721
+ "token": "address of the token to sweep."
722
+ }
723
+ },
724
+ "transferOwnership(address)": {
725
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
726
+ }
727
+ },
728
+ "stateVariables": {
729
+ "ethVault": {
730
+ "details": "The stargate V1 eth vault, used as the underlying V1 ETH LP token."
731
+ },
732
+ "factoryV1": {
733
+ "details": "The Stargate V1 Factory contract, for migrating from V1 LPs to V2 stakes."
734
+ },
735
+ "lpToAsset": {
736
+ "details": "Mapping of V2 LP tokens to their pool's underlying asset (eg. USDC)."
737
+ },
738
+ "lpToPool": {
739
+ "details": "Mapping of V2 LP tokens to their corresponding V2 StargatePool."
740
+ },
741
+ "routerV1": {
742
+ "details": "The Stargate V1 Router contract, for migrating from V1 LPs to V2 stakes."
743
+ },
744
+ "staking": {
745
+ "details": "The Stargate V2 StargateStaking contract, which the V2 LP tokens are staked into."
746
+ },
747
+ "v1PidToConversionRate": {
748
+ "details": "Mapping of V1 pool IDs to their pool's conversion rate, used for ETH migration exclusively."
749
+ },
750
+ "v1PidToV1Lp": {
751
+ "details": "Mapping of V1 pool IDs to their corresponding V1 LP tokens, used for migration."
752
+ },
753
+ "v1PidToV2Lp": {
754
+ "details": "Mapping of V1 pool IDs to their corresponding V2 LP tokens, used for migration."
755
+ }
756
+ },
757
+ "title": "Stargate Zapper - V1",
758
+ "version": 1
759
+ },
760
+ "userdoc": {
761
+ "kind": "user",
762
+ "methods": {
763
+ "configureLpToken(address,bool)": {
764
+ "notice": "Whitelist a V2 stargate LP for zapping, configures storage mappings from the LP to the pool and asset for gas efficiency. Only callable by `owner`."
765
+ },
766
+ "configureV1Pool(uint16,address)": {
767
+ "notice": "Whitelist a V1 pool ID to a V2 LP token for migration, configures a storage mapping for gas efficiency. Must be called after `configureLpToken`. Only callable by `owner`."
768
+ },
769
+ "depositAndStake(address,uint256,uint256)": {
770
+ "notice": "Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Requires approval of the underlying asset of the LP pool."
771
+ },
772
+ "depositAndStakeWithPermit(address,uint256,uint256,uint256,uint8,bytes32,bytes32)": {
773
+ "notice": "Deposits an asset into a stargate pool and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Does not require approval of the underlying asset of the LP pool, instead the permit signature of `msg.sender` needs to be provided for the amount."
774
+ },
775
+ "migrateV1LpToV2Stake(uint16,uint256,uint256)": {
776
+ "notice": "Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Requires approval of the V1 LP token."
777
+ },
778
+ "migrateV1LpToV2StakeWithPermit(uint16,uint256,uint256,uint256,uint8,bytes32,bytes32)": {
779
+ "notice": "Migrates a V1 LP token to V2 and stakes the resulting LP token into the Stargate V2 Staking contract, all in a single transaction. Does not require approval of the V1 LP token, instead the permit signature of `msg.sender` needs to be provided for the amount."
780
+ },
781
+ "onWithdrawReceived(address,address,uint256,bytes)": {
782
+ "notice": "Unstakes and redeems a V2 LP token to the underlying asset (such as USDC) in a single transaction. Called through `StargateStaking.withdrawToAndCall`."
783
+ },
784
+ "sweep(address,address,uint256)": {
785
+ "notice": "Callable by the owner to withdraw any tokens accidentally sent or stuck in this contract."
786
+ }
787
+ },
788
+ "notice": "The Stargate Zapper V1 contract allows users to zap into and out of Stargate V2 LP tokens, as well as migrate from V1 LP tokens to V2 LP tokens.",
789
+ "version": 1
790
+ },
791
+ "storageLayout": {
792
+ "storage": [
793
+ {
794
+ "astId": 3517,
795
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
796
+ "label": "_owner",
797
+ "offset": 0,
798
+ "slot": "0",
799
+ "type": "t_address"
800
+ },
801
+ {
802
+ "astId": 23703,
803
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
804
+ "label": "lpToPool",
805
+ "offset": 0,
806
+ "slot": "1",
807
+ "type": "t_mapping(t_contract(IERC20)4312,t_contract(IStargatePool)14400)"
808
+ },
809
+ {
810
+ "astId": 23710,
811
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
812
+ "label": "lpToAsset",
813
+ "offset": 0,
814
+ "slot": "2",
815
+ "type": "t_mapping(t_contract(IERC20)4312,t_contract(IERC20)4312)"
816
+ },
817
+ {
818
+ "astId": 23716,
819
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
820
+ "label": "v1PidToV2Lp",
821
+ "offset": 0,
822
+ "slot": "3",
823
+ "type": "t_mapping(t_uint16,t_contract(IERC20)4312)"
824
+ },
825
+ {
826
+ "astId": 23722,
827
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
828
+ "label": "v1PidToV1Lp",
829
+ "offset": 0,
830
+ "slot": "4",
831
+ "type": "t_mapping(t_uint16,t_contract(IERC20)4312)"
832
+ },
833
+ {
834
+ "astId": 23727,
835
+ "contract": "src/peripheral/zapper/StargateZapperV1.sol:StargateZapperV1",
836
+ "label": "v1PidToConversionRate",
837
+ "offset": 0,
838
+ "slot": "5",
839
+ "type": "t_mapping(t_uint16,t_uint256)"
840
+ }
841
+ ],
842
+ "types": {
843
+ "t_address": {
844
+ "encoding": "inplace",
845
+ "label": "address",
846
+ "numberOfBytes": "20"
847
+ },
848
+ "t_contract(IERC20)4312": {
849
+ "encoding": "inplace",
850
+ "label": "contract IERC20",
851
+ "numberOfBytes": "20"
852
+ },
853
+ "t_contract(IStargatePool)14400": {
854
+ "encoding": "inplace",
855
+ "label": "contract IStargatePool",
856
+ "numberOfBytes": "20"
857
+ },
858
+ "t_mapping(t_contract(IERC20)4312,t_contract(IERC20)4312)": {
859
+ "encoding": "mapping",
860
+ "key": "t_contract(IERC20)4312",
861
+ "label": "mapping(contract IERC20 => contract IERC20)",
862
+ "numberOfBytes": "32",
863
+ "value": "t_contract(IERC20)4312"
864
+ },
865
+ "t_mapping(t_contract(IERC20)4312,t_contract(IStargatePool)14400)": {
866
+ "encoding": "mapping",
867
+ "key": "t_contract(IERC20)4312",
868
+ "label": "mapping(contract IERC20 => contract IStargatePool)",
869
+ "numberOfBytes": "32",
870
+ "value": "t_contract(IStargatePool)14400"
871
+ },
872
+ "t_mapping(t_uint16,t_contract(IERC20)4312)": {
873
+ "encoding": "mapping",
874
+ "key": "t_uint16",
875
+ "label": "mapping(uint16 => contract IERC20)",
876
+ "numberOfBytes": "32",
877
+ "value": "t_contract(IERC20)4312"
878
+ },
879
+ "t_mapping(t_uint16,t_uint256)": {
880
+ "encoding": "mapping",
881
+ "key": "t_uint16",
882
+ "label": "mapping(uint16 => uint256)",
883
+ "numberOfBytes": "32",
884
+ "value": "t_uint256"
885
+ },
886
+ "t_uint16": {
887
+ "encoding": "inplace",
888
+ "label": "uint16",
889
+ "numberOfBytes": "2"
890
+ },
891
+ "t_uint256": {
892
+ "encoding": "inplace",
893
+ "label": "uint256",
894
+ "numberOfBytes": "32"
895
+ }
896
+ }
897
+ }
898
+ }