mirror of
https://github.com/logos-messaging/logos-messaging-rlnv2-contract.git
synced 2026-01-04 15:03:09 +00:00
fix: delete MaliciousImplementation
This commit is contained in:
parent
aefc0ed5a8
commit
7c8d2d7b89
@ -68,24 +68,6 @@ contract NonUUPSContract {
|
||||
|
||||
}
|
||||
|
||||
// Malicious implementation for testing upgrade risks
|
||||
// This overrides _authorizeUpgrade to allow anyone (public) and adds a drain function to steal tokens
|
||||
contract MaliciousImplementation is UUPSUpgradeable, OwnableUpgradeable {
|
||||
// Drain all balance of a token to caller (malicious)
|
||||
function drainTokens(address token) external {
|
||||
IERC20(token).transfer(msg.sender, IERC20(token).balanceOf(address(this)));
|
||||
}
|
||||
|
||||
// Override to allow anyone to upgrade (bypassing onlyOwner)
|
||||
function _authorizeUpgrade(address newImplementation) internal override { }
|
||||
|
||||
// Placeholder initializer to match layout (but malicious could ignore)
|
||||
function initialize() public initializer {
|
||||
__Ownable_init();
|
||||
__UUPSUpgradeable_init();
|
||||
}
|
||||
}
|
||||
|
||||
contract WakuRlnV2Test is Test {
|
||||
WakuRlnV2 internal w;
|
||||
TestStableToken internal token;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user