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

124
Views
Hacer un retiro de Aave causa "transacción de error revertida"

Tengo un ejemplo en ejecución que deposita el token Aave en Aave. Estoy usando los ejemplos de Code Contracts proporcionados por Aave v2 github

 // Fork Kovan await hre.network.provider.request({ method: 'hardhat_reset', params: [{ forking: { jsonRpcUrl: KOVAN_JSON_RPC } }], }); // Act like AAVE_HOLDER await hre.network.provider.request({ method: 'hardhat_impersonateAccount', params: [AAVE_HOLDER], }); const signer = await hre.ethers.getSigner(AAVE_HOLDER); console.log('signer:', signer.address); // AAVE token on Kovan network const aavetoken = IERC20__factory.connect(AAVE_TOKEN_ADDRESS, signer); console.log('token balance:', (await aavetoken.balanceOf(signer.address)).toString()); const MyV2CreditDelegation = new MyV2CreditDelegation__factory(signer); const delegation = await MyV2CreditDelegation.deploy({ gasLimit: 1e7 }); console.log('delegation:', delegation.address); // Set the allowance higher than the deposit amount // so we know we can make multiple transactions let allowance = 100000 let despositAmount = 10; await aavetoken.approve(delegation.address, allowance); console.log('allowance:', (await aavetoken.allowance(signer.address, delegation.address, { gasLimit: 1e6 })).toString()); const depositTrans = await delegation.depositCollateral(aavetoken.address, despositAmount, true, { gasLimit: 1e6 }); console.log('depositTrans:', depositTrans.hash); const depositReceipt = await depositTrans.wait();

El depósito funciona bien, sin embargo, cuando intento retirar:

 try { var withdrawTrans = await delegation .withdrawCollateral(aavetoken.address, { gasLimit: 1e6 }) console.log('withdrawTrans:', withdrawTrans.hash); const withdrawReceipt = await withdrawTrans.wait(); } catch (err) { console.log('Error:' + err); }

me sale un error:

Transacción revertida: la función devolvió una cantidad inesperada de datos

Soy bastante nuevo en hardhat, ahora estoy seguro de cómo depurar esto más. ¿Cómo puedo retirarme de Aave?

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!