What are the conditions that needs to be met for the masterchef contract to start minting tokens

We forked the pancakeswap farming contract and after deployment, the masterchef doesn’t mint tokens when the updatepool() function is called. We can’t figure out what we’re doing wrong.
Is it mandatory to make the time lock contract owner of masterchef

Hi Welcome to Open Zeppelin @devunanya !

Please post your full code here by linking the contract address.

Is it mandatory to make the time lock contract owner of masterchef

Generally the Time Lock is going to have ownership of something to safeguard it, but I’m not sure this is relevant if your updatepool isn’t working.

Are you sure you are passing the right _pid to it?

Thank you for your reply Tsushima
Here is the bscscan link https://testnet.bscscan.com/address/0x22c84fa682693fb28b8b4926976281aad938ad5f#code
on testnet

Pasting the entire code here might be overwhelming.

Looking through the code and doing a compare, it appears there are significant changes to the MasterChef contract at https://github.com/sushiswap/sushiswap/blob/master/contracts/MasterChef.sol

I would copy the original, get that working, then start adding your custom functionality one piece at at time.

Oh Yeah! The changes. Like I mentioned above, what we have is a fork of pantherswap who actually forked pancakeswap.

I see, you may want to ask with their dev team and see how it works there.

It probably doesn’t work because of a change in the code somewhere. It would take sometime to figure out where, the best way is to just do debugging.

Just step through the code, and figure out which part is going wrong in your test environment.