Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
This is entire contract for the ethernaut Telephone question. I created attack() function, but a youtuber suggests constructor(). Anyone knows why?
It's not important. A contracts constructor is ran at deployment time, so it would save one transaction (everything happens on deployment instead of you having to deploy then call the attack() function) but that's the only point.
Required, but never shown