Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Update ENS registry addresses (MetaMask#7954)
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored and yqrashawn committed Feb 3, 2020
1 parent f23c43f commit 717b6ff
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/scripts/lib/ens-ipfs/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,22 @@ function hexValueIsEmpty (value) {
].includes(value)
}

/**
* Returns the registry address for the given chain ID
* @param {number} chainId the chain ID
* @returns {string|null} the registry address if known, null otherwise
*/
function getRegistryForChainId (chainId) {
switch (chainId) {
// mainnet
case 1:
return '0x314159265dd8dbb310642f98f50c066173c1259b'
// ropsten
// falls through
case 3:
return '0x112234455c3a32fd11230c42e7bccd4a84e02010'
// rinkeby
// falls through
case 4:
return '0xe7410170f87102df0055eb195163a03b7f2bff4a'
// goerli
// falls through
case 5:
return '0x112234455c3a32fd11230c42e7bccd4a84e02010'
// Mainnet, Ropsten, Rinkeby, and Goerli, respectively, use the same address
return '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
default:
return null
}
Expand Down

0 comments on commit 717b6ff

Please sign in to comment.