anyone know how to add liquidity to a pair created in a mainnet fork on Ethers and Hardhat?

Sep 29, 2022, 6:09 PM
fork from where
Sep 29, 2022, 6:23 PM
There is functions in router contract called addLiquidity and addLiquidityEth
Sep 29, 2022, 6:27 PM
Tried them, getting underflow errors. It a basic token/eth pair. Signer has both of them
Sep 29, 2022, 6:58 PM
you can try force the transaction, and debug it. Perhaps try replicate it on a testnet
Sep 29, 2022, 7:00 PM
He is using hardhat - local dev chain
Sep 29, 2022, 7:15 PM
i wouldn't use that to debug a transaction
Sep 29, 2022, 7:17 PM
sounds like a numerical error, have you checked that the types / units / decimals are all correct?
Sep 29, 2022, 7:17 PM
i think its possible to import it into tenderly, then debug the tx, thats how i would do it. Find out where the tx fails exactly.
Sep 29, 2022, 7:20 PM
if you're on hardhat then the console.log contracts are a lifesaver
or remix debugger but debuggers are midcurve imo
Sep 29, 2022, 7:21 PM
tenderly is underrated, debugger there is like god mode
remix debugger is useless
Sep 29, 2022, 7:26 PM

© 2024 Draquery.com All rights reserved.