In the Timelock contract, the changeAdmin function is currently set to public, and it uses the onlyTimelock modifier to ensure that only the contract itself can call this function. I believe it would be more appropriate to set the changeAdmin function to private.
/**
* @dev 改变管理员地址,调用者必须是Timelock合约。
*/
function changeAdmin(address newAdmin) public onlyTimelock {
admin = newAdmin;
emit NewAdmin(newAdmin);
}
Description
In the Timelock contract, the changeAdmin function is currently set to public, and it uses the onlyTimelock modifier to ensure that only the contract itself can call this function. I believe it would be more appropriate to set the changeAdmin function to private.
Are you willing to submit a PR?(你愿意提交PR吗?)