Governance contract or Timelock contract.... Which comes first?

So... I'm setting up some governance examples and I think it's important to show how to do it with a TimelockController. It seems clear to me that I need to deploy a timelockcontroller contract first, since one of the constructor parameters for a governance contract is the GovernorTimelockControl, which needs a timelock.

However... For deploying a timelock contract I need an array of proposers. This is where the issue comes in:

According to the docs:

The proposers are in charge of scheduling (and cancelling) operations. This is a critical role, that should be given to governing entities. This could be an EOA, a multisig, or a DAO.

How does it make sense that the proposer has to be the DAO? How can I deploy the timelock contract before I deploy the governor contract, if they depend on each other?

Should I just leave them as blanks and just add the governor contract to the list of proposers later?

Thanks again for these tools

1 Like

TimelockController uses an AccessControl setup that we need to understand in order to set up roles. The Proposer role is in charge of queueing operations: this is the role the Governor instance should be granted, and it should likely be the only proposer in the system. The Executor role is in charge of executing already available operations: we can assign this role to the special zero address to allow anyone to execute (if operations can be particularly time sensitive, the Governor should be made Executor instead). Lastly, there is the Admin role, which can grant and revoke the two previous roles: this is a very sensitive role that will be granted automatically to both deployer and timelock itself, but should be renounced by the deployer after setup.

Just found this on another tutorial. :man_facepalming:

Was scratching my head for about an hour. Cool to see I was thinking about it right.

Sharing here as well for visibility:

1 Like

I should have went there first, thanks!