@gearbox-protocol/sdk 8.5.0 → 8.6.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.
@@ -76,7 +76,9 @@ const DRPC_NETS = {
76
76
  Monad: "monad-testnet",
77
77
  // TODO: no drpc
78
78
  MegaETH: "",
79
- Etherlink: ""
79
+ Etherlink: "",
80
+ Hemi: "hemi",
81
+ Lisk: "lisk"
80
82
  };
81
83
  function getDrpcUrl(network, apiKey, protocol) {
82
84
  const net = DRPC_NETS[network];
@@ -42,7 +42,9 @@ const SUPPORTED_NETWORKS = [
42
42
  "Avalanche",
43
43
  "BNB",
44
44
  "WorldChain",
45
- "Etherlink"
45
+ "Etherlink",
46
+ "Hemi",
47
+ "Lisk"
46
48
  ];
47
49
  const NetworkType = import_zod.z.enum(SUPPORTED_NETWORKS);
48
50
  function withPublicNode(chain, subdomain) {
@@ -73,7 +75,9 @@ const chains = {
73
75
  address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
74
76
  symbol: "USDC"
75
77
  },
76
- alchemyDomain: "eth-mainnet"
78
+ alchemyDomain: "eth-mainnet",
79
+ firstBlock: 18433056n
80
+ // AddressProvderV3 0x9ea7b04Da02a5373317D745c1571c84aaD03321D
77
81
  },
78
82
  "ethereum-rpc"
79
83
  ),
@@ -89,7 +93,8 @@ const chains = {
89
93
  address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
90
94
  symbol: "USDC"
91
95
  },
92
- alchemyDomain: "arb-mainnet"
96
+ alchemyDomain: "arb-mainnet",
97
+ firstBlock: 184650310n
93
98
  },
94
99
  "arbitrum-one-rpc"
95
100
  ),
@@ -105,7 +110,8 @@ const chains = {
105
110
  address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
106
111
  symbol: "USDC"
107
112
  },
108
- alchemyDomain: "opt-mainnet"
113
+ alchemyDomain: "opt-mainnet",
114
+ firstBlock: 118410666n
109
115
  },
110
116
  "optimism-rpc"
111
117
  ),
@@ -142,7 +148,8 @@ const chains = {
142
148
  address: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
143
149
  symbol: "USDC"
144
150
  },
145
- alchemyDomain: "sonic-mainnet"
151
+ alchemyDomain: "sonic-mainnet",
152
+ firstBlock: 9779380n
146
153
  }),
147
154
  "sonic-rpc"
148
155
  ),
@@ -221,7 +228,8 @@ const chains = {
221
228
  address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
222
229
  symbol: "USDC"
223
230
  },
224
- alchemyDomain: "bnb-mainnet"
231
+ alchemyDomain: "bnb-mainnet",
232
+ firstBlock: 48761804n
225
233
  },
226
234
  "bsc-rpc"
227
235
  ),
@@ -248,8 +256,29 @@ const chains = {
248
256
  wellKnownToken: {
249
257
  address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9",
250
258
  symbol: "USDC"
251
- }
259
+ },
260
+ firstBlock: 16672969n
252
261
  // TODO: has no block explorer API
262
+ }),
263
+ Hemi: (0, import_viem.defineChain)({
264
+ ...import_chains.hemi,
265
+ network: "Hemi",
266
+ defaultMarketConfigurators: {},
267
+ isPublic: false,
268
+ wellKnownToken: {
269
+ address: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
270
+ symbol: "USDC.e"
271
+ }
272
+ }),
273
+ Lisk: (0, import_viem.defineChain)({
274
+ ...import_chains.lisk,
275
+ network: "Lisk",
276
+ defaultMarketConfigurators: {},
277
+ isPublic: false,
278
+ wellKnownToken: {
279
+ address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
280
+ symbol: "USDC.e"
281
+ }
253
282
  })
254
283
  };
