OpenZeppelin / ethernaut

Web3/Solidity based wargame
MIT License
1.98k stars 677 forks source link

Refactor: Replace deprecated `Address.isContract()` with `dest_.code.length > 0` #743

Open 0xScratch opened 3 months ago

0xScratch commented 3 months ago

While working on the Good Samaritan challenge, I encountered an error in Visual Studio Code indicating that the .isContract() function is no longer available in the Address library.

Screenshot 2024-07-15 143548

Found this pull request in the OpenZeppelin repository, which details the removal of the .isContract() function. The recommended approach is to use address(...).code.length > 0 instead...

Thanks!