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

269
Views
¿Cómo podemos convertir una dirección Ethereum (cadena) al tipo de dirección de Solidity en Javascript para pasarla a una función de contrato como argumento?

Tengo una función en un contrato inteligente de Solidity como esta:

 function mint (address _recipient, string _name) public onlyOwner { uint256 newItemId = _tokenIds.current(); _safemint(_recipient, newItemId); // etc }

Trato de pasar desde el front-end

 import { ethers } from "ethers"; let tmpdata = ethers.utils.getAddress("0x6f...etc"); // let nftTxn = await connectedContract.mintNFT(tmpdata, "some string"); await nftTxn.wait();

Copio y pego las direcciones para asegurarme de que sean correctas, pero esto arroja un error cada vez. Y creo que no funciona porque necesitaríamos un tipo de dirección como primer argumento, ¿no? No puedo averiguar cómo lograr eso, ¿alguien puede ayudarme y señalarme en la dirección correcta aquí?

la consola me da

datos: "0x08c379a00000000000000 ...... etc" mensaje: "ejecución revertida: ERC721: menta a dirección cero

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