255
284
  const networkByChainId = Object.values(chains).reduce((acc, chain) => {
@@ -100,7 +100,9 @@ const ADDRESS_PROVIDER = {
100
100
  Avalanche: import_addresses.NOT_DEPLOYED,
101
101
  BNB: import_addresses.NOT_DEPLOYED,
102
102
  WorldChain: import_addresses.NOT_DEPLOYED,
103
- Etherlink: import_addresses.NOT_DEPLOYED
103
+ Etherlink: import_addresses.NOT_DEPLOYED,
104
+ Hemi: import_addresses.NOT_DEPLOYED,
105
+ Lisk: import_addresses.NOT_DEPLOYED
104
106
  };
105
107
  const ADDRESS_PROVIDER_V310 = "0xF7f0a609BfAb9a0A98786951ef10e5FE26cC1E38";
106
108
  // Annotate the CommonJS export names for ESM import in node:
@@ -43,7 +43,9 @@ const TIMELOCK = {
43
43
  Avalanche: NOT_DEPLOYED,
44
44
  BNB: NOT_DEPLOYED,
45
45
  WorldChain: NOT_DEPLOYED,
46
- Etherlink: NOT_DEPLOYED
46
+ Etherlink: NOT_DEPLOYED,
47
+ Hemi: NOT_DEPLOYED,
48
+ Lisk: NOT_DEPLOYED
47
49
  };
48
50
  const GEARBOX_MULTISIG = {
49
51
  Mainnet: "0xA7D5DDc1b8557914F158076b228AA91eF613f1D5",
@@ -58,7 +60,9 @@ const GEARBOX_MULTISIG = {
58
60
  Avalanche: NOT_DEPLOYED,
59
61
  BNB: NOT_DEPLOYED,
60
62
  WorldChain: NOT_DEPLOYED,
61
- Etherlink: NOT_DEPLOYED
63
+ Etherlink: NOT_DEPLOYED,
64
+ Hemi: NOT_DEPLOYED,
65
+ Lisk: NOT_DEPLOYED
62
66
  };
63
67
  const GEARBOX_RISK_CURATORS = {
64
68
  Mainnet: [TIMELOCK.Mainnet],
@@ -73,7 +77,9 @@ const GEARBOX_RISK_CURATORS = {
73
77
  Avalanche: [],
74
78
  BNB: [],
75
79
  WorldChain: [],
76
- Etherlink: []
80
+ Etherlink: [],
81
+ Hemi: [],
82
+ Lisk: []
77
83
  };
78
84
  const DEPRECIATED_POOLS = {
79
85
  Mainnet: {
@@ -90,7 +96,9 @@ const DEPRECIATED_POOLS = {
90
96
  Avalanche: {},
91
97
  BNB: {},
92
98
  WorldChain: {},
93
- Etherlink: {}
99
+ Etherlink: {},
100
+ Hemi: {},
101
+ Lisk: {}
94
102
  };
95
103
  // Annotate the CommonJS export names for ESM import in node:
96
104
  0 && (module.exports = {
@@ -44,7 +44,11 @@ const ADDRESS_PROVIDER_BLOCK = {
44
44
  // arbitrary not deployed yet
45
45
  WorldChain: 22372908n,
46
46
  // arbitrary not deployed yet
47
- Etherlink: 16672969n
47
+ Etherlink: 16672969n,
48
+ // arbitrary not deployed yet
49
+ Hemi: 2227553n,
50
+ // arbitrary not deployed yet
51
+ Lisk: 18934260n
48
52
  // arbitrary not deployed yet
49
53
  };
50
54
  const BLOCK_DURATION_BY_NETWORK = {
@@ -62,7 +66,9 @@ const BLOCK_DURATION_BY_NETWORK = {
62
66
  Avalanche: 1.7,
63
67
  BNB: 3,
64
68
  WorldChain: 2,
65
- Etherlink: 1
69
+ Etherlink: 1,
70
+ Hemi: 12,
71
+ Lisk: 2
66
72
  };
67
73
  const RAMP_TIME = 30 * 24 * 60 * 60 * 1.2;
68
74
  const RAMP_DURATION_BY_NETWORK = import_mappers.TypedObjectUtils.entries(BLOCK_DURATION_BY_NETWORK).reduce(
@@ -316,7 +316,9 @@ class RouterV300Contract extends import_AbstractRouterContract.AbstractRouterCon
316
316
  Avalanche: "0x0",
317
317
  BNB: "0x0",
318
318
  WorldChain: "0x0",
319
- Etherlink: "0x0"
319
+ Etherlink: "0x0",
320
+ Hemi: "0x0",
321
+ Lisk: "0x0"
320
322
  };
321
323
  const pendleRouter = PENDLE_ROUTER_BY_NETWORK[this.sdk.provider.networkType];
322
324
  const pendleAdapter = cm.creditManager.adapters.mustGet(pendleRouter);
@@ -833,7 +833,9 @@ const contractsByNetwork = {
833
833
  Berachain: {},
834
834
  BNB: {},
835
835
  WorldChain: {},
836
- Etherlink: {}
836
+ Etherlink: {},
837
+ Hemi: {},
838
+ Lisk: {}
837
839
  };
838
840
  const UNISWAP_V3_QUOTER = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
839
841
  const CAMELOT_V3_QUOTER = "0x0Fc73040b26E9bC8514fA028D998E73A254Fa76E";
@@ -943,7 +945,9 @@ const contractParams = {
943
945
  Avalanche: import_constants.NOT_DEPLOYED,
944
946
  BNB: import_constants.NOT_DEPLOYED,
945
947
  WorldChain: import_constants.NOT_DEPLOYED,
946
- Etherlink: import_constants.NOT_DEPLOYED
948
+ Etherlink: import_constants.NOT_DEPLOYED,
949
+ Hemi: import_constants.NOT_DEPLOYED,
950
+ Lisk: import_constants.NOT_DEPLOYED
947
951
  },
948
952
  tokens: ["WETH", "STETH"],
949
953
  lpToken: "steCRV"
@@ -965,7 +969,9 @@ const contractParams = {
965
969
  Avalanche: import_constants.NOT_DEPLOYED,
966
970
  BNB: import_constants.NOT_DEPLOYED,
967
971
  WorldChain: import_constants.NOT_DEPLOYED,
968
- Etherlink: import_constants.NOT_DEPLOYED
972
+ Etherlink: import_constants.NOT_DEPLOYED,
973
+ Hemi: import_constants.NOT_DEPLOYED,
974
+ Lisk: import_constants.NOT_DEPLOYED
969
975
  },
970
976
  tokens: ["WETH", "wstETH"],
971
977
  lpToken: "wstETHCRV"
@@ -987,7 +993,9 @@ const contractParams = {
987
993
  Avalanche: import_constants.NOT_DEPLOYED,
988
994
  BNB: import_constants.NOT_DEPLOYED,
989
995
  WorldChain: import_constants.NOT_DEPLOYED,
990
- Etherlink: import_constants.NOT_DEPLOYED
996
+ Etherlink: import_constants.NOT_DEPLOYED,
997
+ Hemi: import_constants.NOT_DEPLOYED,
998
+ Lisk: import_constants.NOT_DEPLOYED
991
999
  },
992
1000
  tokens: ["GEAR", "WETH"],
993
1001
  lpToken: "GEAR"
@@ -1521,7 +1529,9 @@ const contractParams = {
1521
1529
  Avalanche: import_constants.NOT_DEPLOYED,
1522
1530
  BNB: import_constants.NOT_DEPLOYED,
1523
1531
  WorldChain: import_constants.NOT_DEPLOYED,
1524
- Etherlink: import_constants.NOT_DEPLOYED
1532
+ Etherlink: import_constants.NOT_DEPLOYED,
1533
+ Hemi: import_constants.NOT_DEPLOYED,
1534
+ Lisk: import_constants.NOT_DEPLOYED
1525
1535
  }
1526
1536
  }
1527
1537
  ]
@@ -1547,7 +1557,9 @@ const contractParams = {
1547
1557
  Avalanche: import_constants.NOT_DEPLOYED,
1548
1558
  BNB: import_constants.NOT_DEPLOYED,
1549
1559
  WorldChain: import_constants.NOT_DEPLOYED,
1550
- Etherlink: import_constants.NOT_DEPLOYED
1560
+ Etherlink: import_constants.NOT_DEPLOYED,
1561
+ Hemi: import_constants.NOT_DEPLOYED,
1562
+ Lisk: import_constants.NOT_DEPLOYED
1551
1563
  }
1552
1564
  }
1553
1565
  ]
@@ -1573,7 +1585,9 @@ const contractParams = {
1573
1585
  Avalanche: import_constants.NOT_DEPLOYED,
1574
1586
  BNB: import_constants.NOT_DEPLOYED,
1575
1587
  WorldChain: import_constants.NOT_DEPLOYED,
1576
- Etherlink: import_constants.NOT_DEPLOYED
1588
+ Etherlink: import_constants.NOT_DEPLOYED,
1589
+ Hemi: import_constants.NOT_DEPLOYED,
1590
+ Lisk: import_constants.NOT_DEPLOYED
1577
1591
  }
1578
1592
  }
1579
1593
  ]
@@ -1599,7 +1613,9 @@ const contractParams = {
1599
1613
  Avalanche: import_constants.NOT_DEPLOYED,
1600
1614
  BNB: import_constants.NOT_DEPLOYED,
1601
1615
  WorldChain: import_constants.NOT_DEPLOYED,
1602
- Etherlink: import_constants.NOT_DEPLOYED
1616
+ Etherlink: import_constants.NOT_DEPLOYED,
1617
+ Hemi: import_constants.NOT_DEPLOYED,
1618
+ Lisk: import_constants.NOT_DEPLOYED
1603
1619
  }
1604
1620
  }
1605
1621
  ]
@@ -1624,7 +1640,9 @@ const contractParams = {
1624
1640
  Avalanche: import_constants.NOT_DEPLOYED,
1625
1641
  BNB: import_constants.NOT_DEPLOYED,
1626
1642
  WorldChain: import_constants.NOT_DEPLOYED,
1627
- Etherlink: import_constants.NOT_DEPLOYED
1643
+ Etherlink: import_constants.NOT_DEPLOYED,
1644
+ Hemi: import_constants.NOT_DEPLOYED,
1645
+ Lisk: import_constants.NOT_DEPLOYED
1628
1646
  }
1629
1647
  }
1630
1648
  ]
@@ -1649,7 +1667,9 @@ const contractParams = {
1649
1667
  Avalanche: import_constants.NOT_DEPLOYED,
1650
1668
  BNB: import_constants.NOT_DEPLOYED,
1651
1669
  WorldChain: import_constants.NOT_DEPLOYED,
1652
- Etherlink: import_constants.NOT_DEPLOYED
1670
+ Etherlink: import_constants.NOT_DEPLOYED,
1671
+ Hemi: import_constants.NOT_DEPLOYED,
1672
+ Lisk: import_constants.NOT_DEPLOYED
1653
1673
  }
1654
1674
  }
1655
1675
  ]
@@ -1681,7 +1701,9 @@ const contractParams = {
1681
1701
  Avalanche: import_constants.NOT_DEPLOYED,
1682
1702
  BNB: import_constants.NOT_DEPLOYED,
1683
1703
  WorldChain: import_constants.NOT_DEPLOYED,
1684
- Etherlink: import_constants.NOT_DEPLOYED
1704
+ Etherlink: import_constants.NOT_DEPLOYED,
1705
+ Hemi: import_constants.NOT_DEPLOYED,
1706
+ Lisk: import_constants.NOT_DEPLOYED
1685
1707
  }
1686
1708
  }
1687
1709
  ]
@@ -1706,7 +1728,9 @@ const contractParams = {
1706
1728
  Avalanche: import_constants.NOT_DEPLOYED,
1707
1729
  BNB: import_constants.NOT_DEPLOYED,
1708
1730
  WorldChain: import_constants.NOT_DEPLOYED,
1709
- Etherlink: import_constants.NOT_DEPLOYED
1731
+ Etherlink: import_constants.NOT_DEPLOYED,
1732
+ Hemi: import_constants.NOT_DEPLOYED,
1733
+ Lisk: import_constants.NOT_DEPLOYED
1710
1734
  }
1711
1735
  }
1712
1736
  ]
@@ -1731,7 +1755,9 @@ const contractParams = {
1731
1755
  Avalanche: import_constants.NOT_DEPLOYED,
1732
1756
  BNB: import_constants.NOT_DEPLOYED,
1733
1757
  WorldChain: import_constants.NOT_DEPLOYED,
1734
- Etherlink: import_constants.NOT_DEPLOYED
1758
+ Etherlink: import_constants.NOT_DEPLOYED,
1759
+ Hemi: import_constants.NOT_DEPLOYED,
1760
+ Lisk: import_constants.NOT_DEPLOYED
1735
1761
  }
1736
1762
  }
1737
1763
  ]
