No way to deposit on Masterchef, caller is not the owner

Hi. I'm familiarizing myself with Sushiswap, with remix, on Goerli testnet.
I created a Masterchef, a SLP token with 2 other ERC20 tokens inside.
I added this SLP as a new pool on Masterchef. I deposited SLP token on this staking pool.

All of that with the Masterchef's owner address.

But when I try to deposit on this pool with another address (obviously having some SLP as well), I get a "Caller is not the Owner" error.

Nothing in the doc nor in the code seems to require to be owner to call this function... I do not understand what is happening.

Obviously, I already approved SLP for transferring on Masterchef.

Here is the error...

Here is the Masterchef code :

Thank to anyone coud help me.

I’m not behind a pc so I can’t check, however the deposit function calls updatepool function which in turn call the function which requires the msg sender to be the owner.
I’m assuming the msg sender of that transaction is not the owner of the sushi token defined in the constructor

And you are right !!!
I tried to deploy another sushi with Masterchef's address as owner and it worked like a charm !

Thank you bro !

1 Like