MetaMask / specifications

Specifications that we're riffing on and want to keep secret.
3 stars 3 forks source link

Support for ENS Multicoin when connected to other EVM chain #11

Open makoto opened 1 year ago

makoto commented 1 year ago

Currently, the ENS name is resolvable only when Metamask is connected to Ethereum Mainnet.

However, ENS has support for multicoin types (eg: Bitcoin) since 2019 and we recently extended to support any EVM chains.

The proposed flow is.

  1. If it's currently connected to ChainId 1, get the address record with coinType 60 (ETH) (eg: resolver.getAddr(namehash, 60)
  2. If not connected to ChainId1, then resolve against Mainnet but with the equivalent coinType.

For example, the coinType of Polgyon (ChainID 137) is 2147483785 hence resolver.getAddr(namehash, 2147483785)

The draft implementation is at https://github.com/MetaMask/metamask-extension/pull/18035 and I would like to get feedback before turning this into production-ready PR.

mirceanis commented 1 week ago

This is fixed in the extension by https://github.com/MetaMask/metamask-extension/pull/26242