@@ -1756,7 +1782,9 @@ const contractParams = {
1756
1782
  Avalanche: import_constants.NOT_DEPLOYED,
1757
1783
  BNB: import_constants.NOT_DEPLOYED,
1758
1784
  WorldChain: import_constants.NOT_DEPLOYED,
1759
- Etherlink: import_constants.NOT_DEPLOYED
1785
+ Etherlink: import_constants.NOT_DEPLOYED,
1786
+ Hemi: import_constants.NOT_DEPLOYED,
1787
+ Lisk: import_constants.NOT_DEPLOYED
1760
1788
  }
1761
1789
  }
1762
1790
  ]
@@ -1781,7 +1809,9 @@ const contractParams = {
1781
1809
  Avalanche: import_constants.NOT_DEPLOYED,
1782
1810
  BNB: import_constants.NOT_DEPLOYED,
1783
1811
  WorldChain: import_constants.NOT_DEPLOYED,
1784
- Etherlink: import_constants.NOT_DEPLOYED
1812
+ Etherlink: import_constants.NOT_DEPLOYED,
1813
+ Hemi: import_constants.NOT_DEPLOYED,
1814
+ Lisk: import_constants.NOT_DEPLOYED
1785
1815
  }
1786
1816
  }
1787
1817
  ]
@@ -1806,7 +1836,9 @@ const contractParams = {
1806
1836
  Avalanche: import_constants.NOT_DEPLOYED,
1807
1837
  BNB: import_constants.NOT_DEPLOYED,
1808
1838
  WorldChain: import_constants.NOT_DEPLOYED,
1809
- Etherlink: import_constants.NOT_DEPLOYED
1839
+ Etherlink: import_constants.NOT_DEPLOYED,
1840
+ Hemi: import_constants.NOT_DEPLOYED,
1841
+ Lisk: import_constants.NOT_DEPLOYED
1810
1842
  }
1811
1843
  }
1812
1844
  ]
@@ -1831,7 +1863,9 @@ const contractParams = {
1831
1863
  Avalanche: import_constants.NOT_DEPLOYED,
1832
1864
  BNB: import_constants.NOT_DEPLOYED,
1833
1865
  WorldChain: import_constants.NOT_DEPLOYED,
1834
- Etherlink: import_constants.NOT_DEPLOYED
1866
+ Etherlink: import_constants.NOT_DEPLOYED,
1867
+ Hemi: import_constants.NOT_DEPLOYED,
1868
+ Lisk: import_constants.NOT_DEPLOYED
1835
1869
  }
1836
1870
  }
1837
1871
  ]
@@ -1856,7 +1890,9 @@ const contractParams = {
1856
1890
  Avalanche: import_constants.NOT_DEPLOYED,
1857
1891
  BNB: import_constants.NOT_DEPLOYED,
1858
1892
  WorldChain: import_constants.NOT_DEPLOYED,
1859
- Etherlink: import_constants.NOT_DEPLOYED
1893
+ Etherlink: import_constants.NOT_DEPLOYED,
1894
+ Hemi: import_constants.NOT_DEPLOYED,
1895
+ Lisk: import_constants.NOT_DEPLOYED
1860
1896
  }
1861
1897
  }
1862
1898
  ]
@@ -1898,7 +1934,9 @@ const contractParams = {
1898
1934
  Avalanche: import_constants.NOT_DEPLOYED,
1899
1935
  BNB: import_constants.NOT_DEPLOYED,
1900
1936
  WorldChain: import_constants.NOT_DEPLOYED,
1901
- Etherlink: import_constants.NOT_DEPLOYED
1937
+ Etherlink: import_constants.NOT_DEPLOYED,
1938
+ Hemi: import_constants.NOT_DEPLOYED,
1939
+ Lisk: import_constants.NOT_DEPLOYED
1902
1940
  }
1903
1941
  }
1904
1942
  ]
@@ -1923,7 +1961,9 @@ const contractParams = {
1923
1961
  Avalanche: import_constants.NOT_DEPLOYED,
1924
1962
  BNB: import_constants.NOT_DEPLOYED,
1925
1963
  WorldChain: import_constants.NOT_DEPLOYED,
1926
- Etherlink: import_constants.NOT_DEPLOYED
1964
+ Etherlink: import_constants.NOT_DEPLOYED,
1965
+ Hemi: import_constants.NOT_DEPLOYED,
1966
+ Lisk: import_constants.NOT_DEPLOYED
1927
1967
  }
1928
1968
  }
1929
1969
  ]
@@ -1948,7 +1988,9 @@ const contractParams = {
1948
1988
  Avalanche: import_constants.NOT_DEPLOYED,
1949
1989
  BNB: import_constants.NOT_DEPLOYED,
1950
1990
  WorldChain: import_constants.NOT_DEPLOYED,
1951
- Etherlink: import_constants.NOT_DEPLOYED
1991
+ Etherlink: import_constants.NOT_DEPLOYED,
1992
+ Hemi: import_constants.NOT_DEPLOYED,
1993
+ Lisk: import_constants.NOT_DEPLOYED
1952
1994
  }
1953
1995
  },
1954
1996
  {
@@ -1965,7 +2007,9 @@ const contractParams = {
1965
2007
  Avalanche: import_constants.NOT_DEPLOYED,
1966
2008
  BNB: import_constants.NOT_DEPLOYED,
1967
2009
  WorldChain: import_constants.NOT_DEPLOYED,
1968
- Etherlink: import_constants.NOT_DEPLOYED
2010
+ Etherlink: import_constants.NOT_DEPLOYED,
2011
+ Hemi: import_constants.NOT_DEPLOYED,
2012
+ Lisk: import_constants.NOT_DEPLOYED
1969
2013
  }
1970
2014
  }
1971
2015
  ]
@@ -1990,7 +2034,9 @@ const contractParams = {
1990
2034
  Avalanche: import_constants.NOT_DEPLOYED,
1991
2035
  BNB: import_constants.NOT_DEPLOYED,
1992
2036
  WorldChain: import_constants.NOT_DEPLOYED,
1993
- Etherlink: import_constants.NOT_DEPLOYED
2037
+ Etherlink: import_constants.NOT_DEPLOYED,
2038
+ Hemi: import_constants.NOT_DEPLOYED,
2039
+ Lisk: import_constants.NOT_DEPLOYED
1994
2040
  }
1995
2041
  },
1996
2042
  {
@@ -2007,7 +2053,9 @@ const contractParams = {
2007
2053
  Avalanche: import_constants.NOT_DEPLOYED,
2008
2054
  BNB: import_constants.NOT_DEPLOYED,
2009
2055
  WorldChain: import_constants.NOT_DEPLOYED,
2010
- Etherlink: import_constants.NOT_DEPLOYED
2056
+ Etherlink: import_constants.NOT_DEPLOYED,
2057
+ Hemi: import_constants.NOT_DEPLOYED,
2058
+ Lisk: import_constants.NOT_DEPLOYED
2011
2059
  }
2012
2060
  }
2013
2061
  ]
@@ -2032,7 +2080,9 @@ const contractParams = {
2032
2080
  Avalanche: import_constants.NOT_DEPLOYED,
2033
2081
  BNB: import_constants.NOT_DEPLOYED,
2034
2082
  WorldChain: import_constants.NOT_DEPLOYED,
2035
- Etherlink: import_constants.NOT_DEPLOYED
2083
+ Etherlink: import_constants.NOT_DEPLOYED,
2084
+ Hemi: import_constants.NOT_DEPLOYED,
2085
+ Lisk: import_constants.NOT_DEPLOYED
2036
2086
  }
2037
2087
  },
2038
2088
  {
@@ -2049,7 +2099,9 @@ const contractParams = {
2049
2099
  Avalanche: import_constants.NOT_DEPLOYED,
2050
2100
  BNB: import_constants.NOT_DEPLOYED,
2051
2101
  WorldChain: import_constants.NOT_DEPLOYED,
2052
- Etherlink: import_constants.NOT_DEPLOYED
2102
+ Etherlink: import_constants.NOT_DEPLOYED,
2103
+ Hemi: import_constants.NOT_DEPLOYED,
2104
+ Lisk: import_constants.NOT_DEPLOYED
2053
2105
  }
2054
2106
  }
2055
2107
  ]
@@ -2074,7 +2126,9 @@ const contractParams = {
2074
2126
  Avalanche: import_constants.NOT_DEPLOYED,
2075
2127
  BNB: import_constants.NOT_DEPLOYED,
2076
2128
  WorldChain: import_constants.NOT_DEPLOYED,
2077
- Etherlink: import_constants.NOT_DEPLOYED
2129
+ Etherlink: import_constants.NOT_DEPLOYED,
2130
+ Hemi: import_constants.NOT_DEPLOYED,
2131
+ Lisk: import_constants.NOT_DEPLOYED
2078
2132
  }
2079
2133
  },
2080
2134
  {
@@ -2091,7 +2145,9 @@ const contractParams = {
2091
2145
  Avalanche: import_constants.NOT_DEPLOYED,
2092
2146
  BNB: import_constants.NOT_DEPLOYED,
2093
2147
  WorldChain: import_constants.NOT_DEPLOYED,
2094
- Etherlink: import_constants.NOT_DEPLOYED
2148
+ Etherlink: import_constants.NOT_DEPLOYED,
2149
+ Hemi: import_constants.NOT_DEPLOYED,
2150
+ Lisk: import_constants.NOT_DEPLOYED
2095
2151
  }
2096
2152
  }
2097
2153
  ]
@@ -2116,7 +2172,9 @@ const contractParams = {
2116
2172
  Avalanche: import_constants.NOT_DEPLOYED,
2117
2173
  BNB: import_constants.NOT_DEPLOYED,
2118
2174
  WorldChain: import_constants.NOT_DEPLOYED,
2119
- Etherlink: import_constants.NOT_DEPLOYED
2175
+ Etherlink: import_constants.NOT_DEPLOYED,
2176
+ Hemi: import_constants.NOT_DEPLOYED,
2177
+ Lisk: import_constants.NOT_DEPLOYED
2120
2178
  }
2121
2179
  },
2122
2180
  {
@@ -2133,7 +2191,9 @@ const contractParams = {
2133
2191
  Avalanche: import_constants.NOT_DEPLOYED,
2134
2192
  BNB: import_constants.NOT_DEPLOYED,
2135
2193
  WorldChain: import_constants.NOT_DEPLOYED,
2136
- Etherlink: import_constants.NOT_DEPLOYED
2194
+ Etherlink: import_constants.NOT_DEPLOYED,
2195
+ Hemi: import_constants.NOT_DEPLOYED,
2196
+ Lisk: import_constants.NOT_DEPLOYED
2137
2197
  }
2138
2198
  }
2139
2199
  ]
@@ -2158,7 +2218,9 @@ const contractParams = {
2158
2218
  Avalanche: import_constants.NOT_DEPLOYED,
2159
2219
  BNB: import_constants.NOT_DEPLOYED,
2160
2220
  WorldChain: import_constants.NOT_DEPLOYED,
2161
- Etherlink: import_constants.NOT_DEPLOYED
2221
+ Etherlink: import_constants.NOT_DEPLOYED,
2222
+ Hemi: import_constants.NOT_DEPLOYED,
2223
+ Lisk: import_constants.NOT_DEPLOYED
2162
2224
  }
2163
2225
  },
2164
2226
  {
@@ -2175,7 +2237,9 @@ const contractParams = {
2175
2237
  Avalanche: import_constants.NOT_DEPLOYED,
2176
2238
  BNB: import_constants.NOT_DEPLOYED,
2177
2239
  WorldChain: import_constants.NOT_DEPLOYED,
2178
- Etherlink: import_constants.NOT_DEPLOYED
2240
+ Etherlink: import_constants.NOT_DEPLOYED,
2241
+ Hemi: import_constants.NOT_DEPLOYED,
2242
+ Lisk: import_constants.NOT_DEPLOYED
2179
2243
  }
2180
2244
  }
2181
2245
  ]
@@ -2200,7 +2264,9 @@ const contractParams = {
2200
2264
  Avalanche: import_constants.NOT_DEPLOYED,
2201
2265
  BNB: import_constants.NOT_DEPLOYED,
2202
2266
  WorldChain: import_constants.NOT_DEPLOYED,
2203
- Etherlink: import_constants.NOT_DEPLOYED
2267
+ Etherlink: import_constants.NOT_DEPLOYED,
2268
+ Hemi: import_constants.NOT_DEPLOYED,
2269
+ Lisk: import_constants.NOT_DEPLOYED
2204
2270
  }
2205
2271
  },
2206
2272
  {
@@ -2217,7 +2283,9 @@ const contractParams = {
2217
2283
  Avalanche: import_constants.NOT_DEPLOYED,
2218
2284
  BNB: import_constants.NOT_DEPLOYED,
2219
2285
  WorldChain: import_constants.NOT_DEPLOYED,
2220
- Etherlink: import_constants.NOT_DEPLOYED
2286
+ Etherlink: import_constants.NOT_DEPLOYED,
2287
+ Hemi: import_constants.NOT_DEPLOYED,
2288
+ Lisk: import_constants.NOT_DEPLOYED
2221
2289
  }
2222
2290
  }
2223
2291
  ]
@@ -2239,7 +2307,9 @@ const contractParams = {
2239
2307
  Avalanche: import_constants.NOT_DEPLOYED,
2240
2308
  BNB: import_constants.NOT_DEPLOYED,
2241
2309
  WorldChain: import_constants.NOT_DEPLOYED,
2242
- Etherlink: import_constants.NOT_DEPLOYED
2310
+ Etherlink: import_constants.NOT_DEPLOYED,
2311
+ Hemi: import_constants.NOT_DEPLOYED,
2312
+ Lisk: import_constants.NOT_DEPLOYED
2243
2313
  },
2244
2314
  lpToken: "steCRV"
2245
2315
  },
@@ -2269,7 +2339,9 @@ const contractParams = {
2269
2339
  Avalanche: import_constants.NOT_DEPLOYED,
2270
2340
  BNB: import_constants.NOT_DEPLOYED,
2271
2341
  WorldChain: import_constants.NOT_DEPLOYED,
2272
- Etherlink: import_constants.NOT_DEPLOYED
2342
+ Etherlink: import_constants.NOT_DEPLOYED,
2343
+ Hemi: import_constants.NOT_DEPLOYED,
2344
+ Lisk: import_constants.NOT_DEPLOYED
2273
2345
  }
2274
2346
  },
2275
2347
  BALANCER_V3_ROUTER: {
@@ -2288,7 +2360,9 @@ const contractParams = {
2288
2360
  Avalanche: import_constants.NOT_DEPLOYED,
2289
2361
  BNB: import_constants.NOT_DEPLOYED,
2290
2362
  WorldChain: import_constants.NOT_DEPLOYED,
2291
- Etherlink: import_constants.NOT_DEPLOYED
2363
+ Etherlink: import_constants.NOT_DEPLOYED,
2364
+ Hemi: import_constants.NOT_DEPLOYED,
2365
+ Lisk: import_constants.NOT_DEPLOYED
2292
2366
  }
2293
2367
  },
2294
2368
  AAVE_V2_LENDING_POOL: {
@@ -558,7 +558,9 @@ const tokenDataByNetwork = {
558
558
  WETH: "0xfc24f770f94edbca6d6f885e12d4317320bcb401",
559
559
  WXTZ: "0xc9b53ab2679f573e480d01e0f49e2b5cfb7a3eab",
560
560
  mTBILL: "0xdd629e5241cbc5919847783e6c96b2de4754e438"
561
- }
561
+ },
562
+ Hemi: {},
563
+ Lisk: {}
562
564
  };
