Weapons remain assigned if a member leaves leading to a contract holding inappropriate state.
The function Laundrette::quitTheGang
does not set to 0 the assigned weapons to the left member which are held in WeaponShelf::bank
.
This leads to having a state in which there are assigned weapons to a member that left.
The contract WeaponShelf
is meant to hold weapons only to users that are in the gang and not resetting the assigned weapons to 0 leads to breaking this functionality.
Contract holds wrong state - assigned weapons of members that already left. Leaving weapons to past members might be dangerous.
Manual Review
Reset to zero the weapons assigned to the member that left in Laundrette::quitTheGang
.
Add the following method to LaundretteTest
:
Run this command: forge test --mt test_memberLeavesButWeaponsRemainsAssigned
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.