timelock-sdk 0.0.161 → 0.0.163

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 (42) hide show
  1. package/dist/abis.cjs +1059 -308
  2. package/dist/abis.cjs.map +1 -1
  3. package/dist/abis.d.cts +2967 -766
  4. package/dist/abis.d.ts +2967 -766
  5. package/dist/abis.js +1051 -303
  6. package/dist/abis.js.map +1 -1
  7. package/dist/{client-BKIKRCjR.d.ts → client-CoeY1yLm.d.cts} +4846 -1212
  8. package/dist/{client-CZoaAxx7.d.cts → client-DqVrd4kQ.d.ts} +4504 -870
  9. package/dist/client.cjs +54 -926
  10. package/dist/client.cjs.map +1 -1
  11. package/dist/client.d.cts +2 -2
  12. package/dist/client.d.ts +2 -2
  13. package/dist/client.js +20 -892
  14. package/dist/client.js.map +1 -1
  15. package/dist/factory-DitVXzjQ.cjs +1715 -0
  16. package/dist/factory-DitVXzjQ.cjs.map +1 -0
  17. package/dist/factory-y-iVl_er.js +1697 -0
  18. package/dist/factory-y-iVl_er.js.map +1 -0
  19. package/dist/{optionUtils-CaKlLWf2.cjs → optionUtils-Cuuw6jXD.cjs} +7 -1049
  20. package/dist/optionUtils-Cuuw6jXD.cjs.map +1 -0
  21. package/dist/optionUtils-OyY8qOu0.js +381 -0
  22. package/dist/optionUtils-OyY8qOu0.js.map +1 -0
  23. package/dist/{uniswapMathLens-Ds8UmCMU.d.ts → optionsMarket-2HZ-p_dl.d.ts} +20 -625
  24. package/dist/{uniswapMathLens-BoQxBJoY.d.cts → optionsMarket-c4hgszY_.d.cts} +20 -625
  25. package/dist/package.cjs +2 -2
  26. package/dist/package.d.cts +3 -3
  27. package/dist/package.d.ts +3 -3
  28. package/dist/package.js +2 -2
  29. package/dist/{optionsMarket-BbXpQnpV.js → statelessStateView-CBkcP7CK.js} +1612 -1316
  30. package/dist/statelessStateView-CBkcP7CK.js.map +1 -0
  31. package/dist/{optionsMarket-DtjLm46g.cjs → statelessStateView-XdTJQxsY.cjs} +1613 -1317
  32. package/dist/statelessStateView-XdTJQxsY.cjs.map +1 -0
  33. package/package.json +1 -1
  34. package/dist/optionUtils-CaKlLWf2.cjs.map +0 -1
  35. package/dist/optionUtils-Ci6C7FPN.js +0 -1417
  36. package/dist/optionUtils-Ci6C7FPN.js.map +0 -1
  37. package/dist/optionsMarket-BbXpQnpV.js.map +0 -1
  38. package/dist/optionsMarket-DtjLm46g.cjs.map +0 -1
  39. package/dist/singleOwnerVault-BJyEs_D_.js +0 -847
  40. package/dist/singleOwnerVault-BJyEs_D_.js.map +0 -1
  41. package/dist/singleOwnerVault-GCpQV7pN.cjs +0 -853
  42. package/dist/singleOwnerVault-GCpQV7pN.cjs.map +0 -1
@@ -1030,6 +1030,25 @@ const lensAbi = [
1030
1030
  }],
1031
1031
  stateMutability: "view"
1032
1032
  },
