refactor(protocol-core)!: drop sunset chains Polygon zkEVM and Dogechain - #33
Open
henrypalacios wants to merge 1 commit into
Open
refactor(protocol-core)!: drop sunset chains Polygon zkEVM and Dogechain#33henrypalacios wants to merge 1 commit into
henrypalacios wants to merge 1 commit into
Conversation
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.
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
Remove the
ZKEVM(1101) andDOGECHAIN(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
ZKEVMandDOGECHAINconfig exports, and theCHAIN_ID.ZKEVM/CHAIN_ID.DOGECHAINentries.Loud at runtime, for chain IDs 1101 and 2000:
getChainOrThrow()throwsUnsupported chain: <id>Silent at runtime — no throw, no compile error. These are the call sites worth auditing:
getChain()ChainConfigundefinedgetStablecoins()[]getStablecoinAddresses()[]isStablecoin()truefor their USDC/USDT/DAIfalsegetNativeToken()TokenInfoundefinedgetWrappedNative()TokenInfoundefinedgetSupportedVersions()[]CHAIN_REGISTRY[id]ChainConfigundefinedgetSupportedChainIds()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 testpnpm --filter @quickswap-defi/protocol-core buildpnpm --filter @quickswap-defi/protocol-core validate:addressesNote for reviewers
#30 builds on this branch and should merge after it.