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

484
Views
Web3: fondos insuficientes para gas * precio + valor

Estoy tratando de transferir un token erc-721 entre diferentes billeteras. Ambos están conectados a la red ropsten y deberían tener fondos suficientes (0,08 y 0,1 eth) para realizar una transacción. Sin embargo, todavía recibo un error que dice que

Algo salió mal al enviar su transacción: Error: Error devuelto: fondos insuficientes para gas * precio + valor

Miré las otras preguntas con respecto a esto, pero no encontré mucho útil.

Código:

 async function transfer(token, tokenId) { const contract = new web3.eth.Contract(abi, token); try { const tx = { from: publicKey, to: token, gas: 30000, value: 0, chain: "rinkeby", baseChain: "rinkeby", hardfork: "berlin", data: contract.methods .transferFrom(publicKey, toAddress, tokenId) .encodeABI(), }; const signed = await web3.eth.accounts.signTransaction(tx, privateKey); const hash = await sendTx(signed);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

intente especificar el precio del gas que desea usar también,

me gusta,

 'gasPrice': web3.toWei('5','gwei')

tu codigo:

 async function transfer(token, tokenId) { const contract = new web3.eth.Contract(abi, token); try { const tx = { from: publicKey, to: token, gas: 30000, gasPrice: web3.toWei('5','gwei'), value: 0, chain: "rinkeby", baseChain: "rinkeby", hardfork: "berlin", data: contract.methods .transferFrom(publicKey, toAddress, tokenId) .encodeABI(), }; const signed = await web3.eth.accounts.signTransaction(tx, privateKey); const hash = await sendTx(signed);

por supuesto, necesitaría ajustar el precio del gas de acuerdo con la red

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!