-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Description
Problem
Currently, the chain URL parameter only accepts chain slugs (e.g., ?chain=base, ?chain=ethereum). This requires users and integrators to know the specific slug for each chain, which can vary between applications.
For example, this works:
https://app.uniswap.org/swap?chain=base
But this doesn't:
https://app.uniswap.org/swap?chain=8453
Proposed Solution
Accept numeric chain IDs as an alternative to chain slugs in the chain URL parameter. The parser could check if the value is numeric and resolve it to the appropriate chain, falling back to slug matching for non-numeric values.
This would allow both formats:
?chain=base(existing behavior)?chain=8453(proposed addition)
Use Case
- Deep linking: Other apps and wallets often work with chain IDs natively, making it easier to construct URLs programmatically
- Consistency: Chain IDs are standardized (EIP-155), while slugs can differ between applications
- Developer experience: Reduces the need to maintain a mapping table when integrating with Uniswap
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels