Hey I'm using uniswap v2's swapTokensForEth() function in my contract. I would like the amount of ETH that the contract gets from that to be send to an address, but I don't know how to define that amount. The Uniswap function doesn't seem to return this value, and if I just empty the entire ETH balance of the contract everytime this function is called I will run in to problems. Is there a way to know how much the uniswap router sends back to the contract after a swap? Any help much appreciated!

May 19, 2022, 11:30 AM

© 2024 Draquery.com All rights reserved.