You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Vault contract has a public boolean locked which indicates whether the contract can accept ether or not. Using unlock will change its value to false allowing future transactions. However, if an owner of Vault wants to lock it once again, there is no functionality that allows it.
Impact:
There is no way owner lock its Vault contract again.
Solution:
Create a new event Locked(address owner) and a new function which can lock a Vault again
function lock() external onlyOwner {
locked =true;
emitLocked(msg.sender);
}
The text was updated successfully, but these errors were encountered:
ghost
changed the title
deth_ctf - Vault cannot be locked again
deth_ctf - Vault cannot be locked again by its owner
Aug 12, 2024
Description of the Bug:
A
Vault
contract has a public booleanlocked
which indicates whether the contract can accept ether or not. Usingunlock
will change its value tofalse
allowing future transactions. However, if an owner ofVault
wants to lock it once again, there is no functionality that allows it.Impact:
There is no way owner lock its
Vault
contract again.Solution:
Create a new
event Locked(address owner)
and a new function which can lock aVault
againThe text was updated successfully, but these errors were encountered: