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

102
Views
¿La función addLiquidity () falla en UniswapV2 en la instancia de ganache local?

La función addLiquidity () se revierte sin ningún motivo en la instancia de desarrollo local de ganache, ¿alguna idea de por qué podría estar sucediendo esto?

Algunos antecedentes:

  • He bifurcado UniswapV2Factory y UniswapV2Router02 y los he implementado en ganache.
  • Creé 2 tokens ERC20 y creé un par (a través de factory.createPair()) para ellos.
  • Acuñó ambos tokens ERC20 a mi dirección.
  • He aprobado montos de token para la dirección del contrato del enrutador (a través de la función erc20.approve())

Así es como llamo a la función addLiquidity

 const blockNumber = await web3.eth.getBlockNumber(); const block = await web3.eth.getBlock(blockNumber); const timestamp = block.timestamp + 300; await router.addLiquidity( ERC20_TOKEN_1_ADDRESS, ERC20_TOKEN_2_ADDRESS, web3.utils.toWei('1', 'ether'), web3.utils.toWei('1', 'ether'), web3.utils.toWei('0.001', 'ether'), web3.utils.toWei('0.001', 'ether'), OWNER_ADDRESS, timestamp, { gas: 4000000 } )
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!