563
565
  const tickerInfoTokensByNetwork = {
564
566
  Mainnet: {
@@ -957,7 +959,9 @@ const tickerInfoTokensByNetwork = {
957
959
  Avalanche: {},
958
960
  BNB: {},
959
961
  WorldChain: {},
960
- Etherlink: {}
962
+ Etherlink: {},
963
+ Hemi: {},
964
+ Lisk: {}
961
965
  };
962
966
  const tokenSymbolByAddress = Object.entries(tokenDataByNetwork).reduce(
963
967
  (acc, [, tokens]) => ({
@@ -58,7 +58,9 @@ const connectors = {
58
58
  Avalanche: [],
59
59
  BNB: [],
60
60
  WorldChain: [],
61
- Etherlink: []
61
+ Etherlink: [],
62
+ Hemi: [],
63
+ Lisk: []
62
64
  };
63
65
  function getConnectors(networkType) {
64
66
  return connectors[networkType].map((e) => {
@@ -130,7 +130,7 @@ class CreditAccountData_Legacy {
130
130
  );
131
131
  }
132
132
  static sortAssets(balances, prices, tokens) {
133
- return balances.sort(
133
+ return [...balances].sort(
134
134
  (t1, t2) => CreditAccountData_Legacy.assetComparator(
135
135
  t1,
136
136
  t2,
@@ -42,7 +42,9 @@ const TESTNET_CHAINS = {
42
42
  Avalanche: 7886,
43
43
  BNB: 7887,
44
44
  WorldChain: 7889,
45
- Etherlink: 7890
45
+ Etherlink: 7890,
46
+ Hemi: 7891,
47
+ Lisk: 7892
46
48
  };
47
49
  const CHAINS_BY_ID = import_mappers.TypedObjectUtils.swapKeyValue(TESTNET_CHAINS);
48
50
  const MAINNET_BY_TESTNET_ID = import_mappers.TypedObjectUtils.entries(TESTNET_CHAINS).reduce((acc, [n, testnetId]) => {
@@ -50,7 +50,9 @@ const DRPC_NETS = {
50
50
  Monad: "monad-testnet",
51
51
  // TODO: no drpc
52
52
  MegaETH: "",
53
- Etherlink: ""
53
+ Etherlink: "",
54
+ Hemi: "hemi",
55
+ Lisk: "lisk"
54
56
  };
55
57
  function getDrpcUrl(network, apiKey, protocol) {
56
58
  const net = DRPC_NETS[network];
@@ -6,6 +6,8 @@ import {
6
6
  berachain,
7
7
  bsc,
8
8
  etherlink,
9
+ hemi,
10
+ lisk,
9
11
  mainnet,
10
12
  megaethTestnet,
11
13
  monadTestnet,
@@ -26,7 +28,9 @@ const SUPPORTED_NETWORKS = [
26
28
  "Avalanche",
27
29
  "BNB",
28
30
  "WorldChain",
29
- "Etherlink"
31
+ "Etherlink",
32
+ "Hemi",
33
+ "Lisk"
30
34
  ];
31
35
  const NetworkType = z.enum(SUPPORTED_NETWORKS);
32
36
  function withPublicNode(chain, subdomain) {
@@ -57,7 +61,9 @@ const chains = {
57
61
  address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
58
62
  symbol: "USDC"
59
63
  },
60
- alchemyDomain: "eth-mainnet"
64
+ alchemyDomain: "eth-mainnet",
65
+ firstBlock: 18433056n
66
+ // AddressProvderV3 0x9ea7b04Da02a5373317D745c1571c84aaD03321D
61
67
  },
62
68
  "ethereum-rpc"
63
69
  ),
@@ -73,7 +79,8 @@ const chains = {
73
79
  address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
74
80
  symbol: "USDC"
75
81
  },
76
- alchemyDomain: "arb-mainnet"
82
+ alchemyDomain: "arb-mainnet",
83
+ firstBlock: 184650310n
77
84
  },
78
85
  "arbitrum-one-rpc"
79
86
  ),
@@ -89,7 +96,8 @@ const chains = {
89
96
  address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
90
97
  symbol: "USDC"
91
98
  },
92
- alchemyDomain: "opt-mainnet"
99
+ alchemyDomain: "opt-mainnet",
100
+ firstBlock: 118410666n
93
101
  },
94
102
  "optimism-rpc"
95
103
  ),
@@ -126,7 +134,8 @@ const chains = {
126
134
  address: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
127
135
  symbol: "USDC"
128
136
  },
129
- alchemyDomain: "sonic-mainnet"
137
+ alchemyDomain: "sonic-mainnet",
138
+ firstBlock: 9779380n
130
139
  }),
131
140
  "sonic-rpc"
132
141
  ),
@@ -205,7 +214,8 @@ const chains = {
205
214
  address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
206
215
  symbol: "USDC"
207
216
  },
208
- alchemyDomain: "bnb-mainnet"
217
+ alchemyDomain: "bnb-mainnet",
218
+ firstBlock: 48761804n
209
219
  },
210
220
  "bsc-rpc"
211
221
  ),
@@ -232,8 +242,29 @@ const chains = {
232
242
  wellKnownToken: {
233
243
  address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9",
234
244
  symbol: "USDC"
235
- }
245
+ },
246
+ firstBlock: 16672969n
236
247
  // TODO: has no block explorer API
248
+ }),
249
+ Hemi: defineChain({
250
+ ...hemi,
251
+ network: "Hemi",
252
+ defaultMarketConfigurators: {},
253
+ isPublic: false,
254
+ wellKnownToken: {
255
+ address: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
256
+ symbol: "USDC.e"
257
+ }
258
+ }),
259
+ Lisk: defineChain({
260
+ ...lisk,
261
+ network: "Lisk",
262
+ defaultMarketConfigurators: {},
263
+ isPublic: false,
264
+ wellKnownToken: {
265
+ address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
266
+ symbol: "USDC.e"
267
+ }
237
268
  })
238
269
  };
239
270
  const networkByChainId = Object.values(chains).reduce((acc, chain) => {
@@ -44,7 +44,9 @@ const ADDRESS_PROVIDER = {
44
44
  Avalanche: NOT_DEPLOYED,
45
45
  BNB: NOT_DEPLOYED,
46
46
  WorldChain: NOT_DEPLOYED,
47
- Etherlink: NOT_DEPLOYED
47
+ Etherlink: NOT_DEPLOYED,
48
+ Hemi: NOT_DEPLOYED,
49
+ Lisk: NOT_DEPLOYED
48
50
  };
49
51
  const ADDRESS_PROVIDER_V310 = "0xF7f0a609BfAb9a0A98786951ef10e5FE26cC1E38";
50
52
  export {
@@ -14,7 +14,9 @@ const TIMELOCK = {
14
14
  Avalanche: NOT_DEPLOYED,
15
15
  BNB: NOT_DEPLOYED,
16
16
  WorldChain: NOT_DEPLOYED,
17
- Etherlink: NOT_DEPLOYED
17
+ Etherlink: NOT_DEPLOYED,
18
+ Hemi: NOT_DEPLOYED,
19
+ Lisk: NOT_DEPLOYED
18
20
  };
19
21
  const GEARBOX_MULTISIG = {
20
22
  Mainnet: "0xA7D5DDc1b8557914F158076b228AA91eF613f1D5",
@@ -29,7 +31,9 @@ const GEARBOX_MULTISIG = {
29
31
  Avalanche: NOT_DEPLOYED,
30
32
  BNB: NOT_DEPLOYED,
31
33
  WorldChain: NOT_DEPLOYED,
32
- Etherlink: NOT_DEPLOYED
34
+ Etherlink: NOT_DEPLOYED,
35
+ Hemi: NOT_DEPLOYED,
36
+ Lisk: NOT_DEPLOYED
33
37
  };
34
38
  const GEARBOX_RISK_CURATORS = {
35
39
  Mainnet: [TIMELOCK.Mainnet],
@@ -44,7 +48,9 @@ const GEARBOX_RISK_CURATORS = {
44
48
  Avalanche: [],
45
49
  BNB: [],
46
50
  WorldChain: [],
47
- Etherlink: []
51
+ Etherlink: [],
52
+ Hemi: [],
53
+ Lisk: []
48
54
  };
49
55
  const DEPRECIATED_POOLS = {
50
56
  Mainnet: {
@@ -61,7 +67,9 @@ const DEPRECIATED_POOLS = {
61
67
  Avalanche: {},
62
68
  BNB: {},
63
69
  WorldChain: {},
64
- Etherlink: {}
70
+ Etherlink: {},
71
+ Hemi: {},
72
+ Lisk: {}
65
73
  };
66
74
  export {
67
75
  ADDRESS_0X0,
@@ -19,7 +19,11 @@ const ADDRESS_PROVIDER_BLOCK = {
19
19
  // arbitrary not deployed yet
20
20
  WorldChain: 22372908n,
21
21
  // arbitrary not deployed yet
22
- Etherlink: 16672969n
22
+ Etherlink: 16672969n,
23
+ // arbitrary not deployed yet
24
+ Hemi: 2227553n,
25
+ // arbitrary not deployed yet
26
+ Lisk: 18934260n
23
27
  // arbitrary not deployed yet
24
28
  };
25
29
  const BLOCK_DURATION_BY_NETWORK = {
@@ -37,7 +41,9 @@ const BLOCK_DURATION_BY_NETWORK = {
37
41
  Avalanche: 1.7,
38
42
  BNB: 3,
39
43
  WorldChain: 2,
40
- Etherlink: 1
44
+ Etherlink: 1,
45
+ Hemi: 12,
46
+ Lisk: 2
41
47
  };
42
48
  const RAMP_TIME = 30 * 24 * 60 * 60 * 1.2;
43
49
  const RAMP_DURATION_BY_NETWORK = TypedObjectUtils.entries(BLOCK_DURATION_BY_NETWORK).reduce(
@@ -296,7 +296,9 @@ class RouterV300Contract extends AbstractRouterContract {
296
296
  Avalanche: "0x0",
297
297
  BNB: "0x0",
298
298
  WorldChain: "0x0",
299
- Etherlink: "0x0"
299
+ Etherlink: "0x0",
300
+ Hemi: "0x0",
301
+ Lisk: "0x0"
300
302
  };
301
303
  const pendleRouter = PENDLE_ROUTER_BY_NETWORK[this.sdk.provider.networkType];
302
304
  const pendleAdapter = cm.creditManager.adapters.mustGet(pendleRouter);
@@ -796,7 +796,9 @@ const contractsByNetwork = {
796
796
  Berachain: {},
797
797
  BNB: {},
798
798
  WorldChain: {},
799
- Etherlink: {}
799
+ Etherlink: {},
800
+ Hemi: {},
801
+ Lisk: {}
800
802
  };
801
803
  const UNISWAP_V3_QUOTER = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
802
804
  const CAMELOT_V3_QUOTER = "0x0Fc73040b26E9bC8514fA028D998E73A254Fa76E";
@@ -906,7 +908,9 @@ const contractParams = {
906
908
  Avalanche: NOT_DEPLOYED,
907
909
  BNB: NOT_DEPLOYED,
908
910
  WorldChain: NOT_DEPLOYED,
909
- Etherlink: NOT_DEPLOYED
911
+ Etherlink: NOT_DEPLOYED,
912
+ Hemi: NOT_DEPLOYED,
913
+ Lisk: NOT_DEPLOYED
910
914
  },
911
915
  tokens: ["WETH", "STETH"],
912
916
  lpToken: "steCRV"
@@ -928,7 +932,9 @@ const contractParams = {
928
932
  Avalanche: NOT_DEPLOYED,
929
933
  BNB: NOT_DEPLOYED,
930
934
  WorldChain: NOT_DEPLOYED,
931
- Etherlink: NOT_DEPLOYED
935
+ Etherlink: NOT_DEPLOYED,
936
+ Hemi: NOT_DEPLOYED,
937
+ Lisk: NOT_DEPLOYED
932
938
  },
933
939
  tokens: ["WETH", "wstETH"],
934
940
  lpToken: "wstETHCRV"
@@ -950,7 +956,9 @@ const contractParams = {
950
956
  Avalanche: NOT_DEPLOYED,
951
957
  BNB: NOT_DEPLOYED,
952
958
  WorldChain: NOT_DEPLOYED,
953
- Etherlink: NOT_DEPLOYED
959
+ Etherlink: NOT_DEPLOYED,
960
+ Hemi: NOT_DEPLOYED,
961
+ Lisk: NOT_DEPLOYED
954
962
  },
955
963
  tokens: ["GEAR", "WETH"],
956
964
  lpToken: "GEAR"
@@ -1484,7 +1492,9 @@ const contractParams = {
1484
1492
  Avalanche: NOT_DEPLOYED,
1485
1493
  BNB: NOT_DEPLOYED,
1486
1494
  WorldChain: NOT_DEPLOYED,
1487
- Etherlink: NOT_DEPLOYED
1495
+ Etherlink: NOT_DEPLOYED,
1496
+ Hemi: NOT_DEPLOYED,
1497
+ Lisk: NOT_DEPLOYED
1488
1498
  }
1489
1499
  }
1490
1500
  ]
@@ -1510,7 +1520,9 @@ const contractParams = {
1510
1520
  Avalanche: NOT_DEPLOYED,
1511
1521
  BNB: NOT_DEPLOYED,
1512
1522
  WorldChain: NOT_DEPLOYED,
1513
- Etherlink: NOT_DEPLOYED
1523
+ Etherlink: NOT_DEPLOYED,
1524
+ Hemi: NOT_DEPLOYED,
1525
+ Lisk: NOT_DEPLOYED
1514
1526
  }
1515
1527
  }
1516
1528
  ]
@@ -1536,7 +1548,9 @@ const contractParams = {
1536
1548
  Avalanche: NOT_DEPLOYED,
1537
1549
  BNB: NOT_DEPLOYED,
1538
1550
  WorldChain: NOT_DEPLOYED,
1539
- Etherlink: NOT_DEPLOYED
1551
+ Etherlink: NOT_DEPLOYED,
1552
+ Hemi: NOT_DEPLOYED,
1553
+ Lisk: NOT_DEPLOYED
1540
1554
  }
1541
1555
  }
1542
1556
  ]
@@ -1562,7 +1576,9 @@ const contractParams = {
1562
1576
  Avalanche: NOT_DEPLOYED,
1563
1577
  BNB: NOT_DEPLOYED,
1564
1578
  WorldChain: NOT_DEPLOYED,
1565
- Etherlink: NOT_DEPLOYED
1579
+ Etherlink: NOT_DEPLOYED,
1580
+ Hemi: NOT_DEPLOYED,
1581
+ Lisk: NOT_DEPLOYED
1566
1582
  }
1567
1583
  }
1568
1584
  ]
@@ -1587,7 +1603,9 @@ const contractParams = {
1587
1603
  Avalanche: NOT_DEPLOYED,
1588
1604
  BNB: NOT_DEPLOYED,
1589
1605
  WorldChain: NOT_DEPLOYED,
1590
- Etherlink: NOT_DEPLOYED
1606
+ Etherlink: NOT_DEPLOYED,
1607
+ Hemi: NOT_DEPLOYED,
1608
+ Lisk: NOT_DEPLOYED
1591
1609
  }
1592
1610
  }
1593
1611
  ]
@@ -1612,7 +1630,9 @@ const contractParams = {
1612
1630
  Avalanche: NOT_DEPLOYED,
1613
1631
  BNB: NOT_DEPLOYED,
1614
1632
  WorldChain: NOT_DEPLOYED,
1615
- Etherlink: NOT_DEPLOYED
1633
+ Etherlink: NOT_DEPLOYED,
1634
+ Hemi: NOT_DEPLOYED,
1635
+ Lisk: NOT_DEPLOYED
1616
1636
  }
1617
1637
  }
1618
1638
  ]
