curvefi / curve-js

MIT License
63 stars 34 forks source link

ETH Mainnet swap fails with UNPREDICTABLE_GAS_LIMIT #71

Open zoranculum opened 2 years ago

zoranculum commented 2 years ago

I am using this SDK to initiate swaps. I used code according to your README.

Problem: I am using this code to initiate swap on ETH Mainnet. Here is the code. I was swaping ETH for USDC const { output } = await curve.router.getBestRouteAndOutput(tokenAAdress, tokenBAddress, '0.001'); const txHash = await curve.router.swap(tokenAAdress, tokenBAddress, tradeAmount);

Swaps however are working on Polygon. Issue: image

Macket commented 2 years ago

I will take a look, thanks