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:
const { BN, constants, expectEvent, expectRevert, time } = require('@openzeppelin/test-helpers');
const { ZERO_ADDRESS, ZERO_BYTES32 } = constants;
const { proposalStatesToBitMap } = require('../helpers/governance');
const { expect } = require('chai');
const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior');
const { expectRevertCustomError } = require('../helpers/customError');
const { OperationState } = require('../helpers/enums');
const TimelockController = artifacts.require('TimelockController');
const CallReceiverMock = artifacts.require('CallReceiverMock');
const Implementation2 = artifacts.require('Implementation2');
const ERC721 = artifacts.require('$ERC721');
const ERC1155 = artifacts.require('$ERC1155');
const TimelockReentrant = artifacts.require('$TimelockReentrant');
const MINDELAY = time.duration.days(1);
const salt = '0x025e7b0be353a74631ad648c667493c0e1cd31caa4cc2d3520fdc171ea0cc726'; // a random value
This file has been truncated. show original
This guide may also help:
Prerequisites
This tutorial assumes you have basic knowledge of solidity, hardhat, and understand the the tutorial from here OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat
This tutorial will use OZ’s Box.sol and BoxV2.sol for the upgrade with the TimeLock controlled by the Gnosis Safe MultiSig.
This tutorial requires a network API key. You can get one from Alchemy https://www.alchemyapi.io/ .
This tutorial uses Rinkeby’s test network, you can get test Ether from the faucet: https:…
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!