I'm using Nextjs.

on sample.jsx

  console.log(address)// 0xd56A6DB7d844722627473C07f840c2604E622161

  console.log(typeof(address)) // string

 const ethers = require('ethers')
 let url = "https://sample.net:8293";
 let provider = new ethers.providers.JsonRpcProvider(url);
    let balance = await provider.getBalance(address)

Error: invalid address or ENS name (argument="name", value=undefined, code=INVALID_ARGUMENT, version=providers/5.7.2)


  • I am having the same issue! Nov 19, 2022 at 10:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.