@gearbox-protocol/sdk 9.6.1 → 9.7.0
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/cjs/dev/providers.js +4 -2
- package/dist/cjs/sdk/chain/chains.js +17 -1
- package/dist/cjs/sdk/constants/address-provider.js +2 -1
- package/dist/cjs/sdk/constants/addresses.js +8 -4
- package/dist/cjs/sdk/constants/networks.js +5 -2
- package/dist/cjs/sdk/router/RouterV300Contract.js +2 -1
- package/dist/cjs/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
- package/dist/cjs/sdk/sdk-gov-legacy/tokens/token.js +4 -2
- package/dist/cjs/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
- package/dist/cjs/sdk/sdk-legacy/core/endpoint.js +2 -1
- package/dist/esm/dev/providers.js +4 -2
- package/dist/esm/sdk/chain/chains.js +18 -1
- package/dist/esm/sdk/constants/address-provider.js +2 -1
- package/dist/esm/sdk/constants/addresses.js +8 -4
- package/dist/esm/sdk/constants/networks.js +5 -2
- package/dist/esm/sdk/router/RouterV300Contract.js +2 -1
- package/dist/esm/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
- package/dist/esm/sdk/sdk-gov-legacy/tokens/token.js +4 -2
- package/dist/esm/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
- package/dist/esm/sdk/sdk-legacy/core/endpoint.js +2 -1
- package/dist/types/sdk/chain/chains.d.ts +2 -1
- package/dist/types/sdk/market/oracle/types.d.ts +12 -0
- package/dist/types/sdk/market/pricefeeds/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -58,7 +58,8 @@ const DRPC_NETS = {
|
|
|
58
58
|
Hemi: "hemi",
|
|
59
59
|
Lisk: "lisk",
|
|
60
60
|
MegaETH: null,
|
|
61
|
-
Etherlink: null
|
|
61
|
+
Etherlink: null,
|
|
62
|
+
Plasma: null
|
|
62
63
|
};
|
|
63
64
|
const ALCHEMY_DOMAINS = {
|
|
64
65
|
Mainnet: "eth-mainnet",
|
|
@@ -74,7 +75,8 @@ const ALCHEMY_DOMAINS = {
|
|
|
74
75
|
MegaETH: null,
|
|
75
76
|
Etherlink: null,
|
|
76
77
|
Hemi: null,
|
|
77
|
-
Lisk: null
|
|
78
|
+
Lisk: null,
|
|
79
|
+
Plasma: null
|
|
78
80
|
};
|
|
79
81
|
function getDrpcUrl(network, apiKey, protocol) {
|
|
80
82
|
const net = DRPC_NETS[network];
|
|
@@ -47,7 +47,8 @@ const SUPPORTED_NETWORKS = [
|
|
|
47
47
|
"WorldChain",
|
|
48
48
|
"Etherlink",
|
|
49
49
|
"Hemi",
|
|
50
|
-
"Lisk"
|
|
50
|
+
"Lisk",
|
|
51
|
+
"Plasma"
|
|
51
52
|
];
|
|
52
53
|
const NetworkType = import_v4.z.enum(SUPPORTED_NETWORKS);
|
|
53
54
|
function withPublicNode(chain, subdomain) {
|
|
@@ -286,6 +287,21 @@ const chains = {
|
|
|
286
287
|
address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
|
|
287
288
|
symbol: "USDC.e"
|
|
288
289
|
}
|
|
290
|
+
}),
|
|
291
|
+
Plasma: (0, import_viem.defineChain)({
|
|
292
|
+
...import_chains.plasma,
|
|
293
|
+
network: "Plasma",
|
|
294
|
+
defaultMarketConfigurators: {},
|
|
295
|
+
isPublic: true,
|
|
296
|
+
wellKnownToken: {
|
|
297
|
+
address: "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb",
|
|
298
|
+
symbol: "USDT0"
|
|
299
|
+
},
|
|
300
|
+
contracts: {
|
|
301
|
+
multicall3: {
|
|
302
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
289
305
|
})
|
|
290
306
|
};
|
|
291
307
|
const networkByChainId = Object.values(chains).reduce((acc, chain) => {
|
|
@@ -104,7 +104,8 @@ const ADDRESS_PROVIDER = {
|
|
|
104
104
|
WorldChain: import_addresses.NOT_DEPLOYED,
|
|
105
105
|
Etherlink: import_addresses.NOT_DEPLOYED,
|
|
106
106
|
Hemi: import_addresses.NOT_DEPLOYED,
|
|
107
|
-
Lisk: import_addresses.NOT_DEPLOYED
|
|
107
|
+
Lisk: import_addresses.NOT_DEPLOYED,
|
|
108
|
+
Plasma: import_addresses.NOT_DEPLOYED
|
|
108
109
|
};
|
|
109
110
|
const ADDRESS_PROVIDER_V310 = "0xF7f0a609BfAb9a0A98786951ef10e5FE26cC1E38";
|
|
110
111
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -45,7 +45,8 @@ const TIMELOCK = {
|
|
|
45
45
|
WorldChain: NOT_DEPLOYED,
|
|
46
46
|
Etherlink: NOT_DEPLOYED,
|
|
47
47
|
Hemi: NOT_DEPLOYED,
|
|
48
|
-
Lisk: NOT_DEPLOYED
|
|
48
|
+
Lisk: NOT_DEPLOYED,
|
|
49
|
+
Plasma: NOT_DEPLOYED
|
|
49
50
|
};
|
|
50
51
|
const GEARBOX_MULTISIG = {
|
|
51
52
|
Mainnet: "0xA7D5DDc1b8557914F158076b228AA91eF613f1D5",
|
|
@@ -62,7 +63,8 @@ const GEARBOX_MULTISIG = {
|
|
|
62
63
|
WorldChain: NOT_DEPLOYED,
|
|
63
64
|
Etherlink: NOT_DEPLOYED,
|
|
64
65
|
Hemi: NOT_DEPLOYED,
|
|
65
|
-
Lisk: NOT_DEPLOYED
|
|
66
|
+
Lisk: NOT_DEPLOYED,
|
|
67
|
+
Plasma: NOT_DEPLOYED
|
|
66
68
|
};
|
|
67
69
|
const GEARBOX_RISK_CURATORS = {
|
|
68
70
|
Mainnet: [TIMELOCK.Mainnet],
|
|
@@ -79,7 +81,8 @@ const GEARBOX_RISK_CURATORS = {
|
|
|
79
81
|
WorldChain: [],
|
|
80
82
|
Etherlink: [],
|
|
81
83
|
Hemi: [],
|
|
82
|
-
Lisk: []
|
|
84
|
+
Lisk: [],
|
|
85
|
+
Plasma: []
|
|
83
86
|
};
|
|
84
87
|
const DEPRECIATED_POOLS = {
|
|
85
88
|
Mainnet: {
|
|
@@ -98,7 +101,8 @@ const DEPRECIATED_POOLS = {
|
|
|
98
101
|
WorldChain: {},
|
|
99
102
|
Etherlink: {},
|
|
100
103
|
Hemi: {},
|
|
101
|
-
Lisk: {}
|
|
104
|
+
Lisk: {},
|
|
105
|
+
Plasma: {}
|
|
102
106
|
};
|
|
103
107
|
// Annotate the CommonJS export names for ESM import in node:
|
|
104
108
|
0 && (module.exports = {
|
|
@@ -49,7 +49,9 @@ const ADDRESS_PROVIDER_BLOCK = {
|
|
|
49
49
|
// arbitrary not deployed yet
|
|
50
50
|
Hemi: 2227553n,
|
|
51
51
|
// arbitrary not deployed yet
|
|
52
|
-
Lisk: 18934260n
|
|
52
|
+
Lisk: 18934260n,
|
|
53
|
+
// arbitrary not deployed yet
|
|
54
|
+
Plasma: 670918n
|
|
53
55
|
// arbitrary not deployed yet
|
|
54
56
|
};
|
|
55
57
|
const BLOCK_DURATION_LOCAL = {
|
|
@@ -69,7 +71,8 @@ const BLOCK_DURATION_LOCAL = {
|
|
|
69
71
|
WorldChain: 2e3,
|
|
70
72
|
Etherlink: 1e3,
|
|
71
73
|
Hemi: 12e3,
|
|
72
|
-
Lisk: 2e3
|
|
74
|
+
Lisk: 2e3,
|
|
75
|
+
Plasma: 1e3
|
|
73
76
|
};
|
|
74
77
|
const DEFAULT_DURATION = 12e3;
|
|
75
78
|
const BLOCK_DURATION = Object.values(import_chain.chains).reduce(
|
|
@@ -332,7 +332,8 @@ class RouterV300Contract extends import_AbstractRouterContract.AbstractRouterCon
|
|
|
332
332
|
WorldChain: "0x0",
|
|
333
333
|
Etherlink: "0x0",
|
|
334
334
|
Hemi: "0x0",
|
|
335
|
-
Lisk: "0x0"
|
|
335
|
+
Lisk: "0x0",
|
|
336
|
+
Plasma: "0x0"
|
|
336
337
|
};
|
|
337
338
|
const pendleRouter = PENDLE_ROUTER_BY_NETWORK[this.sdk.provider.networkType];
|
|
338
339
|
const pendleAdapter = cm.creditManager.adapters.mustGet(pendleRouter);
|
|
@@ -835,7 +835,8 @@ const contractsByNetwork = {
|
|
|
835
835
|
WorldChain: {},
|
|
836
836
|
Etherlink: {},
|
|
837
837
|
Hemi: {},
|
|
838
|
-
Lisk: {}
|
|
838
|
+
Lisk: {},
|
|
839
|
+
Plasma: {}
|
|
839
840
|
};
|
|
840
841
|
const UNISWAP_V3_QUOTER = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
|
|
841
842
|
const CAMELOT_V3_QUOTER = "0x0Fc73040b26E9bC8514fA028D998E73A254Fa76E";
|
|
@@ -947,7 +948,8 @@ const contractParams = {
|
|
|
947
948
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
948
949
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
949
950
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
950
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
951
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
952
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
951
953
|
},
|
|
952
954
|
tokens: ["WETH", "STETH"],
|
|
953
955
|
lpToken: "steCRV"
|
|
@@ -971,7 +973,8 @@ const contractParams = {
|
|
|
971
973
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
972
974
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
973
975
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
974
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
976
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
977
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
975
978
|
},
|
|
976
979
|
tokens: ["WETH", "wstETH"],
|
|
977
980
|
lpToken: "wstETHCRV"
|
|
@@ -995,7 +998,8 @@ const contractParams = {
|
|
|
995
998
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
996
999
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
997
1000
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
998
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1001
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1002
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
999
1003
|
},
|
|
1000
1004
|
tokens: ["GEAR", "WETH"],
|
|
1001
1005
|
lpToken: "GEAR"
|
|
@@ -1531,7 +1535,8 @@ const contractParams = {
|
|
|
1531
1535
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1532
1536
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1533
1537
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1534
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1538
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1539
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1535
1540
|
}
|
|
1536
1541
|
}
|
|
1537
1542
|
]
|
|
@@ -1559,7 +1564,8 @@ const contractParams = {
|
|
|
1559
1564
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1560
1565
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1561
1566
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1562
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1567
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1568
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1563
1569
|
}
|
|
1564
1570
|
}
|
|
1565
1571
|
]
|
|
@@ -1587,7 +1593,8 @@ const contractParams = {
|
|
|
1587
1593
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1588
1594
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1589
1595
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1590
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1596
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1597
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1591
1598
|
}
|
|
1592
1599
|
}
|
|
1593
1600
|
]
|
|
@@ -1615,7 +1622,8 @@ const contractParams = {
|
|
|
1615
1622
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1616
1623
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1617
1624
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1618
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1625
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1626
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1619
1627
|
}
|
|
1620
1628
|
}
|
|
1621
1629
|
]
|
|
@@ -1642,7 +1650,8 @@ const contractParams = {
|
|
|
1642
1650
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1643
1651
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1644
1652
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1645
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1653
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1654
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1646
1655
|
}
|
|
1647
1656
|
}
|
|
1648
1657
|
]
|
|
@@ -1669,7 +1678,8 @@ const contractParams = {
|
|
|
1669
1678
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1670
1679
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1671
1680
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1672
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1681
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1682
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1673
1683
|
}
|
|
1674
1684
|
}
|
|
1675
1685
|
]
|
|
@@ -1703,7 +1713,8 @@ const contractParams = {
|
|
|
1703
1713
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1704
1714
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1705
1715
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1706
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1716
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1717
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1707
1718
|
}
|
|
1708
1719
|
}
|
|
1709
1720
|
]
|
|
@@ -1730,7 +1741,8 @@ const contractParams = {
|
|
|
1730
1741
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1731
1742
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1732
1743
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1733
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1744
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1745
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1734
1746
|
}
|
|
1735
1747
|
}
|
|
1736
1748
|
]
|
|
@@ -1757,7 +1769,8 @@ const contractParams = {
|
|
|
1757
1769
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1758
1770
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1759
1771
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1760
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1772
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1773
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1761
1774
|
}
|
|
1762
1775
|
}
|
|
1763
1776
|
]
|
|
@@ -1784,7 +1797,8 @@ const contractParams = {
|
|
|
1784
1797
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1785
1798
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1786
1799
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1787
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1800
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1801
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1788
1802
|
}
|
|
1789
1803
|
}
|
|
1790
1804
|
]
|
|
@@ -1811,7 +1825,8 @@ const contractParams = {
|
|
|
1811
1825
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1812
1826
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1813
1827
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1814
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1828
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1829
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1815
1830
|
}
|
|
1816
1831
|
}
|
|
1817
1832
|
]
|
|
@@ -1838,7 +1853,8 @@ const contractParams = {
|
|
|
1838
1853
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1839
1854
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1840
1855
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1841
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1856
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1857
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1842
1858
|
}
|
|
1843
1859
|
}
|
|
1844
1860
|
]
|
|
@@ -1865,7 +1881,8 @@ const contractParams = {
|
|
|
1865
1881
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1866
1882
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1867
1883
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1868
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1884
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1885
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1869
1886
|
}
|
|
1870
1887
|
}
|
|
1871
1888
|
]
|
|
@@ -1892,7 +1909,8 @@ const contractParams = {
|
|
|
1892
1909
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1893
1910
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1894
1911
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1895
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1912
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1913
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1896
1914
|
}
|
|
1897
1915
|
}
|
|
1898
1916
|
]
|
|
@@ -1936,7 +1954,8 @@ const contractParams = {
|
|
|
1936
1954
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1937
1955
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1938
1956
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1939
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1957
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1958
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1940
1959
|
}
|
|
1941
1960
|
}
|
|
1942
1961
|
]
|
|
@@ -1963,7 +1982,8 @@ const contractParams = {
|
|
|
1963
1982
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1964
1983
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1965
1984
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1966
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
1985
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
1986
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1967
1987
|
}
|
|
1968
1988
|
}
|
|
1969
1989
|
]
|
|
@@ -1990,7 +2010,8 @@ const contractParams = {
|
|
|
1990
2010
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
1991
2011
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
1992
2012
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
1993
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2013
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2014
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
1994
2015
|
}
|
|
1995
2016
|
},
|
|
1996
2017
|
{
|
|
@@ -2009,7 +2030,8 @@ const contractParams = {
|
|
|
2009
2030
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2010
2031
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2011
2032
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2012
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2033
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2034
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2013
2035
|
}
|
|
2014
2036
|
}
|
|
2015
2037
|
]
|
|
@@ -2036,7 +2058,8 @@ const contractParams = {
|
|
|
2036
2058
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2037
2059
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2038
2060
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2039
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2061
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2062
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2040
2063
|
}
|
|
2041
2064
|
},
|
|
2042
2065
|
{
|
|
@@ -2055,7 +2078,8 @@ const contractParams = {
|
|
|
2055
2078
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2056
2079
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2057
2080
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2058
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2081
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2082
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2059
2083
|
}
|
|
2060
2084
|
}
|
|
2061
2085
|
]
|
|
@@ -2082,7 +2106,8 @@ const contractParams = {
|
|
|
2082
2106
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2083
2107
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2084
2108
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2085
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2109
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2110
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2086
2111
|
}
|
|
2087
2112
|
},
|
|
2088
2113
|
{
|
|
@@ -2101,7 +2126,8 @@ const contractParams = {
|
|
|
2101
2126
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2102
2127
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2103
2128
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2104
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2129
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2130
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2105
2131
|
}
|
|
2106
2132
|
}
|
|
2107
2133
|
]
|
|
@@ -2128,7 +2154,8 @@ const contractParams = {
|
|
|
2128
2154
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2129
2155
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2130
2156
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2131
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2157
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2158
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2132
2159
|
}
|
|
2133
2160
|
},
|
|
2134
2161
|
{
|
|
@@ -2147,7 +2174,8 @@ const contractParams = {
|
|
|
2147
2174
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2148
2175
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2149
2176
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2150
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2177
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2178
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2151
2179
|
}
|
|
2152
2180
|
}
|
|
2153
2181
|
]
|
|
@@ -2174,7 +2202,8 @@ const contractParams = {
|
|
|
2174
2202
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2175
2203
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2176
2204
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2177
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2205
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2206
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2178
2207
|
}
|
|
2179
2208
|
},
|
|
2180
2209
|
{
|
|
@@ -2193,7 +2222,8 @@ const contractParams = {
|
|
|
2193
2222
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2194
2223
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2195
2224
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2196
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2225
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2226
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2197
2227
|
}
|
|
2198
2228
|
}
|
|
2199
2229
|
]
|
|
@@ -2220,7 +2250,8 @@ const contractParams = {
|
|
|
2220
2250
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2221
2251
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2222
2252
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2223
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2253
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2254
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2224
2255
|
}
|
|
2225
2256
|
},
|
|
2226
2257
|
{
|
|
@@ -2239,7 +2270,8 @@ const contractParams = {
|
|
|
2239
2270
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2240
2271
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2241
2272
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2242
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2273
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2274
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2243
2275
|
}
|
|
2244
2276
|
}
|
|
2245
2277
|
]
|
|
@@ -2266,7 +2298,8 @@ const contractParams = {
|
|
|
2266
2298
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2267
2299
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2268
2300
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2269
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2301
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2302
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2270
2303
|
}
|
|
2271
2304
|
},
|
|
2272
2305
|
{
|
|
@@ -2285,7 +2318,8 @@ const contractParams = {
|
|
|
2285
2318
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2286
2319
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2287
2320
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2288
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2321
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2322
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2289
2323
|
}
|
|
2290
2324
|
}
|
|
2291
2325
|
]
|
|
@@ -2309,7 +2343,8 @@ const contractParams = {
|
|
|
2309
2343
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2310
2344
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2311
2345
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2312
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2346
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2347
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2313
2348
|
},
|
|
2314
2349
|
lpToken: "steCRV"
|
|
2315
2350
|
},
|
|
@@ -2341,7 +2376,8 @@ const contractParams = {
|
|
|
2341
2376
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2342
2377
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2343
2378
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2344
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2379
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2380
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2345
2381
|
}
|
|
2346
2382
|
},
|
|
2347
2383
|
BALANCER_V3_ROUTER: {
|
|
@@ -2362,7 +2398,8 @@ const contractParams = {
|
|
|
2362
2398
|
WorldChain: import_constants.NOT_DEPLOYED,
|
|
2363
2399
|
Etherlink: import_constants.NOT_DEPLOYED,
|
|
2364
2400
|
Hemi: import_constants.NOT_DEPLOYED,
|
|
2365
|
-
Lisk: import_constants.NOT_DEPLOYED
|
|
2401
|
+
Lisk: import_constants.NOT_DEPLOYED,
|
|
2402
|
+
Plasma: import_constants.NOT_DEPLOYED
|
|
2366
2403
|
}
|
|
2367
2404
|
},
|
|
2368
2405
|
AAVE_V2_LENDING_POOL: {
|
|
@@ -571,7 +571,8 @@ const tokenDataByNetwork = {
|
|
|
571
571
|
Lisk: {
|
|
572
572
|
wstETH: "0x76D8de471F54aAA87784119c60Df1bbFc852C415",
|
|
573
573
|
lskETH: "0x1b10E2270780858923cdBbC9B5423e29fffD1A44"
|
|
574
|
-
}
|
|
574
|
+
},
|
|
575
|
+
Plasma: {}
|
|
575
576
|
};
|
|
576
577
|
const tickerInfoTokensByNetwork = {
|
|
577
578
|
Mainnet: {
|
|
@@ -972,7 +973,8 @@ const tickerInfoTokensByNetwork = {
|
|
|
972
973
|
WorldChain: {},
|
|
973
974
|
Etherlink: {},
|
|
974
975
|
Hemi: {},
|
|
975
|
-
Lisk: {}
|
|
976
|
+
Lisk: {},
|
|
977
|
+
Plasma: {}
|
|
976
978
|
};
|
|
977
979
|
const tokenSymbolByAddress = Object.entries(tokenDataByNetwork).reduce(
|
|
978
980
|
(acc, [, tokens]) => ({
|
|
@@ -44,7 +44,8 @@ const TESTNET_CHAINS = {
|
|
|
44
44
|
WorldChain: 7889,
|
|
45
45
|
Etherlink: 7890,
|
|
46
46
|
Hemi: 7891,
|
|
47
|
-
Lisk: 7892
|
|
47
|
+
Lisk: 7892,
|
|
48
|
+
Plasma: 7893
|
|
48
49
|
};
|
|
49
50
|
const CHAINS_BY_ID = import_mappers.TypedObjectUtils.swapKeyValue(TESTNET_CHAINS);
|
|
50
51
|
const MAINNET_BY_TESTNET_ID = import_mappers.TypedObjectUtils.entries(TESTNET_CHAINS).reduce((acc, [n, testnetId]) => {
|
|
@@ -33,7 +33,8 @@ const DRPC_NETS = {
|
|
|
33
33
|
Hemi: "hemi",
|
|
34
34
|
Lisk: "lisk",
|
|
35
35
|
MegaETH: null,
|
|
36
|
-
Etherlink: null
|
|
36
|
+
Etherlink: null,
|
|
37
|
+
Plasma: null
|
|
37
38
|
};
|
|
38
39
|
const ALCHEMY_DOMAINS = {
|
|
39
40
|
Mainnet: "eth-mainnet",
|
|
@@ -49,7 +50,8 @@ const ALCHEMY_DOMAINS = {
|
|
|
49
50
|
MegaETH: null,
|
|
50
51
|
Etherlink: null,
|
|
51
52
|
Hemi: null,
|
|
52
|
-
Lisk: null
|
|
53
|
+
Lisk: null,
|
|
54
|
+
Plasma: null
|
|
53
55
|
};
|
|
54
56
|
function getDrpcUrl(network, apiKey, protocol) {
|
|
55
57
|
const net = DRPC_NETS[network];
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
megaethTestnet,
|
|
13
13
|
monadTestnet,
|
|
14
14
|
optimism,
|
|
15
|
+
plasma,
|
|
15
16
|
sonic,
|
|
16
17
|
worldchain
|
|
17
18
|
} from "viem/chains";
|
|
@@ -31,7 +32,8 @@ const SUPPORTED_NETWORKS = [
|
|
|
31
32
|
"WorldChain",
|
|
32
33
|
"Etherlink",
|
|
33
34
|
"Hemi",
|
|
34
|
-
"Lisk"
|
|
35
|
+
"Lisk",
|
|
36
|
+
"Plasma"
|
|
35
37
|
];
|
|
36
38
|
const NetworkType = z.enum(SUPPORTED_NETWORKS);
|
|
37
39
|
function withPublicNode(chain, subdomain) {
|
|
@@ -270,6 +272,21 @@ const chains = {
|
|
|
270
272
|
address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
|
|
271
273
|
symbol: "USDC.e"
|
|
272
274
|
}
|
|
275
|
+
}),
|
|
276
|
+
Plasma: defineChain({
|
|
277
|
+
...plasma,
|
|
278
|
+
network: "Plasma",
|
|
279
|
+
defaultMarketConfigurators: {},
|
|
280
|
+
isPublic: true,
|
|
281
|
+
wellKnownToken: {
|
|
282
|
+
address: "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb",
|
|
283
|
+
symbol: "USDT0"
|
|
284
|
+
},
|
|
285
|
+
contracts: {
|
|
286
|
+
multicall3: {
|
|
287
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
273
290
|
})
|
|
274
291
|
};
|
|
275
292
|
const networkByChainId = Object.values(chains).reduce((acc, chain) => {
|
|
@@ -47,7 +47,8 @@ const ADDRESS_PROVIDER = {
|
|
|
47
47
|
WorldChain: NOT_DEPLOYED,
|
|
48
48
|
Etherlink: NOT_DEPLOYED,
|
|
49
49
|
Hemi: NOT_DEPLOYED,
|
|
50
|
-
Lisk: NOT_DEPLOYED
|
|
50
|
+
Lisk: NOT_DEPLOYED,
|
|
51
|
+
Plasma: NOT_DEPLOYED
|
|
51
52
|
};
|
|
52
53
|
const ADDRESS_PROVIDER_V310 = "0xF7f0a609BfAb9a0A98786951ef10e5FE26cC1E38";
|
|
53
54
|
export {
|
|
@@ -16,7 +16,8 @@ const TIMELOCK = {
|
|
|
16
16
|
WorldChain: NOT_DEPLOYED,
|
|
17
17
|
Etherlink: NOT_DEPLOYED,
|
|
18
18
|
Hemi: NOT_DEPLOYED,
|
|
19
|
-
Lisk: NOT_DEPLOYED
|
|
19
|
+
Lisk: NOT_DEPLOYED,
|
|
20
|
+
Plasma: NOT_DEPLOYED
|
|
20
21
|
};
|
|
21
22
|
const GEARBOX_MULTISIG = {
|
|
22
23
|
Mainnet: "0xA7D5DDc1b8557914F158076b228AA91eF613f1D5",
|
|
@@ -33,7 +34,8 @@ const GEARBOX_MULTISIG = {
|
|
|
33
34
|
WorldChain: NOT_DEPLOYED,
|
|
34
35
|
Etherlink: NOT_DEPLOYED,
|
|
35
36
|
Hemi: NOT_DEPLOYED,
|
|
36
|
-
Lisk: NOT_DEPLOYED
|
|
37
|
+
Lisk: NOT_DEPLOYED,
|
|
38
|
+
Plasma: NOT_DEPLOYED
|
|
37
39
|
};
|
|
38
40
|
const GEARBOX_RISK_CURATORS = {
|
|
39
41
|
Mainnet: [TIMELOCK.Mainnet],
|
|
@@ -50,7 +52,8 @@ const GEARBOX_RISK_CURATORS = {
|
|
|
50
52
|
WorldChain: [],
|
|
51
53
|
Etherlink: [],
|
|
52
54
|
Hemi: [],
|
|
53
|
-
Lisk: []
|
|
55
|
+
Lisk: [],
|
|
56
|
+
Plasma: []
|
|
54
57
|
};
|
|
55
58
|
const DEPRECIATED_POOLS = {
|
|
56
59
|
Mainnet: {
|
|
@@ -69,7 +72,8 @@ const DEPRECIATED_POOLS = {
|
|
|
69
72
|
WorldChain: {},
|
|
70
73
|
Etherlink: {},
|
|
71
74
|
Hemi: {},
|
|
72
|
-
Lisk: {}
|
|
75
|
+
Lisk: {},
|
|
76
|
+
Plasma: {}
|
|
73
77
|
};
|
|
74
78
|
export {
|
|
75
79
|
ADDRESS_0X0,
|
|
@@ -24,7 +24,9 @@ const ADDRESS_PROVIDER_BLOCK = {
|
|
|
24
24
|
// arbitrary not deployed yet
|
|
25
25
|
Hemi: 2227553n,
|
|
26
26
|
// arbitrary not deployed yet
|
|
27
|
-
Lisk: 18934260n
|
|
27
|
+
Lisk: 18934260n,
|
|
28
|
+
// arbitrary not deployed yet
|
|
29
|
+
Plasma: 670918n
|
|
28
30
|
// arbitrary not deployed yet
|
|
29
31
|
};
|
|
30
32
|
const BLOCK_DURATION_LOCAL = {
|
|
@@ -44,7 +46,8 @@ const BLOCK_DURATION_LOCAL = {
|
|
|
44
46
|
WorldChain: 2e3,
|
|
45
47
|
Etherlink: 1e3,
|
|
46
48
|
Hemi: 12e3,
|
|
47
|
-
Lisk: 2e3
|
|
49
|
+
Lisk: 2e3,
|
|
50
|
+
Plasma: 1e3
|
|
48
51
|
};
|
|
49
52
|
const DEFAULT_DURATION = 12e3;
|
|
50
53
|
const BLOCK_DURATION = Object.values(CHAINS).reduce(
|
|
@@ -317,7 +317,8 @@ class RouterV300Contract extends AbstractRouterContract {
|
|
|
317
317
|
WorldChain: "0x0",
|
|
318
318
|
Etherlink: "0x0",
|
|
319
319
|
Hemi: "0x0",
|
|
320
|
-
Lisk: "0x0"
|
|
320
|
+
Lisk: "0x0",
|
|
321
|
+
Plasma: "0x0"
|
|
321
322
|
};
|
|
322
323
|
const pendleRouter = PENDLE_ROUTER_BY_NETWORK[this.sdk.provider.networkType];
|
|
323
324
|
const pendleAdapter = cm.creditManager.adapters.mustGet(pendleRouter);
|
|
@@ -798,7 +798,8 @@ const contractsByNetwork = {
|
|
|
798
798
|
WorldChain: {},
|
|
799
799
|
Etherlink: {},
|
|
800
800
|
Hemi: {},
|
|
801
|
-
Lisk: {}
|
|
801
|
+
Lisk: {},
|
|
802
|
+
Plasma: {}
|
|
802
803
|
};
|
|
803
804
|
const UNISWAP_V3_QUOTER = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
|
|
804
805
|
const CAMELOT_V3_QUOTER = "0x0Fc73040b26E9bC8514fA028D998E73A254Fa76E";
|
|
@@ -910,7 +911,8 @@ const contractParams = {
|
|
|
910
911
|
WorldChain: NOT_DEPLOYED,
|
|
911
912
|
Etherlink: NOT_DEPLOYED,
|
|
912
913
|
Hemi: NOT_DEPLOYED,
|
|
913
|
-
Lisk: NOT_DEPLOYED
|
|
914
|
+
Lisk: NOT_DEPLOYED,
|
|
915
|
+
Plasma: NOT_DEPLOYED
|
|
914
916
|
},
|
|
915
917
|
tokens: ["WETH", "STETH"],
|
|
916
918
|
lpToken: "steCRV"
|
|
@@ -934,7 +936,8 @@ const contractParams = {
|
|
|
934
936
|
WorldChain: NOT_DEPLOYED,
|
|
935
937
|
Etherlink: NOT_DEPLOYED,
|
|
936
938
|
Hemi: NOT_DEPLOYED,
|
|
937
|
-
Lisk: NOT_DEPLOYED
|
|
939
|
+
Lisk: NOT_DEPLOYED,
|
|
940
|
+
Plasma: NOT_DEPLOYED
|
|
938
941
|
},
|
|
939
942
|
tokens: ["WETH", "wstETH"],
|
|
940
943
|
lpToken: "wstETHCRV"
|
|
@@ -958,7 +961,8 @@ const contractParams = {
|
|
|
958
961
|
WorldChain: NOT_DEPLOYED,
|
|
959
962
|
Etherlink: NOT_DEPLOYED,
|
|
960
963
|
Hemi: NOT_DEPLOYED,
|
|
961
|
-
Lisk: NOT_DEPLOYED
|
|
964
|
+
Lisk: NOT_DEPLOYED,
|
|
965
|
+
Plasma: NOT_DEPLOYED
|
|
962
966
|
},
|
|
963
967
|
tokens: ["GEAR", "WETH"],
|
|
964
968
|
lpToken: "GEAR"
|
|
@@ -1494,7 +1498,8 @@ const contractParams = {
|
|
|
1494
1498
|
WorldChain: NOT_DEPLOYED,
|
|
1495
1499
|
Etherlink: NOT_DEPLOYED,
|
|
1496
1500
|
Hemi: NOT_DEPLOYED,
|
|
1497
|
-
Lisk: NOT_DEPLOYED
|
|
1501
|
+
Lisk: NOT_DEPLOYED,
|
|
1502
|
+
Plasma: NOT_DEPLOYED
|
|
1498
1503
|
}
|
|
1499
1504
|
}
|
|
1500
1505
|
]
|
|
@@ -1522,7 +1527,8 @@ const contractParams = {
|
|
|
1522
1527
|
WorldChain: NOT_DEPLOYED,
|
|
1523
1528
|
Etherlink: NOT_DEPLOYED,
|
|
1524
1529
|
Hemi: NOT_DEPLOYED,
|
|
1525
|
-
Lisk: NOT_DEPLOYED
|
|
1530
|
+
Lisk: NOT_DEPLOYED,
|
|
1531
|
+
Plasma: NOT_DEPLOYED
|
|
1526
1532
|
}
|
|
1527
1533
|
}
|
|
1528
1534
|
]
|
|
@@ -1550,7 +1556,8 @@ const contractParams = {
|
|
|
1550
1556
|
WorldChain: NOT_DEPLOYED,
|
|
1551
1557
|
Etherlink: NOT_DEPLOYED,
|
|
1552
1558
|
Hemi: NOT_DEPLOYED,
|
|
1553
|
-
Lisk: NOT_DEPLOYED
|
|
1559
|
+
Lisk: NOT_DEPLOYED,
|
|
1560
|
+
Plasma: NOT_DEPLOYED
|
|
1554
1561
|
}
|
|
1555
1562
|
}
|
|
1556
1563
|
]
|
|
@@ -1578,7 +1585,8 @@ const contractParams = {
|
|
|
1578
1585
|
WorldChain: NOT_DEPLOYED,
|
|
1579
1586
|
Etherlink: NOT_DEPLOYED,
|
|
1580
1587
|
Hemi: NOT_DEPLOYED,
|
|
1581
|
-
Lisk: NOT_DEPLOYED
|
|
1588
|
+
Lisk: NOT_DEPLOYED,
|
|
1589
|
+
Plasma: NOT_DEPLOYED
|
|
1582
1590
|
}
|
|
1583
1591
|
}
|
|
1584
1592
|
]
|
|
@@ -1605,7 +1613,8 @@ const contractParams = {
|
|
|
1605
1613
|
WorldChain: NOT_DEPLOYED,
|
|
1606
1614
|
Etherlink: NOT_DEPLOYED,
|
|
1607
1615
|
Hemi: NOT_DEPLOYED,
|
|
1608
|
-
Lisk: NOT_DEPLOYED
|
|
1616
|
+
Lisk: NOT_DEPLOYED,
|
|
1617
|
+
Plasma: NOT_DEPLOYED
|
|
1609
1618
|
}
|
|
1610
1619
|
}
|
|
1611
1620
|
]
|
|
@@ -1632,7 +1641,8 @@ const contractParams = {
|
|
|
1632
1641
|
WorldChain: NOT_DEPLOYED,
|
|
1633
1642
|
Etherlink: NOT_DEPLOYED,
|
|
1634
1643
|
Hemi: NOT_DEPLOYED,
|
|
1635
|
-
Lisk: NOT_DEPLOYED
|
|
1644
|
+
Lisk: NOT_DEPLOYED,
|
|
1645
|
+
Plasma: NOT_DEPLOYED
|
|
1636
1646
|
}
|
|
1637
1647
|
}
|
|
1638
1648
|
]
|
|
@@ -1666,7 +1676,8 @@ const contractParams = {
|
|
|
1666
1676
|
WorldChain: NOT_DEPLOYED,
|
|
1667
1677
|
Etherlink: NOT_DEPLOYED,
|
|
1668
1678
|
Hemi: NOT_DEPLOYED,
|
|
1669
|
-
Lisk: NOT_DEPLOYED
|
|
1679
|
+
Lisk: NOT_DEPLOYED,
|
|
1680
|
+
Plasma: NOT_DEPLOYED
|
|
1670
1681
|
}
|
|
1671
1682
|
}
|
|
1672
1683
|
]
|
|
@@ -1693,7 +1704,8 @@ const contractParams = {
|
|
|
1693
1704
|
WorldChain: NOT_DEPLOYED,
|
|
1694
1705
|
Etherlink: NOT_DEPLOYED,
|
|
1695
1706
|
Hemi: NOT_DEPLOYED,
|
|
1696
|
-
Lisk: NOT_DEPLOYED
|
|
1707
|
+
Lisk: NOT_DEPLOYED,
|
|
1708
|
+
Plasma: NOT_DEPLOYED
|
|
1697
1709
|
}
|
|
1698
1710
|
}
|
|
1699
1711
|
]
|
|
@@ -1720,7 +1732,8 @@ const contractParams = {
|
|
|
1720
1732
|
WorldChain: NOT_DEPLOYED,
|
|
1721
1733
|
Etherlink: NOT_DEPLOYED,
|
|
1722
1734
|
Hemi: NOT_DEPLOYED,
|
|
1723
|
-
Lisk: NOT_DEPLOYED
|
|
1735
|
+
Lisk: NOT_DEPLOYED,
|
|
1736
|
+
Plasma: NOT_DEPLOYED
|
|
1724
1737
|
}
|
|
1725
1738
|
}
|
|
1726
1739
|
]
|
|
@@ -1747,7 +1760,8 @@ const contractParams = {
|
|
|
1747
1760
|
WorldChain: NOT_DEPLOYED,
|
|
1748
1761
|
Etherlink: NOT_DEPLOYED,
|
|
1749
1762
|
Hemi: NOT_DEPLOYED,
|
|
1750
|
-
Lisk: NOT_DEPLOYED
|
|
1763
|
+
Lisk: NOT_DEPLOYED,
|
|
1764
|
+
Plasma: NOT_DEPLOYED
|
|
1751
1765
|
}
|
|
1752
1766
|
}
|
|
1753
1767
|
]
|
|
@@ -1774,7 +1788,8 @@ const contractParams = {
|
|
|
1774
1788
|
WorldChain: NOT_DEPLOYED,
|
|
1775
1789
|
Etherlink: NOT_DEPLOYED,
|
|
1776
1790
|
Hemi: NOT_DEPLOYED,
|
|
1777
|
-
Lisk: NOT_DEPLOYED
|
|
1791
|
+
Lisk: NOT_DEPLOYED,
|
|
1792
|
+
Plasma: NOT_DEPLOYED
|
|
1778
1793
|
}
|
|
1779
1794
|
}
|
|
1780
1795
|
]
|
|
@@ -1801,7 +1816,8 @@ const contractParams = {
|
|
|
1801
1816
|
WorldChain: NOT_DEPLOYED,
|
|
1802
1817
|
Etherlink: NOT_DEPLOYED,
|
|
1803
1818
|
Hemi: NOT_DEPLOYED,
|
|
1804
|
-
Lisk: NOT_DEPLOYED
|
|
1819
|
+
Lisk: NOT_DEPLOYED,
|
|
1820
|
+
Plasma: NOT_DEPLOYED
|
|
1805
1821
|
}
|
|
1806
1822
|
}
|
|
1807
1823
|
]
|
|
@@ -1828,7 +1844,8 @@ const contractParams = {
|
|
|
1828
1844
|
WorldChain: NOT_DEPLOYED,
|
|
1829
1845
|
Etherlink: NOT_DEPLOYED,
|
|
1830
1846
|
Hemi: NOT_DEPLOYED,
|
|
1831
|
-
Lisk: NOT_DEPLOYED
|
|
1847
|
+
Lisk: NOT_DEPLOYED,
|
|
1848
|
+
Plasma: NOT_DEPLOYED
|
|
1832
1849
|
}
|
|
1833
1850
|
}
|
|
1834
1851
|
]
|
|
@@ -1855,7 +1872,8 @@ const contractParams = {
|
|
|
1855
1872
|
WorldChain: NOT_DEPLOYED,
|
|
1856
1873
|
Etherlink: NOT_DEPLOYED,
|
|
1857
1874
|
Hemi: NOT_DEPLOYED,
|
|
1858
|
-
Lisk: NOT_DEPLOYED
|
|
1875
|
+
Lisk: NOT_DEPLOYED,
|
|
1876
|
+
Plasma: NOT_DEPLOYED
|
|
1859
1877
|
}
|
|
1860
1878
|
}
|
|
1861
1879
|
]
|
|
@@ -1899,7 +1917,8 @@ const contractParams = {
|
|
|
1899
1917
|
WorldChain: NOT_DEPLOYED,
|
|
1900
1918
|
Etherlink: NOT_DEPLOYED,
|
|
1901
1919
|
Hemi: NOT_DEPLOYED,
|
|
1902
|
-
Lisk: NOT_DEPLOYED
|
|
1920
|
+
Lisk: NOT_DEPLOYED,
|
|
1921
|
+
Plasma: NOT_DEPLOYED
|
|
1903
1922
|
}
|
|
1904
1923
|
}
|
|
1905
1924
|
]
|
|
@@ -1926,7 +1945,8 @@ const contractParams = {
|
|
|
1926
1945
|
WorldChain: NOT_DEPLOYED,
|
|
1927
1946
|
Etherlink: NOT_DEPLOYED,
|
|
1928
1947
|
Hemi: NOT_DEPLOYED,
|
|
1929
|
-
Lisk: NOT_DEPLOYED
|
|
1948
|
+
Lisk: NOT_DEPLOYED,
|
|
1949
|
+
Plasma: NOT_DEPLOYED
|
|
1930
1950
|
}
|
|
1931
1951
|
}
|
|
1932
1952
|
]
|
|
@@ -1953,7 +1973,8 @@ const contractParams = {
|
|
|
1953
1973
|
WorldChain: NOT_DEPLOYED,
|
|
1954
1974
|
Etherlink: NOT_DEPLOYED,
|
|
1955
1975
|
Hemi: NOT_DEPLOYED,
|
|
1956
|
-
Lisk: NOT_DEPLOYED
|
|
1976
|
+
Lisk: NOT_DEPLOYED,
|
|
1977
|
+
Plasma: NOT_DEPLOYED
|
|
1957
1978
|
}
|
|
1958
1979
|
},
|
|
1959
1980
|
{
|
|
@@ -1972,7 +1993,8 @@ const contractParams = {
|
|
|
1972
1993
|
WorldChain: NOT_DEPLOYED,
|
|
1973
1994
|
Etherlink: NOT_DEPLOYED,
|
|
1974
1995
|
Hemi: NOT_DEPLOYED,
|
|
1975
|
-
Lisk: NOT_DEPLOYED
|
|
1996
|
+
Lisk: NOT_DEPLOYED,
|
|
1997
|
+
Plasma: NOT_DEPLOYED
|
|
1976
1998
|
}
|
|
1977
1999
|
}
|
|
1978
2000
|
]
|
|
@@ -1999,7 +2021,8 @@ const contractParams = {
|
|
|
1999
2021
|
WorldChain: NOT_DEPLOYED,
|
|
2000
2022
|
Etherlink: NOT_DEPLOYED,
|
|
2001
2023
|
Hemi: NOT_DEPLOYED,
|
|
2002
|
-
Lisk: NOT_DEPLOYED
|
|
2024
|
+
Lisk: NOT_DEPLOYED,
|
|
2025
|
+
Plasma: NOT_DEPLOYED
|
|
2003
2026
|
}
|
|
2004
2027
|
},
|
|
2005
2028
|
{
|
|
@@ -2018,7 +2041,8 @@ const contractParams = {
|
|
|
2018
2041
|
WorldChain: NOT_DEPLOYED,
|
|
2019
2042
|
Etherlink: NOT_DEPLOYED,
|
|
2020
2043
|
Hemi: NOT_DEPLOYED,
|
|
2021
|
-
Lisk: NOT_DEPLOYED
|
|
2044
|
+
Lisk: NOT_DEPLOYED,
|
|
2045
|
+
Plasma: NOT_DEPLOYED
|
|
2022
2046
|
}
|
|
2023
2047
|
}
|
|
2024
2048
|
]
|
|
@@ -2045,7 +2069,8 @@ const contractParams = {
|
|
|
2045
2069
|
WorldChain: NOT_DEPLOYED,
|
|
2046
2070
|
Etherlink: NOT_DEPLOYED,
|
|
2047
2071
|
Hemi: NOT_DEPLOYED,
|
|
2048
|
-
Lisk: NOT_DEPLOYED
|
|
2072
|
+
Lisk: NOT_DEPLOYED,
|
|
2073
|
+
Plasma: NOT_DEPLOYED
|
|
2049
2074
|
}
|
|
2050
2075
|
},
|
|
2051
2076
|
{
|
|
@@ -2064,7 +2089,8 @@ const contractParams = {
|
|
|
2064
2089
|
WorldChain: NOT_DEPLOYED,
|
|
2065
2090
|
Etherlink: NOT_DEPLOYED,
|
|
2066
2091
|
Hemi: NOT_DEPLOYED,
|
|
2067
|
-
Lisk: NOT_DEPLOYED
|
|
2092
|
+
Lisk: NOT_DEPLOYED,
|
|
2093
|
+
Plasma: NOT_DEPLOYED
|
|
2068
2094
|
}
|
|
2069
2095
|
}
|
|
2070
2096
|
]
|
|
@@ -2091,7 +2117,8 @@ const contractParams = {
|
|
|
2091
2117
|
WorldChain: NOT_DEPLOYED,
|
|
2092
2118
|
Etherlink: NOT_DEPLOYED,
|
|
2093
2119
|
Hemi: NOT_DEPLOYED,
|
|
2094
|
-
Lisk: NOT_DEPLOYED
|
|
2120
|
+
Lisk: NOT_DEPLOYED,
|
|
2121
|
+
Plasma: NOT_DEPLOYED
|
|
2095
2122
|
}
|
|
2096
2123
|
},
|
|
2097
2124
|
{
|
|
@@ -2110,7 +2137,8 @@ const contractParams = {
|
|
|
2110
2137
|
WorldChain: NOT_DEPLOYED,
|
|
2111
2138
|
Etherlink: NOT_DEPLOYED,
|
|
2112
2139
|
Hemi: NOT_DEPLOYED,
|
|
2113
|
-
Lisk: NOT_DEPLOYED
|
|
2140
|
+
Lisk: NOT_DEPLOYED,
|
|
2141
|
+
Plasma: NOT_DEPLOYED
|
|
2114
2142
|
}
|
|
2115
2143
|
}
|
|
2116
2144
|
]
|
|
@@ -2137,7 +2165,8 @@ const contractParams = {
|
|
|
2137
2165
|
WorldChain: NOT_DEPLOYED,
|
|
2138
2166
|
Etherlink: NOT_DEPLOYED,
|
|
2139
2167
|
Hemi: NOT_DEPLOYED,
|
|
2140
|
-
Lisk: NOT_DEPLOYED
|
|
2168
|
+
Lisk: NOT_DEPLOYED,
|
|
2169
|
+
Plasma: NOT_DEPLOYED
|
|
2141
2170
|
}
|
|
2142
2171
|
},
|
|
2143
2172
|
{
|
|
@@ -2156,7 +2185,8 @@ const contractParams = {
|
|
|
2156
2185
|
WorldChain: NOT_DEPLOYED,
|
|
2157
2186
|
Etherlink: NOT_DEPLOYED,
|
|
2158
2187
|
Hemi: NOT_DEPLOYED,
|
|
2159
|
-
Lisk: NOT_DEPLOYED
|
|
2188
|
+
Lisk: NOT_DEPLOYED,
|
|
2189
|
+
Plasma: NOT_DEPLOYED
|
|
2160
2190
|
}
|
|
2161
2191
|
}
|
|
2162
2192
|
]
|
|
@@ -2183,7 +2213,8 @@ const contractParams = {
|
|
|
2183
2213
|
WorldChain: NOT_DEPLOYED,
|
|
2184
2214
|
Etherlink: NOT_DEPLOYED,
|
|
2185
2215
|
Hemi: NOT_DEPLOYED,
|
|
2186
|
-
Lisk: NOT_DEPLOYED
|
|
2216
|
+
Lisk: NOT_DEPLOYED,
|
|
2217
|
+
Plasma: NOT_DEPLOYED
|
|
2187
2218
|
}
|
|
2188
2219
|
},
|
|
2189
2220
|
{
|
|
@@ -2202,7 +2233,8 @@ const contractParams = {
|
|
|
2202
2233
|
WorldChain: NOT_DEPLOYED,
|
|
2203
2234
|
Etherlink: NOT_DEPLOYED,
|
|
2204
2235
|
Hemi: NOT_DEPLOYED,
|
|
2205
|
-
Lisk: NOT_DEPLOYED
|
|
2236
|
+
Lisk: NOT_DEPLOYED,
|
|
2237
|
+
Plasma: NOT_DEPLOYED
|
|
2206
2238
|
}
|
|
2207
2239
|
}
|
|
2208
2240
|
]
|
|
@@ -2229,7 +2261,8 @@ const contractParams = {
|
|
|
2229
2261
|
WorldChain: NOT_DEPLOYED,
|
|
2230
2262
|
Etherlink: NOT_DEPLOYED,
|
|
2231
2263
|
Hemi: NOT_DEPLOYED,
|
|
2232
|
-
Lisk: NOT_DEPLOYED
|
|
2264
|
+
Lisk: NOT_DEPLOYED,
|
|
2265
|
+
Plasma: NOT_DEPLOYED
|
|
2233
2266
|
}
|
|
2234
2267
|
},
|
|
2235
2268
|
{
|
|
@@ -2248,7 +2281,8 @@ const contractParams = {
|
|
|
2248
2281
|
WorldChain: NOT_DEPLOYED,
|
|
2249
2282
|
Etherlink: NOT_DEPLOYED,
|
|
2250
2283
|
Hemi: NOT_DEPLOYED,
|
|
2251
|
-
Lisk: NOT_DEPLOYED
|
|
2284
|
+
Lisk: NOT_DEPLOYED,
|
|
2285
|
+
Plasma: NOT_DEPLOYED
|
|
2252
2286
|
}
|
|
2253
2287
|
}
|
|
2254
2288
|
]
|
|
@@ -2272,7 +2306,8 @@ const contractParams = {
|
|
|
2272
2306
|
WorldChain: NOT_DEPLOYED,
|
|
2273
2307
|
Etherlink: NOT_DEPLOYED,
|
|
2274
2308
|
Hemi: NOT_DEPLOYED,
|
|
2275
|
-
Lisk: NOT_DEPLOYED
|
|
2309
|
+
Lisk: NOT_DEPLOYED,
|
|
2310
|
+
Plasma: NOT_DEPLOYED
|
|
2276
2311
|
},
|
|
2277
2312
|
lpToken: "steCRV"
|
|
2278
2313
|
},
|
|
@@ -2304,7 +2339,8 @@ const contractParams = {
|
|
|
2304
2339
|
WorldChain: NOT_DEPLOYED,
|
|
2305
2340
|
Etherlink: NOT_DEPLOYED,
|
|
2306
2341
|
Hemi: NOT_DEPLOYED,
|
|
2307
|
-
Lisk: NOT_DEPLOYED
|
|
2342
|
+
Lisk: NOT_DEPLOYED,
|
|
2343
|
+
Plasma: NOT_DEPLOYED
|
|
2308
2344
|
}
|
|
2309
2345
|
},
|
|
2310
2346
|
BALANCER_V3_ROUTER: {
|
|
@@ -2325,7 +2361,8 @@ const contractParams = {
|
|
|
2325
2361
|
WorldChain: NOT_DEPLOYED,
|
|
2326
2362
|
Etherlink: NOT_DEPLOYED,
|
|
2327
2363
|
Hemi: NOT_DEPLOYED,
|
|
2328
|
-
Lisk: NOT_DEPLOYED
|
|
2364
|
+
Lisk: NOT_DEPLOYED,
|
|
2365
|
+
Plasma: NOT_DEPLOYED
|
|
2329
2366
|
}
|
|
2330
2367
|
},
|
|
2331
2368
|
AAVE_V2_LENDING_POOL: {
|
|
@@ -545,7 +545,8 @@ const tokenDataByNetwork = {
|
|
|
545
545
|
Lisk: {
|
|
546
546
|
wstETH: "0x76D8de471F54aAA87784119c60Df1bbFc852C415",
|
|
547
547
|
lskETH: "0x1b10E2270780858923cdBbC9B5423e29fffD1A44"
|
|
548
|
-
}
|
|
548
|
+
},
|
|
549
|
+
Plasma: {}
|
|
549
550
|
};
|
|
550
551
|
const tickerInfoTokensByNetwork = {
|
|
551
552
|
Mainnet: {
|
|
@@ -946,7 +947,8 @@ const tickerInfoTokensByNetwork = {
|
|
|
946
947
|
WorldChain: {},
|
|
947
948
|
Etherlink: {},
|
|
948
949
|
Hemi: {},
|
|
949
|
-
Lisk: {}
|
|
950
|
+
Lisk: {},
|
|
951
|
+
Plasma: {}
|
|
950
952
|
};
|
|
951
953
|
const tokenSymbolByAddress = Object.entries(tokenDataByNetwork).reduce(
|
|
952
954
|
(acc, [, tokens]) => ({
|
|
@@ -15,7 +15,8 @@ const TESTNET_CHAINS = {
|
|
|
15
15
|
WorldChain: 7889,
|
|
16
16
|
Etherlink: 7890,
|
|
17
17
|
Hemi: 7891,
|
|
18
|
-
Lisk: 7892
|
|
18
|
+
Lisk: 7892,
|
|
19
|
+
Plasma: 7893
|
|
19
20
|
};
|
|
20
21
|
const CHAINS_BY_ID = TypedObjectUtils.swapKeyValue(TESTNET_CHAINS);
|
|
21
22
|
const MAINNET_BY_TESTNET_ID = TypedObjectUtils.entries(TESTNET_CHAINS).reduce((acc, [n, testnetId]) => {
|
|
@@ -23,7 +23,7 @@ export interface GearboxChain extends Chain {
|
|
|
23
23
|
*/
|
|
24
24
|
firstBlock?: bigint;
|
|
25
25
|
}
|
|
26
|
-
export declare const SUPPORTED_NETWORKS: readonly ["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink", "Hemi", "Lisk"];
|
|
26
|
+
export declare const SUPPORTED_NETWORKS: readonly ["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink", "Hemi", "Lisk", "Plasma"];
|
|
27
27
|
export declare const NetworkType: z.ZodEnum<{
|
|
28
28
|
Mainnet: "Mainnet";
|
|
29
29
|
Arbitrum: "Arbitrum";
|
|
@@ -39,6 +39,7 @@ export declare const NetworkType: z.ZodEnum<{
|
|
|
39
39
|
Etherlink: "Etherlink";
|
|
40
40
|
Hemi: "Hemi";
|
|
41
41
|
Lisk: "Lisk";
|
|
42
|
+
Plasma: "Plasma";
|
|
42
43
|
}>;
|
|
43
44
|
export type NetworkType = z.infer<typeof NetworkType>;
|
|
44
45
|
export declare const chains: Record<NetworkType, GearboxChain>;
|
|
@@ -20,7 +20,13 @@ export interface OnDemandPriceUpdates<T = unknown> {
|
|
|
20
20
|
multicall: MultiCall[];
|
|
21
21
|
}
|
|
22
22
|
export interface IPriceOracleContract extends IBaseContract {
|
|
23
|
+
/**
|
|
24
|
+
* Mapping Token => [PriceFeed Address, stalenessPeriod]
|
|
25
|
+
*/
|
|
23
26
|
mainPriceFeeds: AddressMap<PriceFeedRef>;
|
|
27
|
+
/**
|
|
28
|
+
* Mapping Token => Price in USD
|
|
29
|
+
*/
|
|
24
30
|
mainPrices: PriceFeedAnswerMap;
|
|
25
31
|
/**
|
|
26
32
|
* Gets main price for given token
|
|
@@ -29,7 +35,13 @@ export interface IPriceOracleContract extends IBaseContract {
|
|
|
29
35
|
* @returns
|
|
30
36
|
*/
|
|
31
37
|
mainPrice: (token: Address) => bigint;
|
|
38
|
+
/**
|
|
39
|
+
* Mapping Token => [PriceFeed Address, stalenessPeriod]
|
|
40
|
+
*/
|
|
32
41
|
reservePriceFeeds: AddressMap<PriceFeedRef>;
|
|
42
|
+
/**
|
|
43
|
+
* Mapping Token => Price in USD
|
|
44
|
+
*/
|
|
33
45
|
reservePrices: PriceFeedAnswerMap;
|
|
34
46
|
/**
|
|
35
47
|
* Gets reserve price for given token
|
|
@@ -22,6 +22,7 @@ export interface IPriceFeedContract extends IBaseContract {
|
|
|
22
22
|
* Latest answer for this price feed
|
|
23
23
|
*/
|
|
24
24
|
readonly answer: PriceFeedAnswer;
|
|
25
|
+
readonly skipCheck: boolean;
|
|
25
26
|
readonly underlyingPriceFeeds: readonly PriceFeedRef[];
|
|
26
27
|
stateHuman: (raw?: boolean) => UnionOmit<PriceFeedStateHuman, "stalenessPeriod">;
|
|
27
28
|
/**
|