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

222
Views
Why am I getting 0x from provider.getCode?

I've deployed my contract on the correct network (rinkeby) as seen here. I've also connected my wallet address to the dApp selecting the correct network. I have run npx hardhat compile to update my contract artifact. However, when I try to run provider.getCode(contractAddress), it returns with 0x, and I can't figure out why.

const contractAddress = '0x1Fc7Fe607BA2481Ff492814C27943dEdB8cBA0cE'
const provider = await web3Modal.connect()
const web3Provider = new ethers.providers.Web3Provider(provider)
console.log(await web3Provider.getCode(contractAddress)) // returns 0x
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Because it is address, the address will return 0x, it is also possible that your node is wrong and not on the right chain . Because the address I saw on the Goerli testnet is the contract, and the link you provided is the Rinkeby testnet. :)

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!