@@ -1644,7 +1664,9 @@ const contractParams = {
1644
1664
  Avalanche: NOT_DEPLOYED,
1645
1665
  BNB: NOT_DEPLOYED,
1646
1666
  WorldChain: NOT_DEPLOYED,
1647
- Etherlink: NOT_DEPLOYED
1667
+ Etherlink: NOT_DEPLOYED,
1668
+ Hemi: NOT_DEPLOYED,
1669
+ Lisk: NOT_DEPLOYED
1648
1670
  }
1649
1671
  }
1650
1672
  ]
@@ -1669,7 +1691,9 @@ const contractParams = {
1669
1691
  Avalanche: NOT_DEPLOYED,
1670
1692
  BNB: NOT_DEPLOYED,
1671
1693
  WorldChain: NOT_DEPLOYED,
1672
- Etherlink: NOT_DEPLOYED
1694
+ Etherlink: NOT_DEPLOYED,
1695
+ Hemi: NOT_DEPLOYED,
1696
+ Lisk: NOT_DEPLOYED
1673
1697
  }
1674
1698
  }
1675
1699
  ]
@@ -1694,7 +1718,9 @@ const contractParams = {
1694
1718
  Avalanche: NOT_DEPLOYED,
1695
1719
  BNB: NOT_DEPLOYED,
1696
1720
  WorldChain: NOT_DEPLOYED,
1697
- Etherlink: NOT_DEPLOYED
1721
+ Etherlink: NOT_DEPLOYED,
1722
+ Hemi: NOT_DEPLOYED,
1723
+ Lisk: NOT_DEPLOYED
1698
1724
  }
1699
1725
  }
1700
1726
  ]
@@ -1719,7 +1745,9 @@ const contractParams = {
1719
1745
  Avalanche: NOT_DEPLOYED,
1720
1746
  BNB: NOT_DEPLOYED,
1721
1747
  WorldChain: NOT_DEPLOYED,
1722
- Etherlink: NOT_DEPLOYED
1748
+ Etherlink: NOT_DEPLOYED,
1749
+ Hemi: NOT_DEPLOYED,
1750
+ Lisk: NOT_DEPLOYED
1723
1751
  }
1724
1752
  }
1725
1753
  ]
@@ -1744,7 +1772,9 @@ const contractParams = {
1744
1772
  Avalanche: NOT_DEPLOYED,
1745
1773
  BNB: NOT_DEPLOYED,
1746
1774
  WorldChain: NOT_DEPLOYED,
1747
- Etherlink: NOT_DEPLOYED
1775
+ Etherlink: NOT_DEPLOYED,
1776
+ Hemi: NOT_DEPLOYED,
1777
+ Lisk: NOT_DEPLOYED
1748
1778
  }
1749
1779
  }
1750
1780
  ]
@@ -1769,7 +1799,9 @@ const contractParams = {
1769
1799
  Avalanche: NOT_DEPLOYED,
1770
1800
  BNB: NOT_DEPLOYED,
1771
1801
  WorldChain: NOT_DEPLOYED,
1772
- Etherlink: NOT_DEPLOYED
1802
+ Etherlink: NOT_DEPLOYED,
1803
+ Hemi: NOT_DEPLOYED,
1804
+ Lisk: NOT_DEPLOYED
1773
1805
  }
1774
1806
  }
1775
1807
  ]
@@ -1794,7 +1826,9 @@ const contractParams = {
1794
1826
  Avalanche: NOT_DEPLOYED,
1795
1827
  BNB: NOT_DEPLOYED,
1796
1828
  WorldChain: NOT_DEPLOYED,
1797
- Etherlink: NOT_DEPLOYED
1829
+ Etherlink: NOT_DEPLOYED,
1830
+ Hemi: NOT_DEPLOYED,
1831
+ Lisk: NOT_DEPLOYED
1798
1832
  }
1799
1833
  }
1800
1834
  ]
@@ -1819,7 +1853,9 @@ const contractParams = {
1819
1853
  Avalanche: NOT_DEPLOYED,
1820
1854
  BNB: NOT_DEPLOYED,
1821
1855
  WorldChain: NOT_DEPLOYED,
1822
- Etherlink: NOT_DEPLOYED
1856
+ Etherlink: NOT_DEPLOYED,
1857
+ Hemi: NOT_DEPLOYED,
1858
+ Lisk: NOT_DEPLOYED
1823
1859
  }
1824
1860
  }
1825
1861
  ]
@@ -1861,7 +1897,9 @@ const contractParams = {
1861
1897
  Avalanche: NOT_DEPLOYED,
1862
1898
  BNB: NOT_DEPLOYED,
1863
1899
  WorldChain: NOT_DEPLOYED,
1864
- Etherlink: NOT_DEPLOYED
1900
+ Etherlink: NOT_DEPLOYED,
1901
+ Hemi: NOT_DEPLOYED,
1902
+ Lisk: NOT_DEPLOYED
1865
1903
  }
1866
1904
  }
1867
1905
  ]
@@ -1886,7 +1924,9 @@ const contractParams = {
1886
1924
  Avalanche: NOT_DEPLOYED,
1887
1925
  BNB: NOT_DEPLOYED,
1888
1926
  WorldChain: NOT_DEPLOYED,
1889
- Etherlink: NOT_DEPLOYED
1927
+ Etherlink: NOT_DEPLOYED,
1928
+ Hemi: NOT_DEPLOYED,
1929
+ Lisk: NOT_DEPLOYED
1890
1930
  }
1891
1931
  }
1892
1932
  ]
@@ -1911,7 +1951,9 @@ const contractParams = {
1911
1951
  Avalanche: NOT_DEPLOYED,
1912
1952
  BNB: NOT_DEPLOYED,
1913
1953
  WorldChain: NOT_DEPLOYED,
1914
- Etherlink: NOT_DEPLOYED
1954
+ Etherlink: NOT_DEPLOYED,
1955
+ Hemi: NOT_DEPLOYED,
1956
+ Lisk: NOT_DEPLOYED
1915
1957
  }
1916
1958
  },
1917
1959
  {
@@ -1928,7 +1970,9 @@ const contractParams = {
1928
1970
  Avalanche: NOT_DEPLOYED,
1929
1971
  BNB: NOT_DEPLOYED,
1930
1972
  WorldChain: NOT_DEPLOYED,
1931
- Etherlink: NOT_DEPLOYED
1973
+ Etherlink: NOT_DEPLOYED,
1974
+ Hemi: NOT_DEPLOYED,
1975
+ Lisk: NOT_DEPLOYED
1932
1976
  }
1933
1977
  }
1934
1978
  ]
@@ -1953,7 +1997,9 @@ const contractParams = {
1953
1997
  Avalanche: NOT_DEPLOYED,
1954
1998
  BNB: NOT_DEPLOYED,
1955
1999
  WorldChain: NOT_DEPLOYED,
1956
- Etherlink: NOT_DEPLOYED
2000
+ Etherlink: NOT_DEPLOYED,
2001
+ Hemi: NOT_DEPLOYED,
2002
+ Lisk: NOT_DEPLOYED
1957
2003
  }
1958
2004
  },
1959
2005
  {
@@ -1970,7 +2016,9 @@ const contractParams = {
1970
2016
  Avalanche: NOT_DEPLOYED,
1971
2017
  BNB: NOT_DEPLOYED,
1972
2018
  WorldChain: NOT_DEPLOYED,
1973
- Etherlink: NOT_DEPLOYED
2019
+ Etherlink: NOT_DEPLOYED,
2020
+ Hemi: NOT_DEPLOYED,
2021
+ Lisk: NOT_DEPLOYED
1974
2022
  }
1975
2023
  }
1976
2024
  ]
@@ -1995,7 +2043,9 @@ const contractParams = {
1995
2043
  Avalanche: NOT_DEPLOYED,
1996
2044
  BNB: NOT_DEPLOYED,
1997
2045
  WorldChain: NOT_DEPLOYED,
1998
- Etherlink: NOT_DEPLOYED
2046
+ Etherlink: NOT_DEPLOYED,
2047
+ Hemi: NOT_DEPLOYED,
2048
+ Lisk: NOT_DEPLOYED
1999
2049
  }
2000
2050
  },
2001
2051
  {
@@ -2012,7 +2062,9 @@ const contractParams = {
2012
2062
  Avalanche: NOT_DEPLOYED,
2013
2063
  BNB: NOT_DEPLOYED,
2014
2064
  WorldChain: NOT_DEPLOYED,
2015
- Etherlink: NOT_DEPLOYED
2065
+ Etherlink: NOT_DEPLOYED,
2066
+ Hemi: NOT_DEPLOYED,
2067
+ Lisk: NOT_DEPLOYED
2016
2068
  }
2017
2069
  }
2018
2070
  ]
@@ -2037,7 +2089,9 @@ const contractParams = {
2037
2089
  Avalanche: NOT_DEPLOYED,
2038
2090
  BNB: NOT_DEPLOYED,
2039
2091
  WorldChain: NOT_DEPLOYED,
2040
- Etherlink: NOT_DEPLOYED
2092
+ Etherlink: NOT_DEPLOYED,
2093
+ Hemi: NOT_DEPLOYED,
2094
+ Lisk: NOT_DEPLOYED
2041
2095
  }
2042
2096
  },
2043
2097
  {
@@ -2054,7 +2108,9 @@ const contractParams = {
2054
2108
  Avalanche: NOT_DEPLOYED,
2055
2109
  BNB: NOT_DEPLOYED,
2056
2110
  WorldChain: NOT_DEPLOYED,
2057
- Etherlink: NOT_DEPLOYED
2111
+ Etherlink: NOT_DEPLOYED,
2112
+ Hemi: NOT_DEPLOYED,
2113
+ Lisk: NOT_DEPLOYED
2058
2114
  }
2059
2115
  }
2060
2116
  ]
@@ -2079,7 +2135,9 @@ const contractParams = {
2079
2135
  Avalanche: NOT_DEPLOYED,
2080
2136
  BNB: NOT_DEPLOYED,
2081
2137
  WorldChain: NOT_DEPLOYED,
2082
- Etherlink: NOT_DEPLOYED
2138
+ Etherlink: NOT_DEPLOYED,
2139
+ Hemi: NOT_DEPLOYED,
2140
+ Lisk: NOT_DEPLOYED
2083
2141
  }
2084
2142
  },
