@continuumdao/ctm-mpc-defi 0.2.39 → 0.2.41
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 +50 -10
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.js +50 -10
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +1 -1
- package/dist/agent/skills/circle-cctp/SKILL.md +1 -0
- package/dist/agent/skills/gmx/SKILL.md +4 -4
- package/dist/agent/skills/morpho/SKILL.md +11 -0
- package/dist/agent/skills/uniswap-v4/SKILL.md +1 -1
- package/dist/chains/evm/index.cjs +1 -0
- package/dist/chains/evm/index.cjs.map +1 -1
- package/dist/chains/evm/index.js +1 -0
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.cjs +16 -0
- package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.js +16 -0
- package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +1 -0
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.js +1 -0
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/gmx/index.cjs +17 -7
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +7 -1
- package/dist/protocols/evm/gmx/index.js +17 -7
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +21 -2
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +12 -1
- package/dist/protocols/evm/morpho/index.js +17 -3
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/permit2/index.cjs.map +1 -1
- package/dist/protocols/evm/permit2/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +6 -2
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js +6 -2
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +2 -2
package/dist/agent/catalog.cjs
CHANGED
|
@@ -544,7 +544,9 @@ var UNIVERSAL_ROUTER_SPENDER = {
|
|
|
544
544
|
4217: "0x1febb76be10aaf3a1402f04e8e835f2c382f7914",
|
|
545
545
|
196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff",
|
|
546
546
|
/** Robinhood Chain mainnet — Universal Router v2.1.1 (Trade API / interface) */
|
|
547
|
-
4663: "0x8876789976decbfcbbbe364623c63652db8c0904"
|
|
547
|
+
4663: "0x8876789976decbfcbbbe364623c63652db8c0904",
|
|
548
|
+
/** Circle Arc mainnet — official Uniswap v4 deployments */
|
|
549
|
+
5042: "0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1"
|
|
548
550
|
};
|
|
549
551
|
function isUniswapV4ChainSupported(chainId) {
|
|
550
552
|
if (chainId == null) return false;
|
|
@@ -5148,7 +5150,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5148
5150
|
actionId: "gmx.gmDeposit",
|
|
5149
5151
|
protocolId: "gmx",
|
|
5150
5152
|
chainCategory: "evm",
|
|
5151
|
-
description: "Create and submit mpc-auth multiSignRequest for GMX GM pool deposit (ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
5153
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX v2.2c GM pool deposit (approve SyntheticsRouter, ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
5152
5154
|
prerequisites: ["keyGen", "executorAddress", "marketSymbol", "collateral token"],
|
|
5153
5155
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmDepositBatch" },
|
|
5154
5156
|
inputZod: mcpGmxGmDepositInputSchema
|
|
@@ -5158,7 +5160,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5158
5160
|
actionId: "gmx.gmWithdraw",
|
|
5159
5161
|
protocolId: "gmx",
|
|
5160
5162
|
chainCategory: "evm",
|
|
5161
|
-
description: "Create and submit mpc-auth multiSignRequest for GMX GM pool withdrawal (ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
5163
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX v2.2c GM pool withdrawal (approve SyntheticsRouter, ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
5162
5164
|
prerequisites: ["keyGen", "executorAddress", "GM market token balance"],
|
|
5163
5165
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmWithdrawBatch" },
|
|
5164
5166
|
inputZod: mcpGmxGmWithdrawInputSchema
|
|
@@ -8460,7 +8462,14 @@ function gmxResolvedApiBaseUrls(chainId) {
|
|
|
8460
8462
|
if (!primary) {
|
|
8461
8463
|
throw new Error(`GMX API URLs are not configured for chain ${chainId}.`);
|
|
8462
8464
|
}
|
|
8463
|
-
|
|
8465
|
+
const urls = [primary, ...getApiFallbackUrls(chainId)].map((url) => url.replace(/\/$/, ""));
|
|
8466
|
+
const peer = gmxApiPeerFallback(urls[0]);
|
|
8467
|
+
if (peer && !urls.includes(peer)) urls.push(peer);
|
|
8468
|
+
return urls;
|
|
8469
|
+
}
|
|
8470
|
+
function gmxApiPeerFallback(primary) {
|
|
8471
|
+
if (primary.includes(".gmxapi.io")) return primary.replace(".gmxapi.io", ".gmxapi.ai");
|
|
8472
|
+
return void 0;
|
|
8464
8473
|
}
|
|
8465
8474
|
function buildGmxUrl(baseUrl, path, query) {
|
|
8466
8475
|
const base = baseUrl.replace(/\/$/, "");
|
|
@@ -8629,7 +8638,7 @@ var gmxProtocolModule = {
|
|
|
8629
8638
|
id: "gmx.gmDeposit",
|
|
8630
8639
|
protocolId: GMX_PROTOCOL_ID,
|
|
8631
8640
|
chainCategory: "evm",
|
|
8632
|
-
description: "Deposit collateral into a GMX GM liquidity pool (ExchangeRouter multicall)",
|
|
8641
|
+
description: "Deposit collateral into a GMX v2.2c GM liquidity pool (ExchangeRouter multicall)",
|
|
8633
8642
|
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8634
8643
|
params: {
|
|
8635
8644
|
marketSymbol: { type: "string", required: true, description: "GM market symbol e.g. ETH/USD [WETH-USDC]" },
|
|
@@ -8641,7 +8650,7 @@ var gmxProtocolModule = {
|
|
|
8641
8650
|
id: "gmx.gmWithdraw",
|
|
8642
8651
|
protocolId: GMX_PROTOCOL_ID,
|
|
8643
8652
|
chainCategory: "evm",
|
|
8644
|
-
description: "Withdraw GM market tokens from a GMX liquidity pool",
|
|
8653
|
+
description: "Withdraw GM market tokens from a GMX v2.2c liquidity pool",
|
|
8645
8654
|
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
8646
8655
|
params: {
|
|
8647
8656
|
marketSymbol: { type: "string", required: true, description: "GM market symbol" },
|
|
@@ -8981,6 +8990,16 @@ registerProtocolModule(arcusProtocolModule);
|
|
|
8981
8990
|
|
|
8982
8991
|
// src/protocols/evm/morpho/api.ts
|
|
8983
8992
|
init_defiProxy();
|
|
8993
|
+
|
|
8994
|
+
// src/protocols/evm/morpho/support.ts
|
|
8995
|
+
var ARC_MAINNET_CHAIN_ID = 5042;
|
|
8996
|
+
var ARC_TESTNET_CHAIN_ID = 5042002;
|
|
8997
|
+
var MORPHO_EXTRA_SUPPORTED_CHAIN_IDS = [ARC_MAINNET_CHAIN_ID, ARC_TESTNET_CHAIN_ID];
|
|
8998
|
+
function isMorphoArcChainId(chainId) {
|
|
8999
|
+
return chainId === ARC_MAINNET_CHAIN_ID || chainId === ARC_TESTNET_CHAIN_ID;
|
|
9000
|
+
}
|
|
9001
|
+
|
|
9002
|
+
// src/protocols/evm/morpho/api.ts
|
|
8984
9003
|
var MORPHO_GRAPHQL_URL = "https://api.morpho.org/graphql";
|
|
8985
9004
|
async function morphoGql(query, variables) {
|
|
8986
9005
|
const body = { query, variables: variables ?? {} };
|
|
@@ -9003,14 +9022,18 @@ async function fetchMorphoChains() {
|
|
|
9003
9022
|
`);
|
|
9004
9023
|
return d.chains ?? [];
|
|
9005
9024
|
}
|
|
9006
|
-
|
|
9007
|
-
const rows = await fetchMorphoChains();
|
|
9025
|
+
function mergeMorphoSupportedChainIds(rows) {
|
|
9008
9026
|
const s = /* @__PURE__ */ new Set();
|
|
9009
9027
|
for (const c of rows) {
|
|
9010
9028
|
if (typeof c.id === "number" && Number.isFinite(c.id)) s.add(c.id);
|
|
9011
9029
|
}
|
|
9030
|
+
for (const id of MORPHO_EXTRA_SUPPORTED_CHAIN_IDS) s.add(id);
|
|
9012
9031
|
return s;
|
|
9013
9032
|
}
|
|
9033
|
+
async function loadMorphoSupportedChainIds() {
|
|
9034
|
+
const rows = await fetchMorphoChains();
|
|
9035
|
+
return mergeMorphoSupportedChainIds(rows);
|
|
9036
|
+
}
|
|
9014
9037
|
var VAULT_PAGE_SIZE = 100;
|
|
9015
9038
|
async function fetchMorphoVaultsForChain(chainId, first = 100) {
|
|
9016
9039
|
const d = await morphoGql(
|
|
@@ -9286,6 +9309,22 @@ var CCTP_EVM_CHAINS = [
|
|
|
9286
9309
|
usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
|
|
9287
9310
|
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
9288
9311
|
label: "Polygon Amoy"
|
|
9312
|
+
},
|
|
9313
|
+
{
|
|
9314
|
+
chainId: 5042,
|
|
9315
|
+
domain: 26,
|
|
9316
|
+
network: "mainnet",
|
|
9317
|
+
usdc: "0x3600000000000000000000000000000000000000",
|
|
9318
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
9319
|
+
label: "Arc"
|
|
9320
|
+
},
|
|
9321
|
+
{
|
|
9322
|
+
chainId: 5042002,
|
|
9323
|
+
domain: 26,
|
|
9324
|
+
network: "testnet",
|
|
9325
|
+
usdc: "0x3600000000000000000000000000000000000000",
|
|
9326
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
9327
|
+
label: "Arc Testnet"
|
|
9289
9328
|
}
|
|
9290
9329
|
];
|
|
9291
9330
|
function cctpChainConfig(chainId) {
|
|
@@ -10910,7 +10949,8 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
10910
10949
|
59144,
|
|
10911
10950
|
4217,
|
|
10912
10951
|
196,
|
|
10913
|
-
4663
|
|
10952
|
+
4663,
|
|
10953
|
+
5042
|
|
10914
10954
|
]) {
|
|
10915
10955
|
if (isUniswapV4ChainSupported(id)) ids.push(id);
|
|
10916
10956
|
}
|
|
@@ -11018,7 +11058,7 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
11018
11058
|
}));
|
|
11019
11059
|
return {
|
|
11020
11060
|
tokens,
|
|
11021
|
-
notes: chainId === ROBINHOOD_CHAIN_ID ? 'Morpho vault assets on Robinhood Chain. Robinhood Earn USDG yield uses Steakhouse USDG (steakUSDG) \u2014 query "robinhood earn" or robinhoodEarn: true on deposit multisign; not Arcus collateral.' : "Morpho vault assets, Blue market loan/collateral tokens, and Midnight book loan/collateral tokens from api.morpho.org."
|
|
11061
|
+
notes: chainId === ROBINHOOD_CHAIN_ID ? 'Morpho vault assets on Robinhood Chain. Robinhood Earn USDG yield uses Steakhouse USDG (steakUSDG) \u2014 query "robinhood earn" or robinhoodEarn: true on deposit multisign; not Arcus collateral.' : isMorphoArcChainId(chainId) ? "Morpho vault and Blue market assets on Arc (USDC-native gas). Mainnet is 5042; testnet is 5042002. Midnight remains Ethereum/Base only." : "Morpho vault assets, Blue market loan/collateral tokens, and Midnight book loan/collateral tokens from api.morpho.org."
|
|
11022
11062
|
};
|
|
11023
11063
|
},
|
|
11024
11064
|
async isTokenSupported(chainId, address) {
|