Commit 3caad8b
committed
Validate network supports ENS before resolution attempt
ENS resolution was attempted on any network including BSC and opBNB,
where the ENS registry contract does not exist. This caused cryptic
contract call errors instead of a clear message.
- Added network allowlist check before ENS resolution
- Supports Ethereum mainnet, Sepolia, and Goerli by name or chain ID
- Returns clear error message when ENS is used on unsupported networks1 parent c208ef9 commit 3caad8b
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
0 commit comments