I think I have my token and staking set up all right, but when trying to call the stakeLP function, I’m getting the error - ‘SafeERC20: low-level call failed’. Everything else is works seemingly okay.
Environment
I’m using Remix on Ropsten testnet. The LP is from Uniswap.
Details
I saw some other posts with a similar problem and most of them didn’t just have the tokens minted.
It is unclear to me if I have to generate the tokens beforehand and transfer them to token or staking contract address? Either way, I tried that.
Tried it, still getting the same error. Probably doing something wrong. When approving and calling the staking function, do I have to type the amount with 18 zeroes? I currently have 77 uni-v2 tokens
Yes thank you, I got it working, but only with small amounts. When trying to do the same with all of the LP tokens, I get the same error. If I have 77 uni tokens, the amount should be 77 with 18 zeroes, no? Or could I approve the max amount somehow?
One more slightly unrelated question. I’m doing this for a school project and I’d need the interface to look decent. Is there a some kind source code or a preset for a front end staking interface? I’ve seen many of them look really similar, but haven’t really found what they’re based on