Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
How to Make a Custom Chain Connect Button With Ethers.js

I want to make a connect to custom network like that at the bottom of arbiscan.io

How would I do this using ethers.js framework?

Clicking the button should add arbitrum network to user's Metamask.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you should use ethereum library:

async function changeNetwork(){
await ethereum.request({ method: 'wallet_addEthereumChain',
   params:[
      {chainId: "IN_HEXADECIMAL_FORM",
      chainName: "CHAIN_NAME",
      nativeCurrency: {
         name: "NATIVE_CURRENCY_NAME",
         symbol: "NATIVE_CURRENCY_SYMBOL",
         decimals: NATIVE_CURRENCY_DECIMALS //In number form
      },
      rpcUrls: ["BLOCKcHAIN_RPC_URL"],
      blockExplorerUrls?: ["BLOCKCHAIN_EXPLORER"]
   ]});
}

for more info see this document

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda