@continuumdao/ctm-mpc-defi 0.2.30 → 0.2.32
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 +1933 -56
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +3671 -661
- package/dist/agent/catalog.js +1896 -58
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aerodrome/SKILL.md +93 -0
- package/dist/agent/skills/compound-v3/SKILL.md +132 -0
- package/dist/agent/skills/euler-v2/SKILL.md +1 -1
- package/dist/agent/skills/morpho/SKILL.md +16 -8
- package/dist/buildBatch-CngvebiD.d.ts +45 -0
- package/dist/chains/evm/index.d.ts +6 -44
- package/dist/core/index.cjs +2 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +119 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +119 -2
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aerodrome/index.cjs +3922 -0
- package/dist/protocols/evm/aerodrome/index.cjs.map +1 -0
- package/dist/protocols/evm/aerodrome/index.d.ts +792 -0
- package/dist/protocols/evm/aerodrome/index.js +3843 -0
- package/dist/protocols/evm/aerodrome/index.js.map +1 -0
- package/dist/protocols/evm/compound-v3/index.cjs +1542 -0
- package/dist/protocols/evm/compound-v3/index.cjs.map +1 -0
- package/dist/protocols/evm/compound-v3/index.d.ts +683 -0
- package/dist/protocols/evm/compound-v3/index.js +1488 -0
- package/dist/protocols/evm/compound-v3/index.js.map +1 -0
- package/dist/protocols/evm/euler-v2/index.cjs +17 -10
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.js +17 -10
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +746 -39
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +161 -14
- package/dist/protocols/evm/morpho/index.js +736 -42
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/package.json +15 -1
package/dist/agent/catalog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAddress, isAddress, zeroAddress } from 'viem';
|
|
1
|
+
import { getAddress, parseAbi, stringToHex, keccak256, toBytes, isAddress, zeroAddress, defineChain, createPublicClient, http } from 'viem';
|
|
2
2
|
import { MidnightApi } from '@morpho-org/midnight-sdk/api';
|
|
3
3
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -21,6 +21,9 @@ var __export = (target, all) => {
|
|
|
21
21
|
function getAaveGraphqlProxyUrl() {
|
|
22
22
|
return aaveGraphqlProxyUrl;
|
|
23
23
|
}
|
|
24
|
+
function getEulerGraphqlProxyUrl() {
|
|
25
|
+
return eulerGraphqlProxyUrl;
|
|
26
|
+
}
|
|
24
27
|
function getMorphoGraphqlProxyUrl() {
|
|
25
28
|
return morphoGraphqlProxyUrl;
|
|
26
29
|
}
|
|
@@ -58,7 +61,7 @@ async function getJsonViaOptionalProxy(args) {
|
|
|
58
61
|
}
|
|
59
62
|
return await r.json();
|
|
60
63
|
}
|
|
61
|
-
var aaveGraphqlProxyUrl, morphoGraphqlProxyUrl;
|
|
64
|
+
var aaveGraphqlProxyUrl, eulerGraphqlProxyUrl, morphoGraphqlProxyUrl;
|
|
62
65
|
var init_defiProxy = __esm({
|
|
63
66
|
"src/core/defiProxy.ts"() {
|
|
64
67
|
}
|
|
@@ -92,17 +95,27 @@ var init_api = __esm({
|
|
|
92
95
|
// src/protocols/evm/morpho/midnightConstants.ts
|
|
93
96
|
var midnightConstants_exports = {};
|
|
94
97
|
__export(midnightConstants_exports, {
|
|
98
|
+
MORPHO_BLUE_CANONICAL: () => MORPHO_BLUE_CANONICAL,
|
|
95
99
|
MORPHO_MIDNIGHT_ADDRESSES: () => MORPHO_MIDNIGHT_ADDRESSES,
|
|
96
100
|
MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS: () => MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS,
|
|
97
101
|
MORPHO_MIDNIGHT_BASE_CHAIN_ID: () => MORPHO_MIDNIGHT_BASE_CHAIN_ID,
|
|
102
|
+
MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS,
|
|
103
|
+
MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS,
|
|
98
104
|
MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT: () => MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT,
|
|
99
105
|
MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS,
|
|
106
|
+
MORPHO_MIDNIGHT_CALLBACK_SALT: () => MORPHO_MIDNIGHT_CALLBACK_SALT,
|
|
107
|
+
MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS: () => MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS,
|
|
100
108
|
MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS: () => MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS,
|
|
109
|
+
MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS: () => MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS,
|
|
101
110
|
MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT: () => MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT,
|
|
102
111
|
MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK: () => MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK,
|
|
112
|
+
MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID: () => MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID,
|
|
103
113
|
MORPHO_MIDNIGHT_LEND_FALLBACK_GAS: () => MORPHO_MIDNIGHT_LEND_FALLBACK_GAS,
|
|
114
|
+
MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS: () => MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS,
|
|
104
115
|
MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS: () => MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS,
|
|
105
116
|
MORPHO_MIDNIGHT_REST_BASE: () => MORPHO_MIDNIGHT_REST_BASE,
|
|
117
|
+
MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS: () => MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS,
|
|
118
|
+
MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS: () => MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS,
|
|
106
119
|
MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK: () => MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK,
|
|
107
120
|
TOKEN_PERMIT_NONE: () => TOKEN_PERMIT_NONE,
|
|
108
121
|
morphoMidnightAddressesForChain: () => morphoMidnightAddressesForChain
|
|
@@ -110,18 +123,36 @@ __export(midnightConstants_exports, {
|
|
|
110
123
|
function morphoMidnightAddressesForChain(chainId) {
|
|
111
124
|
return MORPHO_MIDNIGHT_ADDRESSES[chainId] ?? null;
|
|
112
125
|
}
|
|
113
|
-
var MORPHO_MIDNIGHT_REST_BASE, MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT, MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT, MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS, MORPHO_MIDNIGHT_BASE_CHAIN_ID, MORPHO_MIDNIGHT_ADDRESSES, TOKEN_PERMIT_NONE, MORPHO_MIDNIGHT_LEND_FALLBACK_GAS, MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS, MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS, MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS, MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK, MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK;
|
|
126
|
+
var MORPHO_MIDNIGHT_REST_BASE, MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT, MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT, MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS, MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS, MORPHO_MIDNIGHT_BASE_CHAIN_ID, MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID, MORPHO_BLUE_CANONICAL, MORPHO_MIDNIGHT_CALLBACK_SALT, MORPHO_MIDNIGHT_ADDRESSES, TOKEN_PERMIT_NONE, MORPHO_MIDNIGHT_LEND_FALLBACK_GAS, MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS, MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS, MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS, MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK, MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK, MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS, MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS, MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS, MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS, MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS, MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS;
|
|
114
127
|
var init_midnightConstants = __esm({
|
|
115
128
|
"src/protocols/evm/morpho/midnightConstants.ts"() {
|
|
116
129
|
MORPHO_MIDNIGHT_REST_BASE = "https://api.morpho.org/v0/midnight";
|
|
117
130
|
MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT = 20;
|
|
118
131
|
MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT = "0.5";
|
|
119
132
|
MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS = 3600;
|
|
133
|
+
MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS = 7 * 24 * 3600;
|
|
120
134
|
MORPHO_MIDNIGHT_BASE_CHAIN_ID = 8453;
|
|
135
|
+
MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID = 1;
|
|
136
|
+
MORPHO_BLUE_CANONICAL = "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
|
|
137
|
+
MORPHO_MIDNIGHT_CALLBACK_SALT = keccak256(toBytes("continuum-midnight-lend-v1"));
|
|
121
138
|
MORPHO_MIDNIGHT_ADDRESSES = {
|
|
139
|
+
[MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID]: {
|
|
140
|
+
midnight: "0x471686c42792F93528B000beF54bC10E3aa2045f",
|
|
141
|
+
bundles: "0x7c00dBB2b6b6b9B28745332e550dC8782Fcf77EC",
|
|
142
|
+
mempool: "0xde2d62449301a09A51EbF9326EA60d2e8BF4A8F7",
|
|
143
|
+
setterRatifier: "0xb72c416382c8A6399D0765CebfB032F040B00B3c",
|
|
144
|
+
ecrecoverRatifier: "0xAC439c81CAA6ef4C7B7E8F0110F8CE63A4b6D43e",
|
|
145
|
+
blueBuyCallbackFactory: "0x172d1FdC5f79bFe1ED46448f18541E591E5c93a7",
|
|
146
|
+
morphoBlue: MORPHO_BLUE_CANONICAL
|
|
147
|
+
},
|
|
122
148
|
[MORPHO_MIDNIGHT_BASE_CHAIN_ID]: {
|
|
123
|
-
midnight: "
|
|
124
|
-
bundles: "
|
|
149
|
+
midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A",
|
|
150
|
+
bundles: "0x091183d729BE9f808c212b475E387A12E67850A7",
|
|
151
|
+
mempool: "0xdD6DCE32e21f7b020898a8258dA37355b4017993",
|
|
152
|
+
setterRatifier: "0x800B5F12A61B8198a5a6EfD794Cac6699B294d63",
|
|
153
|
+
ecrecoverRatifier: "0xd6e70365C8E8DDa9a4ca662C07bbE663b017755E",
|
|
154
|
+
blueBuyCallbackFactory: "0x7337f119Eca028bD39E0e543cEf71631D2333425",
|
|
155
|
+
morphoBlue: MORPHO_BLUE_CANONICAL
|
|
125
156
|
}
|
|
126
157
|
};
|
|
127
158
|
TOKEN_PERMIT_NONE = { kind: 0, data: "0x" };
|
|
@@ -131,6 +162,12 @@ var init_midnightConstants = __esm({
|
|
|
131
162
|
MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS = 80000n;
|
|
132
163
|
MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK = 100000n;
|
|
133
164
|
MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK = 120000n;
|
|
165
|
+
MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS = 1200000n;
|
|
166
|
+
MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS = 400000n;
|
|
167
|
+
MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS = 350000n;
|
|
168
|
+
MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS = 80000n;
|
|
169
|
+
MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS = 250000n;
|
|
170
|
+
MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS = 80000n;
|
|
134
171
|
}
|
|
135
172
|
});
|
|
136
173
|
|
|
@@ -140,6 +177,7 @@ __export(midnightApi_exports, {
|
|
|
140
177
|
fetchMorphoMidnightBook: () => fetchMorphoMidnightBook,
|
|
141
178
|
fetchMorphoMidnightBookQuote: () => fetchMorphoMidnightBookQuote,
|
|
142
179
|
fetchMorphoMidnightBooks: () => fetchMorphoMidnightBooks,
|
|
180
|
+
fetchMorphoMidnightMakerOffers: () => fetchMorphoMidnightMakerOffers,
|
|
143
181
|
fetchMorphoMidnightMarketById: () => fetchMorphoMidnightMarketById,
|
|
144
182
|
fetchMorphoMidnightUserMarketPosition: () => fetchMorphoMidnightUserMarketPosition,
|
|
145
183
|
fetchMorphoMidnightUserPositions: () => fetchMorphoMidnightUserPositions,
|
|
@@ -281,6 +319,39 @@ async function fetchMorphoMidnightUserPositions(args) {
|
|
|
281
319
|
}
|
|
282
320
|
return rows;
|
|
283
321
|
}
|
|
322
|
+
async function fetchMorphoMidnightMakerOffers(args) {
|
|
323
|
+
const qs = new URLSearchParams();
|
|
324
|
+
qs.set("maker", getAddress(args.maker));
|
|
325
|
+
if (args.chainId != null) qs.set("chain_ids", String(args.chainId));
|
|
326
|
+
const j = await midnightGetJson(`/takeable-offers?${qs}`);
|
|
327
|
+
const out = [];
|
|
328
|
+
for (const row of j.data ?? []) {
|
|
329
|
+
const o = row.offer;
|
|
330
|
+
if (!o?.maker || !isAddress(o.maker) || !o.market?.loan_token || !isAddress(o.market.loan_token)) continue;
|
|
331
|
+
if (!o.market.midnight || !isAddress(o.market.midnight)) continue;
|
|
332
|
+
const group = (o.group ?? "").trim();
|
|
333
|
+
if (!group.startsWith("0x") || group.length !== 66) continue;
|
|
334
|
+
const callback = o.callback && isAddress(o.callback) ? getAddress(o.callback) : "0x0000000000000000000000000000000000000000";
|
|
335
|
+
out.push({
|
|
336
|
+
marketId: String(row.market_id ?? ""),
|
|
337
|
+
chainId: Number(o.market.chain_id ?? args.chainId ?? 0),
|
|
338
|
+
midnight: getAddress(o.market.midnight),
|
|
339
|
+
loanToken: getAddress(o.market.loan_token),
|
|
340
|
+
maker: getAddress(o.maker),
|
|
341
|
+
buy: o.buy === true,
|
|
342
|
+
tick: String(o.tick ?? "0"),
|
|
343
|
+
maxAssets: String(o.max_assets ?? "0"),
|
|
344
|
+
maxUnits: String(o.max_units ?? "0"),
|
|
345
|
+
expiry: Number(o.expiry ?? 0),
|
|
346
|
+
group,
|
|
347
|
+
callback,
|
|
348
|
+
callbackData: o.callback_data ?? "0x",
|
|
349
|
+
units: String(row.units ?? "0"),
|
|
350
|
+
maturity: o.market.maturity != null ? Number(o.market.maturity) : null
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
return out;
|
|
354
|
+
}
|
|
284
355
|
async function fetchMorphoMidnightUserMarketPosition(args) {
|
|
285
356
|
const marketId = args.marketId.trim();
|
|
286
357
|
const user = args.user.trim();
|
|
@@ -600,9 +671,9 @@ async function loadFullCurveSessionForRpc(rpcUrl) {
|
|
|
600
671
|
if (!url) {
|
|
601
672
|
throw new Error("rpcUrl is required.");
|
|
602
673
|
}
|
|
603
|
-
const
|
|
604
|
-
if (
|
|
605
|
-
return
|
|
674
|
+
const cached2 = curveSessionCache.get(url);
|
|
675
|
+
if (cached2 && cached2.expiresAt > Date.now()) {
|
|
676
|
+
return cached2.session;
|
|
606
677
|
}
|
|
607
678
|
try {
|
|
608
679
|
const { default: curve } = await import('@curvefi/api');
|
|
@@ -918,7 +989,7 @@ var evmMultisignCommonInputSchema = z.object({
|
|
|
918
989
|
chainDetail: chainDetailSchema.optional().describe("Server-filled gas row from chain registry when keyGenId is set."),
|
|
919
990
|
customGasChainDetails: z.record(z.unknown()).optional().describe("Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true."),
|
|
920
991
|
expiryDate: z.number().int().positive().optional().describe(
|
|
921
|
-
"Optional Unix seconds (UTC) when the MPC sign request expires. Uniswap V4, GMX, Hyperliquid,
|
|
992
|
+
"Optional Unix seconds (UTC) when the MPC sign request expires. Uniswap V4, GMX, Hyperliquid, Curve DAO, and Aerodrome default to 30 minutes when omitted; other protocols use the node default (7 days)."
|
|
922
993
|
)
|
|
923
994
|
});
|
|
924
995
|
function withMultisignKeySourceRefine(schema) {
|
|
@@ -1654,6 +1725,182 @@ var mcpCurveDaoBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
|
1654
1725
|
})
|
|
1655
1726
|
)
|
|
1656
1727
|
);
|
|
1728
|
+
var chain8453 = agentEvmChainIdSchema.describe("Must be 8453 (Base). Aerodrome is Base-only.");
|
|
1729
|
+
var rpcUrlOptional = z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL");
|
|
1730
|
+
var mcpAerodromeDiscoverPoolsInputSchema = z.object({
|
|
1731
|
+
chainId: chain8453,
|
|
1732
|
+
rpcUrl: rpcUrlOptional,
|
|
1733
|
+
token: z.string().min(1).describe("Ticker or 0x address to find pools for (AAPLc, USDC, ETH, WETH, AERO)."),
|
|
1734
|
+
tokenOut: z.string().min(1).optional().describe("Optional counterpart. Defaults to USDC so B20 stocks resolve. Tickers OK.")
|
|
1735
|
+
});
|
|
1736
|
+
var mcpAerodromeDiscoverPoolsOutputSchema = jsonObjectSchema.describe(
|
|
1737
|
+
"{ token, tokenOut, pools[] (lp, kind, tickSpacing, factory), notes }. Factory getPool only \u2014 not LpSugar. Then call ctm_aerodrome_quote."
|
|
1738
|
+
);
|
|
1739
|
+
var mcpAerodromeFetchPoolsInputSchema = z.object({
|
|
1740
|
+
chainId: chain8453,
|
|
1741
|
+
rpcUrl: rpcUrlOptional,
|
|
1742
|
+
limit: z.number().int().positive().max(200).optional(),
|
|
1743
|
+
offset: z.number().int().min(0).optional()
|
|
1744
|
+
});
|
|
1745
|
+
var mcpAerodromeFetchPoolsOutputSchema = jsonObjectSchema.describe("{ chainId, pools[] }");
|
|
1746
|
+
var mcpAerodromeFetchPositionsInputSchema = z.object({
|
|
1747
|
+
chainId: chain8453,
|
|
1748
|
+
rpcUrl: rpcUrlOptional,
|
|
1749
|
+
account: evmAddressSchema.optional(),
|
|
1750
|
+
executorAddress: evmAddressSchema.optional().describe("Server-filled from keyGenId when omitted")
|
|
1751
|
+
});
|
|
1752
|
+
var mcpAerodromeFetchPositionsOutputSchema = jsonObjectSchema.describe(
|
|
1753
|
+
"{ chainId, account, notes, positions[] } \u2014 each row has label (vAMM-USDC/AERO \xB7 #id), kind, gauge, stakedInGauge, claimFees.pool, claimEmissions (gauge + tokenId/cl for Slipstream, or null if no gauge). Dust v2 rows omitted."
|
|
1754
|
+
);
|
|
1755
|
+
var mcpAerodromeQuoteInputSchema = z.object({
|
|
1756
|
+
chainId: chain8453,
|
|
1757
|
+
rpcUrl: rpcUrlOptional,
|
|
1758
|
+
tokenIn: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address. Native: 0x0 / eth. B20 stocks need no address lookup."),
|
|
1759
|
+
tokenOut: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address. Native: 0x0 / eth."),
|
|
1760
|
+
amountHuman: z.string().min(1).describe("Human-readable amount of tokenIn (B20 stocks are 8 decimals)"),
|
|
1761
|
+
tokenInDecimals: z.number().int().min(0).max(18).optional().describe("Optional override. Omit for known tickers \u2014 AAPLc and other B20 stocks always use 8.")
|
|
1762
|
+
});
|
|
1763
|
+
var mcpAerodromeQuoteOutputSchema = jsonObjectSchema.describe(
|
|
1764
|
+
"{ tokenIn, tokenOut, amountInWei, amountOutWei, amountOutHuman, priceImpactPercent (0\u2013100 vs a tiny same-route probe, or null), hops, pathPacked, isNativeIn, isNativeOut, source }"
|
|
1765
|
+
);
|
|
1766
|
+
var mcpAerodromeBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1767
|
+
evmMultisignCommonInputSchema.extend({
|
|
1768
|
+
tokenIn: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address / 0x0 native"),
|
|
1769
|
+
tokenOut: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address / 0x0 native"),
|
|
1770
|
+
amountHuman: z.string().min(1),
|
|
1771
|
+
slippagePercent: z.number().gt(0).lt(100),
|
|
1772
|
+
quoteSnapshot: jsonObjectSchema.optional()
|
|
1773
|
+
})
|
|
1774
|
+
);
|
|
1775
|
+
var mcpAerodromeQuoteAddLiquidityInputSchema = z.object({
|
|
1776
|
+
chainId: chain8453,
|
|
1777
|
+
rpcUrl: rpcUrlOptional,
|
|
1778
|
+
tokenA: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native"),
|
|
1779
|
+
tokenB: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native"),
|
|
1780
|
+
stable: agentBooleanSchema(false),
|
|
1781
|
+
amountAHuman: z.string().optional().describe("Human amount of tokenA. Omit to solve from tokenB (one-sided, same as the dialog)."),
|
|
1782
|
+
amountBHuman: z.string().optional().describe("Human amount of tokenB. Omit to solve from tokenA (one-sided, same as the dialog)."),
|
|
1783
|
+
tokenADecimals: z.number().int().min(0).max(18).optional(),
|
|
1784
|
+
tokenBDecimals: z.number().int().min(0).max(18).optional()
|
|
1785
|
+
}).refine((v) => Boolean((v.amountAHuman ?? "").trim() || (v.amountBHuman ?? "").trim()), {
|
|
1786
|
+
message: "Enter amountAHuman or amountBHuman. The other side is filled from the current vAMM, sAMM, or Slipstream pool."
|
|
1787
|
+
});
|
|
1788
|
+
var mcpAerodromeQuoteAddLiquidityOutputSchema = jsonObjectSchema.describe(
|
|
1789
|
+
"{ tokenA, tokenB, amountAHuman, amountBHuman, kind (stable|volatile|cl), tickSpacing?, emptyPool, seedable, hint }. seedable:false = do not first-deposit (ETH/AAPLc has no pool \u2014 pair vs USDC). kind:cl is a Slipstream ratio; basic addLiquidity is v2 only."
|
|
1790
|
+
);
|
|
1791
|
+
var mcpAerodromeQuoteClDepositInputSchema = z.object({
|
|
1792
|
+
chainId: chain8453,
|
|
1793
|
+
rpcUrl: rpcUrlOptional,
|
|
1794
|
+
token0: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
|
|
1795
|
+
token1: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
|
|
1796
|
+
amount0Human: z.string().optional(),
|
|
1797
|
+
amount1Human: z.string().optional(),
|
|
1798
|
+
tickSpacing: z.number().int(),
|
|
1799
|
+
tickLower: z.number().int(),
|
|
1800
|
+
tickUpper: z.number().int(),
|
|
1801
|
+
sqrtPriceX96: z.string().min(1).describe("0 if the CL pool already exists")
|
|
1802
|
+
});
|
|
1803
|
+
var mcpAerodromeQuoteClDepositOutputSchema = jsonObjectSchema;
|
|
1804
|
+
var mcpAerodromeBuildAddLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1805
|
+
evmMultisignCommonInputSchema.extend({
|
|
1806
|
+
tokenA: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
|
|
1807
|
+
tokenB: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
|
|
1808
|
+
stable: agentBooleanSchema(false),
|
|
1809
|
+
amountAHuman: z.string().optional().describe("Omit to solve from amountBHuman (one-sided)."),
|
|
1810
|
+
amountBHuman: z.string().optional().describe("Omit to solve from amountAHuman (one-sided)."),
|
|
1811
|
+
slippagePercent: z.number().gt(0).lt(100)
|
|
1812
|
+
}).refine((v) => Boolean((v.amountAHuman ?? "").trim() || (v.amountBHuman ?? "").trim()), {
|
|
1813
|
+
message: "Enter amountAHuman or amountBHuman."
|
|
1814
|
+
})
|
|
1815
|
+
);
|
|
1816
|
+
var mcpAerodromeBuildRemoveLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1817
|
+
evmMultisignCommonInputSchema.extend({
|
|
1818
|
+
tokenA: z.string().min(1),
|
|
1819
|
+
tokenB: z.string().min(1),
|
|
1820
|
+
stable: agentBooleanSchema(false),
|
|
1821
|
+
lpToken: evmAddressSchema,
|
|
1822
|
+
liquidityHuman: z.string().min(1),
|
|
1823
|
+
lpDecimals: z.number().int().min(0).max(18).optional(),
|
|
1824
|
+
amountAMinHuman: z.string().optional(),
|
|
1825
|
+
amountBMinHuman: z.string().optional()
|
|
1826
|
+
})
|
|
1827
|
+
);
|
|
1828
|
+
var mcpAerodromeBuildClMintMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1829
|
+
evmMultisignCommonInputSchema.extend({
|
|
1830
|
+
token0: z.string().min(1),
|
|
1831
|
+
token1: z.string().min(1),
|
|
1832
|
+
amount0Human: z.string().optional(),
|
|
1833
|
+
amount1Human: z.string().optional(),
|
|
1834
|
+
tickSpacing: z.number().int(),
|
|
1835
|
+
tickLower: z.number().int(),
|
|
1836
|
+
tickUpper: z.number().int(),
|
|
1837
|
+
sqrtPriceX96: z.string().min(1),
|
|
1838
|
+
slippagePercent: z.number().gt(0).lt(100)
|
|
1839
|
+
})
|
|
1840
|
+
);
|
|
1841
|
+
var mcpAerodromeBuildClIncreaseMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1842
|
+
evmMultisignCommonInputSchema.extend({
|
|
1843
|
+
tokenId: z.string().min(1),
|
|
1844
|
+
token0: z.string().min(1),
|
|
1845
|
+
token1: z.string().min(1),
|
|
1846
|
+
amount0Wei: z.string().min(1),
|
|
1847
|
+
amount1Wei: z.string().min(1),
|
|
1848
|
+
slippagePercent: z.number().gt(0).lt(100)
|
|
1849
|
+
})
|
|
1850
|
+
);
|
|
1851
|
+
var mcpAerodromeBuildClDecreaseMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1852
|
+
evmMultisignCommonInputSchema.extend({
|
|
1853
|
+
tokenId: z.string().min(1),
|
|
1854
|
+
liquidity: z.string().min(1),
|
|
1855
|
+
amount0MinWei: z.string().optional(),
|
|
1856
|
+
amount1MinWei: z.string().optional()
|
|
1857
|
+
})
|
|
1858
|
+
);
|
|
1859
|
+
var mcpAerodromeBuildClBurnMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1860
|
+
evmMultisignCommonInputSchema.extend({
|
|
1861
|
+
tokenId: z.string().min(1)
|
|
1862
|
+
})
|
|
1863
|
+
);
|
|
1864
|
+
var mcpAerodromeBuildGaugeStakeMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1865
|
+
evmMultisignCommonInputSchema.extend({
|
|
1866
|
+
gauge: evmAddressSchema,
|
|
1867
|
+
lpToken: evmAddressSchema.optional(),
|
|
1868
|
+
amountHuman: z.string().optional(),
|
|
1869
|
+
lpDecimals: z.number().int().min(0).max(18).optional(),
|
|
1870
|
+
tokenId: z.string().optional(),
|
|
1871
|
+
cl: agentBooleanSchema(false)
|
|
1872
|
+
})
|
|
1873
|
+
);
|
|
1874
|
+
var mcpAerodromeBuildGaugeUnstakeMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1875
|
+
evmMultisignCommonInputSchema.extend({
|
|
1876
|
+
gauge: evmAddressSchema,
|
|
1877
|
+
amountHuman: z.string().optional(),
|
|
1878
|
+
lpDecimals: z.number().int().min(0).max(18).optional(),
|
|
1879
|
+
tokenId: z.string().optional(),
|
|
1880
|
+
cl: agentBooleanSchema(false)
|
|
1881
|
+
})
|
|
1882
|
+
);
|
|
1883
|
+
var mcpAerodromeBuildClaimFeesMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1884
|
+
evmMultisignCommonInputSchema.extend({
|
|
1885
|
+
pool: evmAddressSchema.describe(
|
|
1886
|
+
"Pool (lp) from ctm_aerodrome_fetch_positions claimFees.pool \u2014 not the gauge. Dialog: \u201CFees from the pool\u201D."
|
|
1887
|
+
)
|
|
1888
|
+
})
|
|
1889
|
+
);
|
|
1890
|
+
var mcpAerodromeBuildClCollectFeesMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1891
|
+
evmMultisignCommonInputSchema.extend({
|
|
1892
|
+
tokenId: z.string().min(1)
|
|
1893
|
+
})
|
|
1894
|
+
);
|
|
1895
|
+
var mcpAerodromeBuildClaimEmissionsMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1896
|
+
evmMultisignCommonInputSchema.extend({
|
|
1897
|
+
gauge: evmAddressSchema.describe(
|
|
1898
|
+
"Gauge from fetch_positions claimEmissions.gauge \u2014 not the pool. Dialog: \u201CEmissions from the gauge in AERO\u201D. Skip if claimEmissions is null."
|
|
1899
|
+
),
|
|
1900
|
+
tokenId: z.string().optional().describe("Required for Slipstream staked positions (claimEmissions.tokenId)."),
|
|
1901
|
+
cl: agentBooleanSchema(false).describe("true when claimEmissions.cl (Slipstream NFT getReward).")
|
|
1902
|
+
})
|
|
1903
|
+
);
|
|
1657
1904
|
|
|
1658
1905
|
// src/protocols/evm/morpho/robinhoodEarn.ts
|
|
1659
1906
|
var ROBINHOOD_CHAIN_ID = 4663;
|
|
@@ -1830,6 +2077,23 @@ function preprocessMorphoMidnightBorrowInput(raw) {
|
|
|
1830
2077
|
}
|
|
1831
2078
|
return o;
|
|
1832
2079
|
}
|
|
2080
|
+
function preprocessMorphoMidnightLendOfferInput(raw) {
|
|
2081
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
2082
|
+
const o = { ...raw };
|
|
2083
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
2084
|
+
if (!purposeText) {
|
|
2085
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
2086
|
+
if (amt) o.purposeText = `Morpho Midnight lend offer ${amt}`;
|
|
2087
|
+
}
|
|
2088
|
+
return o;
|
|
2089
|
+
}
|
|
2090
|
+
function preprocessMorphoMidnightCancelLendOfferInput(raw) {
|
|
2091
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
2092
|
+
const o = { ...raw };
|
|
2093
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
2094
|
+
if (!purposeText) o.purposeText = "Morpho Midnight cancel lend offer";
|
|
2095
|
+
return o;
|
|
2096
|
+
}
|
|
1833
2097
|
function preprocessMorphoMidnightRepayInput(raw) {
|
|
1834
2098
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1835
2099
|
const o = { ...raw };
|
|
@@ -1911,6 +2175,34 @@ var mcpMorphoFetchMidnightPositionsOutputSchema = z.object({
|
|
|
1911
2175
|
})
|
|
1912
2176
|
)
|
|
1913
2177
|
});
|
|
2178
|
+
var mcpMorphoFetchMidnightOffersInputSchema = z.object({
|
|
2179
|
+
user: z.string().min(1).describe("Maker EVM address"),
|
|
2180
|
+
chainId: agentEvmChainIdSchema.optional()
|
|
2181
|
+
});
|
|
2182
|
+
var mcpMorphoFetchMidnightOffersOutputSchema = z.object({
|
|
2183
|
+
offers: z.array(
|
|
2184
|
+
z.object({
|
|
2185
|
+
marketId: z.string(),
|
|
2186
|
+
chainId: z.number().int(),
|
|
2187
|
+
midnightAddress: z.string(),
|
|
2188
|
+
loanTokenAddress: z.string(),
|
|
2189
|
+
maker: z.string(),
|
|
2190
|
+
group: z.string().describe("Pass to ctm_morpho_build_midnight_cancel_lend_offer_multisign"),
|
|
2191
|
+
callback: z.string(),
|
|
2192
|
+
callbackData: z.string(),
|
|
2193
|
+
tick: z.string(),
|
|
2194
|
+
maxAssets: z.string(),
|
|
2195
|
+
remainingUnits: z.string(),
|
|
2196
|
+
expiry: z.number(),
|
|
2197
|
+
expiryIso: z.string(),
|
|
2198
|
+
maturity: z.number().nullable(),
|
|
2199
|
+
maturityIso: z.string(),
|
|
2200
|
+
lendApr: z.string(),
|
|
2201
|
+
lendAprNumeric: z.number().nullable(),
|
|
2202
|
+
marketLabel: z.string()
|
|
2203
|
+
})
|
|
2204
|
+
)
|
|
2205
|
+
});
|
|
1914
2206
|
var mcpServerCommonInputSchema = z.object({
|
|
1915
2207
|
keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
1916
2208
|
chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
@@ -2290,6 +2582,35 @@ var mcpMorphoMidnightBorrowInputSchema = withMultisignKeySourceRefine(
|
|
|
2290
2582
|
})
|
|
2291
2583
|
)
|
|
2292
2584
|
);
|
|
2585
|
+
var mcpMorphoMidnightLendOfferInputSchema = withMultisignKeySourceRefine(
|
|
2586
|
+
z.preprocess(
|
|
2587
|
+
preprocessMorphoMidnightLendOfferInput,
|
|
2588
|
+
evmMultisignCommonInputSchema.extend({
|
|
2589
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_books"),
|
|
2590
|
+
amountHuman: z.string().min(1).describe("Loan-token amount to park in Blue and quote on Midnight"),
|
|
2591
|
+
loanToken: evmAddressSchema.optional(),
|
|
2592
|
+
lendAprPct: z.string().optional().describe("Target fixed lend APR percent, e.g. 5.2. Defaults to book best bid."),
|
|
2593
|
+
tick: z.string().optional().describe("Override Midnight tick (takes precedence over lendAprPct)"),
|
|
2594
|
+
blueMarketId: z.string().optional().describe("Morpho Blue market to earn variable yield until the offer fills"),
|
|
2595
|
+
expirySeconds: agentCoercedOptionalIntSchema(z.number().int().min(60)),
|
|
2596
|
+
marketLabel: z.string().optional(),
|
|
2597
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
2598
|
+
})
|
|
2599
|
+
)
|
|
2600
|
+
);
|
|
2601
|
+
var mcpMorphoMidnightCancelLendOfferInputSchema = withMultisignKeySourceRefine(
|
|
2602
|
+
z.preprocess(
|
|
2603
|
+
preprocessMorphoMidnightCancelLendOfferInput,
|
|
2604
|
+
evmMultisignCommonInputSchema.extend({
|
|
2605
|
+
group: z.string().min(1).describe("Offer group id from ctm_morpho_fetch_midnight_offers"),
|
|
2606
|
+
callback: evmAddressSchema.optional(),
|
|
2607
|
+
callbackData: z.string().optional().describe("Hex Blue MarketParams from the offer row"),
|
|
2608
|
+
midnight: evmAddressSchema.optional(),
|
|
2609
|
+
withdrawRemaining: agentOptionalBooleanSchema(),
|
|
2610
|
+
marketLabel: z.string().optional()
|
|
2611
|
+
})
|
|
2612
|
+
)
|
|
2613
|
+
);
|
|
2293
2614
|
var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
|
|
2294
2615
|
z.preprocess(
|
|
2295
2616
|
preprocessMorphoMidnightRepayInput,
|
|
@@ -2791,6 +3112,96 @@ var mcpEulerV2FetchLendVaultsOutputSchema = z.object({
|
|
|
2791
3112
|
})
|
|
2792
3113
|
)
|
|
2793
3114
|
});
|
|
3115
|
+
var mcpCompoundV3FetchMarketsInputSchema = z.object({
|
|
3116
|
+
chainId: agentEvmChainIdSchema,
|
|
3117
|
+
rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
|
|
3118
|
+
});
|
|
3119
|
+
var mcpCompoundV3MarketAssetSchema = z.object({
|
|
3120
|
+
asset: z.string(),
|
|
3121
|
+
symbol: z.string(),
|
|
3122
|
+
decimals: z.number(),
|
|
3123
|
+
borrowCollateralFactorPercent: z.number(),
|
|
3124
|
+
liquidateCollateralFactorPercent: z.number(),
|
|
3125
|
+
priceRaw: z.string(),
|
|
3126
|
+
role: z.enum(["base", "collateral"])
|
|
3127
|
+
});
|
|
3128
|
+
var mcpCompoundV3MarketSummarySchema = z.object({
|
|
3129
|
+
chainId: z.number(),
|
|
3130
|
+
slug: z.string(),
|
|
3131
|
+
symbol: z.string(),
|
|
3132
|
+
comet: z.string().describe("Comet proxy \u2014 copy as comet for write tools"),
|
|
3133
|
+
rewards: z.string(),
|
|
3134
|
+
bulker: z.string().nullable(),
|
|
3135
|
+
baseToken: z.string().nullable(),
|
|
3136
|
+
utilization: z.number().nullable(),
|
|
3137
|
+
supplyAprPercent: z.string().nullable(),
|
|
3138
|
+
borrowAprPercent: z.string().nullable(),
|
|
3139
|
+
assets: z.array(mcpCompoundV3MarketAssetSchema)
|
|
3140
|
+
});
|
|
3141
|
+
var mcpCompoundV3FetchMarketsOutputSchema = z.object({
|
|
3142
|
+
markets: z.array(mcpCompoundV3MarketSummarySchema),
|
|
3143
|
+
notes: z.string()
|
|
3144
|
+
});
|
|
3145
|
+
var mcpCompoundV3FetchMarketInputSchema = z.object({
|
|
3146
|
+
chainId: agentEvmChainIdSchema,
|
|
3147
|
+
comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
|
|
3148
|
+
rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
|
|
3149
|
+
});
|
|
3150
|
+
var mcpCompoundV3FetchMarketOutputSchema = mcpCompoundV3MarketSummarySchema;
|
|
3151
|
+
var mcpCompoundV3FetchAccountInputSchema = z.object({
|
|
3152
|
+
chainId: agentEvmChainIdSchema,
|
|
3153
|
+
comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
|
|
3154
|
+
account: evmAddressSchema.describe("MPC executor / user address"),
|
|
3155
|
+
rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
|
|
3156
|
+
});
|
|
3157
|
+
var mcpCompoundV3FetchAccountOutputSchema = z.object({
|
|
3158
|
+
comet: z.string(),
|
|
3159
|
+
symbol: z.string(),
|
|
3160
|
+
baseSupplied: z.string(),
|
|
3161
|
+
baseBorrowed: z.string(),
|
|
3162
|
+
collaterals: z.array(
|
|
3163
|
+
z.object({
|
|
3164
|
+
asset: z.string(),
|
|
3165
|
+
symbol: z.string(),
|
|
3166
|
+
balance: z.string()
|
|
3167
|
+
})
|
|
3168
|
+
),
|
|
3169
|
+
isBorrowCollateralized: z.boolean(),
|
|
3170
|
+
isLiquidatable: z.boolean(),
|
|
3171
|
+
rewardToken: z.string().nullable(),
|
|
3172
|
+
rewardOwed: z.string().nullable()
|
|
3173
|
+
});
|
|
3174
|
+
var compoundV3WriteFields = {
|
|
3175
|
+
comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets. Never the implementation."),
|
|
3176
|
+
asset: evmAddressSchema.describe(
|
|
3177
|
+
"Token to supply/withdraw. Native ETH: 0x0000000000000000000000000000000000000000 or set isNative true."
|
|
3178
|
+
),
|
|
3179
|
+
amountHuman: z.string().min(1).describe('Human amount (e.g. "100"). Withdraw base while undercollateralized borrows.'),
|
|
3180
|
+
isNative: agentOptionalBooleanSchema().describe(
|
|
3181
|
+
"Wrap/unwrap native ETH automatically (WETH.deposit/withdraw). Independent of useBulker."
|
|
3182
|
+
),
|
|
3183
|
+
isNativeIn: agentOptionalBooleanSchema().describe("Alias of isNative for supply/repay."),
|
|
3184
|
+
useBulker: agentOptionalBooleanSchema().describe(
|
|
3185
|
+
"If true, prefer ctm_compound_v3_build_bulker_multisign for combined actions. ETH wrap still works when false."
|
|
3186
|
+
)
|
|
3187
|
+
};
|
|
3188
|
+
var mcpCompoundV3SupplyInputSchema = mcpMultisignInput(compoundV3WriteFields);
|
|
3189
|
+
var mcpCompoundV3WithdrawInputSchema = mcpMultisignInput(compoundV3WriteFields);
|
|
3190
|
+
var mcpCompoundV3RepayInputSchema = mcpMultisignInput(compoundV3WriteFields);
|
|
3191
|
+
var mcpCompoundV3ClaimRewardsInputSchema = mcpMultisignInput({
|
|
3192
|
+
comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets")
|
|
3193
|
+
});
|
|
3194
|
+
var mcpCompoundV3BulkerInputSchema = mcpMultisignInput({
|
|
3195
|
+
comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
|
|
3196
|
+
steps: z.array(
|
|
3197
|
+
z.object({
|
|
3198
|
+
action: z.enum(["supply", "withdraw", "claim"]),
|
|
3199
|
+
asset: evmAddressSchema.optional(),
|
|
3200
|
+
amountHuman: z.string().optional(),
|
|
3201
|
+
isNative: agentOptionalBooleanSchema()
|
|
3202
|
+
})
|
|
3203
|
+
).min(1).describe("Combined Bulker actions. Native supply/withdraw uses Bulker native token actions.")
|
|
3204
|
+
});
|
|
2794
3205
|
function mcpGmxMultisignInput(fields, preprocess) {
|
|
2795
3206
|
const inner = evmMultisignCommonInputSchema.extend(fields);
|
|
2796
3207
|
const shaped = preprocess ? z.preprocess(preprocess, inner) : inner;
|
|
@@ -4075,6 +4486,26 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
4075
4486
|
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightLendBatch" },
|
|
4076
4487
|
inputZod: mcpMorphoMidnightLendInputSchema
|
|
4077
4488
|
}),
|
|
4489
|
+
defineProtocolMcpTool({
|
|
4490
|
+
name: "ctm_morpho_build_midnight_lend_offer_multisign",
|
|
4491
|
+
actionId: "morpho.midnight-lend-offer",
|
|
4492
|
+
protocolId: "morpho",
|
|
4493
|
+
chainCategory: "evm",
|
|
4494
|
+
description: "Build a Morpho Midnight lend limit offer. Parks the loan token in Morpho Blue (variable yield) until a borrower takes the offer via BlueBuyCallback.",
|
|
4495
|
+
prerequisites: ["keyGenId", "chainId", "marketId from ctm_morpho_fetch_midnight_books", "amountHuman"],
|
|
4496
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightLendOfferBatch" },
|
|
4497
|
+
inputZod: mcpMorphoMidnightLendOfferInputSchema
|
|
4498
|
+
}),
|
|
4499
|
+
defineProtocolMcpTool({
|
|
4500
|
+
name: "ctm_morpho_build_midnight_cancel_lend_offer_multisign",
|
|
4501
|
+
actionId: "morpho.midnight-cancel-lend-offer",
|
|
4502
|
+
protocolId: "morpho",
|
|
4503
|
+
chainCategory: "evm",
|
|
4504
|
+
description: "Cancel a Morpho Midnight lend offer (exhaust the offer group) and withdraw unused Blue-parked funds.",
|
|
4505
|
+
prerequisites: ["keyGenId", "chainId", "group from ctm_morpho_fetch_midnight_offers"],
|
|
4506
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightCancelLendOfferBatch" },
|
|
4507
|
+
inputZod: mcpMorphoMidnightCancelLendOfferInputSchema
|
|
4508
|
+
}),
|
|
4078
4509
|
defineProtocolMcpTool({
|
|
4079
4510
|
name: "ctm_morpho_build_midnight_borrow_multisign",
|
|
4080
4511
|
actionId: "morpho.midnight-borrow",
|
|
@@ -4647,6 +5078,56 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
4647
5078
|
followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_forum_me"],
|
|
4648
5079
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoForumSignIn" },
|
|
4649
5080
|
inputZod: mcpContinuumDaoForumSignInInputSchema
|
|
5081
|
+
}),
|
|
5082
|
+
defineProtocolMcpTool({
|
|
5083
|
+
name: "ctm_compound_v3_build_supply_multisign",
|
|
5084
|
+
actionId: "compound-v3.supply",
|
|
5085
|
+
protocolId: "compound-v3",
|
|
5086
|
+
chainCategory: "evm",
|
|
5087
|
+
description: "Supply base (earn or repay) or collateral to a Comet proxy. Native ETH always wraps via WETH.deposit even when useBulker is false.",
|
|
5088
|
+
prerequisites: ["keyGenId", "chainId", "comet from ctm_compound_v3_fetch_markets", "asset", "amountHuman"],
|
|
5089
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Supply" },
|
|
5090
|
+
inputZod: mcpCompoundV3SupplyInputSchema
|
|
5091
|
+
}),
|
|
5092
|
+
defineProtocolMcpTool({
|
|
5093
|
+
name: "ctm_compound_v3_build_withdraw_multisign",
|
|
5094
|
+
actionId: "compound-v3.withdraw",
|
|
5095
|
+
protocolId: "compound-v3",
|
|
5096
|
+
chainCategory: "evm",
|
|
5097
|
+
description: "Withdraw collateral or base from a Comet. Withdraw of base while undercollateralized borrows. Native ETH always unwraps via WETH.withdraw.",
|
|
5098
|
+
prerequisites: ["keyGenId", "chainId", "comet", "asset", "amountHuman", "ctm_compound_v3_fetch_account"],
|
|
5099
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Withdraw" },
|
|
5100
|
+
inputZod: mcpCompoundV3WithdrawInputSchema
|
|
5101
|
+
}),
|
|
5102
|
+
defineProtocolMcpTool({
|
|
5103
|
+
name: "ctm_compound_v3_build_repay_multisign",
|
|
5104
|
+
actionId: "compound-v3.repay",
|
|
5105
|
+
protocolId: "compound-v3",
|
|
5106
|
+
chainCategory: "evm",
|
|
5107
|
+
description: "Repay Comet base debt by supplying the base asset (same as supply of base while borrowed).",
|
|
5108
|
+
prerequisites: ["keyGenId", "chainId", "comet", "asset (base token)", "amountHuman"],
|
|
5109
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Repay" },
|
|
5110
|
+
inputZod: mcpCompoundV3RepayInputSchema
|
|
5111
|
+
}),
|
|
5112
|
+
defineProtocolMcpTool({
|
|
5113
|
+
name: "ctm_compound_v3_build_claim_rewards_multisign",
|
|
5114
|
+
actionId: "compound-v3.claim-rewards",
|
|
5115
|
+
protocolId: "compound-v3",
|
|
5116
|
+
chainCategory: "evm",
|
|
5117
|
+
description: "Claim COMP / reward token from the market Rewards contract.",
|
|
5118
|
+
prerequisites: ["keyGenId", "chainId", "comet", "ctm_compound_v3_fetch_account for claimable"],
|
|
5119
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3ClaimRewards" },
|
|
5120
|
+
inputZod: mcpCompoundV3ClaimRewardsInputSchema
|
|
5121
|
+
}),
|
|
5122
|
+
defineProtocolMcpTool({
|
|
5123
|
+
name: "ctm_compound_v3_build_bulker_multisign",
|
|
5124
|
+
actionId: "compound-v3.bulker",
|
|
5125
|
+
protocolId: "compound-v3",
|
|
5126
|
+
chainCategory: "evm",
|
|
5127
|
+
description: "Optional combined Bulker.invoke (supply + borrow, claim + withdraw, native via Bulker). ETH wrap still works without this tool.",
|
|
5128
|
+
prerequisites: ["keyGenId", "chainId", "comet", "steps"],
|
|
5129
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Bulker" },
|
|
5130
|
+
inputZod: mcpCompoundV3BulkerInputSchema
|
|
4650
5131
|
})
|
|
4651
5132
|
];
|
|
4652
5133
|
|
|
@@ -5024,6 +5505,210 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
5024
5505
|
handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
|
|
5025
5506
|
inputZod: mcpCurveDaoBuildSwapMultisignInputSchema
|
|
5026
5507
|
}),
|
|
5508
|
+
defineMcpTool({
|
|
5509
|
+
name: "ctm_aerodrome_discover_pools",
|
|
5510
|
+
actionId: "aerodrome.discover-pools",
|
|
5511
|
+
protocolId: "aerodrome",
|
|
5512
|
+
chainCategory: "evm",
|
|
5513
|
+
description: "Find Aerodrome v2 + Slipstream pools for one token (optional tokenOut, default USDC) via factory getPool. Tickers OK (AAPLc, USDC, ETH). Use this instead of dumping listed tokens or LpSugar.all. For a price, skip this and call ctm_aerodrome_quote. rpcUrl is injected.",
|
|
5514
|
+
prerequisites: ["chainId 8453", "token (ticker or 0x)"],
|
|
5515
|
+
followUp: ["ctm_aerodrome_quote", "ctm_aerodrome_quote_add_liquidity"],
|
|
5516
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeDiscoverPoolsSummary" },
|
|
5517
|
+
inputZod: mcpAerodromeDiscoverPoolsInputSchema,
|
|
5518
|
+
outputZod: mcpAerodromeDiscoverPoolsOutputSchema
|
|
5519
|
+
}),
|
|
5520
|
+
defineMcpTool({
|
|
5521
|
+
name: "ctm_aerodrome_fetch_pools",
|
|
5522
|
+
actionId: "aerodrome.fetch-pools",
|
|
5523
|
+
protocolId: "aerodrome",
|
|
5524
|
+
chainCategory: "evm",
|
|
5525
|
+
description: "Paginated LpSugar.all pool dump on Base. Heavy \u2014 can time out. Not required for swaps: ctm_aerodrome_quote discovers Slipstream 3 / v2 routes itself (including AAPLc/USDC). Use only when browsing LP inventory.",
|
|
5526
|
+
prerequisites: ["chainId 8453"],
|
|
5527
|
+
followUp: ["ctm_aerodrome_quote_add_liquidity", "ctm_aerodrome_fetch_positions"],
|
|
5528
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeFetchPoolsSummary" },
|
|
5529
|
+
inputZod: mcpAerodromeFetchPoolsInputSchema,
|
|
5530
|
+
outputZod: mcpAerodromeFetchPoolsOutputSchema
|
|
5531
|
+
}),
|
|
5532
|
+
defineMcpTool({
|
|
5533
|
+
name: "ctm_aerodrome_fetch_positions",
|
|
5534
|
+
actionId: "aerodrome.fetch-positions",
|
|
5535
|
+
protocolId: "aerodrome",
|
|
5536
|
+
chainCategory: "evm",
|
|
5537
|
+
description: "KeyGen Aerodrome positions (same picker as the Multi-Sign Rewards tab). Each row has label, kind (vAMM/sAMM/CL), gauge, stakedInGauge, claimFees.pool, and claimEmissions (gauge + tokenId/cl, or null). Dust v2 rows omitted. Read-only.",
|
|
5538
|
+
prerequisites: ["chainId 8453", "account or keyGenId"],
|
|
5539
|
+
followUp: [
|
|
5540
|
+
"ctm_aerodrome_build_claim_fees_multisign",
|
|
5541
|
+
"ctm_aerodrome_build_claim_emissions_multisign",
|
|
5542
|
+
"ctm_aerodrome_build_cl_collect_fees_multisign"
|
|
5543
|
+
],
|
|
5544
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeFetchPositionsSummary" },
|
|
5545
|
+
inputZod: mcpAerodromeFetchPositionsInputSchema,
|
|
5546
|
+
outputZod: mcpAerodromeFetchPositionsOutputSchema
|
|
5547
|
+
}),
|
|
5548
|
+
defineMcpTool({
|
|
5549
|
+
name: "ctm_aerodrome_quote",
|
|
5550
|
+
actionId: "aerodrome.quote",
|
|
5551
|
+
protocolId: "aerodrome",
|
|
5552
|
+
chainCategory: "evm",
|
|
5553
|
+
description: "Quote an Aerodrome swap on Base. tokenIn/tokenOut accept tickers (AAPLc, USDC, ETH, WETH, AERO) or 0x addresses. Coinbase B20 stocks are 8 decimals and route via Slipstream 3 (usually a USDC hop). Returns amountOutHuman and priceImpactPercent (0\u2013100 vs a tiny same-route probe). Call this directly \u2014 do not fetch_pools or ask the user for a stock address. Does NOT create a sign request.",
|
|
5554
|
+
prerequisites: ["chainId 8453", "tokenIn + tokenOut + amountHuman (tickers OK)"],
|
|
5555
|
+
followUp: ["ctm_aerodrome_build_swap_multisign"],
|
|
5556
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuote" },
|
|
5557
|
+
inputZod: mcpAerodromeQuoteInputSchema,
|
|
5558
|
+
outputZod: mcpAerodromeQuoteOutputSchema
|
|
5559
|
+
}),
|
|
5560
|
+
defineMultisignSubmitMcpTool({
|
|
5561
|
+
name: "ctm_aerodrome_build_swap_multisign",
|
|
5562
|
+
actionId: "aerodrome.swap",
|
|
5563
|
+
protocolId: "aerodrome",
|
|
5564
|
+
chainCategory: "evm",
|
|
5565
|
+
description: "Create and submit mpc-auth multiSignRequest for an Aerodrome swap (optional ERC-20 approve + Router / Slipstream SwapRouter). Default deadline 30 minutes \u2014 ask the user to confirm that window and useCustomGas (via get_multi_sign_gas_options) before calling. Activate aerodrome:swap first.",
|
|
5566
|
+
prerequisites: [
|
|
5567
|
+
"ctm_aerodrome_quote",
|
|
5568
|
+
"get_multi_sign_gas_options + user confirms useCustomGas and 30-minute deadline",
|
|
5569
|
+
"keyGenId + chainId 8453 + purposeText + slippagePercent"
|
|
5570
|
+
],
|
|
5571
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeSwapBatch" },
|
|
5572
|
+
inputZod: mcpAerodromeBuildSwapMultisignInputSchema
|
|
5573
|
+
}),
|
|
5574
|
+
defineMcpTool({
|
|
5575
|
+
name: "ctm_aerodrome_quote_add_liquidity",
|
|
5576
|
+
actionId: "aerodrome.quote-add-liquidity",
|
|
5577
|
+
protocolId: "aerodrome",
|
|
5578
|
+
chainCategory: "evm",
|
|
5579
|
+
description: "Quote an Aerodrome deposit on Base (same as the Liquidity tab). One-sided: pass amountAHuman or amountBHuman; the other side comes from the current vAMM/sAMM reserves or Slipstream slot0. Tickers OK (AAPLc, USDC, ETH). B20 stocks are 8 decimals. ETH/stock has no pool \u2014 seedable:false and hint says pair vs USDC. Do not first-deposit an empty vAMM. Read-only.",
|
|
5580
|
+
prerequisites: ["chainId 8453", "tokenA + tokenB + amountAHuman or amountBHuman (tickers OK)"],
|
|
5581
|
+
followUp: ["ctm_aerodrome_build_add_liquidity_multisign"],
|
|
5582
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuoteAddLiquidity" },
|
|
5583
|
+
inputZod: mcpAerodromeQuoteAddLiquidityInputSchema,
|
|
5584
|
+
outputZod: mcpAerodromeQuoteAddLiquidityOutputSchema
|
|
5585
|
+
}),
|
|
5586
|
+
defineMcpTool({
|
|
5587
|
+
name: "ctm_aerodrome_quote_cl_deposit",
|
|
5588
|
+
actionId: "aerodrome.quote-cl-deposit",
|
|
5589
|
+
protocolId: "aerodrome",
|
|
5590
|
+
chainCategory: "evm",
|
|
5591
|
+
description: "Quote a Slipstream CL deposit (SugarHelper estimate when one side is omitted). token0/token1 accept tickers (AAPLc, USDC, ETH). Use when quote_add_liquidity returns kind:cl. Read-only.",
|
|
5592
|
+
prerequisites: ["chainId 8453", "ticks + sqrtPriceX96"],
|
|
5593
|
+
followUp: ["ctm_aerodrome_build_cl_mint_multisign"],
|
|
5594
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuoteClDeposit" },
|
|
5595
|
+
inputZod: mcpAerodromeQuoteClDepositInputSchema,
|
|
5596
|
+
outputZod: mcpAerodromeQuoteClDepositOutputSchema
|
|
5597
|
+
}),
|
|
5598
|
+
defineMultisignSubmitMcpTool({
|
|
5599
|
+
name: "ctm_aerodrome_build_add_liquidity_multisign",
|
|
5600
|
+
actionId: "aerodrome.add-liquidity",
|
|
5601
|
+
protocolId: "aerodrome",
|
|
5602
|
+
chainCategory: "evm",
|
|
5603
|
+
description: "Submit multiSignRequest to add basic vAMM/sAMM liquidity (approve + addLiquidity / addLiquidityETH). One-sided amounts OK. Refuses empty/unseedable pairs (ETH/AAPLc) and Slipstream-only quotes (use CL mint). Activate aerodrome:lp first.",
|
|
5604
|
+
prerequisites: [
|
|
5605
|
+
"ctm_aerodrome_quote_add_liquidity",
|
|
5606
|
+
"get_multi_sign_gas_options + user confirms useCustomGas and 30-minute deadline",
|
|
5607
|
+
"keyGenId + purposeText + slippagePercent"
|
|
5608
|
+
],
|
|
5609
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeAddLiquidityBatch" },
|
|
5610
|
+
inputZod: mcpAerodromeBuildAddLiquidityMultisignInputSchema
|
|
5611
|
+
}),
|
|
5612
|
+
defineMultisignSubmitMcpTool({
|
|
5613
|
+
name: "ctm_aerodrome_build_remove_liquidity_multisign",
|
|
5614
|
+
actionId: "aerodrome.remove-liquidity",
|
|
5615
|
+
protocolId: "aerodrome",
|
|
5616
|
+
chainCategory: "evm",
|
|
5617
|
+
description: "Submit multiSignRequest to remove basic-pool liquidity.",
|
|
5618
|
+
prerequisites: ["keyGenId", "lpToken + liquidityHuman"],
|
|
5619
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeRemoveLiquidityBatch" },
|
|
5620
|
+
inputZod: mcpAerodromeBuildRemoveLiquidityMultisignInputSchema
|
|
5621
|
+
}),
|
|
5622
|
+
defineMultisignSubmitMcpTool({
|
|
5623
|
+
name: "ctm_aerodrome_build_cl_mint_multisign",
|
|
5624
|
+
actionId: "aerodrome.cl-mint",
|
|
5625
|
+
protocolId: "aerodrome",
|
|
5626
|
+
chainCategory: "evm",
|
|
5627
|
+
description: "Submit multiSignRequest to mint a Slipstream concentrated liquidity NFT.",
|
|
5628
|
+
prerequisites: ["ctm_aerodrome_quote_cl_deposit", "keyGenId"],
|
|
5629
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClMintBatch" },
|
|
5630
|
+
inputZod: mcpAerodromeBuildClMintMultisignInputSchema
|
|
5631
|
+
}),
|
|
5632
|
+
defineMultisignSubmitMcpTool({
|
|
5633
|
+
name: "ctm_aerodrome_build_cl_increase_multisign",
|
|
5634
|
+
actionId: "aerodrome.cl-increase",
|
|
5635
|
+
protocolId: "aerodrome",
|
|
5636
|
+
chainCategory: "evm",
|
|
5637
|
+
description: "Submit multiSignRequest to increase Slipstream liquidity.",
|
|
5638
|
+
prerequisites: ["keyGenId", "tokenId"],
|
|
5639
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClIncreaseBatch" },
|
|
5640
|
+
inputZod: mcpAerodromeBuildClIncreaseMultisignInputSchema
|
|
5641
|
+
}),
|
|
5642
|
+
defineMultisignSubmitMcpTool({
|
|
5643
|
+
name: "ctm_aerodrome_build_cl_decrease_multisign",
|
|
5644
|
+
actionId: "aerodrome.cl-decrease",
|
|
5645
|
+
protocolId: "aerodrome",
|
|
5646
|
+
chainCategory: "evm",
|
|
5647
|
+
description: "Submit multiSignRequest to decrease Slipstream liquidity.",
|
|
5648
|
+
prerequisites: ["keyGenId", "tokenId + liquidity"],
|
|
5649
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClDecreaseBatch" },
|
|
5650
|
+
inputZod: mcpAerodromeBuildClDecreaseMultisignInputSchema
|
|
5651
|
+
}),
|
|
5652
|
+
defineMultisignSubmitMcpTool({
|
|
5653
|
+
name: "ctm_aerodrome_build_cl_burn_multisign",
|
|
5654
|
+
actionId: "aerodrome.cl-burn",
|
|
5655
|
+
protocolId: "aerodrome",
|
|
5656
|
+
chainCategory: "evm",
|
|
5657
|
+
description: "Submit multiSignRequest to burn an empty Slipstream position NFT.",
|
|
5658
|
+
prerequisites: ["keyGenId", "tokenId (liquidity withdrawn, fees collected)"],
|
|
5659
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClBurnBatch" },
|
|
5660
|
+
inputZod: mcpAerodromeBuildClBurnMultisignInputSchema
|
|
5661
|
+
}),
|
|
5662
|
+
defineMultisignSubmitMcpTool({
|
|
5663
|
+
name: "ctm_aerodrome_build_gauge_stake_multisign",
|
|
5664
|
+
actionId: "aerodrome.gauge-stake",
|
|
5665
|
+
protocolId: "aerodrome",
|
|
5666
|
+
chainCategory: "evm",
|
|
5667
|
+
description: "Submit multiSignRequest to stake basic LP tokens or a Slipstream NFT in a gauge.",
|
|
5668
|
+
prerequisites: ["keyGenId", "gauge + lpToken or tokenId"],
|
|
5669
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeGaugeStakeBatch" },
|
|
5670
|
+
inputZod: mcpAerodromeBuildGaugeStakeMultisignInputSchema
|
|
5671
|
+
}),
|
|
5672
|
+
defineMultisignSubmitMcpTool({
|
|
5673
|
+
name: "ctm_aerodrome_build_gauge_unstake_multisign",
|
|
5674
|
+
actionId: "aerodrome.gauge-unstake",
|
|
5675
|
+
protocolId: "aerodrome",
|
|
5676
|
+
chainCategory: "evm",
|
|
5677
|
+
description: "Submit multiSignRequest to unstake from an Aerodrome gauge.",
|
|
5678
|
+
prerequisites: ["keyGenId", "gauge"],
|
|
5679
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeGaugeUnstakeBatch" },
|
|
5680
|
+
inputZod: mcpAerodromeBuildGaugeUnstakeMultisignInputSchema
|
|
5681
|
+
}),
|
|
5682
|
+
defineMultisignSubmitMcpTool({
|
|
5683
|
+
name: "ctm_aerodrome_build_claim_fees_multisign",
|
|
5684
|
+
actionId: "aerodrome.claim-fees",
|
|
5685
|
+
protocolId: "aerodrome",
|
|
5686
|
+
chainCategory: "evm",
|
|
5687
|
+
description: "Claim unstaked fees from the pool (dialog: \u201CFees from the pool\u201D). Pass claimFees.pool from ctm_aerodrome_fetch_positions \u2014 not the gauge. Activate aerodrome:rewards first.",
|
|
5688
|
+
prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + purposeText + pool=claimFees.pool"],
|
|
5689
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClaimFeesBatch" },
|
|
5690
|
+
inputZod: mcpAerodromeBuildClaimFeesMultisignInputSchema
|
|
5691
|
+
}),
|
|
5692
|
+
defineMultisignSubmitMcpTool({
|
|
5693
|
+
name: "ctm_aerodrome_build_cl_collect_fees_multisign",
|
|
5694
|
+
actionId: "aerodrome.cl-collect-fees",
|
|
5695
|
+
protocolId: "aerodrome",
|
|
5696
|
+
chainCategory: "evm",
|
|
5697
|
+
description: "Collect Slipstream NFT fees via NFPM.collect. Pass the position id from fetch_positions (kind:cl). Activate aerodrome:rewards first.",
|
|
5698
|
+
prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + tokenId"],
|
|
5699
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClCollectBatch" },
|
|
5700
|
+
inputZod: mcpAerodromeBuildClCollectFeesMultisignInputSchema
|
|
5701
|
+
}),
|
|
5702
|
+
defineMultisignSubmitMcpTool({
|
|
5703
|
+
name: "ctm_aerodrome_build_claim_emissions_multisign",
|
|
5704
|
+
actionId: "aerodrome.claim-emissions",
|
|
5705
|
+
protocolId: "aerodrome",
|
|
5706
|
+
chainCategory: "evm",
|
|
5707
|
+
description: "Claim gauge emissions in AERO (dialog: \u201CEmissions from the gauge in AERO\u201D). Pass claimEmissions from ctm_aerodrome_fetch_positions (gauge; CL staked also needs tokenId + cl:true). Skip when claimEmissions is null. Activate aerodrome:rewards first.",
|
|
5708
|
+
prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + purposeText + gauge=claimEmissions.gauge"],
|
|
5709
|
+
handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClaimEmissionsBatch" },
|
|
5710
|
+
inputZod: mcpAerodromeBuildClaimEmissionsMultisignInputSchema
|
|
5711
|
+
}),
|
|
5027
5712
|
defineMcpTool({
|
|
5028
5713
|
name: "ctm_gmx_fetch_markets",
|
|
5029
5714
|
actionId: "gmx.fetch-markets",
|
|
@@ -5442,6 +6127,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
5442
6127
|
followUp: [
|
|
5443
6128
|
"ctm_morpho_fetch_midnight_quote",
|
|
5444
6129
|
"ctm_morpho_build_midnight_lend_multisign",
|
|
6130
|
+
"ctm_morpho_build_midnight_lend_offer_multisign",
|
|
5445
6131
|
"ctm_morpho_build_midnight_borrow_multisign"
|
|
5446
6132
|
],
|
|
5447
6133
|
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightBooksSummary" },
|
|
@@ -5455,7 +6141,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
5455
6141
|
chainCategory: "evm",
|
|
5456
6142
|
description: "Quote a Morpho Midnight book fill. side asks = lend, bids = borrow. assets is raw loan-token units.",
|
|
5457
6143
|
prerequisites: ["marketId from ctm_morpho_fetch_midnight_books", "assets raw amount"],
|
|
5458
|
-
followUp: [
|
|
6144
|
+
followUp: [
|
|
6145
|
+
"ctm_morpho_build_midnight_lend_multisign",
|
|
6146
|
+
"ctm_morpho_build_midnight_lend_offer_multisign",
|
|
6147
|
+
"ctm_morpho_build_midnight_borrow_multisign"
|
|
6148
|
+
],
|
|
5459
6149
|
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightQuoteSummary" },
|
|
5460
6150
|
inputZod: mcpMorphoFetchMidnightQuoteInputSchema,
|
|
5461
6151
|
outputZod: mcpMorphoFetchMidnightQuoteOutputSchema
|
|
@@ -5472,6 +6162,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
5472
6162
|
inputZod: mcpMorphoFetchMidnightPositionsInputSchema,
|
|
5473
6163
|
outputZod: mcpMorphoFetchMidnightPositionsOutputSchema
|
|
5474
6164
|
}),
|
|
6165
|
+
defineMcpTool({
|
|
6166
|
+
name: "ctm_morpho_fetch_midnight_offers",
|
|
6167
|
+
actionId: "morpho.fetch-midnight-offers",
|
|
6168
|
+
protocolId: "morpho",
|
|
6169
|
+
chainCategory: "evm",
|
|
6170
|
+
description: "Open Morpho Midnight maker lend offers for a user. Use group/callback/callbackData to cancel and withdraw unused Blue park.",
|
|
6171
|
+
prerequisites: ["user address"],
|
|
6172
|
+
followUp: ["ctm_morpho_build_midnight_cancel_lend_offer_multisign"],
|
|
6173
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightMakerOffersSummary" },
|
|
6174
|
+
inputZod: mcpMorphoFetchMidnightOffersInputSchema,
|
|
6175
|
+
outputZod: mcpMorphoFetchMidnightOffersOutputSchema
|
|
6176
|
+
}),
|
|
5475
6177
|
defineMcpTool({
|
|
5476
6178
|
name: "ctm_euler_v2_fetch_lend_vaults",
|
|
5477
6179
|
actionId: "euler-v2.fetch-lend-vaults",
|
|
@@ -5934,6 +6636,47 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
5934
6636
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumSections" },
|
|
5935
6637
|
inputZod: mcpContinuumDaoForumSectionsInputSchema,
|
|
5936
6638
|
outputZod: mcpContinuumDaoForumSectionsOutputSchema
|
|
6639
|
+
}),
|
|
6640
|
+
defineMcpTool({
|
|
6641
|
+
name: "ctm_compound_v3_fetch_markets",
|
|
6642
|
+
actionId: "compound-v3.fetch-markets",
|
|
6643
|
+
protocolId: "compound-v3",
|
|
6644
|
+
chainCategory: "evm",
|
|
6645
|
+
description: "List Compound III Comet markets on a chain. Each market has one borrowable base and a collateral list \u2014 use this (not web search) to answer what you can borrow against an asset or which collaterals a Comet accepts. Copy comet for fetch_market / fetch_account / build_*_multisign.",
|
|
6646
|
+
prerequisites: ["chainId", "get_defi_protocol_supported_chains"],
|
|
6647
|
+
followUp: ["ctm_compound_v3_fetch_market", "ctm_compound_v3_fetch_account"],
|
|
6648
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchMarketsSummary" },
|
|
6649
|
+
inputZod: mcpCompoundV3FetchMarketsInputSchema,
|
|
6650
|
+
outputZod: mcpCompoundV3FetchMarketsOutputSchema
|
|
6651
|
+
}),
|
|
6652
|
+
defineMcpTool({
|
|
6653
|
+
name: "ctm_compound_v3_fetch_market",
|
|
6654
|
+
actionId: "compound-v3.fetch-market",
|
|
6655
|
+
protocolId: "compound-v3",
|
|
6656
|
+
chainCategory: "evm",
|
|
6657
|
+
description: "One Comet: collateral list (what backs a borrow), collateral factors, prices, utilization, supply/borrow APR. Base is the only borrowable asset. Always uses the Comet proxy + CometInterface.",
|
|
6658
|
+
prerequisites: ["comet from ctm_compound_v3_fetch_markets", "rpcUrl from chain registry"],
|
|
6659
|
+
followUp: ["ctm_compound_v3_fetch_account", "ctm_compound_v3_build_supply_multisign"],
|
|
6660
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchMarketSummary" },
|
|
6661
|
+
inputZod: mcpCompoundV3FetchMarketInputSchema,
|
|
6662
|
+
outputZod: mcpCompoundV3FetchMarketOutputSchema
|
|
6663
|
+
}),
|
|
6664
|
+
defineMcpTool({
|
|
6665
|
+
name: "ctm_compound_v3_fetch_account",
|
|
6666
|
+
actionId: "compound-v3.fetch-account",
|
|
6667
|
+
protocolId: "compound-v3",
|
|
6668
|
+
chainCategory: "evm",
|
|
6669
|
+
description: "User position on a Comet: base supplied, base borrowed, each collateral, isBorrowCollateralized, isLiquidatable, claimable rewards.",
|
|
6670
|
+
prerequisites: ["comet from ctm_compound_v3_fetch_markets", "account", "rpcUrl from chain registry"],
|
|
6671
|
+
followUp: [
|
|
6672
|
+
"ctm_compound_v3_build_supply_multisign",
|
|
6673
|
+
"ctm_compound_v3_build_withdraw_multisign",
|
|
6674
|
+
"ctm_compound_v3_build_repay_multisign",
|
|
6675
|
+
"ctm_compound_v3_build_claim_rewards_multisign"
|
|
6676
|
+
],
|
|
6677
|
+
handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchAccountSummary" },
|
|
6678
|
+
inputZod: mcpCompoundV3FetchAccountInputSchema,
|
|
6679
|
+
outputZod: mcpCompoundV3FetchAccountOutputSchema
|
|
5937
6680
|
})
|
|
5938
6681
|
];
|
|
5939
6682
|
var MCP_TOOL_DEFINITIONS = [
|
|
@@ -6327,37 +7070,273 @@ var aaveV4ProtocolModule = {
|
|
|
6327
7070
|
]
|
|
6328
7071
|
};
|
|
6329
7072
|
registerProtocolModule(aaveV4ProtocolModule);
|
|
7073
|
+
init_defiProxy();
|
|
7074
|
+
var EULER_EVAULT_CAP_UNLIMITED_WEI = (1n << 256n) - 1n;
|
|
7075
|
+
var UINT256_MAX = EULER_EVAULT_CAP_UNLIMITED_WEI;
|
|
7076
|
+
parseAbi([
|
|
7077
|
+
"function caps() view returns (uint16 supplyCap, uint16 borrowCap)",
|
|
7078
|
+
"function cash() view returns (uint256)",
|
|
7079
|
+
"function totalBorrows() view returns (uint256)",
|
|
7080
|
+
"function totalAssets() view returns (uint256)"
|
|
7081
|
+
]);
|
|
7082
|
+
function resolveEulerAmountCapToWei(rawCap16) {
|
|
7083
|
+
const amountCap = BigInt(rawCap16) & 0xffffn;
|
|
7084
|
+
if (amountCap === 0n) return UINT256_MAX;
|
|
7085
|
+
const exp = amountCap & 63n;
|
|
7086
|
+
const mantissa = amountCap >> 6n;
|
|
7087
|
+
return 10n ** exp * mantissa / 100n;
|
|
7088
|
+
}
|
|
7089
|
+
function eulerSubgraphVaultCapToUnderlyingWei(raw) {
|
|
7090
|
+
try {
|
|
7091
|
+
const v = BigInt((raw ?? "").trim() || "0");
|
|
7092
|
+
if (v >= UINT256_MAX - 3n) return v;
|
|
7093
|
+
if (v <= 0xffffn) return resolveEulerAmountCapToWei(v);
|
|
7094
|
+
return v;
|
|
7095
|
+
} catch {
|
|
7096
|
+
return 0n;
|
|
7097
|
+
}
|
|
7098
|
+
}
|
|
6330
7099
|
|
|
6331
|
-
// src/protocols/evm/euler-v2/
|
|
6332
|
-
var
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
7100
|
+
// src/protocols/evm/euler-v2/eulerV2Subgraph.ts
|
|
7101
|
+
var EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID = {
|
|
7102
|
+
1: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-mainnet/latest/gn",
|
|
7103
|
+
8453: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-base/latest/gn",
|
|
7104
|
+
1923: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-swell/latest/gn",
|
|
7105
|
+
146: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-sonic/latest/gn",
|
|
7106
|
+
60808: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-bob/latest/gn",
|
|
7107
|
+
80094: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-berachain/latest/gn",
|
|
7108
|
+
43114: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-avalanche/latest/gn",
|
|
7109
|
+
42161: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-arbitrum/latest/gn",
|
|
7110
|
+
130: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-unichain/latest/gn",
|
|
7111
|
+
57073: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-ink/latest/gn",
|
|
7112
|
+
56: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-bsc/latest/gn",
|
|
7113
|
+
999: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-hyperevm/latest/gn",
|
|
7114
|
+
10: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-optimism/latest/gn",
|
|
7115
|
+
100: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-gnosis/latest/gn",
|
|
7116
|
+
480: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-worldchain/latest/gn",
|
|
7117
|
+
239: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-tac/latest/gn",
|
|
7118
|
+
9745: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-plasma/latest/gn",
|
|
7119
|
+
5e3: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-v2-mantle/latest/gn"
|
|
6350
7120
|
};
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
7121
|
+
var WRAPPED_NATIVE_FALLBACK = {
|
|
7122
|
+
1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
7123
|
+
10: "0x4200000000000000000000000000000000000006",
|
|
7124
|
+
56: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
7125
|
+
100: "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
|
|
7126
|
+
130: "0x4200000000000000000000000000000000000006",
|
|
7127
|
+
146: "0x03980325872071166574bcd94670450917897468",
|
|
7128
|
+
239: "0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9",
|
|
7129
|
+
// TAC: WTAC (https://docs.tac.build/ecosystem/token-list)
|
|
7130
|
+
480: "0x4200000000000000000000000000000000000006",
|
|
7131
|
+
999: "0x5555555555555555555555555555555555555555",
|
|
7132
|
+
// HyperEVM: WHYPE (Hyperliquid docs)
|
|
7133
|
+
1923: "0x4200000000000000000000000000000000000006",
|
|
7134
|
+
42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
7135
|
+
43114: "0xB31f66AA3C1e785363F0875A1B74D27b85FE0459",
|
|
7136
|
+
5e3: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
|
|
7137
|
+
// Mantle: WMNT
|
|
7138
|
+
57073: "0x4200000000000000000000000000000000000006",
|
|
7139
|
+
60808: "0x4200000000000000000000000000000000000006",
|
|
7140
|
+
80094: "0x6969696969696969696969696969696969696969",
|
|
7141
|
+
// Berachain: WBERA (https://docs.berachain.com)
|
|
7142
|
+
8453: "0x4200000000000000000000000000000000000006",
|
|
7143
|
+
9745: "0x6100E367285b01F48D07953803A2d8dCA5D19873"
|
|
7144
|
+
// Plasma: WXPL
|
|
7145
|
+
};
|
|
7146
|
+
for (const id of Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map(Number)) {
|
|
7147
|
+
if (WRAPPED_NATIVE_FALLBACK[id] == null) {
|
|
7148
|
+
throw new Error(`eulerV2Subgraph: add WRAPPED_NATIVE_FALLBACK for Euler Goldsky chain ${id}`);
|
|
7149
|
+
}
|
|
6357
7150
|
}
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
7151
|
+
function eulerV2GoldskyUrlForChain(chainId) {
|
|
7152
|
+
return EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID[chainId];
|
|
7153
|
+
}
|
|
7154
|
+
async function resolveEulerWrappedNativeToken(chainId) {
|
|
7155
|
+
try {
|
|
7156
|
+
const fromAave = await fetchAaveV4NativeWrappedToken(chainId);
|
|
7157
|
+
if (fromAave) return fromAave;
|
|
7158
|
+
} catch {
|
|
7159
|
+
}
|
|
7160
|
+
const fb = WRAPPED_NATIVE_FALLBACK[chainId];
|
|
7161
|
+
if (fb && isAddress(fb)) return getAddress(fb);
|
|
7162
|
+
return null;
|
|
7163
|
+
}
|
|
7164
|
+
async function eulerSubgraphGql(endpoint, query, variables, chainId) {
|
|
7165
|
+
const body = { query, variables: variables ?? {} };
|
|
7166
|
+
const proxy = getEulerGraphqlProxyUrl();
|
|
7167
|
+
const j = await postJsonViaOptionalProxy({
|
|
7168
|
+
directUrl: endpoint,
|
|
7169
|
+
body,
|
|
7170
|
+
proxyUrl: proxy,
|
|
7171
|
+
proxyEnvelope: chainId != null ? { chainId, query, variables: variables ?? {} } : body
|
|
7172
|
+
});
|
|
7173
|
+
if (j.errors?.length) {
|
|
7174
|
+
throw new Error(j.errors.map((e) => e.message ?? "Unknown").join("; "));
|
|
7175
|
+
}
|
|
7176
|
+
if (j.data == null) throw new Error("Euler subgraph: empty response");
|
|
7177
|
+
return j.data;
|
|
7178
|
+
}
|
|
7179
|
+
async function eulerV2QueryGraphQl(chainId, query, variables) {
|
|
7180
|
+
const endpoint = eulerV2GoldskyUrlForChain(chainId);
|
|
7181
|
+
if (!endpoint) {
|
|
7182
|
+
throw new Error(`Euler v2 subgraph is not configured for chain ${chainId}`);
|
|
7183
|
+
}
|
|
7184
|
+
return eulerSubgraphGql(endpoint, query, variables, chainId);
|
|
7185
|
+
}
|
|
7186
|
+
function normAssetAddr(raw) {
|
|
7187
|
+
const s = (raw ?? "").trim();
|
|
7188
|
+
if (!s || !isAddress(s)) return null;
|
|
7189
|
+
return getAddress(s).toLowerCase();
|
|
7190
|
+
}
|
|
7191
|
+
function vaultShowsBorrowTab(borrowCap, totalBorrows) {
|
|
7192
|
+
let borrows = 0n;
|
|
7193
|
+
try {
|
|
7194
|
+
borrows = BigInt((totalBorrows ?? "").trim() || "0");
|
|
7195
|
+
} catch {
|
|
7196
|
+
borrows = 0n;
|
|
7197
|
+
}
|
|
7198
|
+
if (borrows > 0n) return true;
|
|
7199
|
+
const w = eulerSubgraphVaultCapToUnderlyingWei(borrowCap);
|
|
7200
|
+
if (w >= EULER_EVAULT_CAP_UNLIMITED_WEI - 3n) return true;
|
|
7201
|
+
return w > 0n;
|
|
7202
|
+
}
|
|
7203
|
+
var VAULT_PAGE = `
|
|
7204
|
+
query V($first: Int!, $skip: Int!) {
|
|
7205
|
+
eulerVaults(first: $first, skip: $skip) {
|
|
7206
|
+
asset
|
|
7207
|
+
borrowCap
|
|
7208
|
+
state { totalBorrows }
|
|
7209
|
+
}
|
|
7210
|
+
}
|
|
7211
|
+
`;
|
|
7212
|
+
var EARN_PAGE = `
|
|
7213
|
+
query E($first: Int!, $skip: Int!) {
|
|
7214
|
+
eulerEarnVaults(first: $first, skip: $skip) {
|
|
7215
|
+
asset
|
|
7216
|
+
}
|
|
7217
|
+
}
|
|
7218
|
+
`;
|
|
7219
|
+
async function paginateEulerVaultRows(chainId) {
|
|
7220
|
+
const out = [];
|
|
7221
|
+
let skip = 0;
|
|
7222
|
+
const first = 1e3;
|
|
7223
|
+
while (true) {
|
|
7224
|
+
const d = await eulerV2QueryGraphQl(chainId, VAULT_PAGE, { first, skip });
|
|
7225
|
+
const rows = d.eulerVaults ?? [];
|
|
7226
|
+
if (!rows.length) break;
|
|
7227
|
+
for (const r of rows) {
|
|
7228
|
+
const tb = (r.state?.totalBorrows ?? "0").toString();
|
|
7229
|
+
out.push({ asset: r.asset ?? null, borrowCap: r.borrowCap, totalBorrows: tb });
|
|
7230
|
+
}
|
|
7231
|
+
if (rows.length < first) break;
|
|
7232
|
+
skip += first;
|
|
7233
|
+
}
|
|
7234
|
+
return out;
|
|
7235
|
+
}
|
|
7236
|
+
async function paginateEulerEarnAssets(chainId) {
|
|
7237
|
+
const assets = [];
|
|
7238
|
+
let skip = 0;
|
|
7239
|
+
const first = 1e3;
|
|
7240
|
+
while (true) {
|
|
7241
|
+
const d = await eulerV2QueryGraphQl(
|
|
7242
|
+
chainId,
|
|
7243
|
+
EARN_PAGE,
|
|
7244
|
+
{
|
|
7245
|
+
first,
|
|
7246
|
+
skip
|
|
7247
|
+
}
|
|
7248
|
+
);
|
|
7249
|
+
const rows = d.eulerEarnVaults ?? [];
|
|
7250
|
+
if (!rows.length) break;
|
|
7251
|
+
for (const r of rows) {
|
|
7252
|
+
const a = normAssetAddr(r.asset ?? void 0);
|
|
7253
|
+
if (a) assets.push(a);
|
|
7254
|
+
}
|
|
7255
|
+
if (rows.length < first) break;
|
|
7256
|
+
skip += first;
|
|
7257
|
+
}
|
|
7258
|
+
return assets;
|
|
7259
|
+
}
|
|
7260
|
+
var eulerV2ChainAssetCache = /* @__PURE__ */ new Map();
|
|
7261
|
+
async function fetchEulerV2ChainAssetCache(chainId) {
|
|
7262
|
+
const endpoint = eulerV2GoldskyUrlForChain(chainId);
|
|
7263
|
+
if (!endpoint) {
|
|
7264
|
+
return { nativeWrapped: null, modesByUnderlying: /* @__PURE__ */ new Map() };
|
|
7265
|
+
}
|
|
7266
|
+
const [nativeWrapped, vaultRows, earnAssets] = await Promise.all([
|
|
7267
|
+
resolveEulerWrappedNativeToken(chainId),
|
|
7268
|
+
paginateEulerVaultRows(chainId),
|
|
7269
|
+
paginateEulerEarnAssets(chainId)
|
|
7270
|
+
]);
|
|
7271
|
+
const modes = /* @__PURE__ */ new Map();
|
|
7272
|
+
const bump = (addr, patch) => {
|
|
7273
|
+
const cur = modes.get(addr) ?? { lend: false, borrow: false, earn: false };
|
|
7274
|
+
modes.set(addr, {
|
|
7275
|
+
lend: cur.lend || !!patch.lend,
|
|
7276
|
+
borrow: cur.borrow || !!patch.borrow,
|
|
7277
|
+
earn: cur.earn || !!patch.earn
|
|
7278
|
+
});
|
|
7279
|
+
};
|
|
7280
|
+
for (const e of earnAssets) bump(e, { earn: true });
|
|
7281
|
+
for (const row of vaultRows) {
|
|
7282
|
+
const a = normAssetAddr(row.asset);
|
|
7283
|
+
if (!a) continue;
|
|
7284
|
+
bump(a, {
|
|
7285
|
+
lend: true,
|
|
7286
|
+
borrow: vaultShowsBorrowTab(row.borrowCap, row.totalBorrows)
|
|
7287
|
+
});
|
|
7288
|
+
}
|
|
7289
|
+
return { nativeWrapped, modesByUnderlying: modes };
|
|
7290
|
+
}
|
|
7291
|
+
function ensureEulerV2ChainAssetCache(chainId) {
|
|
7292
|
+
const hit = eulerV2ChainAssetCache.get(chainId);
|
|
7293
|
+
if (hit) return hit;
|
|
7294
|
+
const p = fetchEulerV2ChainAssetCache(chainId).catch((e) => {
|
|
7295
|
+
eulerV2ChainAssetCache.delete(chainId);
|
|
7296
|
+
throw e;
|
|
7297
|
+
});
|
|
7298
|
+
eulerV2ChainAssetCache.set(chainId, p);
|
|
7299
|
+
return p;
|
|
7300
|
+
}
|
|
7301
|
+
|
|
7302
|
+
// src/protocols/evm/euler-v2/loadEulerV2SupportedChainIds.ts
|
|
7303
|
+
var cached = null;
|
|
7304
|
+
function loadEulerV2SupportedChainIds() {
|
|
7305
|
+
if (cached) return Promise.resolve(cached);
|
|
7306
|
+
cached = new Set(Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map((k) => Number(k)));
|
|
7307
|
+
return Promise.resolve(cached);
|
|
7308
|
+
}
|
|
7309
|
+
|
|
7310
|
+
// src/protocols/evm/euler-v2/index.ts
|
|
7311
|
+
var EULER_V2_PROTOCOL_ID = "euler-v2";
|
|
7312
|
+
var eulerV2ProtocolModule = {
|
|
7313
|
+
id: EULER_V2_PROTOCOL_ID,
|
|
7314
|
+
chainCategory: "evm",
|
|
7315
|
+
isChainSupported(ctx) {
|
|
7316
|
+
return ctx.chainCategory === "evm";
|
|
7317
|
+
},
|
|
7318
|
+
isTokenSupported(token) {
|
|
7319
|
+
return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
|
|
7320
|
+
},
|
|
7321
|
+
actions: [
|
|
7322
|
+
{ id: "euler-v2.isolated-lend", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7323
|
+
{ id: "euler-v2.isolated-borrow", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7324
|
+
{ id: "euler-v2.vault-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7325
|
+
{ id: "euler-v2.borrow-repay", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Repay Euler borrow", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7326
|
+
{ id: "euler-v2.collateral-deposit", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7327
|
+
{ id: "euler-v2.collateral-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
7328
|
+
]
|
|
7329
|
+
};
|
|
7330
|
+
registerProtocolModule(eulerV2ProtocolModule);
|
|
7331
|
+
|
|
7332
|
+
// src/protocols/evm/gmx/support.ts
|
|
7333
|
+
var GMX_SUPPORTED_CHAIN_IDS = [42161, 43114];
|
|
7334
|
+
function isGmxChainSupported(chainId) {
|
|
7335
|
+
return GMX_SUPPORTED_CHAIN_IDS.includes(chainId);
|
|
7336
|
+
}
|
|
7337
|
+
var require2 = createRequire(fileURLToPath(import.meta.url));
|
|
7338
|
+
var { GmxApiSdk } = require2("@gmx-io/sdk/v2");
|
|
7339
|
+
var { getApiUrl, getApiFallbackUrls } = require2("@gmx-io/sdk/configs/api");
|
|
6361
7340
|
var GMX_HTTP_TIMEOUT_MS = 3e4;
|
|
6362
7341
|
function gmxResolvedApiBaseUrls(chainId) {
|
|
6363
7342
|
const primary = getApiUrl(chainId);
|
|
@@ -7082,6 +8061,8 @@ var morphoProtocolModule = {
|
|
|
7082
8061
|
{ id: "morpho.fetch-midnight-quote", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Quote Morpho Midnight lend/borrow fill", commonParams: [], params: {} },
|
|
7083
8062
|
{ id: "morpho.fetch-midnight-positions", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight user positions", commonParams: [], params: {} },
|
|
7084
8063
|
{ id: "morpho.midnight-lend", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate lend (take asks)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
8064
|
+
{ id: "morpho.midnight-lend-offer", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight lend limit offer parked in Blue until filled", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
8065
|
+
{ id: "morpho.midnight-cancel-lend-offer", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a Morpho Midnight lend offer and withdraw unused Blue park", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7085
8066
|
{ id: "morpho.midnight-borrow", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate borrow (supply collateral + take bids)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
7086
8067
|
{ id: "morpho.midnight-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight repay debt and withdraw collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
7087
8068
|
]
|
|
@@ -7357,6 +8338,141 @@ var veniceProtocolModule = {
|
|
|
7357
8338
|
]
|
|
7358
8339
|
};
|
|
7359
8340
|
registerProtocolModule(veniceProtocolModule);
|
|
8341
|
+
var AERODROME_PROTOCOL_ID = "aerodrome";
|
|
8342
|
+
var AERODROME_CHAIN_ID = 8453;
|
|
8343
|
+
var AERODROME_WETH_BASE = "0x4200000000000000000000000000000000000006";
|
|
8344
|
+
var AERODROME_USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
8345
|
+
function isAerodromeChainSupported(chainId) {
|
|
8346
|
+
const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
|
|
8347
|
+
return n === AERODROME_CHAIN_ID;
|
|
8348
|
+
}
|
|
8349
|
+
var AERODROME_BASE_ADDRESSES_FALLBACK = {
|
|
8350
|
+
aero: "0x940181a94A35A4569E4529A3CDfB74e38FD98631"};
|
|
8351
|
+
var AERODROME_COINBASE_STOCK_TOKENS = [
|
|
8352
|
+
{ symbol: "AAPLc", name: "Apple Inc.", address: "0xb200000000000000000000C2e324d24d7eEcd1fb" },
|
|
8353
|
+
{ symbol: "NVDAc", name: "NVIDIA Corporation", address: "0xb20000000000000000000078ee7ce2fE4908108C" },
|
|
8354
|
+
{ symbol: "METAc", name: "Meta Platforms Inc.", address: "0xb2000000000000000000008bC8786B856E61707C" },
|
|
8355
|
+
{ symbol: "GOOGLc", name: "Alphabet Inc.", address: "0xb2000000000000000000002D0BA3164cc74f58B7" },
|
|
8356
|
+
{ symbol: "AMZNc", name: "Amazon.com Inc.", address: "0xb200000000000000000000d9192b6B456483C2E8" },
|
|
8357
|
+
{ symbol: "TSLAc", name: "Tesla Inc.", address: "0xb2000000000000000000001e800a7f5189430cD0" },
|
|
8358
|
+
{ symbol: "MSFTc", name: "Microsoft Corporation", address: "0xB200000000000000000000Ab99cFa739E253872B" },
|
|
8359
|
+
{ symbol: "COINc", name: "Coinbase Global Inc.", address: "0xb200000000000000000000c85a31389D71F3ecfb" },
|
|
8360
|
+
{ symbol: "MSTRc", name: "Strategy Inc.", address: "0xb2000000000000000000004884b426556b92883d" },
|
|
8361
|
+
{ symbol: "CRCLc", name: "Circle Internet Group Inc.", address: "0xB20000000000000000000019f6E7C675b73C2e4D" },
|
|
8362
|
+
{ symbol: "INTCc", name: "Intel Corporation", address: "0xB2000000000000000000004AFF16039bA04bdFBc" },
|
|
8363
|
+
{ symbol: "SNDKc", name: "Sandisk Corporation", address: "0xb200000000000000000000397293Cb8cda9a10c5" },
|
|
8364
|
+
{ symbol: "SPCXc", name: "Space Exploration Technologies Corp.", address: "0xb2000000000000000000007b9fcbd005511aCBd5" }
|
|
8365
|
+
];
|
|
8366
|
+
var AERODROME_COINBASE_STOCK_DECIMALS = 8;
|
|
8367
|
+
|
|
8368
|
+
// src/protocols/evm/aerodrome/index.ts
|
|
8369
|
+
var aerodromeProtocolModule = {
|
|
8370
|
+
id: AERODROME_PROTOCOL_ID,
|
|
8371
|
+
chainCategory: "evm",
|
|
8372
|
+
isChainSupported(ctx) {
|
|
8373
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
8374
|
+
return isAerodromeChainSupported(ctx.chainId);
|
|
8375
|
+
},
|
|
8376
|
+
isTokenSupported(token) {
|
|
8377
|
+
if (token.category !== "evm") return false;
|
|
8378
|
+
return token.kind === "native" || token.kind === "erc20";
|
|
8379
|
+
},
|
|
8380
|
+
actions: [
|
|
8381
|
+
{
|
|
8382
|
+
id: "aerodrome.quote",
|
|
8383
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8384
|
+
chainCategory: "evm",
|
|
8385
|
+
description: "Quote an Aerodrome swap on Base via factory discovery + MixedRouteQuoterV3 / Router. Tickers (AAPLc, USDC, ETH) accepted.",
|
|
8386
|
+
commonParams: [],
|
|
8387
|
+
params: {
|
|
8388
|
+
chainId: { type: "number", required: true, description: `Must be ${AERODROME_CHAIN_ID}` },
|
|
8389
|
+
tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
|
|
8390
|
+
tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
|
|
8391
|
+
amountHuman: { type: "string", required: true, description: "Human-readable input amount (B20 stocks are 8 decimals)" }
|
|
8392
|
+
}
|
|
8393
|
+
},
|
|
8394
|
+
{
|
|
8395
|
+
id: "aerodrome.swap",
|
|
8396
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8397
|
+
chainCategory: "evm",
|
|
8398
|
+
description: "Swap via Aerodrome Router / Slipstream SwapRouter (optional ERC-20 approve batch)",
|
|
8399
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8400
|
+
params: {
|
|
8401
|
+
tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
|
|
8402
|
+
tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
|
|
8403
|
+
amountHuman: { type: "string", required: true, description: "Human-readable input amount" },
|
|
8404
|
+
slippagePercent: { type: "number", required: true, description: "Slippage percent (0\u2013100 exclusive)" }
|
|
8405
|
+
}
|
|
8406
|
+
},
|
|
8407
|
+
{
|
|
8408
|
+
id: "aerodrome.add-liquidity",
|
|
8409
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8410
|
+
chainCategory: "evm",
|
|
8411
|
+
description: "Deposit into a basic vAMM/sAMM pool (one-sided amounts; tickers OK)",
|
|
8412
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8413
|
+
params: {
|
|
8414
|
+
tokenA: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
|
|
8415
|
+
tokenB: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
|
|
8416
|
+
stable: { type: "boolean", required: true, description: "true = sAMM, false = vAMM" },
|
|
8417
|
+
amountAHuman: { type: "string", required: false, description: "Amount A; omit to solve from B" },
|
|
8418
|
+
amountBHuman: { type: "string", required: false, description: "Amount B; omit to solve from A" },
|
|
8419
|
+
slippagePercent: { type: "number", required: true, description: "Slippage percent" }
|
|
8420
|
+
}
|
|
8421
|
+
},
|
|
8422
|
+
{
|
|
8423
|
+
id: "aerodrome.remove-liquidity",
|
|
8424
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8425
|
+
chainCategory: "evm",
|
|
8426
|
+
description: "Withdraw from a basic vAMM/sAMM pool",
|
|
8427
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8428
|
+
params: {
|
|
8429
|
+
lpToken: { type: "address", required: true, description: "LP token" },
|
|
8430
|
+
liquidityHuman: { type: "string", required: true, description: "LP amount" }
|
|
8431
|
+
}
|
|
8432
|
+
},
|
|
8433
|
+
{
|
|
8434
|
+
id: "aerodrome.cl-mint",
|
|
8435
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8436
|
+
chainCategory: "evm",
|
|
8437
|
+
description: "Mint a Slipstream concentrated liquidity NFT",
|
|
8438
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8439
|
+
params: {
|
|
8440
|
+
token0: { type: "address", required: true, description: "Token0" },
|
|
8441
|
+
token1: { type: "address", required: true, description: "Token1" },
|
|
8442
|
+
tickSpacing: { type: "number", required: true, description: "Pool tick spacing" },
|
|
8443
|
+
tickLower: { type: "number", required: true, description: "Lower tick" },
|
|
8444
|
+
tickUpper: { type: "number", required: true, description: "Upper tick" }
|
|
8445
|
+
}
|
|
8446
|
+
},
|
|
8447
|
+
{
|
|
8448
|
+
id: "aerodrome.gauge-stake",
|
|
8449
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8450
|
+
chainCategory: "evm",
|
|
8451
|
+
description: "Stake basic LP tokens or a Slipstream NFT in a gauge",
|
|
8452
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8453
|
+
params: {
|
|
8454
|
+
gauge: { type: "address", required: true, description: "Gauge address" }
|
|
8455
|
+
}
|
|
8456
|
+
},
|
|
8457
|
+
{
|
|
8458
|
+
id: "aerodrome.claim-fees",
|
|
8459
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8460
|
+
chainCategory: "evm",
|
|
8461
|
+
description: "Claim unstaked fees from the pool (not the gauge)",
|
|
8462
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8463
|
+
params: { pool: { type: "address", required: true, description: "Pool lp from fetch_positions claimFees.pool" } }
|
|
8464
|
+
},
|
|
8465
|
+
{
|
|
8466
|
+
id: "aerodrome.claim-emissions",
|
|
8467
|
+
protocolId: AERODROME_PROTOCOL_ID,
|
|
8468
|
+
chainCategory: "evm",
|
|
8469
|
+
description: "Claim gauge emissions in AERO (not the pool)",
|
|
8470
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8471
|
+
params: { gauge: { type: "address", required: true, description: "Gauge from fetch_positions claimEmissions" } }
|
|
8472
|
+
}
|
|
8473
|
+
]
|
|
8474
|
+
};
|
|
8475
|
+
registerProtocolModule(aerodromeProtocolModule);
|
|
7360
8476
|
var CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
|
|
7361
8477
|
var CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
|
|
7362
8478
|
var CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
|
|
@@ -7489,6 +8605,617 @@ var continuumDaoProtocolModule = {
|
|
|
7489
8605
|
]
|
|
7490
8606
|
};
|
|
7491
8607
|
registerProtocolModule(continuumDaoProtocolModule);
|
|
8608
|
+
var COMPOUND_V3_PROTOCOL_ID = "compound-v3";
|
|
8609
|
+
var COMPOUND_V3_CHAIN_IDS = [1, 8453, 42161, 10, 137, 5e3, 130, 59144];
|
|
8610
|
+
var COMPOUND_V3_WRAPPED_NATIVE = {
|
|
8611
|
+
1: getAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
|
|
8612
|
+
8453: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8613
|
+
42161: getAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
|
|
8614
|
+
10: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8615
|
+
137: getAddress("0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"),
|
|
8616
|
+
5e3: getAddress("0x78c1b0C915c4CD0f08633e2ec3d4961Ab0237669"),
|
|
8617
|
+
130: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8618
|
+
59144: getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f")
|
|
8619
|
+
};
|
|
8620
|
+
function isCompoundV3ChainSupported(chainId) {
|
|
8621
|
+
return COMPOUND_V3_CHAIN_IDS.includes(chainId);
|
|
8622
|
+
}
|
|
8623
|
+
function compoundV3WrappedNative(chainId) {
|
|
8624
|
+
return COMPOUND_V3_WRAPPED_NATIVE[chainId] ?? null;
|
|
8625
|
+
}
|
|
8626
|
+
var COMPOUND_V3_MARKETS = [
|
|
8627
|
+
// Ethereum
|
|
8628
|
+
{
|
|
8629
|
+
chainId: 1,
|
|
8630
|
+
slug: "usdc",
|
|
8631
|
+
symbol: "cUSDCv3",
|
|
8632
|
+
comet: getAddress("0xc3d688B66703497DAA19211EEdff47f25384cdc3"),
|
|
8633
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8634
|
+
bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
|
|
8635
|
+
baseToken: getAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),
|
|
8636
|
+
source: "comet-deployments"
|
|
8637
|
+
},
|
|
8638
|
+
{
|
|
8639
|
+
chainId: 1,
|
|
8640
|
+
slug: "usds",
|
|
8641
|
+
symbol: "cUSDSv3",
|
|
8642
|
+
comet: getAddress("0x5D409e56D886231aDAf00c8775665AD0f9897b56"),
|
|
8643
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8644
|
+
bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
|
|
8645
|
+
baseToken: getAddress("0xdC035D45d973E3EC169d2276DDab16f1e407384F"),
|
|
8646
|
+
source: "comet-deployments"
|
|
8647
|
+
},
|
|
8648
|
+
{
|
|
8649
|
+
chainId: 1,
|
|
8650
|
+
slug: "usdt",
|
|
8651
|
+
symbol: "cUSDTv3",
|
|
8652
|
+
comet: getAddress("0x3Afdc9BCA9213A35503b077a6072F3D0d5AB0840"),
|
|
8653
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8654
|
+
bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
|
|
8655
|
+
baseToken: getAddress("0xdAC17F958D2ee523a2206206994597C13D831ec7"),
|
|
8656
|
+
source: "comet-deployments"
|
|
8657
|
+
},
|
|
8658
|
+
{
|
|
8659
|
+
chainId: 1,
|
|
8660
|
+
slug: "wbtc",
|
|
8661
|
+
symbol: "cWBTCv3",
|
|
8662
|
+
comet: getAddress("0xe85Dc543813B8c2CFEaAc371517b925a166a9293"),
|
|
8663
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8664
|
+
bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
|
|
8665
|
+
baseToken: getAddress("0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"),
|
|
8666
|
+
source: "comet-deployments"
|
|
8667
|
+
},
|
|
8668
|
+
{
|
|
8669
|
+
chainId: 1,
|
|
8670
|
+
slug: "weth",
|
|
8671
|
+
symbol: "cWETHv3",
|
|
8672
|
+
comet: getAddress("0xA17581A9E3356d9A858b789D68B4d866e593aE94"),
|
|
8673
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8674
|
+
bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
|
|
8675
|
+
baseToken: getAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
|
|
8676
|
+
source: "comet-deployments"
|
|
8677
|
+
},
|
|
8678
|
+
{
|
|
8679
|
+
chainId: 1,
|
|
8680
|
+
slug: "wsteth",
|
|
8681
|
+
symbol: "cWstETHv3",
|
|
8682
|
+
comet: getAddress("0x3D0bb1ccaB520A66e607822fC55BC921738fAFE3"),
|
|
8683
|
+
rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
|
|
8684
|
+
bulker: getAddress("0x2c776041CCFe903071AF44aa147368a9c8EEA518"),
|
|
8685
|
+
baseToken: getAddress("0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"),
|
|
8686
|
+
source: "comet-deployments"
|
|
8687
|
+
},
|
|
8688
|
+
// Base
|
|
8689
|
+
{
|
|
8690
|
+
chainId: 8453,
|
|
8691
|
+
slug: "usdc",
|
|
8692
|
+
symbol: "cUSDCv3",
|
|
8693
|
+
comet: getAddress("0xb125E6687d4313864e53df431d5425969c15Eb2F"),
|
|
8694
|
+
rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
|
|
8695
|
+
bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
|
|
8696
|
+
baseToken: getAddress("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),
|
|
8697
|
+
source: "comet-deployments"
|
|
8698
|
+
},
|
|
8699
|
+
{
|
|
8700
|
+
chainId: 8453,
|
|
8701
|
+
slug: "usdbc",
|
|
8702
|
+
symbol: "cUSDbCv3",
|
|
8703
|
+
comet: getAddress("0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"),
|
|
8704
|
+
rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
|
|
8705
|
+
bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
|
|
8706
|
+
baseToken: getAddress("0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA"),
|
|
8707
|
+
source: "comet-deployments"
|
|
8708
|
+
},
|
|
8709
|
+
{
|
|
8710
|
+
chainId: 8453,
|
|
8711
|
+
slug: "usds",
|
|
8712
|
+
symbol: "cUSDSv3",
|
|
8713
|
+
comet: getAddress("0x2c776041CCFe903071AF44aa147368a9c8EEA518"),
|
|
8714
|
+
rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
|
|
8715
|
+
bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
|
|
8716
|
+
baseToken: getAddress("0x820C137fa70C8691f0e44Dc420a5e53c168921Dc"),
|
|
8717
|
+
source: "comet-deployments"
|
|
8718
|
+
},
|
|
8719
|
+
{
|
|
8720
|
+
chainId: 8453,
|
|
8721
|
+
slug: "weth",
|
|
8722
|
+
symbol: "cWETHv3",
|
|
8723
|
+
comet: getAddress("0x46e6b214b524310239732D51387075E0e70970bf"),
|
|
8724
|
+
rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
|
|
8725
|
+
bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
|
|
8726
|
+
baseToken: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8727
|
+
source: "comet-deployments"
|
|
8728
|
+
},
|
|
8729
|
+
{
|
|
8730
|
+
chainId: 8453,
|
|
8731
|
+
slug: "aero",
|
|
8732
|
+
symbol: "cAEROv3",
|
|
8733
|
+
comet: getAddress("0x784efeB622244d2348d4F2522f8860B96fbEcE89"),
|
|
8734
|
+
rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
|
|
8735
|
+
bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
|
|
8736
|
+
baseToken: getAddress("0x940181a94A35A4569E4529A3CDfB74e38FD98631"),
|
|
8737
|
+
source: "comet-deployments"
|
|
8738
|
+
},
|
|
8739
|
+
// Arbitrum
|
|
8740
|
+
{
|
|
8741
|
+
chainId: 42161,
|
|
8742
|
+
slug: "usdc",
|
|
8743
|
+
symbol: "cUSDCv3",
|
|
8744
|
+
comet: getAddress("0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"),
|
|
8745
|
+
rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
|
|
8746
|
+
bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
|
|
8747
|
+
baseToken: getAddress("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),
|
|
8748
|
+
source: "comet-deployments"
|
|
8749
|
+
},
|
|
8750
|
+
{
|
|
8751
|
+
chainId: 42161,
|
|
8752
|
+
slug: "usdc.e",
|
|
8753
|
+
symbol: "cUSDC.ev3",
|
|
8754
|
+
comet: getAddress("0xA5EDBDD9646f8dFF606d7448e414884C7d905dCA"),
|
|
8755
|
+
rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
|
|
8756
|
+
bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
|
|
8757
|
+
baseToken: getAddress("0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"),
|
|
8758
|
+
source: "comet-deployments"
|
|
8759
|
+
},
|
|
8760
|
+
{
|
|
8761
|
+
chainId: 42161,
|
|
8762
|
+
slug: "usdt",
|
|
8763
|
+
symbol: "cUSDTv3",
|
|
8764
|
+
comet: getAddress("0xd98Be00b5D27fc98112BdE293e487f8D4cA57d07"),
|
|
8765
|
+
rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
|
|
8766
|
+
bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
|
|
8767
|
+
baseToken: getAddress("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),
|
|
8768
|
+
source: "comet-deployments"
|
|
8769
|
+
},
|
|
8770
|
+
{
|
|
8771
|
+
chainId: 42161,
|
|
8772
|
+
slug: "weth",
|
|
8773
|
+
symbol: "cWETHv3",
|
|
8774
|
+
comet: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
|
|
8775
|
+
rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
|
|
8776
|
+
bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
|
|
8777
|
+
baseToken: getAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
|
|
8778
|
+
source: "comet-deployments"
|
|
8779
|
+
},
|
|
8780
|
+
// Optimism
|
|
8781
|
+
{
|
|
8782
|
+
chainId: 10,
|
|
8783
|
+
slug: "usdc",
|
|
8784
|
+
symbol: "cUSDCv3",
|
|
8785
|
+
comet: getAddress("0x2e44e174f7D53F0212823acC11C01A11d58c5bCB"),
|
|
8786
|
+
rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
|
|
8787
|
+
bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
|
|
8788
|
+
baseToken: getAddress("0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"),
|
|
8789
|
+
source: "comet-deployments"
|
|
8790
|
+
},
|
|
8791
|
+
{
|
|
8792
|
+
chainId: 10,
|
|
8793
|
+
slug: "usdt",
|
|
8794
|
+
symbol: "cUSDTv3",
|
|
8795
|
+
comet: getAddress("0x995E394b8B2437aC8Ce61Ee0bC610D617962B214"),
|
|
8796
|
+
rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
|
|
8797
|
+
bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
|
|
8798
|
+
baseToken: getAddress("0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"),
|
|
8799
|
+
source: "comet-deployments"
|
|
8800
|
+
},
|
|
8801
|
+
{
|
|
8802
|
+
chainId: 10,
|
|
8803
|
+
slug: "weth",
|
|
8804
|
+
symbol: "cWETHv3",
|
|
8805
|
+
comet: getAddress("0xE36A30D249f7761327fd973001A32010b521b6Fd"),
|
|
8806
|
+
rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
|
|
8807
|
+
bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
|
|
8808
|
+
baseToken: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8809
|
+
source: "comet-deployments"
|
|
8810
|
+
},
|
|
8811
|
+
// Polygon
|
|
8812
|
+
{
|
|
8813
|
+
chainId: 137,
|
|
8814
|
+
slug: "usdc",
|
|
8815
|
+
symbol: "cUSDCv3",
|
|
8816
|
+
comet: getAddress("0xF25212E676D1F7F89Cd72fFEe66158f541246445"),
|
|
8817
|
+
rewards: getAddress("0x45939657d1CA34A8FA39A924B71D28Fe8431e581"),
|
|
8818
|
+
bulker: getAddress("0x59e242D352ae13166B4987aE5c990C232f7f7CD6"),
|
|
8819
|
+
baseToken: getAddress("0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"),
|
|
8820
|
+
source: "comet-deployments"
|
|
8821
|
+
},
|
|
8822
|
+
{
|
|
8823
|
+
chainId: 137,
|
|
8824
|
+
slug: "usdt",
|
|
8825
|
+
symbol: "cUSDTv3",
|
|
8826
|
+
comet: getAddress("0xaeB318360f27748Acb200CE616E389A6C9409a07"),
|
|
8827
|
+
rewards: getAddress("0x45939657d1CA34A8FA39A924B71D28Fe8431e581"),
|
|
8828
|
+
bulker: getAddress("0x59e242D352ae13166B4987aE5c990C232f7f7CD6"),
|
|
8829
|
+
baseToken: getAddress("0xc2132D05D31c914a87C6611C10748AEb04B58e8F"),
|
|
8830
|
+
source: "comet-deployments"
|
|
8831
|
+
},
|
|
8832
|
+
// Mantle
|
|
8833
|
+
{
|
|
8834
|
+
chainId: 5e3,
|
|
8835
|
+
slug: "usde",
|
|
8836
|
+
symbol: "cUSDev3",
|
|
8837
|
+
comet: getAddress("0x606174f62cd968d8e684c645080fa694c1D7786E"),
|
|
8838
|
+
rewards: getAddress("0xCd83CbBFCE149d141A5171C3D6a0F0fCCeE225Ab"),
|
|
8839
|
+
bulker: getAddress("0x67DFCa85CcEEFA2C5B1dB4DEe3BEa716A28B9baa"),
|
|
8840
|
+
source: "comet-deployments"
|
|
8841
|
+
},
|
|
8842
|
+
// Unichain
|
|
8843
|
+
{
|
|
8844
|
+
chainId: 130,
|
|
8845
|
+
slug: "usdc",
|
|
8846
|
+
symbol: "cUSDCv3",
|
|
8847
|
+
comet: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
|
|
8848
|
+
rewards: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
|
|
8849
|
+
bulker: getAddress("0x58EbB8Db8b4FdF2dCbbB16E04c2F5b952963B514"),
|
|
8850
|
+
baseToken: getAddress("0x078D782b760474a361dDA0AF3839290b0EF57AD6"),
|
|
8851
|
+
source: "comet-deployments"
|
|
8852
|
+
},
|
|
8853
|
+
{
|
|
8854
|
+
chainId: 130,
|
|
8855
|
+
slug: "weth",
|
|
8856
|
+
symbol: "cWETHv3",
|
|
8857
|
+
comet: getAddress("0x6C987dDE50dB1dcDd32Cd4175778C2a291978E2a"),
|
|
8858
|
+
rewards: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
|
|
8859
|
+
bulker: getAddress("0x58EbB8Db8b4FdF2dCbbB16E04c2F5b952963B514"),
|
|
8860
|
+
baseToken: getAddress("0x4200000000000000000000000000000000000006"),
|
|
8861
|
+
source: "comet-deployments"
|
|
8862
|
+
},
|
|
8863
|
+
// Linea
|
|
8864
|
+
{
|
|
8865
|
+
chainId: 59144,
|
|
8866
|
+
slug: "usdc",
|
|
8867
|
+
symbol: "cUSDCv3",
|
|
8868
|
+
comet: getAddress("0x8D38A3d6B3c3B7d96D6536DA7Eef94A9d7dbC991"),
|
|
8869
|
+
rewards: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
|
|
8870
|
+
bulker: getAddress("0x023ee795361B28cDbB94e302983578486A0A5f1B"),
|
|
8871
|
+
baseToken: getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff"),
|
|
8872
|
+
source: "comet-deployments"
|
|
8873
|
+
},
|
|
8874
|
+
{
|
|
8875
|
+
chainId: 59144,
|
|
8876
|
+
slug: "weth",
|
|
8877
|
+
symbol: "cWETHv3",
|
|
8878
|
+
comet: getAddress("0x60F2058379716A64a7A5d29219397e79bC552194"),
|
|
8879
|
+
rewards: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
|
|
8880
|
+
bulker: getAddress("0x023ee795361B28cDbB94e302983578486A0A5f1B"),
|
|
8881
|
+
baseToken: getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"),
|
|
8882
|
+
source: "comet-deployments"
|
|
8883
|
+
}
|
|
8884
|
+
];
|
|
8885
|
+
function listCompoundV3SupportedChainIds() {
|
|
8886
|
+
return [...COMPOUND_V3_CHAIN_IDS];
|
|
8887
|
+
}
|
|
8888
|
+
function listCompoundV3MarketsForChain(chainId) {
|
|
8889
|
+
if (!isCompoundV3ChainSupported(chainId)) return [];
|
|
8890
|
+
return COMPOUND_V3_MARKETS.filter((m) => m.chainId === chainId);
|
|
8891
|
+
}
|
|
8892
|
+
var cometInterfaceAbi = parseAbi([
|
|
8893
|
+
"function supply(address asset, uint256 amount)",
|
|
8894
|
+
"function supplyTo(address dst, address asset, uint256 amount)",
|
|
8895
|
+
"function withdraw(address asset, uint256 amount)",
|
|
8896
|
+
"function withdrawTo(address to, address asset, uint256 amount)",
|
|
8897
|
+
"function allow(address manager, bool isAllowed)",
|
|
8898
|
+
"function hasPermission(address owner, address manager) view returns (bool)",
|
|
8899
|
+
"function balanceOf(address account) view returns (uint256)",
|
|
8900
|
+
"function borrowBalanceOf(address account) view returns (uint256)",
|
|
8901
|
+
"function collateralBalanceOf(address account, address asset) view returns (uint128)",
|
|
8902
|
+
"function baseToken() view returns (address)",
|
|
8903
|
+
"function baseTokenPriceFeed() view returns (address)",
|
|
8904
|
+
"function decimals() view returns (uint8)",
|
|
8905
|
+
"function numAssets() view returns (uint8)",
|
|
8906
|
+
"function getUtilization() view returns (uint256)",
|
|
8907
|
+
"function getSupplyRate(uint256 utilization) view returns (uint64)",
|
|
8908
|
+
"function getBorrowRate(uint256 utilization) view returns (uint64)",
|
|
8909
|
+
"function getPrice(address priceFeed) view returns (uint256)",
|
|
8910
|
+
"function isBorrowCollateralized(address account) view returns (bool)",
|
|
8911
|
+
"function isLiquidatable(address account) view returns (bool)",
|
|
8912
|
+
"function getAssetInfo(uint8 i) view returns ((uint8 offset, address asset, address priceFeed, uint64 scale, uint64 borrowCollateralFactor, uint64 liquidateCollateralFactor, uint64 liquidationFactor, uint128 supplyCap))",
|
|
8913
|
+
"function getAssetInfoByAddress(address asset) view returns ((uint8 offset, address asset, address priceFeed, uint64 scale, uint64 borrowCollateralFactor, uint64 liquidateCollateralFactor, uint64 liquidationFactor, uint128 supplyCap))"
|
|
8914
|
+
]);
|
|
8915
|
+
parseAbi([
|
|
8916
|
+
"function getRewardOwed(address comet, address account) view returns ((address token, uint256 owed))",
|
|
8917
|
+
"function claim(address comet, address src, bool shouldAccrue)"
|
|
8918
|
+
]);
|
|
8919
|
+
parseAbi([
|
|
8920
|
+
"function invoke(bytes32[] actions, bytes[] data) payable"
|
|
8921
|
+
]);
|
|
8922
|
+
var erc20ReadAbi = parseAbi([
|
|
8923
|
+
"function allowance(address owner, address spender) view returns (uint256)",
|
|
8924
|
+
"function decimals() view returns (uint8)",
|
|
8925
|
+
"function symbol() view returns (string)",
|
|
8926
|
+
"function name() view returns (string)"
|
|
8927
|
+
]);
|
|
8928
|
+
parseAbi(["function approve(address spender, uint256 amount) returns (bool)"]);
|
|
8929
|
+
parseAbi(["function deposit() payable", "function withdraw(uint256 wad)"]);
|
|
8930
|
+
function bulkerActionId(name) {
|
|
8931
|
+
return stringToHex(name, { size: 32 });
|
|
8932
|
+
}
|
|
8933
|
+
bulkerActionId("ACTION_SUPPLY_ASSET");
|
|
8934
|
+
bulkerActionId("ACTION_SUPPLY_NATIVE_TOKEN");
|
|
8935
|
+
bulkerActionId("ACTION_WITHDRAW_ASSET");
|
|
8936
|
+
bulkerActionId("ACTION_WITHDRAW_NATIVE_TOKEN");
|
|
8937
|
+
bulkerActionId("ACTION_CLAIM_REWARD");
|
|
8938
|
+
bulkerActionId("ACTION_TRANSFER_ASSET");
|
|
8939
|
+
|
|
8940
|
+
// src/protocols/evm/compound-v3/apr.ts
|
|
8941
|
+
var COMPOUND_V3_SECONDS_PER_YEAR = 365 * 24 * 60 * 60;
|
|
8942
|
+
function compoundV3RatePerSecondToAprDecimal(ratePerSecond) {
|
|
8943
|
+
if (ratePerSecond <= 0n) return 0;
|
|
8944
|
+
return Number(ratePerSecond) / 1e18 * COMPOUND_V3_SECONDS_PER_YEAR;
|
|
8945
|
+
}
|
|
8946
|
+
function compoundV3AprToPercentLabel(aprDecimal) {
|
|
8947
|
+
if (!Number.isFinite(aprDecimal)) return "\u2014";
|
|
8948
|
+
const pct = aprDecimal * 100;
|
|
8949
|
+
if (Math.abs(pct) < 1e-3) return "0.00%";
|
|
8950
|
+
return `${pct.toFixed(2)}%`;
|
|
8951
|
+
}
|
|
8952
|
+
function compoundV3UtilizationToDecimal(utilization) {
|
|
8953
|
+
if (utilization <= 0n) return 0;
|
|
8954
|
+
return Number(utilization) / 1e18;
|
|
8955
|
+
}
|
|
8956
|
+
function compoundV3FactorToPercent(factor) {
|
|
8957
|
+
return Number(factor) / 1e16;
|
|
8958
|
+
}
|
|
8959
|
+
|
|
8960
|
+
// src/protocols/evm/compound-v3/subgraph.ts
|
|
8961
|
+
var COMPOUND_V3_SUBGRAPH_BY_CHAIN = {
|
|
8962
|
+
1: "5nwMCSHaTqG3Kd2gHznbTXEnZ9QNWsssQfbHhDqQSQFp",
|
|
8963
|
+
137: "AaFtUWKfFdj2x8nnE3RxTSJkHwGHvawH3VWFBykCGzLs",
|
|
8964
|
+
42161: "Ff7ha9ELmpmg81D6nYxy4t8aGP26dPztqD1LDJNPqjLS",
|
|
8965
|
+
8453: "2hcXhs36pTBDVUmk5K2Zkr6N4UYGwaHuco2a6jyTsijo",
|
|
8966
|
+
10: "FhHNkfh5z6Z2WCEBxB6V3s8RPxnJfWZ9zAfM5bVvbvbb"
|
|
8967
|
+
};
|
|
8968
|
+
function compoundV3SubgraphIdForChain(chainId) {
|
|
8969
|
+
return COMPOUND_V3_SUBGRAPH_BY_CHAIN[chainId] ?? null;
|
|
8970
|
+
}
|
|
8971
|
+
async function fetchCompoundV3SubgraphMarkets(args) {
|
|
8972
|
+
const id = compoundV3SubgraphIdForChain(args.chainId);
|
|
8973
|
+
const apiKey = (args.apiKey ?? process.env.THE_GRAPH_API_KEY ?? "").trim();
|
|
8974
|
+
if (!id || !apiKey) return null;
|
|
8975
|
+
const url = `https://gateway.thegraph.com/api/${apiKey}/subgraphs/id/${id}`;
|
|
8976
|
+
try {
|
|
8977
|
+
const res = await fetch(url, {
|
|
8978
|
+
method: "POST",
|
|
8979
|
+
headers: { "content-type": "application/json" },
|
|
8980
|
+
body: JSON.stringify({
|
|
8981
|
+
query: `query CompoundV3Markets { markets(first: 50) { id } }`
|
|
8982
|
+
})
|
|
8983
|
+
});
|
|
8984
|
+
if (!res.ok) return null;
|
|
8985
|
+
const json = await res.json();
|
|
8986
|
+
const markets = json.data?.markets;
|
|
8987
|
+
if (!markets) return null;
|
|
8988
|
+
return markets.map((m) => ({ id: m.id, comet: m.id }));
|
|
8989
|
+
} catch {
|
|
8990
|
+
return null;
|
|
8991
|
+
}
|
|
8992
|
+
}
|
|
8993
|
+
function publicClient(rpcUrl, chainId) {
|
|
8994
|
+
const chain = defineChain({
|
|
8995
|
+
id: chainId,
|
|
8996
|
+
name: "Destination",
|
|
8997
|
+
nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
|
|
8998
|
+
rpcUrls: { default: { http: [rpcUrl] } }
|
|
8999
|
+
});
|
|
9000
|
+
return createPublicClient({ chain, transport: http(rpcUrl) });
|
|
9001
|
+
}
|
|
9002
|
+
async function readTokenMeta(client, asset) {
|
|
9003
|
+
const [symbol, decimals] = await Promise.all([
|
|
9004
|
+
client.readContract({ address: asset, abi: erc20ReadAbi, functionName: "symbol" }).catch(() => "TOKEN"),
|
|
9005
|
+
client.readContract({ address: asset, abi: erc20ReadAbi, functionName: "decimals" }).catch(() => 18)
|
|
9006
|
+
]);
|
|
9007
|
+
return { symbol: String(symbol), decimals: Number(decimals) };
|
|
9008
|
+
}
|
|
9009
|
+
async function enrichMarketOnChain(client, market) {
|
|
9010
|
+
const comet = market.comet;
|
|
9011
|
+
const [baseToken, utilization, numAssets, decimals] = await Promise.all([
|
|
9012
|
+
client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "baseToken" }),
|
|
9013
|
+
client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getUtilization" }),
|
|
9014
|
+
client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "numAssets" }),
|
|
9015
|
+
client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "decimals" })
|
|
9016
|
+
]);
|
|
9017
|
+
const [supplyRate, borrowRate, baseMeta, baseFeed] = await Promise.all([
|
|
9018
|
+
client.readContract({
|
|
9019
|
+
address: comet,
|
|
9020
|
+
abi: cometInterfaceAbi,
|
|
9021
|
+
functionName: "getSupplyRate",
|
|
9022
|
+
args: [utilization]
|
|
9023
|
+
}),
|
|
9024
|
+
client.readContract({
|
|
9025
|
+
address: comet,
|
|
9026
|
+
abi: cometInterfaceAbi,
|
|
9027
|
+
functionName: "getBorrowRate",
|
|
9028
|
+
args: [utilization]
|
|
9029
|
+
}),
|
|
9030
|
+
readTokenMeta(client, getAddress(baseToken)),
|
|
9031
|
+
client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "baseTokenPriceFeed" })
|
|
9032
|
+
]);
|
|
9033
|
+
const basePrice = await client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getPrice", args: [baseFeed] }).catch(() => 0n);
|
|
9034
|
+
const assets = [
|
|
9035
|
+
{
|
|
9036
|
+
asset: getAddress(baseToken),
|
|
9037
|
+
symbol: baseMeta.symbol,
|
|
9038
|
+
decimals: Number(decimals) || baseMeta.decimals,
|
|
9039
|
+
borrowCollateralFactorPercent: 0,
|
|
9040
|
+
liquidateCollateralFactorPercent: 0,
|
|
9041
|
+
priceRaw: basePrice.toString(),
|
|
9042
|
+
role: "base"
|
|
9043
|
+
}
|
|
9044
|
+
];
|
|
9045
|
+
const n = Number(numAssets);
|
|
9046
|
+
for (let i = 0; i < n; i++) {
|
|
9047
|
+
const info = await client.readContract({
|
|
9048
|
+
address: comet,
|
|
9049
|
+
abi: cometInterfaceAbi,
|
|
9050
|
+
functionName: "getAssetInfo",
|
|
9051
|
+
args: [i]
|
|
9052
|
+
});
|
|
9053
|
+
const token = getAddress(info.asset);
|
|
9054
|
+
const meta = await readTokenMeta(client, token);
|
|
9055
|
+
const price = await client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getPrice", args: [info.priceFeed] }).catch(() => 0n);
|
|
9056
|
+
assets.push({
|
|
9057
|
+
asset: token,
|
|
9058
|
+
symbol: meta.symbol,
|
|
9059
|
+
decimals: meta.decimals,
|
|
9060
|
+
borrowCollateralFactorPercent: compoundV3FactorToPercent(info.borrowCollateralFactor),
|
|
9061
|
+
liquidateCollateralFactorPercent: compoundV3FactorToPercent(info.liquidateCollateralFactor),
|
|
9062
|
+
priceRaw: price.toString(),
|
|
9063
|
+
role: "collateral"
|
|
9064
|
+
});
|
|
9065
|
+
}
|
|
9066
|
+
return {
|
|
9067
|
+
chainId: market.chainId,
|
|
9068
|
+
slug: market.slug,
|
|
9069
|
+
symbol: market.symbol,
|
|
9070
|
+
comet: market.comet,
|
|
9071
|
+
rewards: market.rewards,
|
|
9072
|
+
bulker: market.bulker,
|
|
9073
|
+
baseToken: getAddress(baseToken),
|
|
9074
|
+
utilization: compoundV3UtilizationToDecimal(utilization),
|
|
9075
|
+
supplyAprPercent: compoundV3AprToPercentLabel(compoundV3RatePerSecondToAprDecimal(supplyRate)),
|
|
9076
|
+
borrowAprPercent: compoundV3AprToPercentLabel(compoundV3RatePerSecondToAprDecimal(borrowRate)),
|
|
9077
|
+
assets
|
|
9078
|
+
};
|
|
9079
|
+
}
|
|
9080
|
+
function registryMarketRow(market) {
|
|
9081
|
+
return {
|
|
9082
|
+
chainId: market.chainId,
|
|
9083
|
+
slug: market.slug,
|
|
9084
|
+
symbol: market.symbol,
|
|
9085
|
+
comet: market.comet,
|
|
9086
|
+
rewards: market.rewards,
|
|
9087
|
+
bulker: market.bulker,
|
|
9088
|
+
baseToken: market.baseToken ?? null,
|
|
9089
|
+
utilization: null,
|
|
9090
|
+
supplyAprPercent: null,
|
|
9091
|
+
borrowAprPercent: null,
|
|
9092
|
+
assets: market.baseToken ? [
|
|
9093
|
+
{
|
|
9094
|
+
asset: market.baseToken,
|
|
9095
|
+
symbol: market.slug.toUpperCase(),
|
|
9096
|
+
decimals: 18,
|
|
9097
|
+
borrowCollateralFactorPercent: 0,
|
|
9098
|
+
liquidateCollateralFactorPercent: 0,
|
|
9099
|
+
priceRaw: "0",
|
|
9100
|
+
role: "base"
|
|
9101
|
+
}
|
|
9102
|
+
] : []
|
|
9103
|
+
};
|
|
9104
|
+
}
|
|
9105
|
+
async function compoundV3FetchMarketsSummary(args) {
|
|
9106
|
+
if (!isCompoundV3ChainSupported(args.chainId)) {
|
|
9107
|
+
return { markets: [], notes: `Compound III is not deployed on chain ${args.chainId}.` };
|
|
9108
|
+
}
|
|
9109
|
+
const registry = listCompoundV3MarketsForChain(args.chainId);
|
|
9110
|
+
let subgraphNote = "";
|
|
9111
|
+
const subgraph = await fetchCompoundV3SubgraphMarkets({ chainId: args.chainId });
|
|
9112
|
+
if (subgraph) {
|
|
9113
|
+
subgraphNote = ` Subgraph listed ${subgraph.length} market id(s); official comet deployments are the address source.`;
|
|
9114
|
+
}
|
|
9115
|
+
if (!args.rpcUrl?.trim()) {
|
|
9116
|
+
return {
|
|
9117
|
+
markets: registry.map(registryMarketRow),
|
|
9118
|
+
notes: "Registry from official comet deployments. Pass rpcUrl (MCP server injects it) to enrich APRs and collaterals." + subgraphNote
|
|
9119
|
+
};
|
|
9120
|
+
}
|
|
9121
|
+
const client = publicClient(args.rpcUrl, args.chainId);
|
|
9122
|
+
const markets = [];
|
|
9123
|
+
for (const row of registry) {
|
|
9124
|
+
try {
|
|
9125
|
+
markets.push(await enrichMarketOnChain(client, row));
|
|
9126
|
+
} catch {
|
|
9127
|
+
markets.push(registryMarketRow(row));
|
|
9128
|
+
}
|
|
9129
|
+
}
|
|
9130
|
+
return {
|
|
9131
|
+
markets,
|
|
9132
|
+
notes: "Comet proxy addresses from official deployments; rates and collaterals from on-chain CometInterface." + subgraphNote
|
|
9133
|
+
};
|
|
9134
|
+
}
|
|
9135
|
+
var chainAssetCache2 = /* @__PURE__ */ new Map();
|
|
9136
|
+
async function ensureCompoundV3ChainAssetCache(args) {
|
|
9137
|
+
const existing = chainAssetCache2.get(args.chainId);
|
|
9138
|
+
if (existing && existing.size > 0 && !args.rpcUrl) return existing;
|
|
9139
|
+
const map = /* @__PURE__ */ new Map();
|
|
9140
|
+
const add = (address, role) => {
|
|
9141
|
+
const key = getAddress(address).toLowerCase();
|
|
9142
|
+
const cur = map.get(key) ?? { base: false, collateral: false };
|
|
9143
|
+
cur[role] = true;
|
|
9144
|
+
map.set(key, cur);
|
|
9145
|
+
};
|
|
9146
|
+
if (args.rpcUrl?.trim()) {
|
|
9147
|
+
try {
|
|
9148
|
+
const { markets } = await compoundV3FetchMarketsSummary({ chainId: args.chainId, rpcUrl: args.rpcUrl });
|
|
9149
|
+
for (const m of markets) {
|
|
9150
|
+
for (const a of m.assets) add(a.asset, a.role === "base" ? "base" : "collateral");
|
|
9151
|
+
}
|
|
9152
|
+
chainAssetCache2.set(args.chainId, map);
|
|
9153
|
+
return map;
|
|
9154
|
+
} catch {
|
|
9155
|
+
}
|
|
9156
|
+
}
|
|
9157
|
+
for (const m of listCompoundV3MarketsForChain(args.chainId)) {
|
|
9158
|
+
if (m.baseToken) add(m.baseToken, "base");
|
|
9159
|
+
}
|
|
9160
|
+
chainAssetCache2.set(args.chainId, map);
|
|
9161
|
+
return map;
|
|
9162
|
+
}
|
|
9163
|
+
|
|
9164
|
+
// src/protocols/evm/compound-v3/index.ts
|
|
9165
|
+
var compoundV3ProtocolModule = {
|
|
9166
|
+
id: COMPOUND_V3_PROTOCOL_ID,
|
|
9167
|
+
chainCategory: "evm",
|
|
9168
|
+
isChainSupported(ctx) {
|
|
9169
|
+
const id = typeof ctx.chainId === "string" ? Number(ctx.chainId) : ctx.chainId;
|
|
9170
|
+
return ctx.chainCategory === "evm" && isCompoundV3ChainSupported(id);
|
|
9171
|
+
},
|
|
9172
|
+
isTokenSupported(token) {
|
|
9173
|
+
return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
|
|
9174
|
+
},
|
|
9175
|
+
actions: [
|
|
9176
|
+
{
|
|
9177
|
+
id: "compound-v3.supply",
|
|
9178
|
+
protocolId: COMPOUND_V3_PROTOCOL_ID,
|
|
9179
|
+
chainCategory: "evm",
|
|
9180
|
+
description: "Supply base (earn/repay) or collateral to a Comet proxy",
|
|
9181
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
9182
|
+
params: {}
|
|
9183
|
+
},
|
|
9184
|
+
{
|
|
9185
|
+
id: "compound-v3.withdraw",
|
|
9186
|
+
protocolId: COMPOUND_V3_PROTOCOL_ID,
|
|
9187
|
+
chainCategory: "evm",
|
|
9188
|
+
description: "Withdraw collateral or base (withdraw of base while undercollateralized = borrow)",
|
|
9189
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
9190
|
+
params: {}
|
|
9191
|
+
},
|
|
9192
|
+
{
|
|
9193
|
+
id: "compound-v3.repay",
|
|
9194
|
+
protocolId: COMPOUND_V3_PROTOCOL_ID,
|
|
9195
|
+
chainCategory: "evm",
|
|
9196
|
+
description: "Repay base debt by supplying base",
|
|
9197
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
9198
|
+
params: {}
|
|
9199
|
+
},
|
|
9200
|
+
{
|
|
9201
|
+
id: "compound-v3.claim-rewards",
|
|
9202
|
+
protocolId: COMPOUND_V3_PROTOCOL_ID,
|
|
9203
|
+
chainCategory: "evm",
|
|
9204
|
+
description: "Claim COMP / reward token from CometRewards",
|
|
9205
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
9206
|
+
params: {}
|
|
9207
|
+
},
|
|
9208
|
+
{
|
|
9209
|
+
id: "compound-v3.bulker",
|
|
9210
|
+
protocolId: COMPOUND_V3_PROTOCOL_ID,
|
|
9211
|
+
chainCategory: "evm",
|
|
9212
|
+
description: "Combined Bulker.invoke (optional)",
|
|
9213
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
9214
|
+
params: {}
|
|
9215
|
+
}
|
|
9216
|
+
]
|
|
9217
|
+
};
|
|
9218
|
+
registerProtocolModule(compoundV3ProtocolModule);
|
|
7492
9219
|
var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
|
|
7493
9220
|
var SKILL_PROTOCOL_IDS = [
|
|
7494
9221
|
"aave-v4",
|
|
@@ -7504,7 +9231,9 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
7504
9231
|
"arcus",
|
|
7505
9232
|
"morpho",
|
|
7506
9233
|
"circle-cctp",
|
|
7507
|
-
"
|
|
9234
|
+
"aerodrome",
|
|
9235
|
+
"continuum-dao",
|
|
9236
|
+
"compound-v3"
|
|
7508
9237
|
];
|
|
7509
9238
|
function getToolsForProtocol(protocolId) {
|
|
7510
9239
|
return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
|
|
@@ -7553,23 +9282,44 @@ function getProtocolDiscoverySummary(protocolId) {
|
|
|
7553
9282
|
};
|
|
7554
9283
|
}
|
|
7555
9284
|
init_support();
|
|
7556
|
-
var EULER_V2_SUBGRAPH_CHAIN_IDS = [
|
|
7557
|
-
1,
|
|
7558
|
-
8453,
|
|
7559
|
-
42161,
|
|
7560
|
-
10,
|
|
7561
|
-
137,
|
|
7562
|
-
56,
|
|
7563
|
-
43114,
|
|
7564
|
-
100,
|
|
7565
|
-
59144,
|
|
7566
|
-
146,
|
|
7567
|
-
1923,
|
|
7568
|
-
130
|
|
7569
|
-
];
|
|
7570
9285
|
function advisor(protocolId, tokenFilter, impl) {
|
|
7571
9286
|
return { protocolId, tokenFilter, ...impl };
|
|
7572
9287
|
}
|
|
9288
|
+
function aerodromeAdvisorPriorityTokens() {
|
|
9289
|
+
return [
|
|
9290
|
+
{
|
|
9291
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
9292
|
+
symbol: "ETH",
|
|
9293
|
+
decimals: 18,
|
|
9294
|
+
roles: ["native"]
|
|
9295
|
+
},
|
|
9296
|
+
{
|
|
9297
|
+
address: AERODROME_WETH_BASE,
|
|
9298
|
+
symbol: "WETH",
|
|
9299
|
+
decimals: 18,
|
|
9300
|
+
roles: ["native_wrapped"]
|
|
9301
|
+
},
|
|
9302
|
+
{
|
|
9303
|
+
address: AERODROME_USDC_BASE,
|
|
9304
|
+
symbol: "USDC",
|
|
9305
|
+
decimals: 6,
|
|
9306
|
+
roles: ["swappable", "listed"]
|
|
9307
|
+
},
|
|
9308
|
+
{
|
|
9309
|
+
address: AERODROME_BASE_ADDRESSES_FALLBACK.aero,
|
|
9310
|
+
symbol: "AERO",
|
|
9311
|
+
decimals: 18,
|
|
9312
|
+
roles: ["swappable"]
|
|
9313
|
+
},
|
|
9314
|
+
...AERODROME_COINBASE_STOCK_TOKENS.map((t) => ({
|
|
9315
|
+
address: t.address,
|
|
9316
|
+
symbol: t.symbol,
|
|
9317
|
+
name: t.name,
|
|
9318
|
+
decimals: AERODROME_COINBASE_STOCK_DECIMALS,
|
|
9319
|
+
roles: ["swappable", "listed", "coinbase_b20"]
|
|
9320
|
+
}))
|
|
9321
|
+
];
|
|
9322
|
+
}
|
|
7573
9323
|
var PROTOCOL_SUPPORT_ADVISORS = {
|
|
7574
9324
|
"aave-v4": advisor("aave-v4", "api_underlyings", {
|
|
7575
9325
|
async supportedChainIds() {
|
|
@@ -7765,13 +9515,34 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
7765
9515
|
}),
|
|
7766
9516
|
"euler-v2": advisor("euler-v2", "subgraph_vaults", {
|
|
7767
9517
|
async supportedChainIds() {
|
|
7768
|
-
|
|
9518
|
+
const set = await loadEulerV2SupportedChainIds();
|
|
9519
|
+
return [...set].sort((a, b) => a - b);
|
|
7769
9520
|
},
|
|
7770
|
-
async supportedTokens() {
|
|
9521
|
+
async supportedTokens(chainId) {
|
|
9522
|
+
const cache = await ensureEulerV2ChainAssetCache(chainId);
|
|
9523
|
+
const tokens = [...cache.modesByUnderlying.entries()].map(([address, modes]) => ({
|
|
9524
|
+
address,
|
|
9525
|
+
roles: [
|
|
9526
|
+
...modes.lend ? ["vault_underlying"] : [],
|
|
9527
|
+
...modes.borrow ? ["loan"] : [],
|
|
9528
|
+
...modes.earn ? ["earn"] : []
|
|
9529
|
+
]
|
|
9530
|
+
}));
|
|
7771
9531
|
return {
|
|
7772
|
-
tokens
|
|
7773
|
-
|
|
9532
|
+
tokens,
|
|
9533
|
+
nativeWrapped: cache.nativeWrapped ?? void 0,
|
|
9534
|
+
notes: "Euler EVK vault underlyings and Earn vault assets from the Goldsky subgraph. Use address as underlyingAddress for ctm_euler_v2_fetch_lend_vaults."
|
|
7774
9535
|
};
|
|
9536
|
+
},
|
|
9537
|
+
async isTokenSupported(chainId, address) {
|
|
9538
|
+
const cache = await ensureEulerV2ChainAssetCache(chainId);
|
|
9539
|
+
let normalized;
|
|
9540
|
+
try {
|
|
9541
|
+
normalized = getAddress(address).toLowerCase();
|
|
9542
|
+
} catch {
|
|
9543
|
+
return false;
|
|
9544
|
+
}
|
|
9545
|
+
return cache.modesByUnderlying.has(normalized);
|
|
7775
9546
|
}
|
|
7776
9547
|
}),
|
|
7777
9548
|
[MAPLE_PROTOCOL_ID]: advisor(MAPLE_PROTOCOL_ID, "fixed_addresses", {
|
|
@@ -7836,6 +9607,21 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
7836
9607
|
};
|
|
7837
9608
|
}
|
|
7838
9609
|
}),
|
|
9610
|
+
[AERODROME_PROTOCOL_ID]: advisor(AERODROME_PROTOCOL_ID, "pool_graph", {
|
|
9611
|
+
async supportedChainIds() {
|
|
9612
|
+
return [AERODROME_CHAIN_ID];
|
|
9613
|
+
},
|
|
9614
|
+
async supportedTokens(chainId) {
|
|
9615
|
+
if (chainId !== AERODROME_CHAIN_ID) {
|
|
9616
|
+
return { tokens: [], notes: "Aerodrome is Base-only (chainId 8453)." };
|
|
9617
|
+
}
|
|
9618
|
+
return {
|
|
9619
|
+
tokens: aerodromeAdvisorPriorityTokens(),
|
|
9620
|
+
nativeWrapped: AERODROME_WETH_BASE,
|
|
9621
|
+
notes: "Slim directory: ETH, WETH, USDC, AERO, and Coinbase B20 stocks (AAPLc, \u2026). For a price call ctm_aerodrome_quote with tickers. To see pools for one token call ctm_aerodrome_discover_pools. Do not dump LpSugar."
|
|
9622
|
+
};
|
|
9623
|
+
}
|
|
9624
|
+
}),
|
|
7839
9625
|
[VENICE_PROTOCOL_ID]: advisor(VENICE_PROTOCOL_ID, "fixed_addresses", {
|
|
7840
9626
|
async supportedChainIds() {
|
|
7841
9627
|
return [VENICE_BASE_CHAIN_ID];
|
|
@@ -7874,6 +9660,54 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
7874
9660
|
};
|
|
7875
9661
|
}
|
|
7876
9662
|
}),
|
|
9663
|
+
[COMPOUND_V3_PROTOCOL_ID]: advisor(COMPOUND_V3_PROTOCOL_ID, "api_underlyings", {
|
|
9664
|
+
async supportedChainIds() {
|
|
9665
|
+
return listCompoundV3SupportedChainIds();
|
|
9666
|
+
},
|
|
9667
|
+
async supportedTokens(chainId, ctx) {
|
|
9668
|
+
const cache = await ensureCompoundV3ChainAssetCache({ chainId, rpcUrl: ctx?.rpcUrl });
|
|
9669
|
+
const nativeWrapped = compoundV3WrappedNative(chainId);
|
|
9670
|
+
const tokens = [];
|
|
9671
|
+
if (nativeWrapped) {
|
|
9672
|
+
tokens.push({
|
|
9673
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
9674
|
+
symbol: "ETH",
|
|
9675
|
+
decimals: 18,
|
|
9676
|
+
roles: ["native"]
|
|
9677
|
+
});
|
|
9678
|
+
tokens.push({
|
|
9679
|
+
address: nativeWrapped,
|
|
9680
|
+
symbol: "WETH",
|
|
9681
|
+
roles: ["native_wrapped"]
|
|
9682
|
+
});
|
|
9683
|
+
}
|
|
9684
|
+
for (const [address, modes] of cache) {
|
|
9685
|
+
if (nativeWrapped && address === nativeWrapped.toLowerCase()) continue;
|
|
9686
|
+
tokens.push({
|
|
9687
|
+
address,
|
|
9688
|
+
roles: [...modes.base ? ["base"] : [], ...modes.collateral ? ["collateral"] : []]
|
|
9689
|
+
});
|
|
9690
|
+
}
|
|
9691
|
+
return {
|
|
9692
|
+
tokens,
|
|
9693
|
+
nativeWrapped: nativeWrapped ?? void 0,
|
|
9694
|
+
notes: "Compound III Comet base and collateral tokens. Native ETH uses wrapped native (automatic wrap/unwrap). Pass comet from ctm_compound_v3_fetch_markets."
|
|
9695
|
+
};
|
|
9696
|
+
},
|
|
9697
|
+
async isTokenSupported(chainId, address, ctx) {
|
|
9698
|
+
const cache = await ensureCompoundV3ChainAssetCache({ chainId, rpcUrl: ctx?.rpcUrl });
|
|
9699
|
+
let normalized;
|
|
9700
|
+
try {
|
|
9701
|
+
normalized = getAddress(address).toLowerCase();
|
|
9702
|
+
} catch {
|
|
9703
|
+
return false;
|
|
9704
|
+
}
|
|
9705
|
+
if (normalized === "0x0000000000000000000000000000000000000000") return true;
|
|
9706
|
+
const wrapped = compoundV3WrappedNative(chainId);
|
|
9707
|
+
if (wrapped && wrapped.toLowerCase() === normalized) return true;
|
|
9708
|
+
return cache.has(normalized);
|
|
9709
|
+
}
|
|
9710
|
+
}),
|
|
7877
9711
|
arcus: advisor("arcus", "api_underlyings", {
|
|
7878
9712
|
async supportedChainIds() {
|
|
7879
9713
|
return [...ARCUS_SUPPORTED_CHAIN_IDS];
|
|
@@ -7908,7 +9742,9 @@ registerProtocolModule(arcusProtocolModule);
|
|
|
7908
9742
|
registerProtocolModule(morphoProtocolModule);
|
|
7909
9743
|
registerProtocolModule(circleCctpProtocolModule);
|
|
7910
9744
|
registerProtocolModule(veniceProtocolModule);
|
|
9745
|
+
registerProtocolModule(aerodromeProtocolModule);
|
|
7911
9746
|
registerProtocolModule(continuumDaoProtocolModule);
|
|
9747
|
+
registerProtocolModule(compoundV3ProtocolModule);
|
|
7912
9748
|
function getAgentCatalog() {
|
|
7913
9749
|
return {
|
|
7914
9750
|
protocols: getProtocolModules(),
|
|
@@ -7931,12 +9767,14 @@ function getAgentCatalog() {
|
|
|
7931
9767
|
morpho: morphoProtocolModule,
|
|
7932
9768
|
circleCctp: circleCctpProtocolModule,
|
|
7933
9769
|
venice: veniceProtocolModule,
|
|
9770
|
+
aerodrome: aerodromeProtocolModule,
|
|
7934
9771
|
continuumDao: continuumDaoProtocolModule,
|
|
9772
|
+
compoundV3: compoundV3ProtocolModule,
|
|
7935
9773
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
7936
9774
|
mcp: getAgentCatalogForMcp()
|
|
7937
9775
|
};
|
|
7938
9776
|
}
|
|
7939
9777
|
|
|
7940
|
-
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpContinuumDaoAttachInputSchema, mcpContinuumDaoCastVoteBravoInputSchema, mcpContinuumDaoCastVoteDeltaInputSchema, mcpContinuumDaoCreateLockInputSchema, mcpContinuumDaoDelegateInputSchema, mcpContinuumDaoExplainProposalInputSchema, mcpContinuumDaoExplainProposalOutputSchema, mcpContinuumDaoFetchDelegatesInputSchema, mcpContinuumDaoFetchDelegatesOutputSchema, mcpContinuumDaoFetchLiveProposalsInputSchema, mcpContinuumDaoFetchLiveProposalsOutputSchema, mcpContinuumDaoFetchProposalInputSchema, mcpContinuumDaoFetchProposalOutputSchema, mcpContinuumDaoFetchProposalStateInputSchema, mcpContinuumDaoFetchProposalStateOutputSchema, mcpContinuumDaoFetchProposalsInputSchema, mcpContinuumDaoFetchProposalsOutputSchema, mcpContinuumDaoFetchVotingPowerInputSchema, mcpContinuumDaoFetchVotingPowerOutputSchema, mcpContinuumDaoForumCreateIdeaInputSchema, mcpContinuumDaoForumCreateIdeaOutputSchema, mcpContinuumDaoForumCreateTopicInputSchema, mcpContinuumDaoForumCreateTopicOutputSchema, mcpContinuumDaoForumDeleteInputSchema, mcpContinuumDaoForumDeleteOutputSchema, mcpContinuumDaoForumFetchPostInputSchema, mcpContinuumDaoForumFetchPostOutputSchema, mcpContinuumDaoForumFetchThreadInputSchema, mcpContinuumDaoForumFetchThreadOutputSchema, mcpContinuumDaoForumMarkReadInputSchema, mcpContinuumDaoForumMarkReadOutputSchema, mcpContinuumDaoForumMarkUnreadInputSchema, mcpContinuumDaoForumMarkUnreadOutputSchema, mcpContinuumDaoForumMeInputSchema, mcpContinuumDaoForumMeOutputSchema, mcpContinuumDaoForumReactInputSchema, mcpContinuumDaoForumReactOutputSchema, mcpContinuumDaoForumRecentInputSchema, mcpContinuumDaoForumRecentOutputSchema, mcpContinuumDaoForumReplyCountInputSchema, mcpContinuumDaoForumReplyCountOutputSchema, mcpContinuumDaoForumReplyInputSchema, mcpContinuumDaoForumReplyOutputSchema, mcpContinuumDaoForumResolveInputSchema, mcpContinuumDaoForumResolveOutputSchema, mcpContinuumDaoForumSearchInputSchema, mcpContinuumDaoForumSearchOutputSchema, mcpContinuumDaoForumSectionsInputSchema, mcpContinuumDaoForumSectionsOutputSchema, mcpContinuumDaoForumSignInEligibleInputSchema, mcpContinuumDaoForumSignInEligibleOutputSchema, mcpContinuumDaoForumSignInInputSchema, mcpContinuumDaoForumSignOutInputSchema, mcpContinuumDaoForumSignOutOutputSchema, mcpContinuumDaoForumUnreadInputSchema, mcpContinuumDaoForumUnreadOutputSchema, mcpContinuumDaoForumUserPostIdsInputSchema, mcpContinuumDaoForumUserPostIdsOutputSchema, mcpContinuumDaoIncreaseAmountInputSchema, mcpContinuumDaoIncreaseUnlockTimeInputSchema, mcpContinuumDaoMergeInputSchema, mcpContinuumDaoProposalIdInputSchema, mcpContinuumDaoProposeBravoInputSchema, mcpContinuumDaoProposeDeltaInputSchema, mcpContinuumDaoRegisterProposalInputSchema, mcpContinuumDaoRegisterProposalOutputSchema, mcpContinuumDaoRequestDetachInputSchema, mcpContinuumDaoSplitInputSchema, mcpContinuumDaoTokenIdInputSchema, mcpContinuumDaoTransferInputSchema, mcpContinuumDaoUndelegateInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CheckPermissionsInputSchema, mcpUniswapV4CheckPermissionsOutputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4KycApplyLinkInputSchema, mcpUniswapV4KycApplyLinkOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
9778
|
+
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpAerodromeBuildAddLiquidityMultisignInputSchema, mcpAerodromeBuildClBurnMultisignInputSchema, mcpAerodromeBuildClCollectFeesMultisignInputSchema, mcpAerodromeBuildClDecreaseMultisignInputSchema, mcpAerodromeBuildClIncreaseMultisignInputSchema, mcpAerodromeBuildClMintMultisignInputSchema, mcpAerodromeBuildClaimEmissionsMultisignInputSchema, mcpAerodromeBuildClaimFeesMultisignInputSchema, mcpAerodromeBuildGaugeStakeMultisignInputSchema, mcpAerodromeBuildGaugeUnstakeMultisignInputSchema, mcpAerodromeBuildRemoveLiquidityMultisignInputSchema, mcpAerodromeBuildSwapMultisignInputSchema, mcpAerodromeDiscoverPoolsInputSchema, mcpAerodromeDiscoverPoolsOutputSchema, mcpAerodromeFetchPoolsInputSchema, mcpAerodromeFetchPoolsOutputSchema, mcpAerodromeFetchPositionsInputSchema, mcpAerodromeFetchPositionsOutputSchema, mcpAerodromeQuoteAddLiquidityInputSchema, mcpAerodromeQuoteAddLiquidityOutputSchema, mcpAerodromeQuoteClDepositInputSchema, mcpAerodromeQuoteClDepositOutputSchema, mcpAerodromeQuoteInputSchema, mcpAerodromeQuoteOutputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpCompoundV3BulkerInputSchema, mcpCompoundV3ClaimRewardsInputSchema, mcpCompoundV3FetchAccountInputSchema, mcpCompoundV3FetchAccountOutputSchema, mcpCompoundV3FetchMarketInputSchema, mcpCompoundV3FetchMarketOutputSchema, mcpCompoundV3FetchMarketsInputSchema, mcpCompoundV3FetchMarketsOutputSchema, mcpCompoundV3RepayInputSchema, mcpCompoundV3SupplyInputSchema, mcpCompoundV3WithdrawInputSchema, mcpContinuumDaoAttachInputSchema, mcpContinuumDaoCastVoteBravoInputSchema, mcpContinuumDaoCastVoteDeltaInputSchema, mcpContinuumDaoCreateLockInputSchema, mcpContinuumDaoDelegateInputSchema, mcpContinuumDaoExplainProposalInputSchema, mcpContinuumDaoExplainProposalOutputSchema, mcpContinuumDaoFetchDelegatesInputSchema, mcpContinuumDaoFetchDelegatesOutputSchema, mcpContinuumDaoFetchLiveProposalsInputSchema, mcpContinuumDaoFetchLiveProposalsOutputSchema, mcpContinuumDaoFetchProposalInputSchema, mcpContinuumDaoFetchProposalOutputSchema, mcpContinuumDaoFetchProposalStateInputSchema, mcpContinuumDaoFetchProposalStateOutputSchema, mcpContinuumDaoFetchProposalsInputSchema, mcpContinuumDaoFetchProposalsOutputSchema, mcpContinuumDaoFetchVotingPowerInputSchema, mcpContinuumDaoFetchVotingPowerOutputSchema, mcpContinuumDaoForumCreateIdeaInputSchema, mcpContinuumDaoForumCreateIdeaOutputSchema, mcpContinuumDaoForumCreateTopicInputSchema, mcpContinuumDaoForumCreateTopicOutputSchema, mcpContinuumDaoForumDeleteInputSchema, mcpContinuumDaoForumDeleteOutputSchema, mcpContinuumDaoForumFetchPostInputSchema, mcpContinuumDaoForumFetchPostOutputSchema, mcpContinuumDaoForumFetchThreadInputSchema, mcpContinuumDaoForumFetchThreadOutputSchema, mcpContinuumDaoForumMarkReadInputSchema, mcpContinuumDaoForumMarkReadOutputSchema, mcpContinuumDaoForumMarkUnreadInputSchema, mcpContinuumDaoForumMarkUnreadOutputSchema, mcpContinuumDaoForumMeInputSchema, mcpContinuumDaoForumMeOutputSchema, mcpContinuumDaoForumReactInputSchema, mcpContinuumDaoForumReactOutputSchema, mcpContinuumDaoForumRecentInputSchema, mcpContinuumDaoForumRecentOutputSchema, mcpContinuumDaoForumReplyCountInputSchema, mcpContinuumDaoForumReplyCountOutputSchema, mcpContinuumDaoForumReplyInputSchema, mcpContinuumDaoForumReplyOutputSchema, mcpContinuumDaoForumResolveInputSchema, mcpContinuumDaoForumResolveOutputSchema, mcpContinuumDaoForumSearchInputSchema, mcpContinuumDaoForumSearchOutputSchema, mcpContinuumDaoForumSectionsInputSchema, mcpContinuumDaoForumSectionsOutputSchema, mcpContinuumDaoForumSignInEligibleInputSchema, mcpContinuumDaoForumSignInEligibleOutputSchema, mcpContinuumDaoForumSignInInputSchema, mcpContinuumDaoForumSignOutInputSchema, mcpContinuumDaoForumSignOutOutputSchema, mcpContinuumDaoForumUnreadInputSchema, mcpContinuumDaoForumUnreadOutputSchema, mcpContinuumDaoForumUserPostIdsInputSchema, mcpContinuumDaoForumUserPostIdsOutputSchema, mcpContinuumDaoIncreaseAmountInputSchema, mcpContinuumDaoIncreaseUnlockTimeInputSchema, mcpContinuumDaoMergeInputSchema, mcpContinuumDaoProposalIdInputSchema, mcpContinuumDaoProposeBravoInputSchema, mcpContinuumDaoProposeDeltaInputSchema, mcpContinuumDaoRegisterProposalInputSchema, mcpContinuumDaoRegisterProposalOutputSchema, mcpContinuumDaoRequestDetachInputSchema, mcpContinuumDaoSplitInputSchema, mcpContinuumDaoTokenIdInputSchema, mcpContinuumDaoTransferInputSchema, mcpContinuumDaoUndelegateInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightOffersInputSchema, mcpMorphoFetchMidnightOffersOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightCancelLendOfferInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightLendOfferInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CheckPermissionsInputSchema, mcpUniswapV4CheckPermissionsOutputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4KycApplyLinkInputSchema, mcpUniswapV4KycApplyLinkOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
7941
9779
|
//# sourceMappingURL=catalog.js.map
|
|
7942
9780
|
//# sourceMappingURL=catalog.js.map
|