PatrickAlphaC/dao-template

Update of the TimeLockController openzeppelin contract

0xYoyo opened this issue · 3 comments

The constructor for this has changed and should be renounced in the TimeLock.sol contract after they added the "admin" to the constructor instead of the previous versions of this contract that would assign this admin to the deployer automatically

Here's how the updated version should look like:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/governance/TimelockController.sol";

contract TimeLock is TimelockController {
    constructor(
        uint256 minDelay, 
        address[] memory proposers, 
        address[] memory executors, 
        address admin
    ) TimelockController(minDelay, proposers, executors, admin) {}
}

After review I realized this should also be update in the 02-deploy-time-lock file to take 4 arguments instead of 3(add deployer as an admin)

You're using a newer version of the contracts. If you want to update this repo with the newer version of the contracts, that would be great.

Fixed