Logo

dev-resources.site

for different kinds of informations.

Fix : TokenService Error: ChainId 0x539 is not supported :(

Published at
4/20/2023
Categories
hardhat
metamask
blockchain
web3
Author
rohitroy
Categories
4 categories in total
hardhat
open
metamask
open
blockchain
open
web3
open
Author
8 person written this
rohitroy
open
Fix : TokenService Error: ChainId 0x539 is not supported :(

I wrote a smart contract to mint some custom tokens using Solidity over Hardhat (Localhost) development environment. The contract compiled successfully but while importing the new minted tokens in my Metamask wallet I got this error message.

Metamask error image !

I figured out the problem, which was causing the error. The new update for Metamask was not accepting the old RPC for Hardhat(Localhost) = [ http://localhost:8545/ ] and Chain ID = 1337 as shown below >

Metamask error image !

Error fix :

Go to Metamask > Settings > Networks > Press "Add a network" button > Add these details as shown below >

Network name > Hardhat
New RPC URL > http://127.0.0.1:8545/
Chain ID > 31337 [ Reference Document ]
Currency symbol > HHETH [ Give any symbol you want ! ]
Block explorer URL > [ Optional, so I skipped ! ]

New network setup !

Click on save.

Now open your "hardhat.config.js" in your code editor and update the chainID and network-name according to this snapshot shown below >

hardhat.config.js

Save the "hardhat.config.js" file.

Re-run npx hardhat node in a separate terminal and then run npx hardhat run scripts/deploy.js --network hardhat > shift your Metamask network to the newly created network : Hardhat as shown below >

Network change !

Now Import Tokens again and you'll see the tokens minted on your wallet.

Happy building :)

hardhat Article's
30 articles in total
Favicon
How to deploy smart contracts using Foundry
Favicon
Node modules confusion??
Favicon
Simple Smart Contract and Hardhat
Favicon
Building Mystic Vault: A Step-by-Step Guide to Creating a Simple Ethereum DApp from Scratch 🔮✨ ( 30 min )
Favicon
Building a Blockchain-Based Blog dApp with Hardhat: A Step-by-Step Guide
Favicon
Building a Decentralized Voting System with Solidity and Hardhat
Favicon
Ethereum Development: Foundry or Hardhat
Favicon
Full Stack Ethereum and Dapp Development. A comprehensive guide: 2024
Favicon
Roadmap to Blockchain Development: 2024
Favicon
A task vs a script in Hardhat
Favicon
Testing a solidity house-swap contract using HardHat and Typescript
Favicon
How to Change the Bytecode of an Already Deployed Smart Contract
Favicon
How to Fork Mainnet for Testing
Favicon
How to Add a New Pool to Uniswap V3
Favicon
Creating a house swap contract using Solidity and Hardhat
Favicon
Solution to the ConnectTimeoutError Encountered When Verifying Smart Contracts with Hardhat
Favicon
Verified Mainnet Polygon Contract
Favicon
Verify Your Smart Contract Code
Favicon
Programmatically Verifying Solidity Smart Contract Code with Hardhat
Favicon
Getting Started with Hardhat for Smart Contracts
Favicon
How Hardhat Simplifies Smart Contract Verification on Ethereum
Favicon
Hardhat vs Truffle: Which One Is the Best for Developing Ethereum dApps?
Favicon
Fix : TokenService Error: ChainId 0x539 is not supported :(
Favicon
How to mint tokens from the backend using Nest.js on Celo Alfajores network
Favicon
My first Solidity Smart Contract
Favicon
"Deploying a Blockchain Application Nextjs / Hardhat on Netlify: A Comprehensive Guide"
Favicon
How to convert Solidity JSON ABI to Human Readable ABI in Hardhat
Favicon
Optimize Your Gas Costs with eth-gas-reporter for Hardhat
Favicon
Introduction to EVM Smart Contract development
Favicon
Top Tools for Solidity Smart Contract Developers

Featured ones: