You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In readme.md, the code: await routerContract.swapExactETHForTokensSupportingFeeOnTransferTokens( trade.minAmountConvertQuote, trade.routePath, to, deadline, trade.stable, { value: amountIn } )
should be await routerContract.swapExactETHForTokensSupportingFeeOnTransferTokens( ethers.utils.parseUnits(trade.minAmountConvertQuote, decimal), trade.routePath, to, deadline, trade.stable, { value: ethers.utils.parseUnits(amountIn, decimal) } )
Here decimal is the token's decimal value, eg: ether is 18, usdc is 6
If I was wrong, pls let me know
The text was updated successfully, but these errors were encountered:
In readme.md, the code:
await routerContract.swapExactETHForTokensSupportingFeeOnTransferTokens( trade.minAmountConvertQuote, trade.routePath, to, deadline, trade.stable, { value: amountIn } )
should be
await routerContract.swapExactETHForTokensSupportingFeeOnTransferTokens( ethers.utils.parseUnits(trade.minAmountConvertQuote, decimal), trade.routePath, to, deadline, trade.stable, { value: ethers.utils.parseUnits(amountIn, decimal) } )
Here decimal is the token's decimal value, eg: ether is 18, usdc is 6
If I was wrong, pls let me know
The text was updated successfully, but these errors were encountered: