58714 sc low pending admin cannot accept ownership in alchemistcurator sol
Previous58796 sc low incorrect balance snapshot in deallocate causes wethredeemed always 0Next58575 sc low operator limit bypass
Was this helpful?
Was this helpful?
Was this helpful?
modifier onlyAdmin() {
require(msg.sender == admin, "PD");
_;
} function testAdminChangeVuln() public{
// Current admin transfers ownership to new admin
vm.startPrank(admin);
address newAdmin = address(0xabc);
mytCuratorProxy.transferAdminOwnerShip(newAdmin);
vm.stopPrank();
// new Admin accepting new ownership privileges
vm.prank(newAdmin);
vm.expectRevert(); // This will revert because of the onlyAdmin modifier which is expecting the current admin to call rather than pending
mytCuratorProxy.acceptAdminOwnership();
}