@continuumdao/ctm-mpc-defi 0.2.31 → 0.2.33
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/agent/catalog.cjs +233 -33
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.js +233 -33
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/euler-v2/SKILL.md +1 -1
- package/dist/core/index.cjs +9 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.js +8 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +298 -290
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +37 -4
- package/dist/protocols/evm/euler-v2/index.js +296 -292
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/sky/index.cjs.map +1 -1
- package/dist/protocols/evm/sky/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAbi, getAddress, defineChain, createPublicClient, http, parseUnits, encodeFunctionData, zeroAddress, maxUint256,
|
|
1
|
+
import { parseAbi, getAddress, defineChain, createPublicClient, http, parseUnits, encodeFunctionData, zeroAddress, maxUint256, isAddress, formatUnits, parseGwei, serializeTransaction, keccak256 } from 'viem';
|
|
2
2
|
import { fetchChainFeeParams, gasLimitFromEstimateAndChainConfig, gweiToDecimalString, proposalTxParamsToFeeSnapshot, alignEip1559FeesWithLatestBase, getClientIdFromKeyGenResult } from '@continuumdao/continuum-node-sdk';
|
|
3
3
|
|
|
4
4
|
// src/core/registry.ts
|
|
@@ -1577,6 +1577,15 @@ async function postJsonViaOptionalProxy(args) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
return await r.json();
|
|
1579
1579
|
}
|
|
1580
|
+
async function getJsonViaOptionalProxy(args) {
|
|
1581
|
+
const url = args.directUrl;
|
|
1582
|
+
const r = await fetch(url, { method: "GET", headers: { accept: "application/json" } });
|
|
1583
|
+
if (!r.ok) {
|
|
1584
|
+
const t = await r.text().catch(() => "");
|
|
1585
|
+
throw new Error(t ? `HTTP ${r.status}: ${t.slice(0, 200)}` : `HTTP ${r.status}`);
|
|
1586
|
+
}
|
|
1587
|
+
return await r.json();
|
|
1588
|
+
}
|
|
1580
1589
|
|
|
1581
1590
|
// src/protocols/evm/aave-v4/api.ts
|
|
1582
1591
|
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
@@ -1610,177 +1619,79 @@ async function fetchAaveV4NativeWrappedToken(chainId) {
|
|
|
1610
1619
|
if (t && isAddress(t)) return getAddress(t);
|
|
1611
1620
|
return null;
|
|
1612
1621
|
}
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
const
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
}
|
|
1649
|
-
try {
|
|
1650
|
-
rawBorrowCap16 = Number(BigInt((args.borrowCapRaw ?? "").trim() || "0") & 0xffffn);
|
|
1651
|
-
} catch {
|
|
1652
|
-
rawBorrowCap16 = 0;
|
|
1653
|
-
}
|
|
1654
|
-
return {
|
|
1655
|
-
rawSupplyCap16,
|
|
1656
|
-
rawBorrowCap16,
|
|
1657
|
-
supplyCapWei: eulerSubgraphVaultCapToUnderlyingWei(args.supplyCapRaw),
|
|
1658
|
-
borrowCapWei: eulerSubgraphVaultCapToUnderlyingWei(args.borrowCapRaw),
|
|
1659
|
-
cashWei: args.cashWei,
|
|
1660
|
-
totalBorrowsWei: args.totalBorrowsWei,
|
|
1661
|
-
totalAssetsWei: args.totalAssetsWei
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
function formatEulerResolvedCapOrCashForUi(wei, decimals, symbolSuffix) {
|
|
1665
|
-
if (wei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return "Unlimited";
|
|
1666
|
-
if (wei === 0n) return symbolSuffix ? `0 ${symbolSuffix}` : "0";
|
|
1667
|
-
try {
|
|
1668
|
-
const s = formatUnits(wei, decimals);
|
|
1669
|
-
const n = Number(s);
|
|
1670
|
-
if (Number.isFinite(n) && Math.abs(n) >= 1e9) return `${n.toExponential(2)}${symbolSuffix ? ` ${symbolSuffix}` : ""}`;
|
|
1671
|
-
return symbolSuffix ? `${s} ${symbolSuffix}` : s;
|
|
1672
|
-
} catch {
|
|
1673
|
-
return wei.toString();
|
|
1622
|
+
|
|
1623
|
+
// src/protocols/evm/euler-v2/eulerV3Api.ts
|
|
1624
|
+
var EULER_V3_API_BASE = "https://v3.euler.finance";
|
|
1625
|
+
function qs(params) {
|
|
1626
|
+
const u = new URLSearchParams();
|
|
1627
|
+
for (const [k, v] of Object.entries(params)) {
|
|
1628
|
+
if (v == null) continue;
|
|
1629
|
+
u.set(k, String(v));
|
|
1630
|
+
}
|
|
1631
|
+
const s = u.toString();
|
|
1632
|
+
return s ? `?${s}` : "";
|
|
1633
|
+
}
|
|
1634
|
+
async function eulerV3Get(path, params = {}) {
|
|
1635
|
+
const rel = path.startsWith("/") ? path : `/${path}`;
|
|
1636
|
+
const query = qs(params);
|
|
1637
|
+
const directUrl = `${EULER_V3_API_BASE}${rel}${query}`;
|
|
1638
|
+
rel.replace(/^\/v3\/?/, "");
|
|
1639
|
+
return getJsonViaOptionalProxy({ directUrl});
|
|
1640
|
+
}
|
|
1641
|
+
async function paginateV3Vaults(path, chainId, extra = {}) {
|
|
1642
|
+
const out = [];
|
|
1643
|
+
let offset = 0;
|
|
1644
|
+
const limit = 100;
|
|
1645
|
+
while (true) {
|
|
1646
|
+
const page = await eulerV3Get(path, {
|
|
1647
|
+
chainId,
|
|
1648
|
+
limit,
|
|
1649
|
+
offset,
|
|
1650
|
+
...extra
|
|
1651
|
+
});
|
|
1652
|
+
const rows = page.data ?? [];
|
|
1653
|
+
out.push(...rows);
|
|
1654
|
+
const total = typeof page.meta?.total === "number" ? page.meta.total : out.length;
|
|
1655
|
+
offset += rows.length;
|
|
1656
|
+
if (!rows.length || offset >= total) break;
|
|
1674
1657
|
}
|
|
1658
|
+
return out;
|
|
1675
1659
|
}
|
|
1676
|
-
function
|
|
1677
|
-
|
|
1678
|
-
if (supplyCapWei === 0n) return 0n;
|
|
1679
|
-
if (supplyCapWei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return EULER_EVAULT_CAP_UNLIMITED_WEI;
|
|
1680
|
-
if (totalAssetsWei >= supplyCapWei) return 0n;
|
|
1681
|
-
return supplyCapWei - totalAssetsWei;
|
|
1660
|
+
async function fetchEulerV3EvkVaults(args) {
|
|
1661
|
+
return paginateV3Vaults("/v3/evk/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
|
|
1682
1662
|
}
|
|
1683
|
-
function
|
|
1684
|
-
|
|
1685
|
-
if (borrowCapWei === 0n) return 0n;
|
|
1686
|
-
if (borrowCapWei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return cashWei;
|
|
1687
|
-
const capLeft = borrowCapWei > totalBorrowsWei ? borrowCapWei - totalBorrowsWei : 0n;
|
|
1688
|
-
return cashWei < capLeft ? cashWei : capLeft;
|
|
1663
|
+
async function fetchEulerV3EarnVaults(args) {
|
|
1664
|
+
return paginateV3Vaults("/v3/earn/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
|
|
1689
1665
|
}
|
|
1690
|
-
async function
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
const client = createPublicClient({ chain: ch, transport: http(args.rpcUrl) });
|
|
1698
|
-
const addr = getAddress(args.evault);
|
|
1699
|
-
const [[supplyRaw, borrowRaw], cashWei, totalBorrowsWei, totalAssetsWei] = await Promise.all([
|
|
1700
|
-
client.readContract({
|
|
1701
|
-
address: addr,
|
|
1702
|
-
abi: eulerVaultLendAbi,
|
|
1703
|
-
functionName: "caps"
|
|
1704
|
-
}),
|
|
1705
|
-
client.readContract({
|
|
1706
|
-
address: addr,
|
|
1707
|
-
abi: eulerVaultLendAbi,
|
|
1708
|
-
functionName: "cash"
|
|
1709
|
-
}),
|
|
1710
|
-
client.readContract({
|
|
1711
|
-
address: addr,
|
|
1712
|
-
abi: eulerVaultLendAbi,
|
|
1713
|
-
functionName: "totalBorrows"
|
|
1714
|
-
}),
|
|
1715
|
-
client.readContract({
|
|
1716
|
-
address: addr,
|
|
1717
|
-
abi: eulerVaultLendAbi,
|
|
1718
|
-
functionName: "totalAssets"
|
|
1719
|
-
})
|
|
1720
|
-
]);
|
|
1721
|
-
const rs = Number(supplyRaw);
|
|
1722
|
-
const rb = Number(borrowRaw);
|
|
1723
|
-
return {
|
|
1724
|
-
rawSupplyCap16: rs,
|
|
1725
|
-
rawBorrowCap16: rb,
|
|
1726
|
-
supplyCapWei: resolveEulerAmountCapToWei(rs),
|
|
1727
|
-
borrowCapWei: resolveEulerAmountCapToWei(rb),
|
|
1728
|
-
cashWei,
|
|
1729
|
-
totalBorrowsWei,
|
|
1730
|
-
totalAssetsWei
|
|
1731
|
-
};
|
|
1732
|
-
}
|
|
1733
|
-
async function fetchEulerVaultOnChainLendMetricsForVaults(args) {
|
|
1734
|
-
const rpc = (args.rpcUrl ?? "").trim();
|
|
1735
|
-
const out = /* @__PURE__ */ new Map();
|
|
1736
|
-
if (!rpc || !args.vaults.length) return out;
|
|
1737
|
-
const concurrency = 8;
|
|
1738
|
-
let idx = 0;
|
|
1739
|
-
const list = [...args.vaults];
|
|
1740
|
-
async function worker() {
|
|
1741
|
-
while (idx < list.length) {
|
|
1742
|
-
const i = idx++;
|
|
1743
|
-
const row = list[i];
|
|
1744
|
-
try {
|
|
1745
|
-
const ev = getAddress(row.evault.trim());
|
|
1746
|
-
const data = await fetchEulerVaultOnChainLendMetrics({
|
|
1747
|
-
rpcUrl: rpc,
|
|
1748
|
-
chainId: args.chainId,
|
|
1749
|
-
evault: ev
|
|
1750
|
-
});
|
|
1751
|
-
out.set(row.key, { ok: true, data });
|
|
1752
|
-
} catch (e) {
|
|
1753
|
-
out.set(row.key, {
|
|
1754
|
-
ok: false,
|
|
1755
|
-
message: e instanceof Error ? e.message : "On-chain read failed"
|
|
1756
|
-
});
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1666
|
+
async function fetchEulerV3ActiveChainIds() {
|
|
1667
|
+
const page = await eulerV3Get("/v3/chains");
|
|
1668
|
+
const ids = [];
|
|
1669
|
+
for (const row of page.data ?? []) {
|
|
1670
|
+
if (typeof row.id !== "number" || !Number.isFinite(row.id)) continue;
|
|
1671
|
+
if ((row.status ?? "active") !== "active") continue;
|
|
1672
|
+
ids.push(row.id);
|
|
1759
1673
|
}
|
|
1760
|
-
|
|
1761
|
-
return out;
|
|
1674
|
+
return ids.sort((a, b) => a - b);
|
|
1762
1675
|
}
|
|
1763
1676
|
|
|
1764
1677
|
// src/protocols/evm/euler-v2/eulerV2Subgraph.ts
|
|
1765
1678
|
var EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID = {
|
|
1766
|
-
1: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1767
|
-
8453: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1768
|
-
1923: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1769
|
-
146: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1770
|
-
60808: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1771
|
-
80094: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1772
|
-
43114: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1773
|
-
42161: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1774
|
-
130: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
9745: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-plasma/latest/gn",
|
|
1783
|
-
5e3: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-mantle/latest/gn"
|
|
1679
|
+
1: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-mainnet/latest/gn",
|
|
1680
|
+
8453: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-base/latest/gn",
|
|
1681
|
+
1923: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-swell/latest/gn",
|
|
1682
|
+
146: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-sonic/latest/gn",
|
|
1683
|
+
60808: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bob/latest/gn",
|
|
1684
|
+
80094: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-berachain/latest/gn",
|
|
1685
|
+
43114: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-avalanche/latest/gn",
|
|
1686
|
+
42161: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-arbitrum/latest/gn",
|
|
1687
|
+
130: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-unichain/latest/gn",
|
|
1688
|
+
56: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bsc/latest/gn",
|
|
1689
|
+
999: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-hyperevm/latest/gn",
|
|
1690
|
+
239: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-tac/latest/gn",
|
|
1691
|
+
9745: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-plasma/latest/gn",
|
|
1692
|
+
137: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-polygon/latest/gn",
|
|
1693
|
+
59144: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-linea/latest/gn",
|
|
1694
|
+
143: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-monad/latest/gn"
|
|
1784
1695
|
};
|
|
1785
1696
|
var WRAPPED_NATIVE_FALLBACK = {
|
|
1786
1697
|
1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
@@ -1788,6 +1699,10 @@ var WRAPPED_NATIVE_FALLBACK = {
|
|
|
1788
1699
|
56: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
1789
1700
|
100: "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
|
|
1790
1701
|
130: "0x4200000000000000000000000000000000000006",
|
|
1702
|
+
137: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
|
|
1703
|
+
// Polygon: WPOL
|
|
1704
|
+
143: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
|
|
1705
|
+
// Monad: WMON
|
|
1791
1706
|
146: "0x03980325872071166574bcd94670450917897468",
|
|
1792
1707
|
239: "0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9",
|
|
1793
1708
|
// TAC: WTAC (https://docs.tac.build/ecosystem/token-list)
|
|
@@ -1799,6 +1714,8 @@ var WRAPPED_NATIVE_FALLBACK = {
|
|
|
1799
1714
|
43114: "0xB31f66AA3C1e785363F0875A1B74D27b85FE0459",
|
|
1800
1715
|
5e3: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
|
|
1801
1716
|
// Mantle: WMNT
|
|
1717
|
+
59144: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
|
|
1718
|
+
// Linea: WETH
|
|
1802
1719
|
57073: "0x4200000000000000000000000000000000000006",
|
|
1803
1720
|
60808: "0x4200000000000000000000000000000000000006",
|
|
1804
1721
|
80094: "0x6969696969696969696969696969696969696969",
|
|
@@ -1897,81 +1814,20 @@ function normAssetAddr(raw) {
|
|
|
1897
1814
|
if (!s || !isAddress(s)) return null;
|
|
1898
1815
|
return getAddress(s).toLowerCase();
|
|
1899
1816
|
}
|
|
1900
|
-
function
|
|
1901
|
-
|
|
1817
|
+
function v3VaultShowsBorrow(totalBorrows, explorableBorrow) {
|
|
1818
|
+
if (explorableBorrow === true) return true;
|
|
1902
1819
|
try {
|
|
1903
|
-
|
|
1820
|
+
return BigInt((totalBorrows ?? "0").trim() || "0") > 0n;
|
|
1904
1821
|
} catch {
|
|
1905
|
-
|
|
1906
|
-
}
|
|
1907
|
-
if (borrows > 0n) return true;
|
|
1908
|
-
const w = eulerSubgraphVaultCapToUnderlyingWei(borrowCap);
|
|
1909
|
-
if (w >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return true;
|
|
1910
|
-
return w > 0n;
|
|
1911
|
-
}
|
|
1912
|
-
var VAULT_PAGE = `
|
|
1913
|
-
query V($first: Int!, $skip: Int!) {
|
|
1914
|
-
eulerVaults(first: $first, skip: $skip) {
|
|
1915
|
-
asset
|
|
1916
|
-
borrowCap
|
|
1917
|
-
state { totalBorrows }
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
`;
|
|
1921
|
-
var EARN_PAGE = `
|
|
1922
|
-
query E($first: Int!, $skip: Int!) {
|
|
1923
|
-
eulerEarnVaults(first: $first, skip: $skip) {
|
|
1924
|
-
asset
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
`;
|
|
1928
|
-
async function paginateEulerVaultRows(endpoint) {
|
|
1929
|
-
const out = [];
|
|
1930
|
-
let skip = 0;
|
|
1931
|
-
const first = 1e3;
|
|
1932
|
-
while (true) {
|
|
1933
|
-
const d = await eulerSubgraphGql(endpoint, VAULT_PAGE, { first, skip });
|
|
1934
|
-
const rows = d.eulerVaults ?? [];
|
|
1935
|
-
if (!rows.length) break;
|
|
1936
|
-
for (const r of rows) {
|
|
1937
|
-
const tb = (r.state?.totalBorrows ?? "0").toString();
|
|
1938
|
-
out.push({ asset: r.asset ?? null, borrowCap: r.borrowCap, totalBorrows: tb });
|
|
1939
|
-
}
|
|
1940
|
-
if (rows.length < first) break;
|
|
1941
|
-
skip += first;
|
|
1942
|
-
}
|
|
1943
|
-
return out;
|
|
1944
|
-
}
|
|
1945
|
-
async function paginateEulerEarnAssets(endpoint) {
|
|
1946
|
-
const assets = [];
|
|
1947
|
-
let skip = 0;
|
|
1948
|
-
const first = 1e3;
|
|
1949
|
-
while (true) {
|
|
1950
|
-
const d = await eulerSubgraphGql(endpoint, EARN_PAGE, {
|
|
1951
|
-
first,
|
|
1952
|
-
skip
|
|
1953
|
-
});
|
|
1954
|
-
const rows = d.eulerEarnVaults ?? [];
|
|
1955
|
-
if (!rows.length) break;
|
|
1956
|
-
for (const r of rows) {
|
|
1957
|
-
const a = normAssetAddr(r.asset ?? void 0);
|
|
1958
|
-
if (a) assets.push(a);
|
|
1959
|
-
}
|
|
1960
|
-
if (rows.length < first) break;
|
|
1961
|
-
skip += first;
|
|
1822
|
+
return false;
|
|
1962
1823
|
}
|
|
1963
|
-
return assets;
|
|
1964
1824
|
}
|
|
1965
1825
|
var eulerV2ChainAssetCache = /* @__PURE__ */ new Map();
|
|
1966
1826
|
async function fetchEulerV2ChainAssetCache(chainId) {
|
|
1967
|
-
const
|
|
1968
|
-
if (!endpoint) {
|
|
1969
|
-
return { nativeWrapped: null, modesByUnderlying: /* @__PURE__ */ new Map() };
|
|
1970
|
-
}
|
|
1971
|
-
const [nativeWrapped, vaultRows, earnAssets] = await Promise.all([
|
|
1827
|
+
const [nativeWrapped, evkVaults, earnVaults] = await Promise.all([
|
|
1972
1828
|
resolveEulerWrappedNativeToken(chainId),
|
|
1973
|
-
|
|
1974
|
-
|
|
1829
|
+
fetchEulerV3EvkVaults({ chainId }),
|
|
1830
|
+
fetchEulerV3EarnVaults({ chainId }).catch(() => [])
|
|
1975
1831
|
]);
|
|
1976
1832
|
const modes = /* @__PURE__ */ new Map();
|
|
1977
1833
|
const bump = (addr, patch) => {
|
|
@@ -1982,13 +1838,17 @@ async function fetchEulerV2ChainAssetCache(chainId) {
|
|
|
1982
1838
|
earn: cur.earn || !!patch.earn
|
|
1983
1839
|
});
|
|
1984
1840
|
};
|
|
1985
|
-
for (const
|
|
1986
|
-
|
|
1987
|
-
|
|
1841
|
+
for (const v of earnVaults) {
|
|
1842
|
+
const a = normAssetAddr(v.asset?.address ?? void 0);
|
|
1843
|
+
if (a) bump(a, { earn: true });
|
|
1844
|
+
}
|
|
1845
|
+
for (const v of evkVaults) {
|
|
1846
|
+
const a = normAssetAddr(v.asset?.address ?? void 0);
|
|
1988
1847
|
if (!a) continue;
|
|
1848
|
+
const vis = v.visibility;
|
|
1989
1849
|
bump(a, {
|
|
1990
|
-
lend:
|
|
1991
|
-
borrow:
|
|
1850
|
+
lend: vis?.explorableLend !== false,
|
|
1851
|
+
borrow: v3VaultShowsBorrow(v.totalBorrows, vis?.explorableBorrow)
|
|
1992
1852
|
});
|
|
1993
1853
|
}
|
|
1994
1854
|
return { nativeWrapped, modesByUnderlying: modes };
|
|
@@ -1996,7 +1856,10 @@ async function fetchEulerV2ChainAssetCache(chainId) {
|
|
|
1996
1856
|
function ensureEulerV2ChainAssetCache(chainId) {
|
|
1997
1857
|
const hit = eulerV2ChainAssetCache.get(chainId);
|
|
1998
1858
|
if (hit) return hit;
|
|
1999
|
-
const p = fetchEulerV2ChainAssetCache(chainId)
|
|
1859
|
+
const p = fetchEulerV2ChainAssetCache(chainId).catch((e) => {
|
|
1860
|
+
eulerV2ChainAssetCache.delete(chainId);
|
|
1861
|
+
throw e;
|
|
1862
|
+
});
|
|
2000
1863
|
eulerV2ChainAssetCache.set(chainId, p);
|
|
2001
1864
|
return p;
|
|
2002
1865
|
}
|
|
@@ -2062,47 +1925,162 @@ function eulerLabelsLookupLabelForVault(labelMap, evaultAddress) {
|
|
|
2062
1925
|
const v = labelMap.get(k);
|
|
2063
1926
|
return typeof v === "string" && v.trim() ? v.trim() : void 0;
|
|
2064
1927
|
}
|
|
1928
|
+
var EULER_EVAULT_CAP_UNLIMITED_WEI = (1n << 256n) - 1n;
|
|
1929
|
+
var UINT256_MAX = EULER_EVAULT_CAP_UNLIMITED_WEI;
|
|
1930
|
+
var EULER_EVAULT_SUPPLY_CAP_UNLIMITED_WEI = EULER_EVAULT_CAP_UNLIMITED_WEI;
|
|
1931
|
+
var EULER_V2_PREFER_ON_CHAIN_LEND_METRICS = false;
|
|
1932
|
+
var eulerVaultLendAbi = parseAbi([
|
|
1933
|
+
"function caps() view returns (uint16 supplyCap, uint16 borrowCap)",
|
|
1934
|
+
"function cash() view returns (uint256)",
|
|
1935
|
+
"function totalBorrows() view returns (uint256)",
|
|
1936
|
+
"function totalAssets() view returns (uint256)"
|
|
1937
|
+
]);
|
|
1938
|
+
function resolveEulerAmountCapToWei(rawCap16) {
|
|
1939
|
+
const amountCap = BigInt(rawCap16) & 0xffffn;
|
|
1940
|
+
if (amountCap === 0n) return UINT256_MAX;
|
|
1941
|
+
const exp = amountCap & 63n;
|
|
1942
|
+
const mantissa = amountCap >> 6n;
|
|
1943
|
+
return 10n ** exp * mantissa / 100n;
|
|
1944
|
+
}
|
|
1945
|
+
var resolveEulerAmountCapToSupplyWei = resolveEulerAmountCapToWei;
|
|
1946
|
+
function eulerSubgraphVaultCapToUnderlyingWei(raw) {
|
|
1947
|
+
try {
|
|
1948
|
+
const v = BigInt((raw ?? "").trim() || "0");
|
|
1949
|
+
if (v >= UINT256_MAX - 3n) return v;
|
|
1950
|
+
if (v <= 0xffffn) return resolveEulerAmountCapToWei(v);
|
|
1951
|
+
return v;
|
|
1952
|
+
} catch {
|
|
1953
|
+
return 0n;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
function eulerVaultLendMetricsFromIndexerVaultState(args) {
|
|
1957
|
+
let rawSupplyCap16 = 0;
|
|
1958
|
+
let rawBorrowCap16 = 0;
|
|
1959
|
+
try {
|
|
1960
|
+
rawSupplyCap16 = Number(BigInt((args.supplyCapRaw ?? "").trim() || "0") & 0xffffn);
|
|
1961
|
+
} catch {
|
|
1962
|
+
rawSupplyCap16 = 0;
|
|
1963
|
+
}
|
|
1964
|
+
try {
|
|
1965
|
+
rawBorrowCap16 = Number(BigInt((args.borrowCapRaw ?? "").trim() || "0") & 0xffffn);
|
|
1966
|
+
} catch {
|
|
1967
|
+
rawBorrowCap16 = 0;
|
|
1968
|
+
}
|
|
1969
|
+
return {
|
|
1970
|
+
rawSupplyCap16,
|
|
1971
|
+
rawBorrowCap16,
|
|
1972
|
+
supplyCapWei: eulerSubgraphVaultCapToUnderlyingWei(args.supplyCapRaw),
|
|
1973
|
+
borrowCapWei: eulerSubgraphVaultCapToUnderlyingWei(args.borrowCapRaw),
|
|
1974
|
+
cashWei: args.cashWei,
|
|
1975
|
+
totalBorrowsWei: args.totalBorrowsWei,
|
|
1976
|
+
totalAssetsWei: args.totalAssetsWei
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
function formatEulerResolvedCapOrCashForUi(wei, decimals, symbolSuffix) {
|
|
1980
|
+
if (wei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return "Unlimited";
|
|
1981
|
+
if (wei === 0n) return symbolSuffix ? `0 ${symbolSuffix}` : "0";
|
|
1982
|
+
try {
|
|
1983
|
+
const s = formatUnits(wei, decimals);
|
|
1984
|
+
const n = Number(s);
|
|
1985
|
+
if (Number.isFinite(n) && Math.abs(n) >= 1e9) return `${n.toExponential(2)}${symbolSuffix ? ` ${symbolSuffix}` : ""}`;
|
|
1986
|
+
return symbolSuffix ? `${s} ${symbolSuffix}` : s;
|
|
1987
|
+
} catch {
|
|
1988
|
+
return wei.toString();
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
function eulerVaultMaxNewSupplyWei(metrics) {
|
|
1992
|
+
const { supplyCapWei, totalAssetsWei } = metrics;
|
|
1993
|
+
if (supplyCapWei === 0n) return 0n;
|
|
1994
|
+
if (supplyCapWei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return EULER_EVAULT_CAP_UNLIMITED_WEI;
|
|
1995
|
+
if (totalAssetsWei >= supplyCapWei) return 0n;
|
|
1996
|
+
return supplyCapWei - totalAssetsWei;
|
|
1997
|
+
}
|
|
1998
|
+
function eulerVaultMaxNewBorrowWei(metrics) {
|
|
1999
|
+
const { cashWei, borrowCapWei, totalBorrowsWei } = metrics;
|
|
2000
|
+
if (borrowCapWei === 0n) return 0n;
|
|
2001
|
+
if (borrowCapWei >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return cashWei;
|
|
2002
|
+
const capLeft = borrowCapWei > totalBorrowsWei ? borrowCapWei - totalBorrowsWei : 0n;
|
|
2003
|
+
return cashWei < capLeft ? cashWei : capLeft;
|
|
2004
|
+
}
|
|
2005
|
+
async function fetchEulerVaultOnChainLendMetrics(args) {
|
|
2006
|
+
const ch = defineChain({
|
|
2007
|
+
id: args.chainId,
|
|
2008
|
+
name: "EulerVaultRead",
|
|
2009
|
+
nativeCurrency: { decimals: 18, name: "x", symbol: "x" },
|
|
2010
|
+
rpcUrls: { default: { http: [args.rpcUrl] } }
|
|
2011
|
+
});
|
|
2012
|
+
const client = createPublicClient({ chain: ch, transport: http(args.rpcUrl) });
|
|
2013
|
+
const addr = getAddress(args.evault);
|
|
2014
|
+
const [[supplyRaw, borrowRaw], cashWei, totalBorrowsWei, totalAssetsWei] = await Promise.all([
|
|
2015
|
+
client.readContract({
|
|
2016
|
+
address: addr,
|
|
2017
|
+
abi: eulerVaultLendAbi,
|
|
2018
|
+
functionName: "caps"
|
|
2019
|
+
}),
|
|
2020
|
+
client.readContract({
|
|
2021
|
+
address: addr,
|
|
2022
|
+
abi: eulerVaultLendAbi,
|
|
2023
|
+
functionName: "cash"
|
|
2024
|
+
}),
|
|
2025
|
+
client.readContract({
|
|
2026
|
+
address: addr,
|
|
2027
|
+
abi: eulerVaultLendAbi,
|
|
2028
|
+
functionName: "totalBorrows"
|
|
2029
|
+
}),
|
|
2030
|
+
client.readContract({
|
|
2031
|
+
address: addr,
|
|
2032
|
+
abi: eulerVaultLendAbi,
|
|
2033
|
+
functionName: "totalAssets"
|
|
2034
|
+
})
|
|
2035
|
+
]);
|
|
2036
|
+
const rs = Number(supplyRaw);
|
|
2037
|
+
const rb = Number(borrowRaw);
|
|
2038
|
+
return {
|
|
2039
|
+
rawSupplyCap16: rs,
|
|
2040
|
+
rawBorrowCap16: rb,
|
|
2041
|
+
supplyCapWei: resolveEulerAmountCapToWei(rs),
|
|
2042
|
+
borrowCapWei: resolveEulerAmountCapToWei(rb),
|
|
2043
|
+
cashWei,
|
|
2044
|
+
totalBorrowsWei,
|
|
2045
|
+
totalAssetsWei
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
async function fetchEulerVaultOnChainLendMetricsForVaults(args) {
|
|
2049
|
+
const rpc = (args.rpcUrl ?? "").trim();
|
|
2050
|
+
const out = /* @__PURE__ */ new Map();
|
|
2051
|
+
if (!rpc || !args.vaults.length) return out;
|
|
2052
|
+
const concurrency = 8;
|
|
2053
|
+
let idx = 0;
|
|
2054
|
+
const list = [...args.vaults];
|
|
2055
|
+
async function worker() {
|
|
2056
|
+
while (idx < list.length) {
|
|
2057
|
+
const i = idx++;
|
|
2058
|
+
const row = list[i];
|
|
2059
|
+
try {
|
|
2060
|
+
const ev = getAddress(row.evault.trim());
|
|
2061
|
+
const data = await fetchEulerVaultOnChainLendMetrics({
|
|
2062
|
+
rpcUrl: rpc,
|
|
2063
|
+
chainId: args.chainId,
|
|
2064
|
+
evault: ev
|
|
2065
|
+
});
|
|
2066
|
+
out.set(row.key, { ok: true, data });
|
|
2067
|
+
} catch (e) {
|
|
2068
|
+
out.set(row.key, {
|
|
2069
|
+
ok: false,
|
|
2070
|
+
message: e instanceof Error ? e.message : "On-chain read failed"
|
|
2071
|
+
});
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
await Promise.all(Array.from({ length: Math.min(concurrency, list.length) }, () => worker()));
|
|
2076
|
+
return out;
|
|
2077
|
+
}
|
|
2065
2078
|
|
|
2066
2079
|
// src/protocols/evm/euler-v2/eulerV2LendMarkets.ts
|
|
2067
2080
|
var erc20StringMetaAbi = parseAbi([
|
|
2068
2081
|
"function name() view returns (string)",
|
|
2069
2082
|
"function symbol() view returns (string)"
|
|
2070
2083
|
]);
|
|
2071
|
-
var LEND_VAULT_PAGE = `
|
|
2072
|
-
query EulerLendVaults($first: Int!, $skip: Int!, $asset: Bytes!) {
|
|
2073
|
-
eulerVaults(
|
|
2074
|
-
first: $first
|
|
2075
|
-
skip: $skip
|
|
2076
|
-
where: { asset: $asset }
|
|
2077
|
-
orderBy: state__supplyApy
|
|
2078
|
-
orderDirection: desc
|
|
2079
|
-
) {
|
|
2080
|
-
id
|
|
2081
|
-
evc
|
|
2082
|
-
evault
|
|
2083
|
-
name
|
|
2084
|
-
symbol
|
|
2085
|
-
asset
|
|
2086
|
-
decimals
|
|
2087
|
-
supplyCap
|
|
2088
|
-
borrowCap
|
|
2089
|
-
interestFee
|
|
2090
|
-
perspectives
|
|
2091
|
-
collaterals
|
|
2092
|
-
oracle
|
|
2093
|
-
unitOfAccount
|
|
2094
|
-
governonAdmin
|
|
2095
|
-
state {
|
|
2096
|
-
cash
|
|
2097
|
-
totalBorrows
|
|
2098
|
-
totalShares
|
|
2099
|
-
supplyApy
|
|
2100
|
-
borrowApy
|
|
2101
|
-
timestamp
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
`;
|
|
2106
2084
|
var COLLATERAL_META = `
|
|
2107
2085
|
query EulerCollateralVaults($first: Int!, $ids: [Bytes!]!) {
|
|
2108
2086
|
eulerVaults(first: $first, where: { id_in: $ids }) {
|
|
@@ -2308,23 +2286,41 @@ function vaultCashAndBorrows(r) {
|
|
|
2308
2286
|
}
|
|
2309
2287
|
return { cash, borrows };
|
|
2310
2288
|
}
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2289
|
+
function v3ApyDecimalToRayString(apy) {
|
|
2290
|
+
if (apy == null || !Number.isFinite(apy) || apy <= 0) return "0";
|
|
2291
|
+
const ray = BigInt(Math.round(apy * 1e9)) * 10n ** 18n;
|
|
2292
|
+
return ray.toString();
|
|
2293
|
+
}
|
|
2294
|
+
function v3VaultToGqlRow(v) {
|
|
2295
|
+
let cash = 0n;
|
|
2296
|
+
let borrows = 0n;
|
|
2297
|
+
try {
|
|
2298
|
+
const assets = BigInt((v.totalAssets ?? "0").trim() || "0");
|
|
2299
|
+
borrows = BigInt((v.totalBorrows ?? "0").trim() || "0");
|
|
2300
|
+
cash = assets > borrows ? assets - borrows : 0n;
|
|
2301
|
+
} catch {
|
|
2302
|
+
cash = 0n;
|
|
2303
|
+
borrows = 0n;
|
|
2326
2304
|
}
|
|
2327
|
-
|
|
2305
|
+
const addr = (v.address ?? "").trim();
|
|
2306
|
+
return {
|
|
2307
|
+
id: addr || null,
|
|
2308
|
+
evault: addr || null,
|
|
2309
|
+
name: v.name ?? null,
|
|
2310
|
+
symbol: v.symbol ?? null,
|
|
2311
|
+
asset: v.asset?.address ?? null,
|
|
2312
|
+
decimals: v.decimals != null ? String(v.decimals) : "18",
|
|
2313
|
+
state: {
|
|
2314
|
+
cash: cash.toString(),
|
|
2315
|
+
totalBorrows: borrows.toString(),
|
|
2316
|
+
supplyApy: v3ApyDecimalToRayString(v.supplyApy),
|
|
2317
|
+
borrowApy: v3ApyDecimalToRayString(v.borrowApy)
|
|
2318
|
+
}
|
|
2319
|
+
};
|
|
2320
|
+
}
|
|
2321
|
+
async function paginateLendVaultRows(chainId, assetLower) {
|
|
2322
|
+
const rows = await fetchEulerV3EvkVaults({ chainId, asset: assetLower });
|
|
2323
|
+
return rows.map(v3VaultToGqlRow);
|
|
2328
2324
|
}
|
|
2329
2325
|
async function fetchCollateralVaultMeta(chainId, collateralIds) {
|
|
2330
2326
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -3804,10 +3800,18 @@ async function loadEulerV2PortfolioUsdSnapshot(args) {
|
|
|
3804
3800
|
|
|
3805
3801
|
// src/protocols/evm/euler-v2/loadEulerV2SupportedChainIds.ts
|
|
3806
3802
|
var cached = null;
|
|
3807
|
-
function loadEulerV2SupportedChainIds() {
|
|
3808
|
-
if (cached) return
|
|
3803
|
+
async function loadEulerV2SupportedChainIds() {
|
|
3804
|
+
if (cached) return cached;
|
|
3805
|
+
try {
|
|
3806
|
+
const ids = await fetchEulerV3ActiveChainIds();
|
|
3807
|
+
if (ids.length) {
|
|
3808
|
+
cached = new Set(ids);
|
|
3809
|
+
return cached;
|
|
3810
|
+
}
|
|
3811
|
+
} catch {
|
|
3812
|
+
}
|
|
3809
3813
|
cached = new Set(Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map((k) => Number(k)));
|
|
3810
|
-
return
|
|
3814
|
+
return cached;
|
|
3811
3815
|
}
|
|
3812
3816
|
|
|
3813
3817
|
// src/protocols/evm/euler-v2/index.ts
|
|
@@ -3832,6 +3836,6 @@ var eulerV2ProtocolModule = {
|
|
|
3832
3836
|
};
|
|
3833
3837
|
registerProtocolModule(eulerV2ProtocolModule);
|
|
3834
3838
|
|
|
3835
|
-
export { EULER_EVAULT_CAP_UNLIMITED_WEI, EULER_EVAULT_SUPPLY_CAP_UNLIMITED_WEI, EULER_REUL_UNLOCK_GAS_FALLBACK, EULER_SAME_ASSET_BORROW_APPROVAL_BUFFER_BPS, EULER_SAME_ASSET_BORROW_MAX_ROUNDS, EULER_SAME_ASSET_BORROW_PROTOCOL_HEADROOM_BPS, EULER_SAME_ASSET_BORROW_RATIO_STOP_EPS_BPS, EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID, EULER_V2_ISOLATED_VAULT_DEPOSIT_FALLBACK_GAS, EULER_V2_PREFER_ON_CHAIN_LEND_METRICS, EULER_V2_PROTOCOL_ID, EULER_V2_VAULT_WITHDRAW_FALLBACK_GAS, REUL_FULL_VEST_SEC, REUL_LOCK_DAY_SEC, buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch, buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch, buildEvmMultisignBodyEulerV2BorrowRepayBatch, buildEvmMultisignBodyEulerV2IsolatedBorrowBatch, buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch, buildEvmMultisignBodyEulerV2VaultWithdraw, clampEulerUnderlyingDecimalsForEulerUi, encodeEulerReulWithdrawToByLockTimestampsData, ensureEulerV2ChainAssetCache, estimateBorrowHumanFromLtv, eulerBorrowAndCollateralSameAsset, eulerLabelsAppendUnderlyingIfDistinct, eulerLabelsLookupLabelForVault, eulerReulUnlockAbi, eulerSameAssetApproveAmountWithBuffer, eulerSameAssetTotalCollateralPullWei, eulerSubgraphVaultCapToUnderlyingWei, eulerV2FetchLendVaultsSummary, eulerV2GoldskyUrlForChain, eulerV2KeyForNodeAssetRow, eulerV2ProtocolModule, eulerV2QueryGraphQl, eulerVaultLendMetricsFromIndexerVaultState, eulerVaultMaxNewBorrowWei, eulerVaultMaxNewSupplyWei, eulerWrappedGasTokenAliasesLower, fetchCoingeckoTokenUsdByContract, fetchEulerBorrowCollateralMaxWithdrawAssetsWei, fetchEulerLabelsEarnVaultAllowlist, fetchEulerLabelsEntityNameByAddress, fetchEulerLabelsVaultNameMap, fetchEulerLendEarnVaultEffectiveMaxWithdrawWei, fetchEulerReulVestingTranches, fetchEulerV2BorrowDebtWei, fetchEulerV2BorrowOracleQuoteSnapshot, fetchEulerV2BorrowPairLtvs, fetchEulerV2ChainAssetCache, fetchEulerV2EarnOfferingsForRowAsset, fetchEulerV2IsolatedLendMarketsForRowAsset, fetchEulerV2TrackingBorrowEntries, fetchEulerV2TrackingDepositEntries, fetchEulerVaultAssetDecimals, fetchEulerVaultMaxWithdrawWei, fetchEulerVaultOnChainLendMetrics, fetchEulerVaultOnChainLendMetricsForVaults, fetchEulerVaultUnderlyingMeta, flattenEulerV2BorrowCollateralRows, formatEulerRayApyPercent, formatEulerRaySupplyApyPercent, formatEulerResolvedCapOrCashForUi, loadEulerV2BorrowPositionsForOwner, loadEulerV2LendSupplyPositionsForOwner, loadEulerV2PortfolioUsdSnapshot, loadEulerV2SupportedChainIds, maxCollateralWeiCappedByBorrowLiquidity, mergeEulerV2PositionsTabRows, parseEulerTrackingBorrowEntry, planSameAssetLeveragedBorrows, resolveEulerAmountCapToSupplyWei, resolveEulerAmountCapToWei, resolveEulerWrappedNativeToken };
|
|
3839
|
+
export { EULER_EVAULT_CAP_UNLIMITED_WEI, EULER_EVAULT_SUPPLY_CAP_UNLIMITED_WEI, EULER_REUL_UNLOCK_GAS_FALLBACK, EULER_SAME_ASSET_BORROW_APPROVAL_BUFFER_BPS, EULER_SAME_ASSET_BORROW_MAX_ROUNDS, EULER_SAME_ASSET_BORROW_PROTOCOL_HEADROOM_BPS, EULER_SAME_ASSET_BORROW_RATIO_STOP_EPS_BPS, EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID, EULER_V2_ISOLATED_VAULT_DEPOSIT_FALLBACK_GAS, EULER_V2_PREFER_ON_CHAIN_LEND_METRICS, EULER_V2_PROTOCOL_ID, EULER_V2_VAULT_WITHDRAW_FALLBACK_GAS, EULER_V3_API_BASE, REUL_FULL_VEST_SEC, REUL_LOCK_DAY_SEC, buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch, buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch, buildEvmMultisignBodyEulerV2BorrowRepayBatch, buildEvmMultisignBodyEulerV2IsolatedBorrowBatch, buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch, buildEvmMultisignBodyEulerV2VaultWithdraw, clampEulerUnderlyingDecimalsForEulerUi, encodeEulerReulWithdrawToByLockTimestampsData, ensureEulerV2ChainAssetCache, estimateBorrowHumanFromLtv, eulerBorrowAndCollateralSameAsset, eulerLabelsAppendUnderlyingIfDistinct, eulerLabelsLookupLabelForVault, eulerReulUnlockAbi, eulerSameAssetApproveAmountWithBuffer, eulerSameAssetTotalCollateralPullWei, eulerSubgraphVaultCapToUnderlyingWei, eulerV2FetchLendVaultsSummary, eulerV2GoldskyUrlForChain, eulerV2KeyForNodeAssetRow, eulerV2ProtocolModule, eulerV2QueryGraphQl, eulerVaultLendMetricsFromIndexerVaultState, eulerVaultMaxNewBorrowWei, eulerVaultMaxNewSupplyWei, eulerWrappedGasTokenAliasesLower, fetchCoingeckoTokenUsdByContract, fetchEulerBorrowCollateralMaxWithdrawAssetsWei, fetchEulerLabelsEarnVaultAllowlist, fetchEulerLabelsEntityNameByAddress, fetchEulerLabelsVaultNameMap, fetchEulerLendEarnVaultEffectiveMaxWithdrawWei, fetchEulerReulVestingTranches, fetchEulerV2BorrowDebtWei, fetchEulerV2BorrowOracleQuoteSnapshot, fetchEulerV2BorrowPairLtvs, fetchEulerV2ChainAssetCache, fetchEulerV2EarnOfferingsForRowAsset, fetchEulerV2IsolatedLendMarketsForRowAsset, fetchEulerV2TrackingBorrowEntries, fetchEulerV2TrackingDepositEntries, fetchEulerV3ActiveChainIds, fetchEulerV3EarnVaults, fetchEulerV3EvkVaults, fetchEulerVaultAssetDecimals, fetchEulerVaultMaxWithdrawWei, fetchEulerVaultOnChainLendMetrics, fetchEulerVaultOnChainLendMetricsForVaults, fetchEulerVaultUnderlyingMeta, flattenEulerV2BorrowCollateralRows, formatEulerRayApyPercent, formatEulerRaySupplyApyPercent, formatEulerResolvedCapOrCashForUi, loadEulerV2BorrowPositionsForOwner, loadEulerV2LendSupplyPositionsForOwner, loadEulerV2PortfolioUsdSnapshot, loadEulerV2SupportedChainIds, maxCollateralWeiCappedByBorrowLiquidity, mergeEulerV2PositionsTabRows, parseEulerTrackingBorrowEntry, planSameAssetLeveragedBorrows, resolveEulerAmountCapToSupplyWei, resolveEulerAmountCapToWei, resolveEulerWrappedNativeToken };
|
|
3836
3840
|
//# sourceMappingURL=index.js.map
|
|
3837
3841
|
//# sourceMappingURL=index.js.map
|