ENSIP-11: EVM compatible Chain Address Resolution
Introduces coinType for EVM compatible chains (amending ENSIP9).
Last updated
Introduces coinType for EVM compatible chains (amending ENSIP9).
Last updated
Author
Makoto Inoue <makoto@ens.domains>
Status
Draft
Submitted
2022-01-13
This ENSIP extends , dedicates a range of coin types for EVM compatible chains, and specifies a way to derive EVM chain IDs to the designated coin types.
The dedicated range uses over 0x80000000 (2147483648) which is reserved under ENSIP 9 so there will be no possibility of coin type collision with other non EVM coin types to be added in future. However, some of coin types previously allocated to EVM chain ides will be deprecated.
The existing ENSIP 9 relies on the existence of coin types on which was designed to define address encoding type for deterministic wallets. As the majority of EVM compatible chains inherit the same encoding type as Ethereum, it is redundant to keep requesting the addition of EVM compatible chains into SLIP 44. This specification standardises a way to derive coinType based on .
This specification amends ENSIP 9 to specify that coin types with the most-significant bit set are to be treated as EVM chain IDs. The MSB is reserved in SLIP44 for other purposes relating to HD wallet key derivation, so no coin types exist in this range.
To compute the new coin type for EVM chains, bitwise-OR the chain ID with 0x80000000
: 0x80000000 | chainId
.
And to reverse the operation, bitwise-AND the cointType with 0x7fffffff
: 0x7fffffff & coinType
.
To compute the new coin type for EVM chains, call convertEVMChainIdToCoinType(chainId)
You can also use existing functions formatsByName and formatsByCoinType to derive these chain IDs
The following EVM chains are the exception to this standard.
AVAX = AVAX has multiple chain address formats, and only c chain is EVM compatible
RSK = RSK has its own additional validation
They will continue using coinType defined at SLIP44
The following EVM compatible cointypes existed before introducing this new standard.
NRG
POA
TT
CELO
CLO
TOMO
EWT
THETA
GO
FTM
XDAI
ETC
When you display them for backward compatibility purposes, append _LEGACY
to the cointype and make them read only.
An implementation of this interface is provided in the repository.
Copyright and related rights waived via .