1033
+ {
1034
+ type: "function",
1035
+ name: "getPricingParams",
1036
+ inputs: [{
1037
+ name: "pricing",
1038
+ type: "address",
1039
+ internalType: "address"
1040
+ }],
1041
+ outputs: [{
1042
+ name: "pricingModel",
1043
+ type: "uint8",
1044
+ internalType: "uint8"
1045
+ }, {
1046
+ name: "data",
1047
+ type: "bytes",
1048
+ internalType: "bytes"
1049
+ }],
1050
+ stateMutability: "view"
1051
+ },
1033
1052
  {
1034
1053
  type: "function",
1035
1054
  name: "getRefTick",
@@ -1305,1234 +1324,1111 @@ const lensAbi = [
1305
1324
  ];
1306
1325
 
1307
1326
  //#endregion
1308
- //#region src/abis/uniswapMathLens.ts
1309
- const uniswapMathLensAbi = [
1327
+ //#region src/abis/optionsMarket.ts
1328
+ const optionsMarketAbi = [
1310
1329
  {
1311
- type: "function",
1312
- name: "batchGetAmount0ForLiquidity",
1330
+ type: "constructor",
1313
1331
  inputs: [
1314
1332
  {
1315
- name: "sqrtRatioAX96",
1316
- type: "uint160[]",
1317
- internalType: "uint160[]"
1333
+ name: "_vault",
1334
+ type: "address",
1335
+ internalType: "contract ITimelockVault"
1318
1336
  },
1319
1337
  {
1320
- name: "sqrtRatioBX96",
1321
- type: "uint160[]",
1322
- internalType: "uint160[]"
1338
+ name: "_optionPricing",
1339
+ type: "address",
1340
+ internalType: "contract IOptionPricing"
1323
1341
  },
1324
1342
  {
1325
- name: "liquidity",
1326
- type: "uint128[]",
1327
- internalType: "uint128[]"
1328
- }
1329
- ],
1330
- outputs: [{
1331
- name: "amounts0",
1332
- type: "uint256[]",
1333
- internalType: "uint256[]"
1334
- }],
1335
- stateMutability: "pure"
1336
- },
1337
- {
1338
- type: "function",
1339
- name: "batchGetAmount0ForLiquidityTicks",
1340
- inputs: [
1343
+ name: "_feeStrategy",
1344
+ type: "address",
1345
+ internalType: "contract IFeeStrategy"
1346
+ },
1341
1347
  {
1342
- name: "tickA",
1343
- type: "int24[]",
1344
- internalType: "int24[]"
1348
+ name: "_guardian",
1349
+ type: "address",
1350
+ internalType: "contract TimelockGuardian"
1345
1351
  },
1346
1352
  {
1347
- name: "tickB",
1348
- type: "int24[]",
1349
- internalType: "int24[]"
1353
+ name: "_optionAssetIsToken0",
1354
+ type: "bool",
1355
+ internalType: "bool"
1350
1356
  },
1351
1357
  {
1352
- name: "liquidity",
1353
- type: "uint128[]",
1354
- internalType: "uint128[]"
1358
+ name: "_owner",
1359
+ type: "address",
1360
+ internalType: "address"
1355
1361
  }
1356
1362
  ],
1357
- outputs: [{
1358
- name: "amounts0",
1359
- type: "uint256[]",
1360
- internalType: "uint256[]"
1361
- }],
1362
- stateMutability: "pure"
1363
+ stateMutability: "nonpayable"
1363
1364
  },
1364
1365
  {
1365
1366
  type: "function",
1366
- name: "batchGetAmount1ForLiquidity",
1367
+ name: "calculatePremium",
1367
1368
  inputs: [
1368
1369
  {
1369
- name: "sqrtRatioAX96",
1370
- type: "uint160[]",
1371
- internalType: "uint160[]"
1370
+ name: "optionType",
1371
+ type: "uint8",
1372
+ internalType: "uint8"
1373
+ },
1374
+ {
1375
+ name: "optionAmount",
1376
+ type: "uint256",
1377
+ internalType: "uint256"
1372
1378
  },
1373
1379
  {
1374
- name: "sqrtRatioBX96",
1375
- type: "uint160[]",
1376
- internalType: "uint160[]"
1380
+ name: "strikeTick",
1381
+ type: "int24",
1382
+ internalType: "int24"
1377
1383
  },
1378
1384
  {
1379
- name: "liquidity",
1380
- type: "uint128[]",
1381
- internalType: "uint128[]"
1385
+ name: "addedDuration",
1386
+ type: "uint32",
1387
+ internalType: "uint32"
1388
+ },
1389
+ {
1390
+ name: "remainingDuration",
1391
+ type: "uint32",
1392
+ internalType: "uint32"
1382
1393
  }
1383
1394
  ],
1384
- outputs: [{
1385
- name: "amounts1",
1386
- type: "uint256[]",
1387
- internalType: "uint256[]"
1388
- }],
1389
- stateMutability: "pure"
1390
- },
1391
- {
1392
- type: "function",
1393
- name: "batchGetAmount1ForLiquidityTicks",
1394
- inputs: [
1395
+ outputs: [
1395
1396
  {
1396
- name: "tickA",
1397
- type: "int24[]",
1398
- internalType: "int24[]"
1397
+ name: "premium",
1398
+ type: "uint256",
1399
+ internalType: "uint256"
1399
1400
  },
1400
1401
  {
1401
- name: "tickB",
1402
- type: "int24[]",
1403
- internalType: "int24[]"
1402
+ name: "protocolFee",
1403
+ type: "uint256",
1404
+ internalType: "uint256"
1404
1405
  },
1405
1406
  {
1406
- name: "liquidity",
1407
- type: "uint128[]",
1408
- internalType: "uint128[]"
1407
+ name: "feeRecipient",
1408
+ type: "address",
1409
+ internalType: "address"
1409
1410
  }
1410
1411
  ],
1411
- outputs: [{
1412
- name: "amounts1",
1413
- type: "uint256[]",
1414
- internalType: "uint256[]"
1412
+ stateMutability: "view"
1413
+ },
1414
+ {
1415
+ type: "function",
1416
+ name: "emergencyWithdraw",
1417
+ inputs: [{
1418
+ name: "tokens",
1419
+ type: "address[]",
1420
+ internalType: "contract IERC20[]"
1415
1421
  }],
1416
- stateMutability: "pure"
1422
+ outputs: [],
1423
+ stateMutability: "nonpayable"
1417
1424
  },
1418
1425
  {
1419
1426
  type: "function",
1420
- name: "batchGetAmountsForLiquidity",
1427
+ name: "exerciseOption",
1421
1428
  inputs: [
1422
1429
  {
1423
- name: "sqrtRatioX96",
1424
- type: "uint160[]",
1425
- internalType: "uint160[]"
1426
- },
1427
- {
1428
- name: "sqrtRatioAX96",
1429
- type: "uint160[]",
1430
- internalType: "uint160[]"
1431
- },
1432
- {
1433
- name: "sqrtRatioBX96",
1434
- type: "uint160[]",
1435
- internalType: "uint160[]"
1430
+ name: "optionId",
1431
+ type: "uint256",
1432
+ internalType: "uint256"
1436
1433
  },
1437
1434
  {
1438
- name: "liquidity",
1435
+ name: "liquidities",
1439
1436
  type: "uint128[]",
1440
1437
  internalType: "uint128[]"
1441
- }
1442
- ],
1443
- outputs: [{
1444
- name: "amounts0",
1445
- type: "uint256[]",
1446
- internalType: "uint256[]"
1447
- }, {
1448
- name: "amounts1",
1449
- type: "uint256[]",
1450
- internalType: "uint256[]"
1451
- }],
1452
- stateMutability: "pure"
1453
- },
1454
- {
1455
- type: "function",
1456
- name: "batchGetAmountsForLiquidityTicks",
1457
- inputs: [
1438
+ },
1458
1439
  {
1459
- name: "tick",
1460
- type: "int24[]",
1461
- internalType: "int24[]"
1440
+ name: "minPayout",
1441
+ type: "uint256",
1442
+ internalType: "uint256"
1462
1443
  },
1463
1444
  {
1464
- name: "tickA",
1465
- type: "int24[]",
1466
- internalType: "int24[]"
1445
+ name: "swapper",
1446
+ type: "address",
1447
+ internalType: "contract ISwapper"
1467
1448
  },
1468
1449
  {
1469
- name: "tickB",
1470
- type: "int24[]",
1471
- internalType: "int24[]"
1450
+ name: "swapperData",
1451
+ type: "bytes",
1452
+ internalType: "bytes"
1472
1453
  },
1473
1454
  {
1474
- name: "liquidity",
1475
- type: "uint128[]",
1476
- internalType: "uint128[]"
1455
+ name: "refTick",
1456
+ type: "int24",
1457
+ internalType: "int24"
1477
1458
  }
1478
1459
  ],
1479
1460
  outputs: [{
1480
- name: "amounts0",
1481
- type: "uint256[]",
1482
- internalType: "uint256[]"
1483
- }, {
1484
- name: "amounts1",
1485
- type: "uint256[]",
1486
- internalType: "uint256[]"
1461
+ name: "payout",
1462
+ type: "uint256",
1463
+ internalType: "uint256"
1487
1464
  }],
1488
- stateMutability: "pure"
1465
+ stateMutability: "nonpayable"
1489
1466
  },
1490
1467
  {
1491
1468
  type: "function",
1492
- name: "batchGetLiquidityForAmount0",
1469
+ name: "extendOption",
1493
1470
  inputs: [
1494
1471
  {
1495
- name: "sqrtRatioAX96",
1496
- type: "uint160[]",
1497
- internalType: "uint160[]"
1472
+ name: "optionId",
1473
+ type: "uint256",
1474
+ internalType: "uint256"
1498
1475
  },
1499
1476
  {
1500
- name: "sqrtRatioBX96",
1501
- type: "uint160[]",
1502
- internalType: "uint160[]"
1477
+ name: "addedDuration",
1478
+ type: "uint32",
1479
+ internalType: "uint32"
1503
1480
  },
1504
1481
  {
1505
- name: "amount0",
1506
- type: "uint256[]",
1507
- internalType: "uint256[]"
1482
+ name: "maxPremium",
1483
+ type: "uint256",
1484
+ internalType: "uint256"
1508
1485
  }
1509
1486
  ],
1510
1487
  outputs: [{
1511
- name: "liquidities",
1512
- type: "uint128[]",
1513
- internalType: "uint128[]"
1488
+ name: "premium",
1489
+ type: "uint256",
1490
+ internalType: "uint256"
1491
+ }, {
1492
+ name: "protocolFee",
1493
+ type: "uint256",
1494
+ internalType: "uint256"
1514
1495
  }],
1515
- stateMutability: "pure"
1496
+ stateMutability: "nonpayable"
1516
1497
  },
1517
1498
  {
1518
1499
  type: "function",
1519
- name: "batchGetLiquidityForAmount0Ticks",
1520
- inputs: [
1521
- {
1522
- name: "tickA",
1523
- type: "int24[]",
1524
- internalType: "int24[]"
1525
- },
1526
- {
1527
- name: "tickB",
1528
- type: "int24[]",
1529
- internalType: "int24[]"
1530
- },
1531
- {
1532
- name: "amount0",
1533
- type: "uint256[]",
1534
- internalType: "uint256[]"
1535
- }
1536
- ],
1500
+ name: "feeStrategy",
1501
+ inputs: [],
1537
1502
  outputs: [{
1538
- name: "liquidities",
1539
- type: "uint128[]",
1540
- internalType: "uint128[]"
1503
+ name: "",
1504
+ type: "address",
1505
+ internalType: "contract IFeeStrategy"
1541
1506
  }],
1542
- stateMutability: "pure"
1507
+ stateMutability: "view"
1543
1508
  },
1544
1509
  {
1545
1510
  type: "function",
1546
- name: "batchGetLiquidityForAmount1",
1547
- inputs: [
1548
- {
1549
- name: "sqrtRatioAX96",
1550
- type: "uint160[]",
1551
- internalType: "uint160[]"
1552
- },
1553
- {
1554
- name: "sqrtRatioBX96",
1555
- type: "uint160[]",
1556
- internalType: "uint160[]"
1557
- },
1558
- {
1559
- name: "amount1",
1560
- type: "uint256[]",
1561
- internalType: "uint256[]"
1562
- }
1563
- ],
1511
+ name: "getOption",
1512
+ inputs: [{
1513
+ name: "optionId",
1514
+ type: "uint256",
1515
+ internalType: "uint256"
1516
+ }],
1564
1517
  outputs: [{
1565
- name: "liquidities",
1518
+ name: "",
1519
+ type: "tuple",
1520
+ internalType: "struct TimelockOptionsMarket.OptionData",
1521
+ components: [
1522
+ {
1523
+ name: "owner",
1524
+ type: "address",
1525
+ internalType: "address"
1526
+ },
1527
+ {
1528
+ name: "optionType",
1529
+ type: "uint8",
1530
+ internalType: "uint8"
1531
+ },
1532
+ {
1533
+ name: "strikeTick",
1534
+ type: "int24",
1535
+ internalType: "int24"
1536
+ },
1537
+ {
1538
+ name: "expiresAt",
1539
+ type: "uint32",
1540
+ internalType: "uint32"
1541
+ }
1542
+ ]
1543
+ }, {
1544
+ name: "",
1566
1545
  type: "uint128[]",
1567
1546
  internalType: "uint128[]"
1568
1547
  }],
1569
- stateMutability: "pure"
1548
+ stateMutability: "view"
1570
1549
  },
1571
1550
  {
1572
1551
  type: "function",
1573
- name: "batchGetLiquidityForAmount1Ticks",
1552
+ name: "getPositionSize",
1574
1553
  inputs: [
1575
1554
  {
1576
- name: "tickA",
1577
- type: "int24[]",
1578
- internalType: "int24[]"
1555
+ name: "optionType",
1556
+ type: "uint8",
1557
+ internalType: "uint8"
1579
1558
  },
1580
1559
  {
1581
- name: "tickB",
1582
- type: "int24[]",
1583
- internalType: "int24[]"
1560
+ name: "strikeTick",
1561
+ type: "int24",
1562
+ internalType: "int24"
1584
1563
  },
1585
1564
  {
1586
- name: "amount1",
1587
- type: "uint256[]",
1588
- internalType: "uint256[]"
1565
+ name: "liquidities",
1566
+ type: "uint128[]",
1567
+ internalType: "uint128[]"
1589
1568
  }
1590
1569
  ],
1591
1570
  outputs: [{
1592
- name: "liquidities",
1593
- type: "uint128[]",
1594
- internalType: "uint128[]"
1571
+ name: "",
1572
+ type: "uint256",
1573
+ internalType: "uint256"
1574
+ }],
1575
+ stateMutability: "view"
1576
+ },
1577
+ {
1578
+ type: "function",
1579
+ name: "guardian",
1580
+ inputs: [],
1581
+ outputs: [{
1582
+ name: "",
1583
+ type: "address",
1584
+ internalType: "contract TimelockGuardian"
1595
1585
  }],
1596
- stateMutability: "pure"
1586
+ stateMutability: "view"
1597
1587
  },
1598
1588
  {
1599
1589
  type: "function",
1600
- name: "batchGetLiquidityForAmounts",
1590
+ name: "mintOption",
1601
1591
  inputs: [
1602
1592
  {
1603
- name: "sqrtRatioX96",
1604
- type: "uint160[]",
1605
- internalType: "uint160[]"
1593
+ name: "owner",
1594
+ type: "address",
1595
+ internalType: "address"
1606
1596
  },
1607
1597
  {
1608
- name: "sqrtRatioAX96",
1609
- type: "uint160[]",
1610
- internalType: "uint160[]"
1598
+ name: "optionType",
1599
+ type: "uint8",
1600
+ internalType: "uint8"
1611
1601
  },
1612
1602
  {
1613
- name: "sqrtRatioBX96",
1614
- type: "uint160[]",
1615
- internalType: "uint160[]"
1603
+ name: "amount",
1604
+ type: "uint256",
1605
+ internalType: "uint256"
1616
1606
  },
1617
1607
  {
1618
- name: "amount0",
1619
- type: "uint256[]",
1620
- internalType: "uint256[]"
1608
+ name: "strikeTick",
1609
+ type: "int24",
1610
+ internalType: "int24"
1621
1611
  },
1622
1612
  {
1623
- name: "amount1",
1624
- type: "uint256[]",
1625
- internalType: "uint256[]"
1626
- }
1627
- ],
1628
- outputs: [{
1629
- name: "liquidities",
1630
- type: "uint128[]",
1631
- internalType: "uint128[]"
1632
- }],
1633
- stateMutability: "pure"
1634
- },
1635
- {
1636
- type: "function",
1637
- name: "batchGetLiquidityForAmountsTicks",
1638
- inputs: [
1613
+ name: "duration",
1614
+ type: "uint32",
1615
+ internalType: "uint32"
1616
+ },
1639
1617
  {
1640
- name: "tick",
1641
- type: "int24[]",
1642
- internalType: "int24[]"
1618
+ name: "maxPremium",
1619
+ type: "uint256",
1620
+ internalType: "uint256"
1643
1621
  },
1644
1622
  {
1645
- name: "tickA",
1646
- type: "int24[]",
1647
- internalType: "int24[]"
1623
+ name: "maxSteps",
1624
+ type: "uint24",
1625
+ internalType: "uint24"
1626
+ },
1627
+ {
1628
+ name: "refTick",
1629
+ type: "int24",
1630
+ internalType: "int24"
1631
+ }
1632
+ ],
1633
+ outputs: [
1634
+ {
1635
+ name: "optionId",
1636
+ type: "uint256",
1637
+ internalType: "uint256"
1648
1638
  },
1649
1639
  {
1650
- name: "tickB",
1651
- type: "int24[]",
1652
- internalType: "int24[]"
1640
+ name: "finalAmount",
1641
+ type: "uint256",
1642
+ internalType: "uint256"
1653
1643
  },
1654
1644
  {
1655
- name: "amount0",
1656
- type: "uint256[]",
1657
- internalType: "uint256[]"
1645
+ name: "premium",
1646
+ type: "uint256",
1647
+ internalType: "uint256"
1658
1648
  },
1659
1649
  {
1660
- name: "amount1",
1661
- type: "uint256[]",
1662
- internalType: "uint256[]"
1650
+ name: "protocolFee",
1651
+ type: "uint256",
1652
+ internalType: "uint256"
1663
1653
  }
1664
1654
  ],
1665
- outputs: [{
1666
- name: "liquidities",
1667
- type: "uint128[]",
1668
- internalType: "uint128[]"
1669
- }],
1670
- stateMutability: "pure"
1655
+ stateMutability: "nonpayable"
1671
1656
  },
1672
1657
  {
1673
1658
  type: "function",
1674
- name: "batchGetPriceAtTick",
1659
+ name: "multicall",
1675
1660
  inputs: [{
1676
- name: "ticks",
1677
- type: "int24[]",
1678
- internalType: "int24[]"
1661
+ name: "data",
1662
+ type: "bytes[]",
1663
+ internalType: "bytes[]"
1679
1664
  }],
1680
1665
  outputs: [{
1681
- name: "prices",
1682
- type: "uint256[]",
1683
- internalType: "uint256[]"
1666
+ name: "results",
1667
+ type: "bytes[]",
1668
+ internalType: "bytes[]"
1684
1669
  }],
1685
- stateMutability: "pure"
1670
+ stateMutability: "nonpayable"
1686
1671
  },
1687
1672
  {
1688
1673
  type: "function",
1689
- name: "getAmount0ForLiquidity",
1690
- inputs: [
1691
- {
1692
- name: "sqrtRatioAX96",
1693
- type: "uint160",
1694
- internalType: "uint160"
1695
- },
1696
- {
1697
- name: "sqrtRatioBX96",
1698
- type: "uint160",
1699
- internalType: "uint160"
1700
- },
1701
- {
1702
- name: "liquidity",
1703
- type: "uint128",
1704
- internalType: "uint128"
1705
- }
1706
- ],
1674
+ name: "nextOptionId",
1675
+ inputs: [],
1707
1676
  outputs: [{
1708
- name: "amount0",
1677
+ name: "",
1709
1678
  type: "uint256",
1710
1679
  internalType: "uint256"
1711
1680
  }],
1712
- stateMutability: "pure"
1681
+ stateMutability: "view"
1713
1682
  },
1714
1683
  {
1715
1684
  type: "function",
1716
- name: "getAmount0ForLiquidityTicks",
1717
- inputs: [
1685
+ name: "operatorPerms",
1686
+ inputs: [{
1687
+ name: "",
1688
+ type: "address",
1689
+ internalType: "address"
1690
+ }, {
1691
+ name: "",
1692
+ type: "address",
1693
+ internalType: "address"
1694
+ }],
1695
+ outputs: [
1718
1696
  {
1719
- name: "tickA",
1720
- type: "int24",
1721
- internalType: "int24"
1697
+ name: "canExtend",
1698
+ type: "bool",
1699
+ internalType: "bool"
1722
1700
  },
1723
1701
  {
1724
- name: "tickB",
1725
- type: "int24",
1726
- internalType: "int24"
1702
+ name: "canExercise",
1703
+ type: "bool",
1704
+ internalType: "bool"
1727
1705
  },
1728
1706
  {
1729
- name: "liquidity",
1730
- type: "uint128",
1731
- internalType: "uint128"
1732
- }
1733
- ],
1734
- outputs: [{
1735
- name: "amount0",
1736
- type: "uint256",
1737
- internalType: "uint256"
1738
- }],
1739
- stateMutability: "pure"
1740
- },
1741
- {
1742
- type: "function",
1743
- name: "getAmount1ForLiquidity",
1744
- inputs: [
1745
- {
1746
- name: "sqrtRatioAX96",
1747
- type: "uint160",
1748
- internalType: "uint160"
1707
+ name: "canTransfer",
1708
+ type: "bool",
1709
+ internalType: "bool"
1749
1710
  },
1750
1711
  {
1751
- name: "sqrtRatioBX96",
1752
- type: "uint160",
1753
- internalType: "uint160"
1712
+ name: "canMint",
1713
+ type: "bool",
1714
+ internalType: "bool"
1754
1715
  },
1755
1716
  {
1756
- name: "liquidity",
1757
- type: "uint128",
1758
- internalType: "uint128"
1717
+ name: "spendingApproval",
1718
+ type: "uint256",
1719
+ internalType: "uint256"
1759
1720
  }
1760
1721
  ],
1722
+ stateMutability: "view"
1723
+ },
1724
+ {
1725
+ type: "function",
1726
+ name: "optionAsset",
1727
+ inputs: [],
1761
1728
  outputs: [{
1762
- name: "amount1",
1763
- type: "uint256",
1764
- internalType: "uint256"
1729
+ name: "",
1730
+ type: "address",
1731
+ internalType: "contract IERC20"
1765
1732
  }],
1766
- stateMutability: "pure"
1733
+ stateMutability: "view"
1767
1734
  },
1768
1735
  {
1769
1736
  type: "function",
1770
- name: "getAmount1ForLiquidityTicks",
1771
- inputs: [
1772
- {
1773
- name: "tickA",
1774
- type: "int24",
1775
- internalType: "int24"
1776
- },
1777
- {
1778
- name: "tickB",
1779
- type: "int24",
1780
- internalType: "int24"
1781
- },
1782
- {
1783
- name: "liquidity",
1784
- type: "uint128",
1785
- internalType: "uint128"
1786
- }
1787
- ],
1737
+ name: "optionAssetIsToken0",
1738
+ inputs: [],
1788
1739
  outputs: [{
1789
- name: "amount1",
1790
- type: "uint256",
1791
- internalType: "uint256"
1740
+ name: "",
1741
+ type: "bool",
1742
+ internalType: "bool"
1792
1743
  }],
1793
- stateMutability: "pure"
1744
+ stateMutability: "view"
1794
1745
  },
1795
1746
  {
1796
1747
  type: "function",
1797
- name: "getAmountsForLiquidity",
1798
- inputs: [
1799
- {
1800
- name: "sqrtRatioX96",
1801
- type: "uint160",
1802
- internalType: "uint160"
1803
- },
1804
- {
1805
- name: "sqrtRatioAX96",
1806
- type: "uint160",
1807
- internalType: "uint160"
1808
- },
1809
- {
1810
- name: "sqrtRatioBX96",
1811
- type: "uint160",
1812
- internalType: "uint160"
1813
- },
1814
- {
1815
- name: "liquidity",
1816
- type: "uint128",
1817
- internalType: "uint128"
1818
- }
1819
- ],
1748
+ name: "optionPricing",
1749
+ inputs: [],
1820
1750
  outputs: [{
1821
- name: "amount0",
1822
- type: "uint256",
1823
- internalType: "uint256"
1824
- }, {
1825
- name: "amount1",
1826
- type: "uint256",
1827
- internalType: "uint256"
1751
+ name: "",
1752
+ type: "address",
1753
+ internalType: "contract IOptionPricing"
1828
1754
  }],
1829
- stateMutability: "pure"
1755
+ stateMutability: "view"
1830
1756
  },
1831
1757
  {
1832
1758
  type: "function",
1833
- name: "getAmountsForLiquidityTicks",
1834
- inputs: [
1835
- {
1836
- name: "tick",
1837
- type: "int24",
1838
- internalType: "int24"
1839
- },
1840
- {
1841
- name: "tickA",
1842
- type: "int24",
1843
- internalType: "int24"
1844
- },
1845
- {
1846
- name: "tickB",
1847
- type: "int24",
1848
- internalType: "int24"
1849
- },
1850
- {
1851
- name: "liquidity",
1852
- type: "uint128",
1853
- internalType: "uint128"
1854
- }
1855
- ],
1759
+ name: "owner",
1760
+ inputs: [],
1856
1761
  outputs: [{
1857
- name: "amount0",
1858
- type: "uint256",
1859
- internalType: "uint256"
1860
- }, {
1861
- name: "amount1",
1862
- type: "uint256",
1863
- internalType: "uint256"
1762
+ name: "",
1763
+ type: "address",
1764
+ internalType: "address"
1864
1765
  }],
1865
- stateMutability: "pure"
1766
+ stateMutability: "view"
1866
1767
  },
1867
1768
  {
1868
1769
  type: "function",
1869
- name: "getLiquidityForAmount0",
1870
- inputs: [
1871
- {
1872
- name: "sqrtRatioAX96",
1873
- type: "uint160",
1874
- internalType: "uint160"
1875
- },
1876
- {
1877
- name: "sqrtRatioBX96",
1878
- type: "uint160",
1879
- internalType: "uint160"
1880
- },
1881
- {
1882
- name: "amount0",
1883
- type: "uint256",
1884
- internalType: "uint256"
1885
- }
1886
- ],
1770
+ name: "payoutAsset",
1771
+ inputs: [],
1887
1772
  outputs: [{
1888
- name: "liquidity",
1889
- type: "uint128",
1890
- internalType: "uint128"
1773
+ name: "",
1774
+ type: "address",
1775
+ internalType: "contract IERC20"
1891
1776
  }],
1892
- stateMutability: "pure"
1777
+ stateMutability: "view"
1893
1778
  },
1894
1779
  {
1895
1780
  type: "function",
1896
- name: "getLiquidityForAmount0Ticks",
1897
- inputs: [
1898
- {
1899
- name: "tickA",
1900
- type: "int24",
1901
- internalType: "int24"
1902
- },
1903
- {
1904
- name: "tickB",
1905
- type: "int24",
1906
- internalType: "int24"
1907
- },
1908
- {
1909
- name: "amount0",
1910
- type: "uint256",
1911
- internalType: "uint256"
1912
- }
1913
- ],
1781
+ name: "poolId",
1782
+ inputs: [],
1914
1783
  outputs: [{
1915
- name: "liquidity",
1916
- type: "uint128",
1917
- internalType: "uint128"
1784
+ name: "",
1785
+ type: "bytes32",
1786
+ internalType: "PoolId"
1918
1787
  }],
1919
- stateMutability: "pure"
1788
+ stateMutability: "view"
1920
1789
  },
1921
1790
  {
1922
1791
  type: "function",
1923
- name: "getLiquidityForAmount1",
1924
- inputs: [
1925
- {
1926
- name: "sqrtRatioAX96",
1927
- type: "uint160",
1928
- internalType: "uint160"
1929
- },
1930
- {
1931
- name: "sqrtRatioBX96",
1932
- type: "uint160",
1933
- internalType: "uint160"
1934
- },
1935
- {
1936
- name: "amount1",
1937
- type: "uint256",
1938
- internalType: "uint256"
1939
- }
1940
- ],
1792
+ name: "poolKey",
1793
+ inputs: [],
1941
1794
  outputs: [{
1942
- name: "liquidity",
1943
- type: "uint128",
1944
- internalType: "uint128"
1795
+ name: "",
1796
+ type: "tuple",
1797
+ internalType: "struct PoolKey",
1798
+ components: [
1799
+ {
1800
+ name: "currency0",
1801
+ type: "address",
1802
+ internalType: "Currency"
1803
+ },
1804
+ {
1805
+ name: "currency1",
1806
+ type: "address",
1807
+ internalType: "Currency"
1808
+ },
1809
+ {
1810
+ name: "fee",
1811
+ type: "uint24",
1812
+ internalType: "uint24"
1813
+ },
1814
+ {
1815
+ name: "tickSpacing",
1816
+ type: "int24",
1817
+ internalType: "int24"
1818
+ },
1819
+ {
1820
+ name: "hooks",
1821
+ type: "address",
1822
+ internalType: "contract IHooks"
1823
+ }
1824
+ ]
1945
1825
  }],
1946
- stateMutability: "pure"
1826
+ stateMutability: "view"
1947
1827
  },
1948
1828
  {
1949
1829
  type: "function",
1950
- name: "getLiquidityForAmount1Ticks",
1951
- inputs: [
1952
- {
1953
- name: "tickA",
1954
- type: "int24",
1955
- internalType: "int24"
1956
- },
1957
- {
1958
- name: "tickB",
1959
- type: "int24",
1960
- internalType: "int24"
1961
- },
1962
- {
1963
- name: "amount1",
1964
- type: "uint256",
1965
- internalType: "uint256"
1966
- }
1967
- ],
1830
+ name: "poolManager",
1831
+ inputs: [],
1968
1832
  outputs: [{
1969
- name: "liquidity",
1970
- type: "uint128",
1971
- internalType: "uint128"
1833
+ name: "",
1834
+ type: "address",
1835
+ internalType: "contract IPoolManager"
1972
1836
  }],
1973
- stateMutability: "pure"
1837
+ stateMutability: "view"
1974
1838
  },
1975
1839
  {
1976
1840
  type: "function",
1977
- name: "getLiquidityForAmounts",
1978
- inputs: [
1979
- {
1980
- name: "sqrtRatioX96",
1981
- type: "uint160",
1982
- internalType: "uint160"
1983
- },
1984
- {
1985
- name: "sqrtRatioAX96",
1986
- type: "uint160",
1987
- internalType: "uint160"
1988
- },
1989
- {
1990
- name: "sqrtRatioBX96",
1991
- type: "uint160",
1992
- internalType: "uint160"
1993
- },
1994
- {
1995
- name: "amount0",
1996
- type: "uint256",
1997
- internalType: "uint256"
1998
- },
1999
- {
2000
- name: "amount1",
2001
- type: "uint256",
2002
- internalType: "uint256"
2003
- }
2004
- ],
2005
- outputs: [{
2006
- name: "liquidity",
2007
- type: "uint128",
2008
- internalType: "uint128"
2009
- }],
2010
- stateMutability: "pure"
1841
+ name: "renounceOwnership",
1842
+ inputs: [],
1843
+ outputs: [],
1844
+ stateMutability: "nonpayable"
2011
1845
  },
2012
1846
  {
2013
1847
  type: "function",
2014
- name: "getLiquidityForAmountsTicks",
1848
+ name: "setOperatorPerms",
2015
1849
  inputs: [
2016
1850
  {
2017
- name: "tick",
2018
- type: "int24",
2019
- internalType: "int24"
1851
+ name: "operator",
1852
+ type: "address",
1853
+ internalType: "address"
2020
1854
  },
2021
1855
  {
2022
- name: "tickA",
2023
- type: "int24",
2024
- internalType: "int24"
1856
+ name: "canExtend",
1857
+ type: "bool",
1858
+ internalType: "bool"
2025
1859
  },
2026
1860
  {
2027
- name: "tickB",
2028
- type: "int24",
2029
- internalType: "int24"
1861
+ name: "canExercise",
1862
+ type: "bool",
1863
+ internalType: "bool"
2030
1864
  },
2031
1865
  {
2032
- name: "amount0",
2033
- type: "uint256",
2034
- internalType: "uint256"
1866
+ name: "canTransfer",
1867
+ type: "bool",
1868
+ internalType: "bool"
1869
+ },
1870
+ {
1871
+ name: "canMint",
1872
+ type: "bool",
1873
+ internalType: "bool"
2035
1874
  },
2036
1875
  {
2037
- name: "amount1",
1876
+ name: "spendingApproval",
2038
1877
  type: "uint256",
2039
1878
  internalType: "uint256"
2040
1879
  }
2041
1880
  ],
2042
- outputs: [{
2043
- name: "liquidity",
2044
- type: "uint128",
2045
- internalType: "uint128"
2046
- }],
2047
- stateMutability: "pure"
1881
+ outputs: [],
1882
+ stateMutability: "nonpayable"
2048
1883
  },
2049
1884
  {
2050
1885
  type: "function",
2051
- name: "getPriceAtTick",
2052
- inputs: [{
2053
- name: "tick",
1886
+ name: "tickSpacing",
1887
+ inputs: [],
1888
+ outputs: [{
1889
+ name: "",
2054
1890
  type: "int24",
2055
1891
  internalType: "int24"
2056
1892
  }],
1893
+ stateMutability: "view"
1894
+ },
1895
+ {
1896
+ type: "function",
1897
+ name: "token0",
1898
+ inputs: [],
2057
1899
  outputs: [{
2058
1900
  name: "",
2059
- type: "uint256",
2060
- internalType: "uint256"
1901
+ type: "address",
1902
+ internalType: "contract IERC20"
2061
1903
  }],
2062
- stateMutability: "pure"
2063
- }
2064
- ];
2065
-
2066
- //#endregion
2067
- //#region src/abis/optionsMarket.ts
2068
- const optionsMarketAbi = [
1904
+ stateMutability: "view"
1905
+ },
2069
1906
  {
2070
- type: "constructor",
2071
- inputs: [
2072
- {
2073
- name: "_vault",
2074
- type: "address",
2075
- internalType: "contract ITimelockVault"
2076
- },
2077
- {
2078
- name: "_optionPricing",
2079
- type: "address",
2080
- internalType: "contract IOptionPricing"
2081
- },
2082
- {
2083
- name: "_feeStrategy",
2084
- type: "address",
2085
- internalType: "contract IFeeStrategy"
2086
- },
2087
- {
2088
- name: "_guardian",
2089
- type: "address",
2090
- internalType: "contract TimelockGuardian"
2091
- },
2092
- {
2093
- name: "_optionAssetIsToken0",
2094
- type: "bool",
2095
- internalType: "bool"
2096
- },
2097
- {
2098
- name: "_owner",
2099
- type: "address",
2100
- internalType: "address"
2101
- }
2102
- ],
2103
- stateMutability: "nonpayable"
1907
+ type: "function",
1908
+ name: "token1",
1909
+ inputs: [],
1910
+ outputs: [{
1911
+ name: "",
1912
+ type: "address",
1913
+ internalType: "contract IERC20"
1914
+ }],
1915
+ stateMutability: "view"
2104
1916
  },
2105
1917
  {
2106
1918
  type: "function",
2107
- name: "calculatePremium",
2108
- inputs: [
2109
- {
2110
- name: "optionType",
2111
- type: "uint8",
2112
- internalType: "uint8"
2113
- },
1919
+ name: "transferOption",
1920
+ inputs: [{
1921
+ name: "optionId",
1922
+ type: "uint256",
1923
+ internalType: "uint256"
1924
+ }, {
1925
+ name: "to",
1926
+ type: "address",
1927
+ internalType: "address"
1928
+ }],
1929
+ outputs: [],
1930
+ stateMutability: "nonpayable"
1931
+ },
1932
+ {
1933
+ type: "function",
1934
+ name: "transferOwnership",
1935
+ inputs: [{
1936
+ name: "newOwner",
1937
+ type: "address",
1938
+ internalType: "address"
1939
+ }],
1940
+ outputs: [],
1941
+ stateMutability: "nonpayable"
1942
+ },
1943
+ {
1944
+ type: "function",
1945
+ name: "unlockCallback",
1946
+ inputs: [{
1947
+ name: "data",
1948
+ type: "bytes",
1949
+ internalType: "bytes"
1950
+ }],
1951
+ outputs: [{
1952
+ name: "",
1953
+ type: "bytes",
1954
+ internalType: "bytes"
1955
+ }],
1956
+ stateMutability: "nonpayable"
1957
+ },
1958
+ {
1959
+ type: "function",
1960
+ name: "updateAddresses",
1961
+ inputs: [{
1962
+ name: "_optionPricing",
1963
+ type: "address",
1964
+ internalType: "contract IOptionPricing"
1965
+ }, {
1966
+ name: "_feeStrategy",
1967
+ type: "address",
1968
+ internalType: "contract IFeeStrategy"
1969
+ }],
1970
+ outputs: [],
1971
+ stateMutability: "nonpayable"
1972
+ },
1973
+ {
1974
+ type: "function",
1975
+ name: "vault",
1976
+ inputs: [],
1977
+ outputs: [{
1978
+ name: "",
1979
+ type: "address",
1980
+ internalType: "contract ITimelockVault"
1981
+ }],
1982
+ stateMutability: "view"
1983
+ },
1984
+ {
1985
+ type: "function",
1986
+ name: "whitelistSwapper",
1987
+ inputs: [{
1988
+ name: "swapper",
1989
+ type: "address",
1990
+ internalType: "contract ISwapper"
1991
+ }, {
1992
+ name: "whitelisted",
1993
+ type: "bool",
1994
+ internalType: "bool"
1995
+ }],
1996
+ outputs: [],
1997
+ stateMutability: "nonpayable"
1998
+ },
1999
+ {
2000
+ type: "event",
2001
+ name: "EmergencyWithdraw",
2002
+ inputs: [{
2003
+ name: "tokens",
2004
+ type: "address[]",
2005
+ indexed: false,
2006
+ internalType: "contract IERC20[]"
2007
+ }, {
2008
+ name: "balances",
2009
+ type: "uint256[]",
2010
+ indexed: false,
2011
+ internalType: "uint256[]"
2012
+ }],
2013
+ anonymous: false
2014
+ },
2015
+ {
2016
+ type: "event",
2017
+ name: "ExerciseOption",
2018
+ inputs: [
2114
2019
  {
2115
- name: "optionAmount",
2020
+ name: "optionId",
2116
2021
  type: "uint256",
2022
+ indexed: true,
2117
2023
  internalType: "uint256"
2118
2024
  },
2119
2025
  {
2120
- name: "strikeTick",
2121
- type: "int24",
2122
- internalType: "int24"
2026
+ name: "liquidities",
2027
+ type: "uint128[]",
2028
+ indexed: false,
2029
+ internalType: "uint128[]"
2123
2030
  },
2124
2031
  {
2125
- name: "addedDuration",
2126
- type: "uint32",
2127
- internalType: "uint32"
2032
+ name: "currentPrice",
2033
+ type: "uint256",
2034
+ indexed: false,
2035
+ internalType: "uint256"
2128
2036
  },
2129
2037
  {
2130
- name: "remainingDuration",
2131
- type: "uint32",
2132
- internalType: "uint32"
2038
+ name: "payout",
2039
+ type: "uint256",
2040
+ indexed: false,
2041
+ internalType: "uint256"
2133
2042
  }
2134
2043
  ],
2135
- outputs: [
2044
+ anonymous: false
2045
+ },
2046
+ {
2047
+ type: "event",
2048
+ name: "ExtendOption",
2049
+ inputs: [
2050
+ {
2051
+ name: "optionId",
2052
+ type: "uint256",
2053
+ indexed: true,
2054
+ internalType: "uint256"
2055
+ },
2136
2056
  {
2137
2057
  name: "premium",
2138
2058
  type: "uint256",
2059
+ indexed: false,
2139
2060
  internalType: "uint256"
2140
2061
  },
2141
2062
  {
2142
2063
  name: "protocolFee",
2143
2064
  type: "uint256",
2065
+ indexed: false,
2144
2066
  internalType: "uint256"
2145
2067
  },
2146
2068
  {
2147
- name: "feeRecipient",
2148
- type: "address",
2149
- internalType: "address"
2069
+ name: "currentPrice",
2070
+ type: "uint256",
2071
+ indexed: false,
2072
+ internalType: "uint256"
2073
+ },
2074
+ {
2075
+ name: "addedDuration",
2076
+ type: "uint32",
2077
+ indexed: false,
2078
+ internalType: "uint32"
2150
2079
  }
2151
2080
  ],
2152
- stateMutability: "view"
2153
- },
2154
- {
2155
- type: "function",
2156
- name: "emergencyWithdraw",
2157
- inputs: [{
2158
- name: "tokens",
2159
- type: "address[]",
2160
- internalType: "contract IERC20[]"
2161
- }],
2162
- outputs: [],
2163
- stateMutability: "nonpayable"
2081
+ anonymous: false
2164
2082
  },
2165
2083
  {
2166
- type: "function",
2167
- name: "exerciseOption",
2084
+ type: "event",
2085
+ name: "MintOption",
2168
2086
  inputs: [
2169
2087
  {
2170
2088
  name: "optionId",
2171
2089
  type: "uint256",
2090
+ indexed: true,
2172
2091
  internalType: "uint256"
2173
2092
  },
2174
2093
  {
2175
- name: "liquidities",
2176
- type: "uint128[]",
2177
- internalType: "uint128[]"
2178
- },
2179
- {
2180
- name: "minPayout",
2181
- type: "uint256",
2182
- internalType: "uint256"
2183
- },
2184
- {
2185
- name: "swapper",
2094
+ name: "owner",
2186
2095
  type: "address",
2187
- internalType: "contract ISwapper"
2096
+ indexed: true,
2097
+ internalType: "address"
2188
2098
  },
2189
2099
  {
2190
- name: "swapperData",
2191
- type: "bytes",
2192
- internalType: "bytes"
2100
+ name: "optionType",
2101
+ type: "uint8",
2102
+ indexed: false,
2103
+ internalType: "uint8"
2193
2104
  },
2194
2105
  {
2195
- name: "refTick",
2106
+ name: "strikeTick",
2196
2107
  type: "int24",
2108
+ indexed: false,
2197
2109
  internalType: "int24"
2198
- }
2199
- ],
2200
- outputs: [{
2201
- name: "payout",
2202
- type: "uint256",
2203
- internalType: "uint256"
2204
- }],
2205
- stateMutability: "nonpayable"
2206
- },
2207
- {
2208
- type: "function",
2209
- name: "extendOption",
2210
- inputs: [
2110
+ },
2211
2111
  {
2212
- name: "optionId",
2112
+ name: "currentPrice",
2213
2113
  type: "uint256",
2114
+ indexed: false,
2214
2115
  internalType: "uint256"
2215
2116
  },
2216
2117
  {
2217
- name: "addedDuration",
2118
+ name: "expiresAt",
2218
2119
  type: "uint32",
2120
+ indexed: false,
2219
2121
  internalType: "uint32"
2220
2122
  },
2221
2123
  {
2222
- name: "maxPremium",
2124
+ name: "premium",
2125
+ type: "uint256",
2126
+ indexed: false,
2127
+ internalType: "uint256"
2128
+ },
2129
+ {
2130
+ name: "protocolFee",
2223
2131
  type: "uint256",
2132
+ indexed: false,
2224
2133
  internalType: "uint256"
2134
+ },
2135
+ {
2136
+ name: "liquidities",
2137
+ type: "uint128[]",
2138
+ indexed: false,
2139
+ internalType: "uint128[]"
2225
2140
  }
2226
2141
  ],
2227
- outputs: [{
2228
- name: "premium",
2229
- type: "uint256",
2230
- internalType: "uint256"
2142
+ anonymous: false
2143
+ },
2144
+ {
2145
+ type: "event",
2146
+ name: "OwnershipTransferred",
2147
+ inputs: [{
2148
+ name: "previousOwner",
2149
+ type: "address",
2150
+ indexed: true,
2151
+ internalType: "address"
2231
2152
  }, {
2232
- name: "protocolFee",
2233
- type: "uint256",
2234
- internalType: "uint256"
2153
+ name: "newOwner",
2154
+ type: "address",
2155
+ indexed: true,
2156
+ internalType: "address"
2235
2157
  }],
2236
- stateMutability: "nonpayable"
2158
+ anonymous: false
2237
2159
  },
2238
2160
  {
2239
- type: "function",
2240
- name: "feeStrategy",
2241
- inputs: [],
2242
- outputs: [{
2243
- name: "",
2244
- type: "address",
2245
- internalType: "contract IFeeStrategy"
2246
- }],
2247
- stateMutability: "view"
2248
- },
2249
- {
2250
- type: "function",
2251
- name: "getOption",
2161
+ type: "event",
2162
+ name: "TransferOption",
2252
2163
  inputs: [{
2253
2164
  name: "optionId",
2254
2165
  type: "uint256",
2166
+ indexed: true,
2255
2167
  internalType: "uint256"
2256
- }],
2257
- outputs: [{
2258
- name: "",
2259
- type: "tuple",
2260
- internalType: "struct TimelockOptionsMarket.OptionData",
2261
- components: [
2262
- {
2263
- name: "owner",
2264
- type: "address",
2265
- internalType: "address"
2266
- },
2267
- {
2268
- name: "optionType",
2269
- type: "uint8",
2270
- internalType: "uint8"
2271
- },
2272
- {
2273
- name: "strikeTick",
2274
- type: "int24",
2275
- internalType: "int24"
2276
- },
2277
- {
2278
- name: "expiresAt",
2279
- type: "uint32",
2280
- internalType: "uint32"
2281
- }
2282
- ]
2283
2168
  }, {
2284
- name: "",
2285
- type: "uint128[]",
2286
- internalType: "uint128[]"
2287
- }],
2288
- stateMutability: "view"
2289
- },
2290
- {
2291
- type: "function",
2292
- name: "getPositionSize",
2293
- inputs: [
2294
- {
2295
- name: "optionType",
2296
- type: "uint8",
2297
- internalType: "uint8"
2298
- },
2299
- {
2300
- name: "strikeTick",
2301
- type: "int24",
2302
- internalType: "int24"
2303
- },
2304
- {
2305
- name: "liquidities",
2306
- type: "uint128[]",
2307
- internalType: "uint128[]"
2308
- }
2309
- ],
2310
- outputs: [{
2311
- name: "",
2312
- type: "uint256",
2313
- internalType: "uint256"
2169
+ name: "to",
2170
+ type: "address",
2171
+ indexed: true,
2172
+ internalType: "address"
2314
2173
  }],
2315
- stateMutability: "view"
2174
+ anonymous: false
2316
2175
  },
2317
2176
  {
2318
- type: "function",
2319
- name: "guardian",
2320
- inputs: [],
2321
- outputs: [{
2322
- name: "",
2177
+ type: "event",
2178
+ name: "UpdateAddresses",
2179
+ inputs: [{
2180
+ name: "optionPricing",
2323
2181
  type: "address",
2324
- internalType: "contract TimelockGuardian"
2182
+ indexed: false,
2183
+ internalType: "contract IOptionPricing"
2184
+ }, {
2185
+ name: "feeStrategy",
2186
+ type: "address",
2187
+ indexed: false,
2188
+ internalType: "contract IFeeStrategy"
2325
2189
  }],
2326
- stateMutability: "view"
2190
+ anonymous: false
2327
2191
  },
2328
2192
  {
2329
- type: "function",
2330
- name: "mintOption",
2193
+ type: "event",
2194
+ name: "UpdateOperatorPerms",
2331
2195
  inputs: [
2332
2196
  {
2333
2197
  name: "owner",
2334
2198
  type: "address",
2199
+ indexed: true,
2335
2200
  internalType: "address"
2336
2201
  },
2337
2202
  {
2338
- name: "optionType",
2339
- type: "uint8",
2340
- internalType: "uint8"
2341
- },
2342
- {
2343
- name: "amount",
2344
- type: "uint256",
2345
- internalType: "uint256"
2346
- },
2347
- {
2348
- name: "strikeTick",
2349
- type: "int24",
2350
- internalType: "int24"
2351
- },
2352
- {
2353
- name: "duration",
2354
- type: "uint32",
2355
- internalType: "uint32"
2356
- },
2357
- {
2358
- name: "maxPremium",
2359
- type: "uint256",
2360
- internalType: "uint256"
2361
- },
2362
- {
2363
- name: "maxSteps",
2364
- type: "uint24",
2365
- internalType: "uint24"
2366
- },
2367
- {
2368
- name: "refTick",
2369
- type: "int24",
2370
- internalType: "int24"
2371
- }
2372
- ],
2373
- outputs: [
2374
- {
2375
- name: "optionId",
2376
- type: "uint256",
2377
- internalType: "uint256"
2378
- },
2379
- {
2380
- name: "finalAmount",
2381
- type: "uint256",
2382
- internalType: "uint256"
2383
- },
2384
- {
2385
- name: "premium",
2386
- type: "uint256",
2387
- internalType: "uint256"
2203
+ name: "operator",
2204
+ type: "address",
2205
+ indexed: true,
2206
+ internalType: "address"
2388
2207
  },
2389
- {
2390
- name: "protocolFee",
2391
- type: "uint256",
2392
- internalType: "uint256"
2393
- }
2394
- ],
2395
- stateMutability: "nonpayable"
2396
- },
2397
- {
2398
- type: "function",
2399
- name: "multicall",
2400
- inputs: [{
2401
- name: "data",
2402
- type: "bytes[]",
2403
- internalType: "bytes[]"
2404
- }],
2405
- outputs: [{
2406
- name: "results",
2407
- type: "bytes[]",
2408
- internalType: "bytes[]"
2409
- }],
2410
- stateMutability: "nonpayable"
2411
- },
2412
- {
2413
- type: "function",
2414
- name: "nextOptionId",
2415
- inputs: [],
2416
- outputs: [{
2417
- name: "",
2418
- type: "uint256",
2419
- internalType: "uint256"
2420
- }],
2421
- stateMutability: "view"
2422
- },
2423
- {
2424
- type: "function",
2425
- name: "operatorPerms",
2426
- inputs: [{
2427
- name: "",
2428
- type: "address",
2429
- internalType: "address"
2430
- }, {
2431
- name: "",
2432
- type: "address",
2433
- internalType: "address"
2434
- }],
2435
- outputs: [
2436
2208
  {
2437
2209
  name: "canExtend",
2438
2210
  type: "bool",
2211
+ indexed: false,
2439
2212
  internalType: "bool"
2440
2213
  },
2441
2214
  {
2442
2215
  name: "canExercise",
2443
2216
  type: "bool",
2217
+ indexed: false,
2444
2218
  internalType: "bool"
2445
2219
  },
2446
2220
  {
2447
2221
  name: "canTransfer",
2448
2222
  type: "bool",
2223
+ indexed: false,
2449
2224
  internalType: "bool"
2450
2225
  },
2451
2226
  {
2452
2227
  name: "canMint",
2453
2228
  type: "bool",
2229
+ indexed: false,
2454
2230
  internalType: "bool"
2455
2231
  },
2456
2232
  {
2457
2233
  name: "spendingApproval",
2458
2234
  type: "uint256",
2235
+ indexed: false,
2459
2236
  internalType: "uint256"
2460
2237
  }
2461
2238
  ],
2462
- stateMutability: "view"
2239
+ anonymous: false
2463
2240
  },
2464
2241
  {
2465
- type: "function",
2466
- name: "optionAsset",
2467
- inputs: [],
2468
- outputs: [{
2469
- name: "",
2242
+ type: "event",
2243
+ name: "WhitelistSwapper",
2244
+ inputs: [{
2245
+ name: "swapper",
2470
2246
  type: "address",
2471
- internalType: "contract IERC20"
2472
- }],
2473
- stateMutability: "view"
2474
- },
2475
- {
2476
- type: "function",
2477
- name: "optionAssetIsToken0",
2478
- inputs: [],
2479
- outputs: [{
2480
- name: "",
2247
+ indexed: true,
2248
+ internalType: "contract ISwapper"
2249
+ }, {
2250
+ name: "whitelisted",
2481
2251
  type: "bool",
2252
+ indexed: false,
2482
2253
  internalType: "bool"
2483
2254
  }],
2484
- stateMutability: "view"
2255
+ anonymous: false
2485
2256
  },
2486
2257
  {
2487
- type: "function",
2488
- name: "optionPricing",
2489
- inputs: [],
2490
- outputs: [{
2491
- name: "",
2258
+ type: "error",
2259
+ name: "AddressEmptyCode",
2260
+ inputs: [{
2261
+ name: "target",
2492
2262
  type: "address",
2493
- internalType: "contract IOptionPricing"
2494
- }],
2495
- stateMutability: "view"
2263
+ internalType: "address"
2264
+ }]
2496
2265
  },
2497
2266
  {
2498
- type: "function",
2499
- name: "owner",
2500
- inputs: [],
2501
- outputs: [{
2502
- name: "",
2503
- type: "address",
2267
+ type: "error",
2268
+ name: "FailedCall",
2269
+ inputs: []
2270
+ },
2271
+ {
2272
+ type: "error",
2273
+ name: "InsufficientLiquidity",
2274
+ inputs: [{
2275
+ name: "remainingAmount",
2276
+ type: "uint256",
2277
+ internalType: "uint256"
2278
+ }]
2279
+ },
2280
+ {
2281
+ type: "error",
2282
+ name: "InvalidAmount",
2283
+ inputs: []
2284
+ },
2285
+ {
2286
+ type: "error",
2287
+ name: "InvalidArrayLength",
2288
+ inputs: []
2289
+ },
2290
+ {
2291
+ type: "error",
2292
+ name: "InvalidDuration",
2293
+ inputs: []
2294
+ },
2295
+ {
2296
+ type: "error",
2297
+ name: "InvalidOptionType",
2298
+ inputs: []
2299
+ },
2300
+ {
2301
+ type: "error",
2302
+ name: "MInvalidTickRange",
2303
+ inputs: [{
2304
+ name: "tickLower",
2305
+ type: "int24",
2306
+ internalType: "int24"
2307
+ }, {
2308
+ name: "tickUpper",
2309
+ type: "int24",
2310
+ internalType: "int24"
2311
+ }]
2312
+ },
2313
+ {
2314
+ type: "error",
2315
+ name: "NotAuthorized",
2316
+ inputs: []
2317
+ },
2318
+ {
2319
+ type: "error",
2320
+ name: "NotEnoughLiquidity",
2321
+ inputs: []
2322
+ },
2323
+ {
2324
+ type: "error",
2325
+ name: "NotEnoughPayout",
2326
+ inputs: []
2327
+ },
2328
+ {
2329
+ type: "error",
2330
+ name: "OptionExpired",
2331
+ inputs: []
2332
+ },
2333
+ {
2334
+ type: "error",
2335
+ name: "OptionNotFound",
2336
+ inputs: []
2337
+ },
2338
+ {
2339
+ type: "error",
2340
+ name: "OwnableInvalidOwner",
2341
+ inputs: [{
2342
+ name: "owner",
2343
+ type: "address",
2504
2344
  internalType: "address"
2505
- }],
2506
- stateMutability: "view"
2345
+ }]
2507
2346
  },
2508
2347
  {
2509
- type: "function",
2510
- name: "payoutAsset",
2511
- inputs: [],
2512
- outputs: [{
2513
- name: "",
2348
+ type: "error",
2349
+ name: "OwnableUnauthorizedAccount",
2350
+ inputs: [{
2351
+ name: "account",
2514
2352
  type: "address",
2515
- internalType: "contract IERC20"
2516
- }],
2517
- stateMutability: "view"
2353
+ internalType: "address"
2354
+ }]
2518
2355
  },
2519
2356
  {
2520
- type: "function",
2521
- name: "poolId",
2522
- inputs: [],
2523
- outputs: [{
2524
- name: "",
2525
- type: "bytes32",
2526
- internalType: "PoolId"
2527
- }],
2528
- stateMutability: "view"
2357
+ type: "error",
2358
+ name: "PoolNotSupported",
2359
+ inputs: []
2360
+ },
2361
+ {
2362
+ type: "error",
2363
+ name: "PremiumTooHigh",
2364
+ inputs: []
2365
+ },
2366
+ {
2367
+ type: "error",
2368
+ name: "ReentrancyGuardReentrantCall",
2369
+ inputs: []
2370
+ },
2371
+ {
2372
+ type: "error",
2373
+ name: "SafeERC20FailedOperation",
2374
+ inputs: [{
2375
+ name: "token",
2376
+ type: "address",
2377
+ internalType: "address"
2378
+ }]
2379
+ },
2380
+ {
2381
+ type: "error",
2382
+ name: "SwapFailed",
2383
+ inputs: [{
2384
+ name: "amountReceived",
2385
+ type: "uint256",
2386
+ internalType: "uint256"
2387
+ }, {
2388
+ name: "amountExpected",
2389
+ type: "uint256",
2390
+ internalType: "uint256"
2391
+ }]
2392
+ },
2393
+ {
2394
+ type: "error",
2395
+ name: "SwapperNotWhitelisted",
2396
+ inputs: []
2397
+ },
2398
+ {
2399
+ type: "error",
2400
+ name: "TradingPaused",
2401
+ inputs: []
2402
+ },
2403
+ {
2404
+ type: "error",
2405
+ name: "UnauthorizedCaller",
2406
+ inputs: []
2407
+ },
2408
+ {
2409
+ type: "error",
2410
+ name: "WithdrawNotAllowed",
2411
+ inputs: []
2529
2412
  },
2413
+ {
2414
+ type: "error",
2415
+ name: "ZeroAddress",
2416
+ inputs: []
2417
+ }
2418
+ ];
2419
+
2420
+ //#endregion
2421
+ //#region src/abis/statelessStateView.ts
2422
+ const statelessStateViewAbi = [
2530
2423
  {
2531
2424
  type: "function",
2532
- name: "poolKey",
2533
- inputs: [],
2534
- outputs: [{
2535
- name: "",
2425
+ name: "getFeeGrowthGlobals",
2426
+ inputs: [{
2427
+ name: "poolManager",
2428
+ type: "address",
2429
+ internalType: "contract IPoolManager"
2430
+ }, {
2431
+ name: "key",
2536
2432
  type: "tuple",
2537
2433
  internalType: "struct PoolKey",
2538
2434
  components: [
@@ -2563,597 +2459,997 @@ const optionsMarketAbi = [
2563
2459
  }
2564
2460
  ]
2565
2461
  }],
2462
+ outputs: [{
2463
+ name: "feeGrowthGlobal0",
2464
+ type: "uint256",
2465
+ internalType: "uint256"
2466
+ }, {
2467
+ name: "feeGrowthGlobal1",
2468
+ type: "uint256",
2469
+ internalType: "uint256"
2470
+ }],
2566
2471
  stateMutability: "view"
2567
2472
  },
2568
2473
  {
2569
2474
  type: "function",
2570
- name: "poolManager",
2571
- inputs: [],
2572
- outputs: [{
2573
- name: "",
2475
+ name: "getFeeGrowthGlobals",
2476
+ inputs: [{
2477
+ name: "poolManager",
2574
2478
  type: "address",
2575
2479
  internalType: "contract IPoolManager"
2480
+ }, {
2481
+ name: "poolId",
2482
+ type: "bytes32",
2483
+ internalType: "PoolId"
2484
+ }],
2485
+ outputs: [{
2486
+ name: "feeGrowthGlobal0",
2487
+ type: "uint256",
2488
+ internalType: "uint256"
2489
+ }, {
2490
+ name: "feeGrowthGlobal1",
2491
+ type: "uint256",
2492
+ internalType: "uint256"
2576
2493
  }],
2577
2494
  stateMutability: "view"
2578
2495
  },
2579
2496
  {
2580
2497
  type: "function",
2581
- name: "renounceOwnership",
2582
- inputs: [],
2583
- outputs: [],
2584
- stateMutability: "nonpayable"
2585
- },
2586
- {
2587
- type: "function",
2588
- name: "setOperatorPerms",
2498
+ name: "getFeeGrowthInside",
2589
2499
  inputs: [
2590
2500
  {
2591
- name: "operator",
2501
+ name: "poolManager",
2592
2502
  type: "address",
2593
- internalType: "address"
2503
+ internalType: "contract IPoolManager"
2594
2504
  },
2595
2505
  {
2596
- name: "canExtend",
2597
- type: "bool",
2598
- internalType: "bool"
2599
- },
2600
- {
2601
- name: "canExercise",
2602
- type: "bool",
2603
- internalType: "bool"
2506
+ name: "poolId",
2507
+ type: "bytes32",
2508
+ internalType: "PoolId"
2604
2509
  },
2605
2510
  {
2606
- name: "canTransfer",
2607
- type: "bool",
2608
- internalType: "bool"
2609
- },
2610
- {
2611
- name: "canMint",
2612
- type: "bool",
2613
- internalType: "bool"
2511
+ name: "tickLower",
2512
+ type: "int24",
2513
+ internalType: "int24"
2614
2514
  },
2615
2515
  {
2616
- name: "spendingApproval",
2617
- type: "uint256",
2618
- internalType: "uint256"
2516
+ name: "tickUpper",
2517
+ type: "int24",
2518
+ internalType: "int24"
2619
2519
  }
2620
2520
  ],
2621
- outputs: [],
2622
- stateMutability: "nonpayable"
2623
- },
2624
- {
2625
- type: "function",
2626
- name: "tickSpacing",
2627
- inputs: [],
2628
2521
  outputs: [{
2629
- name: "",
2630
- type: "int24",
2631
- internalType: "int24"
2522
+ name: "feeGrowthInside0X128",
2523
+ type: "uint256",
2524
+ internalType: "uint256"
2525
+ }, {
2526
+ name: "feeGrowthInside1X128",
2527
+ type: "uint256",
2528
+ internalType: "uint256"
2632
2529
  }],
2633
2530
  stateMutability: "view"
2634
2531
  },
2635
2532
  {
2636
2533
  type: "function",
2637
- name: "token0",
2638
- inputs: [],
2639
- outputs: [{
2640
- name: "",
2641
- type: "address",
2642
- internalType: "contract IERC20"
2643
- }],
2644
- stateMutability: "view"
2645
- },
2646
- {
2647
- type: "function",
2648
- name: "token1",
2649
- inputs: [],
2534
+ name: "getFeeGrowthInside",
2535
+ inputs: [
2536
+ {
2537
+ name: "poolManager",
2538
+ type: "address",
2539
+ internalType: "contract IPoolManager"
2540
+ },
2541
+ {
2542
+ name: "key",
2543
+ type: "tuple",
2544
+ internalType: "struct PoolKey",
2545
+ components: [
2546
+ {
2547
+ name: "currency0",
2548
+ type: "address",
2549
+ internalType: "Currency"
2550
+ },
2551
+ {
2552
+ name: "currency1",
2553
+ type: "address",
2554
+ internalType: "Currency"
2555
+ },
2556
+ {
2557
+ name: "fee",
2558
+ type: "uint24",
2559
+ internalType: "uint24"
2560
+ },
2561
+ {
2562
+ name: "tickSpacing",
2563
+ type: "int24",
2564
+ internalType: "int24"
2565
+ },
2566
+ {
2567
+ name: "hooks",
2568
+ type: "address",
2569
+ internalType: "contract IHooks"
2570
+ }
2571
+ ]
2572
+ },
2573
+ {
2574
+ name: "tickLower",
2575
+ type: "int24",
2576
+ internalType: "int24"
2577
+ },
2578
+ {
2579
+ name: "tickUpper",
2580
+ type: "int24",
2581
+ internalType: "int24"
2582
+ }
2583
+ ],
2650
2584
  outputs: [{
2651
- name: "",
2652
- type: "address",
2653
- internalType: "contract IERC20"
2654
- }],
2655
- stateMutability: "view"
2656
- },
2657
- {
2658
- type: "function",
2659
- name: "transferOption",
2660
- inputs: [{
2661
- name: "optionId",
2585
+ name: "feeGrowthInside0X128",
2662
2586
  type: "uint256",
2663
2587
  internalType: "uint256"
2664
2588
  }, {
2665
- name: "to",
2666
- type: "address",
2667
- internalType: "address"
2589
+ name: "feeGrowthInside1X128",
2590
+ type: "uint256",
2591
+ internalType: "uint256"
2668
2592
  }],
2669
- outputs: [],
2670
- stateMutability: "nonpayable"
2593
+ stateMutability: "view"
2671
2594
  },
2672
2595
  {
2673
2596
  type: "function",
2674
- name: "transferOwnership",
2597
+ name: "getLiquidity",
2675
2598
  inputs: [{
2676
- name: "newOwner",
2599
+ name: "poolManager",
2677
2600
  type: "address",
2678
- internalType: "address"
2679
- }],
2680
- outputs: [],
2681
- stateMutability: "nonpayable"
2682
- },
2683
- {
2684
- type: "function",
2685
- name: "unlockCallback",
2686
- inputs: [{
2687
- name: "data",
2688
- type: "bytes",
2689
- internalType: "bytes"
2601
+ internalType: "contract IPoolManager"
2602
+ }, {
2603
+ name: "poolId",
2604
+ type: "bytes32",
2605
+ internalType: "PoolId"
2690
2606
  }],
2691
2607
  outputs: [{
2692
- name: "",
2693
- type: "bytes",
2694
- internalType: "bytes"
2608
+ name: "liquidity",
2609
+ type: "uint128",
2610
+ internalType: "uint128"
2695
2611
  }],
2696
- stateMutability: "nonpayable"
2612
+ stateMutability: "view"
2697
2613
  },
2698
2614
  {
2699
2615
  type: "function",
2700
- name: "updateAddresses",
2616
+ name: "getLiquidity",
2701
2617
  inputs: [{
2702
- name: "_optionPricing",
2618
+ name: "poolManager",
2703
2619
  type: "address",
2704
- internalType: "contract IOptionPricing"
2620
+ internalType: "contract IPoolManager"
2705
2621
  }, {
2706
- name: "_feeStrategy",
2707
- type: "address",
2708
- internalType: "contract IFeeStrategy"
2622
+ name: "key",
2623
+ type: "tuple",
2624
+ internalType: "struct PoolKey",
2625
+ components: [
2626
+ {
2627
+ name: "currency0",
2628
+ type: "address",
2629
+ internalType: "Currency"
2630
+ },
2631
+ {
2632
+ name: "currency1",
2633
+ type: "address",
2634
+ internalType: "Currency"
2635
+ },
2636
+ {
2637
+ name: "fee",
2638
+ type: "uint24",
2639
+ internalType: "uint24"
2640
+ },
2641
+ {
2642
+ name: "tickSpacing",
2643
+ type: "int24",
2644
+ internalType: "int24"
2645
+ },
2646
+ {
2647
+ name: "hooks",
2648
+ type: "address",
2649
+ internalType: "contract IHooks"
2650
+ }
2651
+ ]
2709
2652
  }],
2710
- outputs: [],
2711
- stateMutability: "nonpayable"
2712
- },
2713
- {
2714
- type: "function",
2715
- name: "vault",
2716
- inputs: [],
2717
2653
  outputs: [{
2718
- name: "",
2719
- type: "address",
2720
- internalType: "contract ITimelockVault"
2654
+ name: "liquidity",
2655
+ type: "uint128",
2656
+ internalType: "uint128"
2721
2657
  }],
2722
2658
  stateMutability: "view"
2723
2659
  },
2724
2660
  {
2725
2661
  type: "function",
2726
- name: "whitelistSwapper",
2727
- inputs: [{
2728
- name: "swapper",
2729
- type: "address",
2730
- internalType: "contract ISwapper"
2731
- }, {
2732
- name: "whitelisted",
2733
- type: "bool",
2734
- internalType: "bool"
2735
- }],
2736
- outputs: [],
2737
- stateMutability: "nonpayable"
2738
- },
2739
- {
2740
- type: "event",
2741
- name: "EmergencyWithdraw",
2742
- inputs: [{
2743
- name: "tokens",
2744
- type: "address[]",
2745
- indexed: false,
2746
- internalType: "contract IERC20[]"
2747
- }, {
2748
- name: "balances",
2749
- type: "uint256[]",
2750
- indexed: false,
2751
- internalType: "uint256[]"
2752
- }],
2753
- anonymous: false
2754
- },
2755
- {
2756
- type: "event",
2757
- name: "ExerciseOption",
2662
+ name: "getPositionInfo",
2758
2663
  inputs: [
2759
2664
  {
2760
- name: "optionId",
2761
- type: "uint256",
2762
- indexed: true,
2763
- internalType: "uint256"
2665
+ name: "poolManager",
2666
+ type: "address",
2667
+ internalType: "contract IPoolManager"
2764
2668
  },
2765
2669
  {
2766
- name: "liquidities",
2767
- type: "uint128[]",
2768
- indexed: false,
2769
- internalType: "uint128[]"
2670
+ name: "key",
2671
+ type: "tuple",
2672
+ internalType: "struct PoolKey",
2673
+ components: [
2674
+ {
2675
+ name: "currency0",
2676
+ type: "address",
2677
+ internalType: "Currency"
2678
+ },
2679
+ {
2680
+ name: "currency1",
2681
+ type: "address",
2682
+ internalType: "Currency"
2683
+ },
2684
+ {
2685
+ name: "fee",
2686
+ type: "uint24",
2687
+ internalType: "uint24"
2688
+ },
2689
+ {
2690
+ name: "tickSpacing",
2691
+ type: "int24",
2692
+ internalType: "int24"
2693
+ },
2694
+ {
2695
+ name: "hooks",
2696
+ type: "address",
2697
+ internalType: "contract IHooks"
2698
+ }
2699
+ ]
2770
2700
  },
2771
2701
  {
2772
- name: "currentPrice",
2702
+ name: "positionId",
2703
+ type: "bytes32",
2704
+ internalType: "bytes32"
2705
+ }
2706
+ ],
2707
+ outputs: [
2708
+ {
2709
+ name: "liquidity",
2710
+ type: "uint128",
2711
+ internalType: "uint128"
2712
+ },
2713
+ {
2714
+ name: "feeGrowthInside0LastX128",
2773
2715
  type: "uint256",
2774
- indexed: false,
2775
2716
  internalType: "uint256"
2776
2717
  },
2777
2718
  {
2778
- name: "payout",
2719
+ name: "feeGrowthInside1LastX128",
2779
2720
  type: "uint256",
2780
- indexed: false,
2781
2721
  internalType: "uint256"
2782
2722
  }
2783
2723
  ],
2784
- anonymous: false
2724
+ stateMutability: "view"
2785
2725
  },
2786
2726
  {
2787
- type: "event",
2788
- name: "ExtendOption",
2727
+ type: "function",
2728
+ name: "getPositionInfo",
2789
2729
  inputs: [
2790
2730
  {
2791
- name: "optionId",
2792
- type: "uint256",
2793
- indexed: true,
2794
- internalType: "uint256"
2731
+ name: "poolManager",
2732
+ type: "address",
2733
+ internalType: "contract IPoolManager"
2795
2734
  },
2796
2735
  {
2797
- name: "premium",
2798
- type: "uint256",
2799
- indexed: false,
2800
- internalType: "uint256"
2736
+ name: "poolId",
2737
+ type: "bytes32",
2738
+ internalType: "PoolId"
2801
2739
  },
2802
2740
  {
2803
- name: "protocolFee",
2804
- type: "uint256",
2805
- indexed: false,
2806
- internalType: "uint256"
2741
+ name: "positionId",
2742
+ type: "bytes32",
2743
+ internalType: "bytes32"
2744
+ }
2745
+ ],
2746
+ outputs: [
2747
+ {
2748
+ name: "liquidity",
2749
+ type: "uint128",
2750
+ internalType: "uint128"
2807
2751
  },
2808
2752
  {
2809
- name: "currentPrice",
2753
+ name: "feeGrowthInside0LastX128",
2810
2754
  type: "uint256",
2811
- indexed: false,
2812
2755
  internalType: "uint256"
2813
2756
  },
2814
2757
  {
2815
- name: "addedDuration",
2816
- type: "uint32",
2817
- indexed: false,
2818
- internalType: "uint32"
2758
+ name: "feeGrowthInside1LastX128",
2759
+ type: "uint256",
2760
+ internalType: "uint256"
2819
2761
  }
2820
2762
  ],
2821
- anonymous: false
2763
+ stateMutability: "view"
2822
2764
  },
2823
2765
  {
2824
- type: "event",
2825
- name: "MintOption",
2766
+ type: "function",
2767
+ name: "getPositionInfo",
2826
2768
  inputs: [
2827
2769
  {
2828
- name: "optionId",
2829
- type: "uint256",
2830
- indexed: true,
2831
- internalType: "uint256"
2770
+ name: "poolManager",
2771
+ type: "address",
2772
+ internalType: "contract IPoolManager"
2773
+ },
2774
+ {
2775
+ name: "poolId",
2776
+ type: "bytes32",
2777
+ internalType: "PoolId"
2832
2778
  },
2833
2779
  {
2834
2780
  name: "owner",
2835
2781
  type: "address",
2836
- indexed: true,
2837
2782
  internalType: "address"
2838
2783
  },
2839
2784
  {
2840
- name: "optionType",
2841
- type: "uint8",
2842
- indexed: false,
2843
- internalType: "uint8"
2785
+ name: "tickLower",
2786
+ type: "int24",
2787
+ internalType: "int24"
2844
2788
  },
2845
2789
  {
2846
- name: "strikeTick",
2790
+ name: "tickUpper",
2847
2791
  type: "int24",
2848
- indexed: false,
2849
2792
  internalType: "int24"
2850
2793
  },
2851
2794
  {
2852
- name: "currentPrice",
2853
- type: "uint256",
2854
- indexed: false,
2855
- internalType: "uint256"
2856
- },
2795
+ name: "salt",
2796
+ type: "bytes32",
2797
+ internalType: "bytes32"
2798
+ }
2799
+ ],
2800
+ outputs: [
2857
2801
  {
2858
- name: "expiresAt",
2859
- type: "uint32",
2860
- indexed: false,
2861
- internalType: "uint32"
2802
+ name: "liquidity",
2803
+ type: "uint128",
2804
+ internalType: "uint128"
2862
2805
  },
2863
2806
  {
2864
- name: "premium",
2807
+ name: "feeGrowthInside0LastX128",
2865
2808
  type: "uint256",
2866
- indexed: false,
2867
2809
  internalType: "uint256"
2868
2810
  },
2869
2811
  {
2870
- name: "protocolFee",
2812
+ name: "feeGrowthInside1LastX128",
2871
2813
  type: "uint256",
2872
- indexed: false,
2873
2814
  internalType: "uint256"
2874
- },
2875
- {
2876
- name: "liquidities",
2877
- type: "uint128[]",
2878
- indexed: false,
2879
- internalType: "uint128[]"
2880
2815
  }
2881
2816
  ],
2882
- anonymous: false
2883
- },
2884
- {
2885
- type: "event",
2886
- name: "OwnershipTransferred",
2887
- inputs: [{
2888
- name: "previousOwner",
2889
- type: "address",
2890
- indexed: true,
2891
- internalType: "address"
2892
- }, {
2893
- name: "newOwner",
2894
- type: "address",
2895
- indexed: true,
2896
- internalType: "address"
2897
- }],
2898
- anonymous: false
2899
- },
2900
- {
2901
- type: "event",
2902
- name: "TransferOption",
2903
- inputs: [{
2904
- name: "optionId",
2905
- type: "uint256",
2906
- indexed: true,
2907
- internalType: "uint256"
2908
- }, {
2909
- name: "to",
2910
- type: "address",
2911
- indexed: true,
2912
- internalType: "address"
2913
- }],
2914
- anonymous: false
2915
- },
2916
- {
2917
- type: "event",
2918
- name: "UpdateAddresses",
2919
- inputs: [{
2920
- name: "optionPricing",
2921
- type: "address",
2922
- indexed: false,
2923
- internalType: "contract IOptionPricing"
2924
- }, {
2925
- name: "feeStrategy",
2926
- type: "address",
2927
- indexed: false,
2928
- internalType: "contract IFeeStrategy"
2929
- }],
2930
- anonymous: false
2817
+ stateMutability: "view"
2931
2818
  },
2932
2819
  {
2933
- type: "event",
2934
- name: "UpdateOperatorPerms",
2820
+ type: "function",
2821
+ name: "getPositionInfo",
2935
2822
  inputs: [
2936
2823
  {
2937
- name: "owner",
2824
+ name: "poolManager",
2938
2825
  type: "address",
2939
- indexed: true,
2940
- internalType: "address"
2826
+ internalType: "contract IPoolManager"
2941
2827
  },
2942
2828
  {
2943
- name: "operator",
2829
+ name: "key",
2830
+ type: "tuple",
2831
+ internalType: "struct PoolKey",
2832
+ components: [
2833
+ {
2834
+ name: "currency0",
2835
+ type: "address",
2836
+ internalType: "Currency"
2837
+ },
2838
+ {
2839
+ name: "currency1",
2840
+ type: "address",
2841
+ internalType: "Currency"
2842
+ },
2843
+ {
2844
+ name: "fee",
2845
+ type: "uint24",
2846
+ internalType: "uint24"
2847
+ },
2848
+ {
2849
+ name: "tickSpacing",
2850
+ type: "int24",
2851
+ internalType: "int24"
2852
+ },
2853
+ {
2854
+ name: "hooks",
2855
+ type: "address",
2856
+ internalType: "contract IHooks"
2857
+ }
2858
+ ]
2859
+ },
2860
+ {
2861
+ name: "owner",
2944
2862
  type: "address",
2945
- indexed: true,
2946
2863
  internalType: "address"
2947
2864
  },
2948
2865
  {
2949
- name: "canExtend",
2950
- type: "bool",
2951
- indexed: false,
2952
- internalType: "bool"
2866
+ name: "tickLower",
2867
+ type: "int24",
2868
+ internalType: "int24"
2953
2869
  },
2954
2870
  {
2955
- name: "canExercise",
2956
- type: "bool",
2957
- indexed: false,
2958
- internalType: "bool"
2871
+ name: "tickUpper",
2872
+ type: "int24",
2873
+ internalType: "int24"
2959
2874
  },
2960
2875
  {
2961
- name: "canTransfer",
2962
- type: "bool",
2963
- indexed: false,
2964
- internalType: "bool"
2876
+ name: "salt",
2877
+ type: "bytes32",
2878
+ internalType: "bytes32"
2879
+ }
2880
+ ],
2881
+ outputs: [
2882
+ {
2883
+ name: "liquidity",
2884
+ type: "uint128",
2885
+ internalType: "uint128"
2965
2886
  },
2966
2887
  {
2967
- name: "canMint",
2968
- type: "bool",
2969
- indexed: false,
2970
- internalType: "bool"
2888
+ name: "feeGrowthInside0LastX128",
2889
+ type: "uint256",
2890
+ internalType: "uint256"
2971
2891
  },
2972
2892
  {
2973
- name: "spendingApproval",
2893
+ name: "feeGrowthInside1LastX128",
2974
2894
  type: "uint256",
2975
- indexed: false,
2976
2895
  internalType: "uint256"
2977
2896
  }
2978
2897
  ],
2979
- anonymous: false
2898
+ stateMutability: "view"
2980
2899
  },
2981
2900
  {
2982
- type: "event",
2983
- name: "WhitelistSwapper",
2984
- inputs: [{
2985
- name: "swapper",
2986
- type: "address",
2987
- indexed: true,
2988
- internalType: "contract ISwapper"
2989
- }, {
2990
- name: "whitelisted",
2991
- type: "bool",
2992
- indexed: false,
2993
- internalType: "bool"
2901
+ type: "function",
2902
+ name: "getPositionLiquidity",
2903
+ inputs: [
2904
+ {
2905
+ name: "poolManager",
2906
+ type: "address",
2907
+ internalType: "contract IPoolManager"
2908
+ },
2909
+ {
2910
+ name: "poolId",
2911
+ type: "bytes32",
2912
+ internalType: "PoolId"
2913
+ },
2914
+ {
2915
+ name: "positionId",
2916
+ type: "bytes32",
2917
+ internalType: "bytes32"
2918
+ }
2919
+ ],
2920
+ outputs: [{
2921
+ name: "liquidity",
2922
+ type: "uint128",
2923
+ internalType: "uint128"
2994
2924
  }],
2995
- anonymous: false
2996
- },
2997
- {
2998
- type: "error",
2999
- name: "AddressEmptyCode",
3000
- inputs: [{
3001
- name: "target",
3002
- type: "address",
3003
- internalType: "address"
3004
- }]
3005
- },
3006
- {
3007
- type: "error",
3008
- name: "FailedCall",
3009
- inputs: []
3010
- },
3011
- {
3012
- type: "error",
3013
- name: "InsufficientLiquidity",
3014
- inputs: [{
3015
- name: "remainingAmount",
3016
- type: "uint256",
3017
- internalType: "uint256"
3018
- }]
3019
- },
3020
- {
3021
- type: "error",
3022
- name: "InvalidAmount",
3023
- inputs: []
3024
- },
3025
- {
3026
- type: "error",
3027
- name: "InvalidArrayLength",
3028
- inputs: []
3029
- },
3030
- {
3031
- type: "error",
3032
- name: "InvalidDuration",
3033
- inputs: []
2925
+ stateMutability: "view"
3034
2926
  },
3035
2927
  {
3036
- type: "error",
3037
- name: "InvalidOptionType",
3038
- inputs: []
2928
+ type: "function",
2929
+ name: "getPositionLiquidity",
2930
+ inputs: [
2931
+ {
2932
+ name: "poolManager",
2933
+ type: "address",
2934
+ internalType: "contract IPoolManager"
2935
+ },
2936
+ {
2937
+ name: "key",
2938
+ type: "tuple",
2939
+ internalType: "struct PoolKey",
2940
+ components: [
2941
+ {
2942
+ name: "currency0",
2943
+ type: "address",
2944
+ internalType: "Currency"
2945
+ },
2946
+ {
2947
+ name: "currency1",
2948
+ type: "address",
2949
+ internalType: "Currency"
2950
+ },
2951
+ {
2952
+ name: "fee",
2953
+ type: "uint24",
2954
+ internalType: "uint24"
2955
+ },
2956
+ {
2957
+ name: "tickSpacing",
2958
+ type: "int24",
2959
+ internalType: "int24"
2960
+ },
2961
+ {
2962
+ name: "hooks",
2963
+ type: "address",
2964
+ internalType: "contract IHooks"
2965
+ }
2966
+ ]
2967
+ },
2968
+ {
2969
+ name: "positionId",
2970
+ type: "bytes32",
2971
+ internalType: "bytes32"
2972
+ }
2973
+ ],
2974
+ outputs: [{
2975
+ name: "liquidity",
2976
+ type: "uint128",
2977
+ internalType: "uint128"
2978
+ }],
2979
+ stateMutability: "view"
3039
2980
  },
3040
2981
  {
3041
- type: "error",
3042
- name: "MInvalidTickRange",
2982
+ type: "function",
2983
+ name: "getSlot0",
3043
2984
  inputs: [{
3044
- name: "tickLower",
3045
- type: "int24",
3046
- internalType: "int24"
2985
+ name: "poolManager",
2986
+ type: "address",
2987
+ internalType: "contract IPoolManager"
3047
2988
  }, {
3048
- name: "tickUpper",
3049
- type: "int24",
3050
- internalType: "int24"
3051
- }]
3052
- },
3053
- {
3054
- type: "error",
3055
- name: "NotAuthorized",
3056
- inputs: []
3057
- },
3058
- {
3059
- type: "error",
3060
- name: "NotEnoughLiquidity",
3061
- inputs: []
3062
- },
3063
- {
3064
- type: "error",
3065
- name: "NotEnoughPayout",
3066
- inputs: []
3067
- },
3068
- {
3069
- type: "error",
3070
- name: "OptionExpired",
3071
- inputs: []
3072
- },
3073
- {
3074
- type: "error",
3075
- name: "OptionNotFound",
3076
- inputs: []
3077
- },
3078
- {
3079
- type: "error",
3080
- name: "OwnableInvalidOwner",
3081
- inputs: [{
3082
- name: "owner",
3083
- type: "address",
3084
- internalType: "address"
3085
- }]
2989
+ name: "key",
2990
+ type: "tuple",
2991
+ internalType: "struct PoolKey",
2992
+ components: [
2993
+ {
2994
+ name: "currency0",
2995
+ type: "address",
2996
+ internalType: "Currency"
2997
+ },
2998
+ {
2999
+ name: "currency1",
3000
+ type: "address",
3001
+ internalType: "Currency"
3002
+ },
3003
+ {
3004
+ name: "fee",
3005
+ type: "uint24",
3006
+ internalType: "uint24"
3007
+ },
3008
+ {
3009
+ name: "tickSpacing",
3010
+ type: "int24",
3011
+ internalType: "int24"
3012
+ },
3013
+ {
3014
+ name: "hooks",
3015
+ type: "address",
3016
+ internalType: "contract IHooks"
3017
+ }
3018
+ ]
3019
+ }],
3020
+ outputs: [
3021
+ {
3022
+ name: "sqrtPriceX96",
3023
+ type: "uint160",
3024
+ internalType: "uint160"
3025
+ },
3026
+ {
3027
+ name: "tick",
3028
+ type: "int24",
3029
+ internalType: "int24"
3030
+ },
3031
+ {
3032
+ name: "protocolFee",
3033
+ type: "uint24",
3034
+ internalType: "uint24"
3035
+ },
3036
+ {
3037
+ name: "lpFee",
3038
+ type: "uint24",
3039
+ internalType: "uint24"
3040
+ }
3041
+ ],
3042
+ stateMutability: "view"
3086
3043
  },
3087
3044
  {
3088
- type: "error",
3089
- name: "OwnableUnauthorizedAccount",
3045
+ type: "function",
3046
+ name: "getSlot0",
3090
3047
  inputs: [{
3091
- name: "account",
3048
+ name: "poolManager",
3092
3049
  type: "address",
3093
- internalType: "address"
3094
- }]
3095
- },
3096
- {
3097
- type: "error",
3098
- name: "PoolNotSupported",
3099
- inputs: []
3100
- },
3101
- {
3102
- type: "error",
3103
- name: "PremiumTooHigh",
3104
- inputs: []
3050
+ internalType: "contract IPoolManager"
3051
+ }, {
3052
+ name: "poolId",
3053
+ type: "bytes32",
3054
+ internalType: "PoolId"
3055
+ }],
3056
+ outputs: [
3057
+ {
3058
+ name: "sqrtPriceX96",
3059
+ type: "uint160",
3060
+ internalType: "uint160"
3061
+ },
3062
+ {
3063
+ name: "tick",
3064
+ type: "int24",
3065
+ internalType: "int24"
3066
+ },
3067
+ {
3068
+ name: "protocolFee",
3069
+ type: "uint24",
3070
+ internalType: "uint24"
3071
+ },
3072
+ {
3073
+ name: "lpFee",
3074
+ type: "uint24",
3075
+ internalType: "uint24"
3076
+ }
3077
+ ],
3078
+ stateMutability: "view"
3105
3079
  },
3106
3080
  {
3107
- type: "error",
3108
- name: "ReentrancyGuardReentrantCall",
3109
- inputs: []
3081
+ type: "function",
3082
+ name: "getTickBitmap",
3083
+ inputs: [
3084
+ {
3085
+ name: "poolManager",
3086
+ type: "address",
3087
+ internalType: "contract IPoolManager"
3088
+ },
3089
+ {
3090
+ name: "key",
3091
+ type: "tuple",
3092
+ internalType: "struct PoolKey",
3093
+ components: [
3094
+ {
3095
+ name: "currency0",
3096
+ type: "address",
3097
+ internalType: "Currency"
3098
+ },
3099
+ {
3100
+ name: "currency1",
3101
+ type: "address",
3102
+ internalType: "Currency"
3103
+ },
3104
+ {
3105
+ name: "fee",
3106
+ type: "uint24",
3107
+ internalType: "uint24"
3108
+ },
3109
+ {
3110
+ name: "tickSpacing",
3111
+ type: "int24",
3112
+ internalType: "int24"
3113
+ },
3114
+ {
3115
+ name: "hooks",
3116
+ type: "address",
3117
+ internalType: "contract IHooks"
3118
+ }
3119
+ ]
3120
+ },
3121
+ {
3122
+ name: "tick",
3123
+ type: "int16",
3124
+ internalType: "int16"
3125
+ }
3126
+ ],
3127
+ outputs: [{
3128
+ name: "tickBitmap",
3129
+ type: "uint256",
3130
+ internalType: "uint256"
3131
+ }],
3132
+ stateMutability: "view"
3110
3133
  },
3111
3134
  {
3112
- type: "error",
3113
- name: "SafeERC20FailedOperation",
3114
- inputs: [{
3115
- name: "token",
3116
- type: "address",
3117
- internalType: "address"
3118
- }]
3135
+ type: "function",
3136
+ name: "getTickBitmap",
3137
+ inputs: [
3138
+ {
3139
+ name: "poolManager",
3140
+ type: "address",
3141
+ internalType: "contract IPoolManager"
3142
+ },
3143
+ {
3144
+ name: "poolId",
3145
+ type: "bytes32",
3146
+ internalType: "PoolId"
3147
+ },
3148
+ {
3149
+ name: "tick",
3150
+ type: "int16",
3151
+ internalType: "int16"
3152
+ }
3153
+ ],
3154
+ outputs: [{
3155
+ name: "tickBitmap",
3156
+ type: "uint256",
3157
+ internalType: "uint256"
3158
+ }],
3159
+ stateMutability: "view"
3119
3160
  },
3120
3161
  {
3121
- type: "error",
3122
- name: "SwapFailed",
3123
- inputs: [{
3124
- name: "amountReceived",
3162
+ type: "function",
3163
+ name: "getTickFeeGrowthOutside",
3164
+ inputs: [
3165
+ {
3166
+ name: "poolManager",
3167
+ type: "address",
3168
+ internalType: "contract IPoolManager"
3169
+ },
3170
+ {
3171
+ name: "key",
3172
+ type: "tuple",
3173
+ internalType: "struct PoolKey",
3174
+ components: [
3175
+ {
3176
+ name: "currency0",
3177
+ type: "address",
3178
+ internalType: "Currency"
3179
+ },
3180
+ {
3181
+ name: "currency1",
3182
+ type: "address",
3183
+ internalType: "Currency"
3184
+ },
3185
+ {
3186
+ name: "fee",
3187
+ type: "uint24",
3188
+ internalType: "uint24"
3189
+ },
3190
+ {
3191
+ name: "tickSpacing",
3192
+ type: "int24",
3193
+ internalType: "int24"
3194
+ },
3195
+ {
3196
+ name: "hooks",
3197
+ type: "address",
3198
+ internalType: "contract IHooks"
3199
+ }
3200
+ ]
3201
+ },
3202
+ {
3203
+ name: "tick",
3204
+ type: "int24",
3205
+ internalType: "int24"
3206
+ }
3207
+ ],
3208
+ outputs: [{
3209
+ name: "feeGrowthOutside0X128",
3125
3210
  type: "uint256",
3126
3211
  internalType: "uint256"
3127
3212
  }, {
3128
- name: "amountExpected",
3213
+ name: "feeGrowthOutside1X128",
3129
3214
  type: "uint256",
3130
3215
  internalType: "uint256"
3131
- }]
3216
+ }],
3217
+ stateMutability: "view"
3132
3218
  },
3133
3219
  {
3134
- type: "error",
3135
- name: "SwapperNotWhitelisted",
3136
- inputs: []
3220
+ type: "function",
3221
+ name: "getTickFeeGrowthOutside",
3222
+ inputs: [
3223
+ {
3224
+ name: "poolManager",
3225
+ type: "address",
3226
+ internalType: "contract IPoolManager"
3227
+ },
3228
+ {
3229
+ name: "poolId",
3230
+ type: "bytes32",
3231
+ internalType: "PoolId"
3232
+ },
3233
+ {
3234
+ name: "tick",
3235
+ type: "int24",
3236
+ internalType: "int24"
3237
+ }
3238
+ ],
3239
+ outputs: [{
3240
+ name: "feeGrowthOutside0X128",
3241
+ type: "uint256",
3242
+ internalType: "uint256"
3243
+ }, {
3244
+ name: "feeGrowthOutside1X128",
3245
+ type: "uint256",
3246
+ internalType: "uint256"
3247
+ }],
3248
+ stateMutability: "view"
3137
3249
  },
3138
3250
  {
3139
- type: "error",
3140
- name: "TradingPaused",
3141
- inputs: []
3251
+ type: "function",
3252
+ name: "getTickInfo",
3253
+ inputs: [
3254
+ {
3255
+ name: "poolManager",
3256
+ type: "address",
3257
+ internalType: "contract IPoolManager"
3258
+ },
3259
+ {
3260
+ name: "poolId",
3261
+ type: "bytes32",
3262
+ internalType: "PoolId"
3263
+ },
3264
+ {
3265
+ name: "tick",
3266
+ type: "int24",
3267
+ internalType: "int24"
3268
+ }
3269
+ ],
3270
+ outputs: [
3271
+ {
3272
+ name: "liquidityGross",
3273
+ type: "uint128",
3274
+ internalType: "uint128"
3275
+ },
3276
+ {
3277
+ name: "liquidityNet",
3278
+ type: "int128",
3279
+ internalType: "int128"
3280
+ },
3281
+ {
3282
+ name: "feeGrowthOutside0X128",
3283
+ type: "uint256",
3284
+ internalType: "uint256"
3285
+ },
3286
+ {
3287
+ name: "feeGrowthOutside1X128",
3288
+ type: "uint256",
3289
+ internalType: "uint256"
3290
+ }
3291
+ ],
3292
+ stateMutability: "view"
3142
3293
  },
3143
3294
  {
3144
- type: "error",
3145
- name: "UnauthorizedCaller",
3146
- inputs: []
3295
+ type: "function",
3296
+ name: "getTickInfo",
3297
+ inputs: [
3298
+ {
3299
+ name: "poolManager",
3300
+ type: "address",
3301
+ internalType: "contract IPoolManager"
3302
+ },
3303
+ {
3304
+ name: "key",
3305
+ type: "tuple",
3306
+ internalType: "struct PoolKey",
3307
+ components: [
3308
+ {
3309
+ name: "currency0",
3310
+ type: "address",
3311
+ internalType: "Currency"
3312
+ },
3313
+ {
3314
+ name: "currency1",
3315
+ type: "address",
3316
+ internalType: "Currency"
3317
+ },
3318
+ {
3319
+ name: "fee",
3320
+ type: "uint24",
3321
+ internalType: "uint24"
3322
+ },
3323
+ {
3324
+ name: "tickSpacing",
3325
+ type: "int24",
3326
+ internalType: "int24"
3327
+ },
3328
+ {
3329
+ name: "hooks",
3330
+ type: "address",
3331
+ internalType: "contract IHooks"
3332
+ }
3333
+ ]
3334
+ },
3335
+ {
3336
+ name: "tick",
3337
+ type: "int24",
3338
+ internalType: "int24"
3339
+ }
3340
+ ],
3341
+ outputs: [
3342
+ {
3343
+ name: "liquidityGross",
3344
+ type: "uint128",
3345
+ internalType: "uint128"
3346
+ },
3347
+ {
3348
+ name: "liquidityNet",
3349
+ type: "int128",
3350
+ internalType: "int128"
3351
+ },
3352
+ {
3353
+ name: "feeGrowthOutside0X128",
3354
+ type: "uint256",
3355
+ internalType: "uint256"
3356
+ },
3357
+ {
3358
+ name: "feeGrowthOutside1X128",
3359
+ type: "uint256",
3360
+ internalType: "uint256"
3361
+ }
3362
+ ],
3363
+ stateMutability: "view"
3147
3364
  },
3148
3365
  {
3149
- type: "error",
3150
- name: "WithdrawNotAllowed",
3151
- inputs: []
3366
+ type: "function",
3367
+ name: "getTickLiquidity",
3368
+ inputs: [
3369
+ {
3370
+ name: "poolManager",
3371
+ type: "address",
3372
+ internalType: "contract IPoolManager"
3373
+ },
3374
+ {
3375
+ name: "key",
3376
+ type: "tuple",
3377
+ internalType: "struct PoolKey",
3378
+ components: [
3379
+ {
3380
+ name: "currency0",
3381
+ type: "address",
3382
+ internalType: "Currency"
3383
+ },
3384
+ {
3385
+ name: "currency1",
3386
+ type: "address",
3387
+ internalType: "Currency"
3388
+ },
3389
+ {
3390
+ name: "fee",
3391
+ type: "uint24",
3392
+ internalType: "uint24"
3393
+ },
3394
+ {
3395
+ name: "tickSpacing",
3396
+ type: "int24",
3397
+ internalType: "int24"
3398
+ },
3399
+ {
3400
+ name: "hooks",
3401
+ type: "address",
3402
+ internalType: "contract IHooks"
3403
+ }
3404
+ ]
3405
+ },
3406
+ {
3407
+ name: "tick",
3408
+ type: "int24",
3409
+ internalType: "int24"
3410
+ }
3411
+ ],
3412
+ outputs: [{
3413
+ name: "liquidityGross",
3414
+ type: "uint128",
3415
+ internalType: "uint128"
3416
+ }, {
3417
+ name: "liquidityNet",
3418
+ type: "int128",
3419
+ internalType: "int128"
3420
+ }],
3421
+ stateMutability: "view"
3152
3422
  },
3153
3423
  {
3154
- type: "error",
3155
- name: "ZeroAddress",
3156
- inputs: []
3424
+ type: "function",
3425
+ name: "getTickLiquidity",
3426
+ inputs: [
3427
+ {
3428
+ name: "poolManager",
3429
+ type: "address",
3430
+ internalType: "contract IPoolManager"
3431
+ },
3432
+ {
3433
+ name: "poolId",
3434
+ type: "bytes32",
3435
+ internalType: "PoolId"
3436
+ },
3437
+ {
3438
+ name: "tick",
3439
+ type: "int24",
3440
+ internalType: "int24"
3441
+ }
3442
+ ],
3443
+ outputs: [{
3444
+ name: "liquidityGross",
3445
+ type: "uint128",
3446
+ internalType: "uint128"
3447
+ }, {
3448
+ name: "liquidityNet",
3449
+ type: "int128",
3450
+ internalType: "int128"
3451
+ }],
3452
+ stateMutability: "view"
3157
3453
  }
3158
3454
  ];
3159
3455
 
@@ -3176,10 +3472,10 @@ Object.defineProperty(exports, 'optionsMarketAbi', {
3176
3472
  return optionsMarketAbi;
3177
3473
  }
3178
3474
  });
3179
- Object.defineProperty(exports, 'uniswapMathLensAbi', {
3475
+ Object.defineProperty(exports, 'statelessStateViewAbi', {
3180
3476
  enumerable: true,
3181
3477
  get: function () {
3182
- return uniswapMathLensAbi;
3478
+ return statelessStateViewAbi;
3183
3479
  }
3184
3480
  });
3185
- //# sourceMappingURL=optionsMarket-DtjLm46g.cjs.map
3481
+ //# sourceMappingURL=statelessStateView-XdTJQxsY.cjs.map