I want to use the openzeppelin timelock controller contract in a way that it calls the functions of other deployed contracts at some time. The thing can be done with the openzeppelin timelock controller smart contract.

The TimelockController contract contains a function that I think would do my work.

function schedule(
        address target,
        uint256 value,
        bytes calldata data,
        bytes32 predecessor,
        bytes32 salt,
        uint256 delay
    ) public virtual onlyRole(PROPOSER_ROLE) {
        bytes32 id = hashOperation(target, value, data, predecessor, salt);
        _schedule(id, delay);
        emit CallScheduled(id, 0, target, value, data, predecessor, delay);

I need to understand a few things,

The contract says

The proposer (resp executor) role
 * is in charge of proposing (resp executing) operations.

So, should I also set the prosper and executor(I think they are already implemented in TimelockController.sol)

second, the parameters of schedule()... what will be the value, data, predecessor, salt, delay...

Can anyone please help? There are no guides regarding this library and documentation is not helping much.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.