Skip to content

Add Anubis chain support - #36

Merged
henrypalacios merged 4 commits into
QuickSwap:mainfrom
brianshattuck:main
Sep 18, 2026
Merged

henrypalacios merged 4 commits into
QuickSwap:mainfrom
brianshattuck:main

Conversation

@brianshattuck

@brianshattuck brianshattuck commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Add Anubis chain support

Anubis pays gas with the ERC-20 DAI and has no wrapped native token, so WETH has no entry for it. Read it through wrappedNative(chainId).

flowchart LR
  A[Native currency] --> B{Wrapped token on this chain?}
  B -- yes --> C[wrappedNative returns it]
  B -- "no (Anubis)" --> D[fails with WRAPPED_NATIVE]
Loading

Breaking: WETH[chainId] is now Token | undefined.

brianshattuck and others added 4 commits September 17, 2026 00:53
Anubis pays gas with the ERC-20 DAI and has no wrapped-native contract,
so the WETH map cannot have an entry for it. Adding the chain id without
one broke the DTS build because the map was inferred as exhaustive.

- Type WETH as a partial record and resolve it through wrappedNative(),
  which fails fast instead of yielding a phantom token
- Register DAI as the chain's native currency
- Keep the V2 factory entry as a placeholder like other V4-only chains
@henrypalacios

henrypalacios commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

@brianshattuck I pushed one commit on top of yours (2ab664a). It removes the Anubis entry from WETH and applies the approach from my review: WETH is a partial map and wrappedNative(chainId) fails with WRAPPED_NATIVE when a chain has no wrapped token.

Anubis has no wrapped token, so the SDK should say so. With an entry in the map, consumers would offer a wrap step on that chain.

This changes the public type of WETH, so it goes out as a major version.

@henrypalacios
henrypalacios merged commit ecf209f into QuickSwap:main Sep 18, 2026
2 checks passed
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.

2 participants