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

171
Vistas
Hardhat Ethers Address is not returning correct Value

I'm doing a hardhat test and using the addresses from the hardhat node I've up.

const provider = ethers.getDefaultProvider();
let owner_balance = await provider.getBalance(owner.address);
console.log(owner.address);
console.log(owner_balance.toString());
owner_balance = ethers.utils.formatEther(owner_balance);
console.log(owner_balance);

The balance is not the correct balance from what the node says the address has which is 10k eth. This is what is returning from the console.log and code above. https://gyazo.com/a94219ae7e39cf75bf9eb6a2df787b82

This is the node and the same address that shows 10k eth in it - https://gyazo.com/b1f88a8f482c254d333728fc19916f20

about 4 years ago · Juan Pablo Isaza
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