Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@conventional-changelog/git-client": "^2.0.0",
"@vitest/coverage-v8": "^3.0.5",
"@vitest/ui": "^3.0.5",
"@types/node": "^24.10.2",
"@vitest/coverage-v8": "^4.0.15",
"@vitest/ui": "^4.0.15",
"conventional-changelog-conventionalcommits": "^8.0.0",
"conventional-changelog-writer": "^8.0.1",
"conventional-recommended-bump": "^11.0.0",
"dotenv-cli": "^8.0.0",
"happy-dom": "^17.0.0",
"happy-dom": "^20.0.11",
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"semver": "^7.7.1",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"lint-staged": {
"*.{json,gql}": "biome check --write --no-errors-on-unmatched",
Expand Down
2 changes: 1 addition & 1 deletion packages/blue-api-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@morpho-org/blue-sdk": "workspace:^",
"@morpho-org/morpho-ts": "workspace:^",
"graphql": "^16.10.0",
"typescript": "^5.7.2"
"typescript": "^5.9.3"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/blue-sdk-viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"@morpho-org/morpho-ts": "workspace:^",
"@morpho-org/test": "workspace:^",
"hardhat": "^2.27.1",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
10 changes: 5 additions & 5 deletions packages/blue-sdk-wagmi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@tanstack/react-query": "^5.0.0",
"react": "^18.0.0",
"viem": "^2.0.0",
"wagmi": "^2.12.10"
"wagmi": ">=2.12.10 <4.0.0"
},
"devDependencies": {
"@morpho-org/blue-sdk": "workspace:^",
Expand All @@ -42,10 +42,10 @@
"@types/react-dom": "^19.0.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5",
"wagmi": "^2.14.10"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15",
"wagmi": "^3.1.0"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/blue-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"devDependencies": {
"@morpho-org/morpho-ts": "workspace:^",
"@morpho-org/test": "workspace:^",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/blue-sdk/test/e2e/Market.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe("Market", () => {
sender: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

Docs: https://viem.sh/docs/contract/writeContract
Version: viem@2.33.3]
Version: viem@2.41.2]
`);

const hash = await client.writeContract({
Expand Down
6 changes: 3 additions & 3 deletions packages/bundler-sdk-viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"@testing-library/react": "^16.1.0",
"@types/lodash": "^4.17.12",
"lodash": "^4.17.21",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
9 changes: 4 additions & 5 deletions packages/liquidation-sdk-viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"codegen": "graphql-codegen --config codegen.ts"
},
"dependencies": {
"@paraswap/sdk": "^7.2.3",
"@velora-dex/sdk": "^9.2.0",
"executooor-viem": "^1.3.3"
},
"peerDependencies": {
Expand All @@ -45,16 +45,15 @@
"@morpho-org/morpho-test": "workspace:^",
"@morpho-org/morpho-ts": "workspace:^",
"@morpho-org/test": "workspace:^",
"@types/node": "^22.13.1",
"evm-maths": "^7.0.1",
"executooor-viem": "^1.3.3",
"fetch-mock": "^11.1.5",
"graphql": "^16.10.0",
"hardhat": "^2.27.1",
"nock": "^14.0.10",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/liquidation-sdk-viem/src/swap/paraswap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SwapSide, constructSimpleSDK } from "@paraswap/sdk";
import { SwapSide, constructSimpleSDK } from "@velora-dex/sdk";

import type { Address, Hex } from "viem";
import type { SwapParams, SwapResponse } from "./types.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
addressesRegistry,
} from "@morpho-org/blue-sdk";
import { format } from "@morpho-org/morpho-ts";
import type { BuildTxInput } from "@paraswap/sdk";
import type { BuildTxInput } from "@velora-dex/sdk";

import {
blueAbi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
addressesRegistry,
} from "@morpho-org/blue-sdk";
import { format } from "@morpho-org/morpho-ts";
import type { BuildTxInput } from "@paraswap/sdk";
import type { BuildTxInput } from "@velora-dex/sdk";

import { blueAbi, fetchAccrualPosition } from "@morpho-org/blue-sdk-viem";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
addressesRegistry,
} from "@morpho-org/blue-sdk";
import { Time, ZERO_ADDRESS, format } from "@morpho-org/morpho-ts";
import type { BuildTxInput } from "@paraswap/sdk";
import type { BuildTxInput } from "@velora-dex/sdk";

import {
blueAbi,
Expand Down
7 changes: 3 additions & 4 deletions packages/liquidity-sdk-viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
"@morpho-org/morpho-ts": "workspace:^",
"@morpho-org/simulation-sdk": "workspace:^",
"@morpho-org/test": "workspace:^",
"@types/node": "^22.13.1",
"graphql": "^16.10.0",
"nock": "^14.0.10",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/migration-sdk-viem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"@morpho-org/test-wagmi": "workspace:^",
"@types/lodash": "^4.17.12",
"lodash": "^4.17.21",
"typescript": "^5.7.2",
"viem": "^2.33.3",
"vitest": "^3.0.5"
"typescript": "^5.9.3",
"viem": "^2.41.2",
"vitest": "^4.0.15"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
12 changes: 3 additions & 9 deletions packages/migration-sdk-viem/test/e2e/blue/borrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ import { type TestAPI, describe, expect } from "vitest";
import { MigratableBorrowPosition_Blue } from "../../../src/index.js";
import { test } from "../setup.js";

const TEST_CONFIGS: {
chainId: ChainId.EthMainnet | ChainId.BaseMainnet;
testFn: TestAPI<ViemTestContext>;
marketFrom: MarketParams;
marketTo: MarketParams;
}[] = [
const TEST_CONFIGS = [
{
chainId: ChainId.EthMainnet,
testFn: test[ChainId.EthMainnet],
testFn: test[ChainId.EthMainnet] as TestAPI<ViemTestContext>,
marketFrom: markets[ChainId.EthMainnet].eth_wstEth_2,
marketTo: new MarketParams({
...markets[ChainId.EthMainnet].eth_wstEth_2,
Expand All @@ -55,8 +50,7 @@ const TEST_CONFIGS: {
},
{
chainId: ChainId.BaseMainnet,
//@ts-expect-error
testFn: test[ChainId.BaseMainnet],
testFn: test[ChainId.BaseMainnet] as TestAPI<ViemTestContext>,
marketFrom: new MarketParams({
collateralToken: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452",
loanToken: "0x4200000000000000000000000000000000000006",
Expand Down
26 changes: 3 additions & 23 deletions packages/migration-sdk-viem/test/e2e/compoundV2/supply.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,10 @@ import {
import { MigratableSupplyPosition_CompoundV2 } from "../../../src/positions/supply/compoundV2.supply.js";
import { test } from "../setup.js";

interface ChainConfig<C extends ChainId.EthMainnet> {
chainId: C;
testFn: TestAPI<ViemTestContext>;
markets: {
[Ch in C]: {
[K in Exclude<
keyof (typeof migrationAddressesRegistry)[Ch][MigratableProtocol.compoundV2],
"comptroller"
>]: {
vault: Address;
underlying: Address;
underlyingDecimals: number;
cToken: Address;
};
};
}[C];
}

const TEST_CONFIGS: {
[C in ChainId.EthMainnet]: ChainConfig<C>;
}[ChainId.EthMainnet][] = [
const TEST_CONFIGS = [
{
chainId: ChainId.EthMainnet,
testFn: test[ChainId.EthMainnet],
testFn: test[ChainId.EthMainnet] as TestAPI<ViemTestContext>,
markets: {
cEth: {
vault: vaults[ChainId.EthMainnet].steakEth.address,
Expand Down Expand Up @@ -95,7 +75,7 @@ const TEST_CONFIGS: {
// },
// },
// },
];
] as const;

describe("Supply position on COMPOUND V2", () => {
for (const { chainId, testFn, markets } of TEST_CONFIGS) {
Expand Down
31 changes: 4 additions & 27 deletions packages/migration-sdk-viem/test/e2e/compoundV3/borrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import {
ChainId,
DEFAULT_SLIPPAGE_TOLERANCE,
type MarketParams,
MathLib,
addressesRegistry,
} from "@morpho-org/blue-sdk";
Expand All @@ -32,31 +31,10 @@ import { cometAbi, cometExtAbi } from "../../../src/abis/compoundV3.js";
import { MigratableBorrowPosition_CompoundV3 } from "../../../src/positions/borrow/compoundV3.borrow.js";
import { test } from "../setup.js";

interface ChainConfig<C extends ChainId.EthMainnet | ChainId.BaseMainnet> {
chainId: C;
testFn: TestAPI<ViemTestContext>;
markets: {
[Ch in C]: {
[K in Exclude<
keyof (typeof migrationAddressesRegistry)[Ch][MigratableProtocol.compoundV3],
"comptroller"
>]: {
marketTo: MarketParams;
comet: Address;
collateralAmount: bigint;
borrowAmount: bigint;
extraCollateral: Address;
};
};
}[C];
}

const TEST_CONFIGS: {
[C in ChainId.EthMainnet | ChainId.BaseMainnet]: ChainConfig<C>;
}[ChainId.EthMainnet | ChainId.BaseMainnet][] = [
const TEST_CONFIGS = [
{
chainId: ChainId.EthMainnet,
testFn: test[ChainId.EthMainnet],
testFn: test[ChainId.EthMainnet] as TestAPI<ViemTestContext>,
markets: {
weth: {
marketTo: markets[ChainId.EthMainnet].eth_wstEth_2,
Expand All @@ -82,8 +60,7 @@ const TEST_CONFIGS: {
},
{
chainId: ChainId.BaseMainnet,
//@ts-expect-error
testFn: test[ChainId.BaseMainnet],
testFn: test[ChainId.BaseMainnet] as TestAPI<ViemTestContext>,
markets: {
weth: {
marketTo: markets[ChainId.BaseMainnet].eth_wstEth,
Expand All @@ -107,7 +84,7 @@ const TEST_CONFIGS: {
},
},
},
];
] as const;

describe("Borrow position on COMPOUND V3", () => {
for (const { chainId, testFn, markets } of TEST_CONFIGS) {
Expand Down
29 changes: 4 additions & 25 deletions packages/migration-sdk-viem/test/e2e/compoundV3/supply.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,10 @@ import {
import { MigratableSupplyPosition_CompoundV3 } from "../../../src/positions/supply/compoundV3.supply.js";
import { test } from "../setup.js";

interface ChainConfig<C extends ChainId.EthMainnet | ChainId.BaseMainnet> {
chainId: C;
testFn: TestAPI<ViemTestContext>;
markets: {
[Ch in C]: {
[K in Exclude<
keyof (typeof migrationAddressesRegistry)[Ch][MigratableProtocol.compoundV3],
"comptroller"
>]: {
vault: Address;
underlying: Address;
underlyingDecimals: number;
comet: Address;
};
};
}[C];
}

const TEST_CONFIGS: {
[C in ChainId.EthMainnet | ChainId.BaseMainnet]: ChainConfig<C>;
}[ChainId.EthMainnet | ChainId.BaseMainnet][] = [
const TEST_CONFIGS = [
{
chainId: ChainId.EthMainnet,
testFn: test[ChainId.EthMainnet],
testFn: test[ChainId.EthMainnet] as TestAPI<ViemTestContext>,
markets: {
weth: {
vault: vaults[ChainId.EthMainnet].steakEth.address,
Expand All @@ -63,8 +43,7 @@ const TEST_CONFIGS: {
},
{
chainId: ChainId.BaseMainnet,
//@ts-expect-error
testFn: test[ChainId.BaseMainnet],
testFn: test[ChainId.BaseMainnet] as TestAPI<ViemTestContext>,
markets: {
weth: {
vault: "0xa0E430870c4604CcfC7B38Ca7845B1FF653D0ff1",
Expand All @@ -86,7 +65,7 @@ const TEST_CONFIGS: {
},
},
},
];
] as const;

describe("Supply position on COMPOUND V3", () => {
for (const { chainId, testFn, markets } of TEST_CONFIGS) {
Expand Down
5 changes: 2 additions & 3 deletions packages/morpho-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
"@morpho-org/blue-sdk": "workspace:^",
"@morpho-org/morpho-ts": "workspace:^",
"@morpho-org/test": "workspace:^",
"@types/node": "^22.13.1",
"typescript": "^5.7.2",
"viem": "^2.33.3"
"typescript": "^5.9.3",
"viem": "^2.41.2"
},
"publishConfig": {
"main": "lib/index.js",
Expand Down
Loading