Hey guys, I'm new to solidity but have a question that google has failed me for (tons of results, not many good answers lol), wondering if anyone here has a tip
I'm trying to create a basic contract that I can send tokens to the contract. The error I'm getting is "transfer amount exceeds allowance" which fires when it tries the transferFrom method..
Its my understanding that the approve method handles the allowance so I'm not too sure why I'm getting the error but I basically have 2 functions for the following:
1. tokenToDeposit.approve(msg.sender, amount);
2. tokenToDeposit.transferFrom(msg.sender, address(this), amount);
In the above case, amount is the same for both functions
Anyone have any recommendations of what I should look into to get to the bottom of this error? It's driving me nuts lol
Jun 4, 2021, 3:53 AM