DAOs Lesson 6 - when executing, the address executing is different to the timelock address #3252
Answered
by
EngrPips
0xkieranwilliams
asked this question in
Q&A
-
Hey, any help on this would be greatly appreciated. Test setup function: function setUp() public {
govToken = new GovToken(address(this));
govToken.mint(USER, INITIAL_SUPPLY);
vm.startPrank(USER);
govToken.delegate(USER);
require(govToken.getVotes(USER) > 0, "User has no voting power");
timelock = new TimeLock(MIN_DELAY, proposers, executors);
governor = new MyGovernor(govToken, timelock);
console.log("timelock", governor.timelock());
bytes32 proposerRole = timelock.PROPOSER_ROLE();
bytes32 executorRole = timelock.EXECUTOR_ROLE();
bytes32 adminRole = timelock.DEFAULT_ADMIN_ROLE();
timelock.grantRole(proposerRole, address(governor));
timelock.grantRole(executorRole, address(0));
timelock.revokeRole(adminRole, USER);
vm.stopPrank();
box = new Box();
box.transferOwnership(address(timelock));
} it appears to fail when running this line in my test: governor.execute(targets, values, calldatas, descriptionHash);
Error and Logs:The error I am getting along with my logs is as follows. Any idea on why my Box contract is being called by an address different to the timelock (the address that box ownership has been transferred to)?
|
Beta Was this translation helpful? Give feedback.
Answered by
EngrPips
Jan 14, 2025
Replies: 1 comment 5 replies
-
Hello @0xkieranwilliams, Run with |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @0xkieranwilliams , inside of your
Box.sol
contract you applied onlyOwner to thereadNumber
function, Please remove it then runforge clean
then delete your cache folder if you have any then rerun your process.