Execution reverted: ERC20: transfer amount exceeds balance

i know that many people already opened a topic about this, but i cant find the problem.
I want to initialize a dummy token, but i still get this error: execution reverted: ERC20: transfer amount exceeds balance.
This is the function that i want to use, i already approved everything and i minted 100 dummy tokens to my wallet(0x6301Ce2771c4E61AdD2C12eD8A2faDd3817CBB0f) cause the function requires that the balance of msg.sender is not 0.

Dummy token address: 0xDb273C604DE8cE5239a921927352868a12c1a8b7

failed transaction hash: 0x8a541624e11cc1e1d1b36b26d9b99c946e4707cbac56ebd0c7fa0ffc4c174d17

Everything was deployed on the avalanche fuji testnet, i would be realllllyy happy if someone could help me solve this problem, i know that this problem is easily solved but i just cant find it....

Hi, welcome to the community! :wave:

I think the error located in the function MASTER_CHEF.deposit(), and the MASTER_CHEF contract does not been verified, so I am not sure what is wrong.

Hey, ive verified the masterchefv2 and masterchef contract(0x1f19a4968C0A0Fc87361dc6267493cF3B0cD9709, 0x8B64ba7f4D4ae8A5d8aC19130095f1aE47266178).
I looked into the MASTER_CHEF.deposit() and still couldnt find the problem.

Do you have another idea, which could solve this problem i am still stuck at it...

I think you deposited DUMMY token to your contracts, and when you try to call init, it will call deposit(uint256 _pid, uint256 _amount), pid is 0, so the lp token seems like SMAY, and I do not think there is such a token in your contract, so when it tries to call pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);, the error comes.

omg, how could i oversee this, thank you sooo much for the help, i really appreciate it!
have a great day!

1 Like