Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!