chore(test): replace chain:'test' fixture with real registered chains in DEX adapter tests - #17
Merged
Merged
Conversation
… in DEX adapter tests
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).
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four DEX adapter test files (uniswap_v3, algebra_v3, balancer_v3, thena_cl) constructed
ProtocolEntryfixtures withchain: "test", which doesn't exist in any registry. Each replacement uses a real chain that the adapter is in fact deployed on. The change is fixture-only — no registry lookups happen in these tests, so behaviour is identical.Mapping
uniswap_v3.test.ts"test""hyperevm"algebra_v3.test.ts"test""hyperevm"thena_cl.test.ts"test""bnb"balancer_v3.test.ts"test""hyperevm"Why
Forward-looking. Any future test that crosschecks a fixture's chain against
Registry.loadEmbedded()(mirroring the address-shape pattern in PR #15) will find the chain and not silently skip assertions. The 2026-05-07 multi-chain broadcast verification surfaced one false-positive class of test that passed only because the fixture chain didn't match any real chain.Test plan
pnpm -C ts -r build— clean.pnpm -C ts -r lint— 3 packages,tsc --noEmitclean.pnpm -C ts -r test— defi-core 32/32, defi-protocols 43/43 (unchanged), defi-cli (unchanged)."test"(none should — the chain field is read by the adapter constructor for naming only).🤖 Generated with Claude Code