timelock-sdk 0.0.162 → 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.
- package/dist/abis.cjs +1059 -308
- package/dist/abis.cjs.map +1 -1
- package/dist/abis.d.cts +2967 -766
- package/dist/abis.d.ts +2967 -766
- package/dist/abis.js +1051 -303
- package/dist/abis.js.map +1 -1
- package/dist/{client-BVPR3obW.d.cts → client-CoeY1yLm.d.cts} +944 -945
- package/dist/{client-BFhMekeP.d.ts → client-DqVrd4kQ.d.ts} +263 -264
- package/dist/client.cjs +42 -891
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -856
- package/dist/client.js.map +1 -1
- package/dist/factory-DitVXzjQ.cjs +1715 -0
- package/dist/factory-DitVXzjQ.cjs.map +1 -0
- package/dist/factory-y-iVl_er.js +1697 -0
- package/dist/factory-y-iVl_er.js.map +1 -0
- package/dist/{optionUtils-R9Y-jxoz.cjs → optionUtils-Cuuw6jXD.cjs} +6 -1048
- package/dist/optionUtils-Cuuw6jXD.cjs.map +1 -0
- package/dist/optionUtils-OyY8qOu0.js +381 -0
- package/dist/optionUtils-OyY8qOu0.js.map +1 -0
- package/dist/{uniswapMathLens-oe-gukfo.d.ts → optionsMarket-2HZ-p_dl.d.ts} +2 -625
- package/dist/{uniswapMathLens-B6gp2UGI.d.cts → optionsMarket-c4hgszY_.d.cts} +2 -625
- package/dist/package.cjs +2 -2
- package/dist/package.d.cts +3 -3
- package/dist/package.d.ts +3 -3
- package/dist/package.js +2 -2
- package/dist/{optionsMarket-CWigPja1.js → statelessStateView-CBkcP7CK.js} +1599 -1322
- package/dist/statelessStateView-CBkcP7CK.js.map +1 -0
- package/dist/{optionsMarket-CtlBxuj0.cjs → statelessStateView-XdTJQxsY.cjs} +1600 -1323
- package/dist/statelessStateView-XdTJQxsY.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/optionUtils-R9Y-jxoz.cjs.map +0 -1
- package/dist/optionUtils-fCYueZl2.js +0 -1417
- package/dist/optionUtils-fCYueZl2.js.map +0 -1
- package/dist/optionsMarket-CWigPja1.js.map +0 -1
- package/dist/optionsMarket-CtlBxuj0.cjs.map +0 -1
- package/dist/singleOwnerVault-BJyEs_D_.js +0 -847
- package/dist/singleOwnerVault-BJyEs_D_.js.map +0 -1
- package/dist/singleOwnerVault-GCpQV7pN.cjs +0 -853
- package/dist/singleOwnerVault-GCpQV7pN.cjs.map +0 -1
package/dist/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { i as erc20Abi$1, r as lensAbi, t as
|
|
5
|
-
import { A as token1ToToken0, B as swappers, D as roundTick, F as getStateView, I as getTimelockLens, L as getTimelockMarket, N as getPriceHistory, O as token0ToToken1, P as getErc20,
|
|
6
|
-
import {
|
|
4
|
+
import { i as erc20Abi$1, n as optionsMarketAbi, r as lensAbi, t as statelessStateViewAbi } from "./statelessStateView-CBkcP7CK.js";
|
|
5
|
+
import { A as token1ToToken0, B as swappers, D as roundTick, F as getStateView, I as getTimelockLens, L as getTimelockMarket, N as getPriceHistory, O as token0ToToken1, P as getErc20, V as timelockFactories, b as getPriceAtSqrtPriceX96, f as wrapAmount, j as token1ToToken0AtTick, k as token0ToToken1AtTick, m as wrapPrice, r as EMPTY_ARRAY, t as getPayoutAtPrice, v as getAmountsFromLiquidity, x as getPriceAtTick, y as getNearestValidStrikeTick } from "./optionUtils-OyY8qOu0.js";
|
|
6
|
+
import { n as guardianAbi, r as singleOwnerVaultAbi, t as factoryAbi } from "./factory-y-iVl_er.js";
|
|
7
7
|
import { decodeAbiParameters, decodeEventLog, encodeAbiParameters, encodeFunctionData, erc20Abi, maxUint256, zeroAddress } from "viem";
|
|
8
8
|
import React, { createContext, useContext, useEffect, useMemo } from "react";
|
|
9
9
|
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
@@ -1101,9 +1101,9 @@ const useMintPerp = (marketAddr) => {
|
|
|
1101
1101
|
const { address } = useConnection();
|
|
1102
1102
|
const { operator, address: operatorAddr, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
|
|
1103
1103
|
const { askForApproval } = useApproval();
|
|
1104
|
-
const {
|
|
1105
|
-
const { tickSpacing } = usePoolData(
|
|
1106
|
-
const { refetch: refetchCurrentTick } = useCurrentTick(
|
|
1104
|
+
const { poolManager, poolKey, optionAssetIsToken0, payoutAsset } = useMarketData(marketAddr);
|
|
1105
|
+
const { tickSpacing } = usePoolData(poolManager, poolKey);
|
|
1106
|
+
const { refetch: refetchCurrentTick } = useCurrentTick(poolManager, poolKey);
|
|
1107
1107
|
const mintPerp = async (data) => {
|
|
1108
1108
|
const { optionType, amount, duration, strikeTick } = data;
|
|
1109
1109
|
if (!client || !address) throw new Error("Wallet not connected");
|
|
@@ -1550,602 +1550,6 @@ const useGuardianGlobalState = (guardianAddr) => {
|
|
|
1550
1550
|
};
|
|
1551
1551
|
};
|
|
1552
1552
|
|
|
1553
|
-
//#endregion
|
|
1554
|
-
//#region src/abis/guardian.ts
|
|
1555
|
-
const guardianAbi = [
|
|
1556
|
-
{
|
|
1557
|
-
type: "constructor",
|
|
1558
|
-
inputs: [],
|
|
1559
|
-
stateMutability: "nonpayable"
|
|
1560
|
-
},
|
|
1561
|
-
{
|
|
1562
|
-
type: "function",
|
|
1563
|
-
name: "DEFAULT_ADMIN_ROLE",
|
|
1564
|
-
inputs: [],
|
|
1565
|
-
outputs: [{
|
|
1566
|
-
name: "",
|
|
1567
|
-
type: "bytes32",
|
|
1568
|
-
internalType: "bytes32"
|
|
1569
|
-
}],
|
|
1570
|
-
stateMutability: "view"
|
|
1571
|
-
},
|
|
1572
|
-
{
|
|
1573
|
-
type: "function",
|
|
1574
|
-
name: "MIN_WITHDRAW_INTERVAL",
|
|
1575
|
-
inputs: [],
|
|
1576
|
-
outputs: [{
|
|
1577
|
-
name: "",
|
|
1578
|
-
type: "uint256",
|
|
1579
|
-
internalType: "uint256"
|
|
1580
|
-
}],
|
|
1581
|
-
stateMutability: "view"
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
type: "function",
|
|
1585
|
-
name: "PAUSER_ROLE",
|
|
1586
|
-
inputs: [],
|
|
1587
|
-
outputs: [{
|
|
1588
|
-
name: "",
|
|
1589
|
-
type: "bytes32",
|
|
1590
|
-
internalType: "bytes32"
|
|
1591
|
-
}],
|
|
1592
|
-
stateMutability: "view"
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
type: "function",
|
|
1596
|
-
name: "allowBurn",
|
|
1597
|
-
inputs: [{
|
|
1598
|
-
name: "vault",
|
|
1599
|
-
type: "address",
|
|
1600
|
-
internalType: "address"
|
|
1601
|
-
}],
|
|
1602
|
-
outputs: [{
|
|
1603
|
-
name: "",
|
|
1604
|
-
type: "bool",
|
|
1605
|
-
internalType: "bool"
|
|
1606
|
-
}],
|
|
1607
|
-
stateMutability: "view"
|
|
1608
|
-
},
|
|
1609
|
-
{
|
|
1610
|
-
type: "function",
|
|
1611
|
-
name: "allowEmergencyMarketWithdraw",
|
|
1612
|
-
inputs: [{
|
|
1613
|
-
name: "market",
|
|
1614
|
-
type: "address",
|
|
1615
|
-
internalType: "address"
|
|
1616
|
-
}],
|
|
1617
|
-
outputs: [{
|
|
1618
|
-
name: "",
|
|
1619
|
-
type: "bool",
|
|
1620
|
-
internalType: "bool"
|
|
1621
|
-
}],
|
|
1622
|
-
stateMutability: "view"
|
|
1623
|
-
},
|
|
1624
|
-
{
|
|
1625
|
-
type: "function",
|
|
1626
|
-
name: "allowEmergencyVaultWithdraw",
|
|
1627
|
-
inputs: [{
|
|
1628
|
-
name: "vault",
|
|
1629
|
-
type: "address",
|
|
1630
|
-
internalType: "address"
|
|
1631
|
-
}],
|
|
1632
|
-
outputs: [{
|
|
1633
|
-
name: "",
|
|
1634
|
-
type: "bool",
|
|
1635
|
-
internalType: "bool"
|
|
1636
|
-
}],
|
|
1637
|
-
stateMutability: "view"
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
type: "function",
|
|
1641
|
-
name: "allowMint",
|
|
1642
|
-
inputs: [{
|
|
1643
|
-
name: "vault",
|
|
1644
|
-
type: "address",
|
|
1645
|
-
internalType: "address"
|
|
1646
|
-
}],
|
|
1647
|
-
outputs: [{
|
|
1648
|
-
name: "",
|
|
1649
|
-
type: "bool",
|
|
1650
|
-
internalType: "bool"
|
|
1651
|
-
}],
|
|
1652
|
-
stateMutability: "view"
|
|
1653
|
-
},
|
|
1654
|
-
{
|
|
1655
|
-
type: "function",
|
|
1656
|
-
name: "allowTrade",
|
|
1657
|
-
inputs: [
|
|
1658
|
-
{
|
|
1659
|
-
name: "market",
|
|
1660
|
-
type: "address",
|
|
1661
|
-
internalType: "address"
|
|
1662
|
-
},
|
|
1663
|
-
{
|
|
1664
|
-
name: "owner",
|
|
1665
|
-
type: "address",
|
|
1666
|
-
internalType: "address"
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
name: "sender",
|
|
1670
|
-
type: "address",
|
|
1671
|
-
internalType: "address"
|
|
1672
|
-
}
|
|
1673
|
-
],
|
|
1674
|
-
outputs: [{
|
|
1675
|
-
name: "",
|
|
1676
|
-
type: "bool",
|
|
1677
|
-
internalType: "bool"
|
|
1678
|
-
}],
|
|
1679
|
-
stateMutability: "view"
|
|
1680
|
-
},
|
|
1681
|
-
{
|
|
1682
|
-
type: "function",
|
|
1683
|
-
name: "getRoleAdmin",
|
|
1684
|
-
inputs: [{
|
|
1685
|
-
name: "role",
|
|
1686
|
-
type: "bytes32",
|
|
1687
|
-
internalType: "bytes32"
|
|
1688
|
-
}],
|
|
1689
|
-
outputs: [{
|
|
1690
|
-
name: "",
|
|
1691
|
-
type: "bytes32",
|
|
1692
|
-
internalType: "bytes32"
|
|
1693
|
-
}],
|
|
1694
|
-
stateMutability: "view"
|
|
1695
|
-
},
|
|
1696
|
-
{
|
|
1697
|
-
type: "function",
|
|
1698
|
-
name: "globalBurnPaused",
|
|
1699
|
-
inputs: [],
|
|
1700
|
-
outputs: [{
|
|
1701
|
-
name: "paused",
|
|
1702
|
-
type: "bool",
|
|
1703
|
-
internalType: "bool"
|
|
1704
|
-
}, {
|
|
1705
|
-
name: "updatedAt",
|
|
1706
|
-
type: "uint64",
|
|
1707
|
-
internalType: "uint64"
|
|
1708
|
-
}],
|
|
1709
|
-
stateMutability: "view"
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
type: "function",
|
|
1713
|
-
name: "globalMintPaused",
|
|
1714
|
-
inputs: [],
|
|
1715
|
-
outputs: [{
|
|
1716
|
-
name: "paused",
|
|
1717
|
-
type: "bool",
|
|
1718
|
-
internalType: "bool"
|
|
1719
|
-
}, {
|
|
1720
|
-
name: "updatedAt",
|
|
1721
|
-
type: "uint64",
|
|
1722
|
-
internalType: "uint64"
|
|
1723
|
-
}],
|
|
1724
|
-
stateMutability: "view"
|
|
1725
|
-
},
|
|
1726
|
-
{
|
|
1727
|
-
type: "function",
|
|
1728
|
-
name: "globalTradingPaused",
|
|
1729
|
-
inputs: [],
|
|
1730
|
-
outputs: [{
|
|
1731
|
-
name: "paused",
|
|
1732
|
-
type: "bool",
|
|
1733
|
-
internalType: "bool"
|
|
1734
|
-
}, {
|
|
1735
|
-
name: "updatedAt",
|
|
1736
|
-
type: "uint64",
|
|
1737
|
-
internalType: "uint64"
|
|
1738
|
-
}],
|
|
1739
|
-
stateMutability: "view"
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
type: "function",
|
|
1743
|
-
name: "grantRole",
|
|
1744
|
-
inputs: [{
|
|
1745
|
-
name: "role",
|
|
1746
|
-
type: "bytes32",
|
|
1747
|
-
internalType: "bytes32"
|
|
1748
|
-
}, {
|
|
1749
|
-
name: "account",
|
|
1750
|
-
type: "address",
|
|
1751
|
-
internalType: "address"
|
|
1752
|
-
}],
|
|
1753
|
-
outputs: [],
|
|
1754
|
-
stateMutability: "nonpayable"
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
type: "function",
|
|
1758
|
-
name: "hasRole",
|
|
1759
|
-
inputs: [{
|
|
1760
|
-
name: "role",
|
|
1761
|
-
type: "bytes32",
|
|
1762
|
-
internalType: "bytes32"
|
|
1763
|
-
}, {
|
|
1764
|
-
name: "account",
|
|
1765
|
-
type: "address",
|
|
1766
|
-
internalType: "address"
|
|
1767
|
-
}],
|
|
1768
|
-
outputs: [{
|
|
1769
|
-
name: "",
|
|
1770
|
-
type: "bool",
|
|
1771
|
-
internalType: "bool"
|
|
1772
|
-
}],
|
|
1773
|
-
stateMutability: "view"
|
|
1774
|
-
},
|
|
1775
|
-
{
|
|
1776
|
-
type: "function",
|
|
1777
|
-
name: "marketTradingPaused",
|
|
1778
|
-
inputs: [{
|
|
1779
|
-
name: "",
|
|
1780
|
-
type: "address",
|
|
1781
|
-
internalType: "address"
|
|
1782
|
-
}],
|
|
1783
|
-
outputs: [{
|
|
1784
|
-
name: "paused",
|
|
1785
|
-
type: "bool",
|
|
1786
|
-
internalType: "bool"
|
|
1787
|
-
}, {
|
|
1788
|
-
name: "updatedAt",
|
|
1789
|
-
type: "uint64",
|
|
1790
|
-
internalType: "uint64"
|
|
1791
|
-
}],
|
|
1792
|
-
stateMutability: "view"
|
|
1793
|
-
},
|
|
1794
|
-
{
|
|
1795
|
-
type: "function",
|
|
1796
|
-
name: "operatorsPaused",
|
|
1797
|
-
inputs: [{
|
|
1798
|
-
name: "",
|
|
1799
|
-
type: "address",
|
|
1800
|
-
internalType: "address"
|
|
1801
|
-
}],
|
|
1802
|
-
outputs: [{
|
|
1803
|
-
name: "paused",
|
|
1804
|
-
type: "bool",
|
|
1805
|
-
internalType: "bool"
|
|
1806
|
-
}, {
|
|
1807
|
-
name: "updatedAt",
|
|
1808
|
-
type: "uint64",
|
|
1809
|
-
internalType: "uint64"
|
|
1810
|
-
}],
|
|
1811
|
-
stateMutability: "view"
|
|
1812
|
-
},
|
|
1813
|
-
{
|
|
1814
|
-
type: "function",
|
|
1815
|
-
name: "pauseGlobal",
|
|
1816
|
-
inputs: [
|
|
1817
|
-
{
|
|
1818
|
-
name: "mintPaused",
|
|
1819
|
-
type: "bool",
|
|
1820
|
-
internalType: "bool"
|
|
1821
|
-
},
|
|
1822
|
-
{
|
|
1823
|
-
name: "burnPaused",
|
|
1824
|
-
type: "bool",
|
|
1825
|
-
internalType: "bool"
|
|
1826
|
-
},
|
|
1827
|
-
{
|
|
1828
|
-
name: "TradingPaused",
|
|
1829
|
-
type: "bool",
|
|
1830
|
-
internalType: "bool"
|
|
1831
|
-
}
|
|
1832
|
-
],
|
|
1833
|
-
outputs: [],
|
|
1834
|
-
stateMutability: "nonpayable"
|
|
1835
|
-
},
|
|
1836
|
-
{
|
|
1837
|
-
type: "function",
|
|
1838
|
-
name: "pauseMarket",
|
|
1839
|
-
inputs: [{
|
|
1840
|
-
name: "market",
|
|
1841
|
-
type: "address",
|
|
1842
|
-
internalType: "address"
|
|
1843
|
-
}, {
|
|
1844
|
-
name: "TradingPaused",
|
|
1845
|
-
type: "bool",
|
|
1846
|
-
internalType: "bool"
|
|
1847
|
-
}],
|
|
1848
|
-
outputs: [],
|
|
1849
|
-
stateMutability: "nonpayable"
|
|
1850
|
-
},
|
|
1851
|
-
{
|
|
1852
|
-
type: "function",
|
|
1853
|
-
name: "pauseOperator",
|
|
1854
|
-
inputs: [{
|
|
1855
|
-
name: "operator",
|
|
1856
|
-
type: "address",
|
|
1857
|
-
internalType: "address"
|
|
1858
|
-
}, {
|
|
1859
|
-
name: "paused",
|
|
1860
|
-
type: "bool",
|
|
1861
|
-
internalType: "bool"
|
|
1862
|
-
}],
|
|
1863
|
-
outputs: [],
|
|
1864
|
-
stateMutability: "nonpayable"
|
|
1865
|
-
},
|
|
1866
|
-
{
|
|
1867
|
-
type: "function",
|
|
1868
|
-
name: "pauseVault",
|
|
1869
|
-
inputs: [
|
|
1870
|
-
{
|
|
1871
|
-
name: "vault",
|
|
1872
|
-
type: "address",
|
|
1873
|
-
internalType: "address"
|
|
1874
|
-
},
|
|
1875
|
-
{
|
|
1876
|
-
name: "mintPaused",
|
|
1877
|
-
type: "bool",
|
|
1878
|
-
internalType: "bool"
|
|
1879
|
-
},
|
|
1880
|
-
{
|
|
1881
|
-
name: "burnPaused",
|
|
1882
|
-
type: "bool",
|
|
1883
|
-
internalType: "bool"
|
|
1884
|
-
}
|
|
1885
|
-
],
|
|
1886
|
-
outputs: [],
|
|
1887
|
-
stateMutability: "nonpayable"
|
|
1888
|
-
},
|
|
1889
|
-
{
|
|
1890
|
-
type: "function",
|
|
1891
|
-
name: "renounceRole",
|
|
1892
|
-
inputs: [{
|
|
1893
|
-
name: "role",
|
|
1894
|
-
type: "bytes32",
|
|
1895
|
-
internalType: "bytes32"
|
|
1896
|
-
}, {
|
|
1897
|
-
name: "callerConfirmation",
|
|
1898
|
-
type: "address",
|
|
1899
|
-
internalType: "address"
|
|
1900
|
-
}],
|
|
1901
|
-
outputs: [],
|
|
1902
|
-
stateMutability: "nonpayable"
|
|
1903
|
-
},
|
|
1904
|
-
{
|
|
1905
|
-
type: "function",
|
|
1906
|
-
name: "revokeRole",
|
|
1907
|
-
inputs: [{
|
|
1908
|
-
name: "role",
|
|
1909
|
-
type: "bytes32",
|
|
1910
|
-
internalType: "bytes32"
|
|
1911
|
-
}, {
|
|
1912
|
-
name: "account",
|
|
1913
|
-
type: "address",
|
|
1914
|
-
internalType: "address"
|
|
1915
|
-
}],
|
|
1916
|
-
outputs: [],
|
|
1917
|
-
stateMutability: "nonpayable"
|
|
1918
|
-
},
|
|
1919
|
-
{
|
|
1920
|
-
type: "function",
|
|
1921
|
-
name: "supportsInterface",
|
|
1922
|
-
inputs: [{
|
|
1923
|
-
name: "interfaceId",
|
|
1924
|
-
type: "bytes4",
|
|
1925
|
-
internalType: "bytes4"
|
|
1926
|
-
}],
|
|
1927
|
-
outputs: [{
|
|
1928
|
-
name: "",
|
|
1929
|
-
type: "bool",
|
|
1930
|
-
internalType: "bool"
|
|
1931
|
-
}],
|
|
1932
|
-
stateMutability: "view"
|
|
1933
|
-
},
|
|
1934
|
-
{
|
|
1935
|
-
type: "function",
|
|
1936
|
-
name: "vaultBurnPaused",
|
|
1937
|
-
inputs: [{
|
|
1938
|
-
name: "",
|
|
1939
|
-
type: "address",
|
|
1940
|
-
internalType: "address"
|
|
1941
|
-
}],
|
|
1942
|
-
outputs: [{
|
|
1943
|
-
name: "paused",
|
|
1944
|
-
type: "bool",
|
|
1945
|
-
internalType: "bool"
|
|
1946
|
-
}, {
|
|
1947
|
-
name: "updatedAt",
|
|
1948
|
-
type: "uint64",
|
|
1949
|
-
internalType: "uint64"
|
|
1950
|
-
}],
|
|
1951
|
-
stateMutability: "view"
|
|
1952
|
-
},
|
|
1953
|
-
{
|
|
1954
|
-
type: "function",
|
|
1955
|
-
name: "vaultMintPaused",
|
|
1956
|
-
inputs: [{
|
|
1957
|
-
name: "",
|
|
1958
|
-
type: "address",
|
|
1959
|
-
internalType: "address"
|
|
1960
|
-
}],
|
|
1961
|
-
outputs: [{
|
|
1962
|
-
name: "paused",
|
|
1963
|
-
type: "bool",
|
|
1964
|
-
internalType: "bool"
|
|
1965
|
-
}, {
|
|
1966
|
-
name: "updatedAt",
|
|
1967
|
-
type: "uint64",
|
|
1968
|
-
internalType: "uint64"
|
|
1969
|
-
}],
|
|
1970
|
-
stateMutability: "view"
|
|
1971
|
-
},
|
|
1972
|
-
{
|
|
1973
|
-
type: "event",
|
|
1974
|
-
name: "PauseGlobal",
|
|
1975
|
-
inputs: [
|
|
1976
|
-
{
|
|
1977
|
-
name: "mintPaused",
|
|
1978
|
-
type: "bool",
|
|
1979
|
-
indexed: false,
|
|
1980
|
-
internalType: "bool"
|
|
1981
|
-
},
|
|
1982
|
-
{
|
|
1983
|
-
name: "burnPaused",
|
|
1984
|
-
type: "bool",
|
|
1985
|
-
indexed: false,
|
|
1986
|
-
internalType: "bool"
|
|
1987
|
-
},
|
|
1988
|
-
{
|
|
1989
|
-
name: "TradingPaused",
|
|
1990
|
-
type: "bool",
|
|
1991
|
-
indexed: false,
|
|
1992
|
-
internalType: "bool"
|
|
1993
|
-
}
|
|
1994
|
-
],
|
|
1995
|
-
anonymous: false
|
|
1996
|
-
},
|
|
1997
|
-
{
|
|
1998
|
-
type: "event",
|
|
1999
|
-
name: "PauseMarket",
|
|
2000
|
-
inputs: [{
|
|
2001
|
-
name: "market",
|
|
2002
|
-
type: "address",
|
|
2003
|
-
indexed: true,
|
|
2004
|
-
internalType: "address"
|
|
2005
|
-
}, {
|
|
2006
|
-
name: "paused",
|
|
2007
|
-
type: "bool",
|
|
2008
|
-
indexed: false,
|
|
2009
|
-
internalType: "bool"
|
|
2010
|
-
}],
|
|
2011
|
-
anonymous: false
|
|
2012
|
-
},
|
|
2013
|
-
{
|
|
2014
|
-
type: "event",
|
|
2015
|
-
name: "PauseOperator",
|
|
2016
|
-
inputs: [{
|
|
2017
|
-
name: "operator",
|
|
2018
|
-
type: "address",
|
|
2019
|
-
indexed: true,
|
|
2020
|
-
internalType: "address"
|
|
2021
|
-
}, {
|
|
2022
|
-
name: "paused",
|
|
2023
|
-
type: "bool",
|
|
2024
|
-
indexed: false,
|
|
2025
|
-
internalType: "bool"
|
|
2026
|
-
}],
|
|
2027
|
-
anonymous: false
|
|
2028
|
-
},
|
|
2029
|
-
{
|
|
2030
|
-
type: "event",
|
|
2031
|
-
name: "PauseVault",
|
|
2032
|
-
inputs: [
|
|
2033
|
-
{
|
|
2034
|
-
name: "vault",
|
|
2035
|
-
type: "address",
|
|
2036
|
-
indexed: true,
|
|
2037
|
-
internalType: "address"
|
|
2038
|
-
},
|
|
2039
|
-
{
|
|
2040
|
-
name: "mintPaused",
|
|
2041
|
-
type: "bool",
|
|
2042
|
-
indexed: false,
|
|
2043
|
-
internalType: "bool"
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
name: "burnPaused",
|
|
2047
|
-
type: "bool",
|
|
2048
|
-
indexed: false,
|
|
2049
|
-
internalType: "bool"
|
|
2050
|
-
}
|
|
2051
|
-
],
|
|
2052
|
-
anonymous: false
|
|
2053
|
-
},
|
|
2054
|
-
{
|
|
2055
|
-
type: "event",
|
|
2056
|
-
name: "RoleAdminChanged",
|
|
2057
|
-
inputs: [
|
|
2058
|
-
{
|
|
2059
|
-
name: "role",
|
|
2060
|
-
type: "bytes32",
|
|
2061
|
-
indexed: true,
|
|
2062
|
-
internalType: "bytes32"
|
|
2063
|
-
},
|
|
2064
|
-
{
|
|
2065
|
-
name: "previousAdminRole",
|
|
2066
|
-
type: "bytes32",
|
|
2067
|
-
indexed: true,
|
|
2068
|
-
internalType: "bytes32"
|
|
2069
|
-
},
|
|
2070
|
-
{
|
|
2071
|
-
name: "newAdminRole",
|
|
2072
|
-
type: "bytes32",
|
|
2073
|
-
indexed: true,
|
|
2074
|
-
internalType: "bytes32"
|
|
2075
|
-
}
|
|
2076
|
-
],
|
|
2077
|
-
anonymous: false
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
type: "event",
|
|
2081
|
-
name: "RoleGranted",
|
|
2082
|
-
inputs: [
|
|
2083
|
-
{
|
|
2084
|
-
name: "role",
|
|
2085
|
-
type: "bytes32",
|
|
2086
|
-
indexed: true,
|
|
2087
|
-
internalType: "bytes32"
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
name: "account",
|
|
2091
|
-
type: "address",
|
|
2092
|
-
indexed: true,
|
|
2093
|
-
internalType: "address"
|
|
2094
|
-
},
|
|
2095
|
-
{
|
|
2096
|
-
name: "sender",
|
|
2097
|
-
type: "address",
|
|
2098
|
-
indexed: true,
|
|
2099
|
-
internalType: "address"
|
|
2100
|
-
}
|
|
2101
|
-
],
|
|
2102
|
-
anonymous: false
|
|
2103
|
-
},
|
|
2104
|
-
{
|
|
2105
|
-
type: "event",
|
|
2106
|
-
name: "RoleRevoked",
|
|
2107
|
-
inputs: [
|
|
2108
|
-
{
|
|
2109
|
-
name: "role",
|
|
2110
|
-
type: "bytes32",
|
|
2111
|
-
indexed: true,
|
|
2112
|
-
internalType: "bytes32"
|
|
2113
|
-
},
|
|
2114
|
-
{
|
|
2115
|
-
name: "account",
|
|
2116
|
-
type: "address",
|
|
2117
|
-
indexed: true,
|
|
2118
|
-
internalType: "address"
|
|
2119
|
-
},
|
|
2120
|
-
{
|
|
2121
|
-
name: "sender",
|
|
2122
|
-
type: "address",
|
|
2123
|
-
indexed: true,
|
|
2124
|
-
internalType: "address"
|
|
2125
|
-
}
|
|
2126
|
-
],
|
|
2127
|
-
anonymous: false
|
|
2128
|
-
},
|
|
2129
|
-
{
|
|
2130
|
-
type: "error",
|
|
2131
|
-
name: "AccessControlBadConfirmation",
|
|
2132
|
-
inputs: []
|
|
2133
|
-
},
|
|
2134
|
-
{
|
|
2135
|
-
type: "error",
|
|
2136
|
-
name: "AccessControlUnauthorizedAccount",
|
|
2137
|
-
inputs: [{
|
|
2138
|
-
name: "account",
|
|
2139
|
-
type: "address",
|
|
2140
|
-
internalType: "address"
|
|
2141
|
-
}, {
|
|
2142
|
-
name: "neededRole",
|
|
2143
|
-
type: "bytes32",
|
|
2144
|
-
internalType: "bytes32"
|
|
2145
|
-
}]
|
|
2146
|
-
}
|
|
2147
|
-
];
|
|
2148
|
-
|
|
2149
1553
|
//#endregion
|
|
2150
1554
|
//#region src/hooks/guardian/usePauseGlobalTrading.ts
|
|
2151
1555
|
const usePauseGlobalTrading = ({ marketAddr }) => {
|
|
@@ -2212,260 +1616,6 @@ const useFeeRates = (feeStrategy) => {
|
|
|
2212
1616
|
return data || {};
|
|
2213
1617
|
};
|
|
2214
1618
|
|
|
2215
|
-
//#endregion
|
|
2216
|
-
//#region src/abis/factory.ts
|
|
2217
|
-
const factoryAbi = [
|
|
2218
|
-
{
|
|
2219
|
-
type: "function",
|
|
2220
|
-
name: "deployFeeStrategy",
|
|
2221
|
-
inputs: [
|
|
2222
|
-
{
|
|
2223
|
-
name: "_openingFeeRate",
|
|
2224
|
-
type: "uint32",
|
|
2225
|
-
internalType: "uint32"
|
|
2226
|
-
},
|
|
2227
|
-
{
|
|
2228
|
-
name: "_baseFeeRate",
|
|
2229
|
-
type: "uint32",
|
|
2230
|
-
internalType: "uint32"
|
|
2231
|
-
},
|
|
2232
|
-
{
|
|
2233
|
-
name: "_minOpeningFee",
|
|
2234
|
-
type: "uint128",
|
|
2235
|
-
internalType: "uint128"
|
|
2236
|
-
},
|
|
2237
|
-
{
|
|
2238
|
-
name: "_minBaseFee",
|
|
2239
|
-
type: "uint128",
|
|
2240
|
-
internalType: "uint128"
|
|
2241
|
-
},
|
|
2242
|
-
{
|
|
2243
|
-
name: "_feeRecipient",
|
|
2244
|
-
type: "address",
|
|
2245
|
-
internalType: "address"
|
|
2246
|
-
}
|
|
2247
|
-
],
|
|
2248
|
-
outputs: [{
|
|
2249
|
-
name: "",
|
|
2250
|
-
type: "address",
|
|
2251
|
-
internalType: "contract FeeStrategy"
|
|
2252
|
-
}],
|
|
2253
|
-
stateMutability: "nonpayable"
|
|
2254
|
-
},
|
|
2255
|
-
{
|
|
2256
|
-
type: "function",
|
|
2257
|
-
name: "deployOptionPricing",
|
|
2258
|
-
inputs: [
|
|
2259
|
-
{
|
|
2260
|
-
name: "_logicContract",
|
|
2261
|
-
type: "address",
|
|
2262
|
-
internalType: "contract StatelessOptionPricing"
|
|
2263
|
-
},
|
|
2264
|
-
{
|
|
2265
|
-
name: "_iv",
|
|
2266
|
-
type: "uint32",
|
|
2267
|
-
internalType: "uint32"
|
|
2268
|
-
},
|
|
2269
|
-
{
|
|
2270
|
-
name: "_riskFreeRate",
|
|
2271
|
-
type: "uint32",
|
|
2272
|
-
internalType: "uint32"
|
|
2273
|
-
},
|
|
2274
|
-
{
|
|
2275
|
-
name: "_minPremiumDailyRate",
|
|
2276
|
-
type: "uint32",
|
|
2277
|
-
internalType: "uint32"
|
|
2278
|
-
},
|
|
2279
|
-
{
|
|
2280
|
-
name: "_minPremiumAmount",
|
|
2281
|
-
type: "uint256",
|
|
2282
|
-
internalType: "uint256"
|
|
2283
|
-
}
|
|
2284
|
-
],
|
|
2285
|
-
outputs: [{
|
|
2286
|
-
name: "",
|
|
2287
|
-
type: "address",
|
|
2288
|
-
internalType: "contract OptionPricing"
|
|
2289
|
-
}],
|
|
2290
|
-
stateMutability: "nonpayable"
|
|
2291
|
-
},
|
|
2292
|
-
{
|
|
2293
|
-
type: "function",
|
|
2294
|
-
name: "deployStaticPerpsPricing",
|
|
2295
|
-
inputs: [{
|
|
2296
|
-
name: "_dailyFundingRate",
|
|
2297
|
-
type: "uint32",
|
|
2298
|
-
internalType: "uint32"
|
|
2299
|
-
}, {
|
|
2300
|
-
name: "_minFundingAmount",
|
|
2301
|
-
type: "uint128",
|
|
2302
|
-
internalType: "uint128"
|
|
2303
|
-
}],
|
|
2304
|
-
outputs: [{
|
|
2305
|
-
name: "",
|
|
2306
|
-
type: "address",
|
|
2307
|
-
internalType: "contract StaticPerpsPricing"
|
|
2308
|
-
}],
|
|
2309
|
-
stateMutability: "nonpayable"
|
|
2310
|
-
},
|
|
2311
|
-
{
|
|
2312
|
-
type: "function",
|
|
2313
|
-
name: "feeStrategies",
|
|
2314
|
-
inputs: [{
|
|
2315
|
-
name: "",
|
|
2316
|
-
type: "bytes32",
|
|
2317
|
-
internalType: "bytes32"
|
|
2318
|
-
}],
|
|
2319
|
-
outputs: [{
|
|
2320
|
-
name: "",
|
|
2321
|
-
type: "address",
|
|
2322
|
-
internalType: "contract FeeStrategy"
|
|
2323
|
-
}],
|
|
2324
|
-
stateMutability: "view"
|
|
2325
|
-
},
|
|
2326
|
-
{
|
|
2327
|
-
type: "function",
|
|
2328
|
-
name: "optionPricings",
|
|
2329
|
-
inputs: [{
|
|
2330
|
-
name: "",
|
|
2331
|
-
type: "bytes32",
|
|
2332
|
-
internalType: "bytes32"
|
|
2333
|
-
}],
|
|
2334
|
-
outputs: [{
|
|
2335
|
-
name: "",
|
|
2336
|
-
type: "address",
|
|
2337
|
-
internalType: "contract OptionPricing"
|
|
2338
|
-
}],
|
|
2339
|
-
stateMutability: "view"
|
|
2340
|
-
},
|
|
2341
|
-
{
|
|
2342
|
-
type: "function",
|
|
2343
|
-
name: "staticPerpsPricings",
|
|
2344
|
-
inputs: [{
|
|
2345
|
-
name: "",
|
|
2346
|
-
type: "bytes32",
|
|
2347
|
-
internalType: "bytes32"
|
|
2348
|
-
}],
|
|
2349
|
-
outputs: [{
|
|
2350
|
-
name: "",
|
|
2351
|
-
type: "address",
|
|
2352
|
-
internalType: "contract StaticPerpsPricing"
|
|
2353
|
-
}],
|
|
2354
|
-
stateMutability: "view"
|
|
2355
|
-
},
|
|
2356
|
-
{
|
|
2357
|
-
type: "event",
|
|
2358
|
-
name: "DeployFeeStrategy",
|
|
2359
|
-
inputs: [
|
|
2360
|
-
{
|
|
2361
|
-
name: "feeStrategy",
|
|
2362
|
-
type: "address",
|
|
2363
|
-
indexed: true,
|
|
2364
|
-
internalType: "contract FeeStrategy"
|
|
2365
|
-
},
|
|
2366
|
-
{
|
|
2367
|
-
name: "openingFeeRate",
|
|
2368
|
-
type: "uint32",
|
|
2369
|
-
indexed: false,
|
|
2370
|
-
internalType: "uint32"
|
|
2371
|
-
},
|
|
2372
|
-
{
|
|
2373
|
-
name: "baseFeeRate",
|
|
2374
|
-
type: "uint32",
|
|
2375
|
-
indexed: false,
|
|
2376
|
-
internalType: "uint32"
|
|
2377
|
-
},
|
|
2378
|
-
{
|
|
2379
|
-
name: "minOpeningFee",
|
|
2380
|
-
type: "uint128",
|
|
2381
|
-
indexed: false,
|
|
2382
|
-
internalType: "uint128"
|
|
2383
|
-
},
|
|
2384
|
-
{
|
|
2385
|
-
name: "minBaseFee",
|
|
2386
|
-
type: "uint128",
|
|
2387
|
-
indexed: false,
|
|
2388
|
-
internalType: "uint128"
|
|
2389
|
-
},
|
|
2390
|
-
{
|
|
2391
|
-
name: "feeRecipient",
|
|
2392
|
-
type: "address",
|
|
2393
|
-
indexed: false,
|
|
2394
|
-
internalType: "address"
|
|
2395
|
-
}
|
|
2396
|
-
],
|
|
2397
|
-
anonymous: false
|
|
2398
|
-
},
|
|
2399
|
-
{
|
|
2400
|
-
type: "event",
|
|
2401
|
-
name: "DeployOptionPricing",
|
|
2402
|
-
inputs: [
|
|
2403
|
-
{
|
|
2404
|
-
name: "pricing",
|
|
2405
|
-
type: "address",
|
|
2406
|
-
indexed: true,
|
|
2407
|
-
internalType: "contract OptionPricing"
|
|
2408
|
-
},
|
|
2409
|
-
{
|
|
2410
|
-
name: "statelessPricing",
|
|
2411
|
-
type: "address",
|
|
2412
|
-
indexed: false,
|
|
2413
|
-
internalType: "contract StatelessOptionPricing"
|
|
2414
|
-
},
|
|
2415
|
-
{
|
|
2416
|
-
name: "iv",
|
|
2417
|
-
type: "uint32",
|
|
2418
|
-
indexed: false,
|
|
2419
|
-
internalType: "uint32"
|
|
2420
|
-
},
|
|
2421
|
-
{
|
|
2422
|
-
name: "riskFreeRate",
|
|
2423
|
-
type: "uint32",
|
|
2424
|
-
indexed: false,
|
|
2425
|
-
internalType: "uint32"
|
|
2426
|
-
},
|
|
2427
|
-
{
|
|
2428
|
-
name: "minPremiumDailyRate",
|
|
2429
|
-
type: "uint32",
|
|
2430
|
-
indexed: false,
|
|
2431
|
-
internalType: "uint32"
|
|
2432
|
-
},
|
|
2433
|
-
{
|
|
2434
|
-
name: "minPremiumAmount",
|
|
2435
|
-
type: "uint256",
|
|
2436
|
-
indexed: false,
|
|
2437
|
-
internalType: "uint256"
|
|
2438
|
-
}
|
|
2439
|
-
],
|
|
2440
|
-
anonymous: false
|
|
2441
|
-
},
|
|
2442
|
-
{
|
|
2443
|
-
type: "event",
|
|
2444
|
-
name: "DeployStaticPerpsPricing",
|
|
2445
|
-
inputs: [
|
|
2446
|
-
{
|
|
2447
|
-
name: "pricing",
|
|
2448
|
-
type: "address",
|
|
2449
|
-
indexed: true,
|
|
2450
|
-
internalType: "contract StaticPerpsPricing"
|
|
2451
|
-
},
|
|
2452
|
-
{
|
|
2453
|
-
name: "dailyFundingRate",
|
|
2454
|
-
type: "uint32",
|
|
2455
|
-
indexed: false,
|
|
2456
|
-
internalType: "uint32"
|
|
2457
|
-
},
|
|
2458
|
-
{
|
|
2459
|
-
name: "minFundingAmount",
|
|
2460
|
-
type: "uint128",
|
|
2461
|
-
indexed: false,
|
|
2462
|
-
internalType: "uint128"
|
|
2463
|
-
}
|
|
2464
|
-
],
|
|
2465
|
-
anonymous: false
|
|
2466
|
-
}
|
|
2467
|
-
];
|
|
2468
|
-
|
|
2469
1619
|
//#endregion
|
|
2470
1620
|
//#region src/hooks/fees/useUpdateMarketFees.ts
|
|
2471
1621
|
const useUpdateMarketFees = (marketAddr) => {
|
|
@@ -2526,6 +1676,7 @@ const useMarketPricing = (marketAddr) => {
|
|
|
2526
1676
|
address: timelockLens === null || timelockLens === void 0 ? void 0 : timelockLens.address,
|
|
2527
1677
|
abi: lensAbi,
|
|
2528
1678
|
functionName: "getPricingParams",
|
|
1679
|
+
args: optionPricing ? [optionPricing] : void 0,
|
|
2529
1680
|
query: {
|
|
2530
1681
|
enabled: !!optionPricing,
|
|
2531
1682
|
select: ([pricingModel, rawData]) => {
|