From ea1c5ba3a4c4be3868f6f6018e169e01c1d98e03 Mon Sep 17 00:00:00 2001 From: Hui-Sang Kim <102507786+Hiksang@users.noreply.github.com> Date: Thu, 7 May 2026 02:18:22 +0900 Subject: [PATCH] chore(test): replace chain:'test' fixture with real registered chains in DEX adapter tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four DEX adapter test files (uniswap_v3, algebra_v3, balancer_v3, thena_cl) constructed ProtocolEntry fixtures with `chain: "test"`, which doesn't exist in any registry. Each replacement uses a real chain that the adapter is in fact deployed on: uniswap_v3.test.ts → "hyperevm" (hyperswap-v3, project-x, ramses-cl) algebra_v3.test.ts → "hyperevm" (kittenswap) thena_cl.test.ts → "bnb" (thena-fusion-bnb) balancer_v3.test.ts → "hyperevm" (no registered protocol; chosen for consistency with the other V3-style adapters) The change is fixture-only — no registry lookups happen in these tests, so behaviour is identical. The benefit is forward-looking: any future test that crosschecks a fixture's chain against Registry.loadEmbedded() (e.g. address-shape PR #15's pattern) will find the chain and not silently skip the assertion. Verified: - pnpm -C ts -r build — clean. - pnpm -C ts -r lint — 3 packages, tsc --noEmit clean. - pnpm -C ts -r test — defi-core 32/32, defi-protocols 43/43 (unchanged), defi-cli 89/89 (unchanged). --- ts/packages/defi-protocols/src/dex/algebra_v3.test.ts | 2 +- ts/packages/defi-protocols/src/dex/balancer_v3.test.ts | 2 +- ts/packages/defi-protocols/src/dex/thena_cl.test.ts | 2 +- ts/packages/defi-protocols/src/dex/uniswap_v3.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/packages/defi-protocols/src/dex/algebra_v3.test.ts b/ts/packages/defi-protocols/src/dex/algebra_v3.test.ts index 9de685a..5251896 100644 --- a/ts/packages/defi-protocols/src/dex/algebra_v3.test.ts +++ b/ts/packages/defi-protocols/src/dex/algebra_v3.test.ts @@ -19,7 +19,7 @@ const ENTRY: ProtocolEntry = { slug: "test-algebra-v3", category: ProtocolCategory.Dex, interface: "algebra_v3", - chain: "test", + chain: "hyperevm", contracts: { router: ("0x" + "01".repeat(20)) as Address, quoter: ("0x" + "02".repeat(20)) as Address, diff --git a/ts/packages/defi-protocols/src/dex/balancer_v3.test.ts b/ts/packages/defi-protocols/src/dex/balancer_v3.test.ts index b82bfbf..c5fde8f 100644 --- a/ts/packages/defi-protocols/src/dex/balancer_v3.test.ts +++ b/ts/packages/defi-protocols/src/dex/balancer_v3.test.ts @@ -17,7 +17,7 @@ const ENTRY: ProtocolEntry = { slug: "test-balancer-v3", category: ProtocolCategory.Dex, interface: "balancer_v3", - chain: "test", + chain: "hyperevm", contracts: { router: ROUTER, pool: POOL }, }; const ENTRY_NO_POOL: ProtocolEntry = { diff --git a/ts/packages/defi-protocols/src/dex/thena_cl.test.ts b/ts/packages/defi-protocols/src/dex/thena_cl.test.ts index 7ad25d6..32f5aef 100644 --- a/ts/packages/defi-protocols/src/dex/thena_cl.test.ts +++ b/ts/packages/defi-protocols/src/dex/thena_cl.test.ts @@ -15,7 +15,7 @@ const ENTRY: ProtocolEntry = { slug: "test-thena-cl", category: ProtocolCategory.Dex, interface: "thena_cl", - chain: "test", + chain: "bnb", contracts: { router: ("0x" + "01".repeat(20)) as Address, position_manager: ("0x" + "03".repeat(20)) as Address, diff --git a/ts/packages/defi-protocols/src/dex/uniswap_v3.test.ts b/ts/packages/defi-protocols/src/dex/uniswap_v3.test.ts index fab2a3b..1c9ead6 100644 --- a/ts/packages/defi-protocols/src/dex/uniswap_v3.test.ts +++ b/ts/packages/defi-protocols/src/dex/uniswap_v3.test.ts @@ -30,7 +30,7 @@ const ENTRY: ProtocolEntry = { slug: "test-unx-v3", category: ProtocolCategory.Dex, interface: "uniswap_v3", - chain: "test", + chain: "hyperevm", contracts: { router: ("0x" + "01".repeat(20)) as Address, quoter: ("0x" + "02".repeat(20)) as Address,