Skip to content

refactor(protocol-core)!: drop sunset chains Polygon zkEVM and Dogechain - #33

Open
henrypalacios wants to merge 1 commit into
mainfrom
refactor/protocol-core-drop-dead-chains
Open

refactor(protocol-core)!: drop sunset chains Polygon zkEVM and Dogechain#33
henrypalacios wants to merge 1 commit into
mainfrom
refactor/protocol-core-drop-dead-chains

Conversation

@henrypalacios

Copy link
Copy Markdown
Collaborator

Summary

Remove the ZKEVM (1101) and DOGECHAIN (2000) chain configs from @quickswap-defi/protocol-core, taking the registry from 11 chains to 9.

Adds a registry test asserting that retired chain IDs stay unregistered, so a future re-registration fails the suite rather than shipping.

Why

The QuickSwap dapp no longer supports either chain, so the package should not advertise them as supported. A registry that lists a chain the product does not serve is a source of wrong answers for every consumer that derives behaviour from it.

Breaking change

This removes public exports from a published package. Consumers fall into three groups.

Breaks at compile time — the ZKEVM and DOGECHAIN config exports, and the CHAIN_ID.ZKEVM / CHAIN_ID.DOGECHAIN entries.

Loud at runtime, for chain IDs 1101 and 2000:

  • getChainOrThrow() throws Unsupported chain: <id>

Silent at runtime — no throw, no compile error. These are the call sites worth auditing:

Call Before After
getChain() ChainConfig undefined
getStablecoins() 3 tokens []
getStablecoinAddresses() 3 addresses []
isStablecoin() true for their USDC/USDT/DAI false
getNativeToken() TokenInfo undefined
getWrappedNative() TokenInfo undefined
getSupportedVersions() 2 versions []
CHAIN_REGISTRY[id] ChainConfig undefined
getSupportedChainIds() 11 entries 9 entries

getProtocolVersionLabel() is unaffected — it already produced the same label for both chains via its fallback.

The package version is deliberately unchanged here; the bump is chosen at publish time.

Test plan

  • pnpm --filter @quickswap-defi/protocol-core test
  • pnpm --filter @quickswap-defi/protocol-core build
  • pnpm --filter @quickswap-defi/protocol-core validate:addresses

Note for reviewers

#30 builds on this branch and should merge after it.

The QuickSwap dapp no longer supports Polygon zkEVM (1101) or Dogechain
(2000), so the registry should not advertise them as supported chains.
Remove both chain configs and every reference to them, taking the
registry from 11 chains to 9.

Add a registry test asserting that retired chain IDs stay unregistered.

BREAKING CHANGE: chain IDs 1101 (Polygon zkEVM) and 2000 (Dogechain) are
no longer part of the registry.

Removed exports: ZKEVM and DOGECHAIN, plus the CHAIN_ID.ZKEVM and
CHAIN_ID.DOGECHAIN entries. These break at compile time.

Loud at runtime for both chain IDs:
  - getChainOrThrow() throws "Unsupported chain: <id>"

Silent for both chain IDs — no throw, no compile error, so audit call
sites that pass a chain ID through:
  - getChain()                 -> undefined (was a ChainConfig)
  - getStablecoins()           -> [] (was 3 tokens)
  - getStablecoinAddresses()   -> [] (was 3 addresses)
  - isStablecoin()             -> false (was true for their USDC/USDT/DAI)
  - getNativeToken()           -> undefined (was a TokenInfo)
  - getWrappedNative()         -> undefined (was a TokenInfo)
  - getSupportedVersions()     -> [] (was 2 versions)
  - CHAIN_REGISTRY[id]         -> undefined
  - getSupportedChainIds()     -> 9 entries, previously 11

getProtocolVersionLabel() is unaffected: it already fell back to the
same label it produced for these two chains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant