Level 2 - Fallout ⏺
Level Setup
Level Contract
Exploit
The contract uses an old method of defining the constructor by (attempting) to set it as the same name as the contract. In this instance, they made a mistake and there's a typo on the "constructor" which means it's different from the contract name, and therefore wasn't run on contract creation and can be run by anyone.
Call the function either using an interface or a
.callwith the function signature.
Unexpected error with integration github-files: Integration is not installed on this space
Submit instance... 🥳
Completion Message
Notes
This exploit occurred because before Solidity
v0.5.0it was not mandatory to name the constructorconstructor. This was updated with a breaking change in thev0.5.0release.Even though this contract uses
v0.6.0this mistake still happened.Exploited contract: https://etherscan.io/address/0xe82719202e5965Cf5D9B6673B7503a3b92DE20be
Last updated