How to interact with a smart contract MasterChef when the Owner is TimeLock?

Hello Community !

Ok so recently, i’ve set in New Owner of my contract Chef, the Timelock. But my question is, how can I interact with my first contract (I’m the owner of Timelock who are the owner of Masterchef)

Because, others platforms can interact with Chef and execute function, but how can I do the same thing ?

Thank you very much.


So what is your timelock contract?

1 Like

Hello Skyge how are you ?

You can see here:

It’s the same for my platform


Fine, thank you!

Generally speaking, there will be another contract Governance.sol, it can vote for proposals.
So for your timelock contract, I think it should be wait for some time -> queue() -> wait for some time -> execute(), but this all depends on your parameters.


0k sor for example, what I need to do here in Timelock:

If i want add a new pool in Masterchef:

Capture d’écran 2021-03-19 à 07.56.55

Hello mate
Did u find the solution of this problem? I also got stucked on same place

1 Like

I’m sorry I missed your message, just like I said above, generally speaking, there will be a Goverance.sol contract to control this TImelock.sol contract, but I think it is ok, you can interact with Timelock.sol contract directly.
But before you call executeTransaction(), you should call queueTransaction() at first, as for parameters, I think it should be

queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta)

target  ------->>> masterchef contract address
value  -------->>> 0(no eth transfer)
signature ---->>> "add(uint256,address,bool)"
data   -------->>>  web3.eth.abi.encodeParameters([uint256,address,bool],YOUR_PARA1,YOUR_PARA2,YOUR_PARA3)
eta  -------->>> `eta` should be greater than  `getBlockTimestamp().add(delay)`

Still little confused in this data argument. How do I get the data argument in bytes? DO I have to use js or any online compiler available for it?

1 Like

Maybe you can try this online tool, I never tried before.


I managed to convert the data to byte. queueTransaction() was also successful but got error on executeTransaction()


any idea about this error?

1 Like

I think maybe your parameters can not be executed in the target contract.

1 Like

You mean the data I input in parameters are wrong?

Emmmm, Yeah, I think so.

1 Like

5 posts were split to a new topic: Interact with MasterChef, through Timelock

I can input target, value, signature, data, but I don’t know how to find my eta
could you explain the eta field?
where to get it?


have the same error :frowning:

someone has a solution ?

Anyone has a solution for this? please I really need it