2

I’m doing yield farming on a smart contract and I try to find out the total amount of my deposits. I know that I can follow the ERC20 tx on etherscan, but I would like to find an easier way. Under contract tab I found getBalanceOf function. The result is the following:

uint256 [ balanceOf(address) method Response ] uint256 : 988588442198945

I thought it’s wei, but after conversion it’s 0.0009 ether. I deposited way more so the function or the conversion doesn’t work as expected or the amount is not in wei.

What’s the best way to retrieve the deposits to a smart contract?

1 Answer 1

1

Hey im gonna answer this because it took me so long to realize how to do it.

You need the PID of the LP Pool

Then you need to go to the main staking contract of UNISWAP. There you have a function called userInfo which needs two inputs. The first is the id of the LP pool, the second your wallet, Ualá , there you have the staked tokens (you need to convert it )

Cheers,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.