@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
|
@@ -1925,12 +1925,12 @@ query E($first: Int!, $skip: Int!) {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
1927
|
`;
|
|
1928
|
-
async function paginateEulerVaultRows(
|
|
1928
|
+
async function paginateEulerVaultRows(chainId) {
|
|
1929
1929
|
const out = [];
|
|
1930
1930
|
let skip = 0;
|
|
1931
1931
|
const first = 1e3;
|
|
1932
1932
|
while (true) {
|
|
1933
|
-
const d = await
|
|
1933
|
+
const d = await eulerV2QueryGraphQl(chainId, VAULT_PAGE, { first, skip });
|
|
1934
1934
|
const rows = d.eulerVaults ?? [];
|
|
1935
1935
|
if (!rows.length) break;
|
|
1936
1936
|
for (const r of rows) {
|
|
@@ -1942,15 +1942,19 @@ async function paginateEulerVaultRows(endpoint) {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
return out;
|
|
1944
1944
|
}
|
|
1945
|
-
async function paginateEulerEarnAssets(
|
|
1945
|
+
async function paginateEulerEarnAssets(chainId) {
|
|
1946
1946
|
const assets = [];
|
|
1947
1947
|
let skip = 0;
|
|
1948
1948
|
const first = 1e3;
|
|
1949
1949
|
while (true) {
|
|
1950
|
-
const d = await
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1950
|
+
const d = await eulerV2QueryGraphQl(
|
|
1951
|
+
chainId,
|
|
1952
|
+
EARN_PAGE,
|
|
1953
|
+
{
|
|
1954
|
+
first,
|
|
1955
|
+
skip
|
|
1956
|
+
}
|
|
1957
|
+
);
|
|
1954
1958
|
const rows = d.eulerEarnVaults ?? [];
|
|
1955
1959
|
if (!rows.length) break;
|
|
1956
1960
|
for (const r of rows) {
|
|
@@ -1970,8 +1974,8 @@ async function fetchEulerV2ChainAssetCache(chainId) {
|
|
|
1970
1974
|
}
|
|
1971
1975
|
const [nativeWrapped, vaultRows, earnAssets] = await Promise.all([
|
|
1972
1976
|
resolveEulerWrappedNativeToken(chainId),
|
|
1973
|
-
paginateEulerVaultRows(
|
|
1974
|
-
paginateEulerEarnAssets(
|
|
1977
|
+
paginateEulerVaultRows(chainId),
|
|
1978
|
+
paginateEulerEarnAssets(chainId)
|
|
1975
1979
|
]);
|
|
1976
1980
|
const modes = /* @__PURE__ */ new Map();
|
|
1977
1981
|
const bump = (addr, patch) => {
|
|
@@ -1996,7 +2000,10 @@ async function fetchEulerV2ChainAssetCache(chainId) {
|
|
|
1996
2000
|
function ensureEulerV2ChainAssetCache(chainId) {
|
|
1997
2001
|
const hit = eulerV2ChainAssetCache.get(chainId);
|
|
1998
2002
|
if (hit) return hit;
|
|
1999
|
-
const p = fetchEulerV2ChainAssetCache(chainId)
|
|
2003
|
+
const p = fetchEulerV2ChainAssetCache(chainId).catch((e) => {
|
|
2004
|
+
eulerV2ChainAssetCache.delete(chainId);
|
|
2005
|
+
throw e;
|
|
2006
|
+
});
|
|
2000
2007
|
eulerV2ChainAssetCache.set(chainId, p);
|
|
2001
2008
|
return p;
|
|
2002
2009
|
}
|