contractV2
contractV2 copied to clipboard
Calc amount in/out
Hi, How can I calculate in a contract the amount of Token 1, how much do I need to give to get 1000 Tokens 2 ? For example, I want to buy in the pool WETH/USDC - 3 WETH, how can I calculate the exact amount USDC that I need to pay? I looked through DODO v2 contracts and didn't find such a function... UniswapV2 has functions getAmountIn and getAmountOut for this, perhaps DODO v2 has similar functions?