Ethernaut lvl.2 (Fal1out) requires update

The version is 0.6.0 in the example.

(upload://yngC0PnXdNhF97O9pT2AeDaH4M4.png)

When I loaded it into remix, I got this error

(upload://zo4LTMQhlaA7F4dJvxiPVItdMZF.png)

Oops, looks like the link is no longer working. When I replace it with the updated one via this link:
// import ‘@openzeppelin/contracts/math/SafeMath.sol’;
import “@openzeppelin/contracts/utils/math/SafeMath.sol”;

I get the new error:
(upload://eCX98wWAbcL83xmJuEkceF78Un3.png)

But when I use the latest compiler version, I get a host of new errors:

Ughh… This is frustrating. I understand how to pass this level after reading a guide:

However, I would love to have been able to solve this myself, not to mention since using remix was in the hint! Any ideas how to fix this? I would fix it myself if I knew how. The backwards compatibility issue throws don’t make any sense to me. Anyone who can explain why "TypeError: Type address is not imiplicitly convertible doesn’t work, please enlighten moi. Thanks!

P.S. I had to remove the other images because I’m a new user. Perhaps someone can give me the privilege to post all my errors?

You should use the compiler version that is declared in the code. If you need to import OpenZeppelin Contracts you should use a version that works with that version of Solidity.

For Solidity 0.6, use OpenZeppelin Contracts 3.x. In remix:

import '@openzeppelin/contracts@3.4.1/math/SafeMath.sol';

etc.

1 Like