2085
2143
  {
@@ -2096,7 +2154,9 @@ const contractParams = {
2096
2154
  Avalanche: NOT_DEPLOYED,
2097
2155
  BNB: NOT_DEPLOYED,
2098
2156
  WorldChain: NOT_DEPLOYED,
2099
- Etherlink: NOT_DEPLOYED
2157
+ Etherlink: NOT_DEPLOYED,
2158
+ Hemi: NOT_DEPLOYED,
2159
+ Lisk: NOT_DEPLOYED
2100
2160
  }
2101
2161
  }
2102
2162
  ]
@@ -2121,7 +2181,9 @@ const contractParams = {
2121
2181
  Avalanche: NOT_DEPLOYED,
2122
2182
  BNB: NOT_DEPLOYED,
2123
2183
  WorldChain: NOT_DEPLOYED,
2124
- Etherlink: NOT_DEPLOYED
2184
+ Etherlink: NOT_DEPLOYED,
2185
+ Hemi: NOT_DEPLOYED,
2186
+ Lisk: NOT_DEPLOYED
2125
2187
  }
2126
2188
  },
2127
2189
  {
@@ -2138,7 +2200,9 @@ const contractParams = {
2138
2200
  Avalanche: NOT_DEPLOYED,
2139
2201
  BNB: NOT_DEPLOYED,
2140
2202
  WorldChain: NOT_DEPLOYED,
2141
- Etherlink: NOT_DEPLOYED
2203
+ Etherlink: NOT_DEPLOYED,
2204
+ Hemi: NOT_DEPLOYED,
2205
+ Lisk: NOT_DEPLOYED
2142
2206
  }
2143
2207
  }
2144
2208
  ]
@@ -2163,7 +2227,9 @@ const contractParams = {
2163
2227
  Avalanche: NOT_DEPLOYED,
2164
2228
  BNB: NOT_DEPLOYED,
2165
2229
  WorldChain: NOT_DEPLOYED,
2166
- Etherlink: NOT_DEPLOYED
2230
+ Etherlink: NOT_DEPLOYED,
2231
+ Hemi: NOT_DEPLOYED,
2232
+ Lisk: NOT_DEPLOYED
2167
2233
  }
2168
2234
  },
2169
2235
  {
@@ -2180,7 +2246,9 @@ const contractParams = {
2180
2246
  Avalanche: NOT_DEPLOYED,
2181
2247
  BNB: NOT_DEPLOYED,
2182
2248
  WorldChain: NOT_DEPLOYED,
2183
- Etherlink: NOT_DEPLOYED
2249
+ Etherlink: NOT_DEPLOYED,
2250
+ Hemi: NOT_DEPLOYED,
2251
+ Lisk: NOT_DEPLOYED
2184
2252
  }
2185
2253
  }
2186
2254
  ]
@@ -2202,7 +2270,9 @@ const contractParams = {
2202
2270
  Avalanche: NOT_DEPLOYED,
2203
2271
  BNB: NOT_DEPLOYED,
2204
2272
  WorldChain: NOT_DEPLOYED,
2205
- Etherlink: NOT_DEPLOYED
2273
+ Etherlink: NOT_DEPLOYED,
2274
+ Hemi: NOT_DEPLOYED,
2275
+ Lisk: NOT_DEPLOYED
2206
2276
  },
2207
2277
  lpToken: "steCRV"
2208
2278
  },
@@ -2232,7 +2302,9 @@ const contractParams = {
2232
2302
  Avalanche: NOT_DEPLOYED,
2233
2303
  BNB: NOT_DEPLOYED,
2234
2304
  WorldChain: NOT_DEPLOYED,
2235
- Etherlink: NOT_DEPLOYED
2305
+ Etherlink: NOT_DEPLOYED,
2306
+ Hemi: NOT_DEPLOYED,
2307
+ Lisk: NOT_DEPLOYED
2236
2308
  }
2237
2309
  },
2238
2310
  BALANCER_V3_ROUTER: {
@@ -2251,7 +2323,9 @@ const contractParams = {
2251
2323
  Avalanche: NOT_DEPLOYED,
2252
2324
  BNB: NOT_DEPLOYED,
2253
2325
  WorldChain: NOT_DEPLOYED,
2254
- Etherlink: NOT_DEPLOYED
2326
+ Etherlink: NOT_DEPLOYED,
2327
+ Hemi: NOT_DEPLOYED,
2328
+ Lisk: NOT_DEPLOYED
2255
2329
  }
2256
2330
  },
2257
2331
  AAVE_V2_LENDING_POOL: {
@@ -531,7 +531,9 @@ const tokenDataByNetwork = {
531
531
  WETH: "0xfc24f770f94edbca6d6f885e12d4317320bcb401",
532
532
  WXTZ: "0xc9b53ab2679f573e480d01e0f49e2b5cfb7a3eab",
533
533
  mTBILL: "0xdd629e5241cbc5919847783e6c96b2de4754e438"
534
- }
534
+ },
535
+ Hemi: {},
536
+ Lisk: {}
535
537
  };
536
538
  const tickerInfoTokensByNetwork = {
537
539
  Mainnet: {
@@ -930,7 +932,9 @@ const tickerInfoTokensByNetwork = {
930
932
  Avalanche: {},
931
933
  BNB: {},
932
934
  WorldChain: {},
933
- Etherlink: {}
935
+ Etherlink: {},
936
+ Hemi: {},
937
+ Lisk: {}
934
938
  };
935
939
  const tokenSymbolByAddress = Object.entries(tokenDataByNetwork).reduce(
936
940
  (acc, [, tokens]) => ({
@@ -34,7 +34,9 @@ const connectors = {
34
34
  Avalanche: [],
35
35
  BNB: [],
36
36
  WorldChain: [],
37
- Etherlink: []
37
+ Etherlink: [],
38
+ Hemi: [],
39
+ Lisk: []
38
40
  };
39
41
  function getConnectors(networkType) {
40
42
  return connectors[networkType].map((e) => {
@@ -116,7 +116,7 @@ class CreditAccountData_Legacy {
116
116
  );
117
117
  }
118
118
  static sortAssets(balances, prices, tokens) {
119
- return balances.sort(
119
+ return [...balances].sort(
120
120
  (t1, t2) => CreditAccountData_Legacy.assetComparator(
121
121
  t1,
122
122
  t2,
@@ -13,7 +13,9 @@ const TESTNET_CHAINS = {
13
13
  Avalanche: 7886,
14
14
  BNB: 7887,
15
15
  WorldChain: 7889,
16
- Etherlink: 7890
16
+ Etherlink: 7890,
17
+ Hemi: 7891,
18
+ Lisk: 7892
17
19
  };
18
20
  const CHAINS_BY_ID = TypedObjectUtils.swapKeyValue(TESTNET_CHAINS);
19
21
  const MAINNET_BY_TESTNET_ID = TypedObjectUtils.entries(TESTNET_CHAINS).reduce((acc, [n, testnetId]) => {
@@ -22,9 +22,13 @@ export interface GearboxChain extends Chain {
22
22
  * Alchemy subdomain to construct provider URL
23
23
  */
24
24
  alchemyDomain?: string;
25
+ /**
26
+ * Block number when Gearbox address provider was deployed
27
+ */
28
+ firstBlock?: bigint;
25
29
  }
26
- export declare const SUPPORTED_NETWORKS: readonly ["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink"];
27
- export declare const NetworkType: z.ZodEnum<["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink"]>;
30
+ export declare const SUPPORTED_NETWORKS: readonly ["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink", "Hemi", "Lisk"];
31
+ export declare const NetworkType: z.ZodEnum<["Mainnet", "Arbitrum", "Optimism", "Base", "Sonic", "MegaETH", "Monad", "Berachain", "Avalanche", "BNB", "WorldChain", "Etherlink", "Hemi", "Lisk"]>;
28
32
  export type NetworkType = z.infer<typeof NetworkType>;
29
33
  export declare const chains: Record<NetworkType, GearboxChain>;
30
34
  export declare function getChain(chainIdOrNetworkType: number | bigint | NetworkType): GearboxChain;
@@ -1,6 +1,7 @@
1
1
  import type { NetworkType } from "../chain/index.js";
2
2
  /**
3
3
  * Block number when address provider was deployed
4
+ * @deprecated use chain.firstBlock instead
4
5
  */
5
6
  export declare const ADDRESS_PROVIDER_BLOCK: Record<NetworkType, bigint>;
6
7
  export declare const RAMP_DURATION_BY_NETWORK: Record<NetworkType, bigint>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.5.0",
3
+ "version": "8.6.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",