MultiversX Tracker is Live!

How do you get the return value or a call function in solidity?

Etherum Reddit

More / Etherum Reddit 155 Views

That sounds like a Uniswap function, if so you need to dig through their documentation or code to find how to obtain that value. You can't get it from the function to actually swap, unless you're ok with getting the value after the swap has happened.

Important to consider that, depending on what you are wanting this data for, there are severe risks involved, you could open yourself up to flash loan type attacks. IIRC Uniswap has a feature where you can obtain a weighted average price instead of the current live price, which is designed to mitigate these risks, might want to look into and consider it.


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments