Help to encode data to use the Timelock

Hello!
I am currently trying to use a timelock to queue / execute transactions in a "masterchef" contract.
The thing is, using functions through a timelock is very different. I am asked for these parameters:

target = the address of the contract where the function is located
value = MATIC used on the transaction (currently 0)
signature = the function I want to execute
data = here is the issue. I dont know how to format the parameters of the function to byte32
eta = current block + delay

Example:

Trying to add a pool in (0x67acAa79F5F33496ac0e9C2D1876F8C3AdC28FeD)
with this timelock (0xfa6eA85eb982C9988653835C3CabB5C14ef6Cf75)

target = 0x67acAa79F5F33496ac0e9C2D1876F8C3AdC28FeD
value = 0
signature = add(uint256,address,uint16)
data = ??
eta = (Current block + 43200 + small number to have some spare time)

Can someone explain me how to get the parameters

_allocPoint = 35
_lpToken = 0x35a991d3D522dc5eE89Be334798CA2788DDf0fB9
_depositFeeBP = 400

in byte32 to make the transaction? Thanks!

Already tried https://abi.hashex.org , but the timelock just tells me the data is wrong

Hey Rafael! I'd suggest you check out the tests for the Timelock contract in the repository, they should help in understanding how to craft txs to be sent via the timelock:

This guide may also help:

A simpler alternative could be using Defender. We recently added support for Timelocks on Defender Admin. You can get a free individual account that works fine on Matic to run txs through a Timelock. Let us know if that works for you!