Skip to content

Instantly share code, notes, and snippets.

@BHaunT
BHaunT / Destroyable.sol
Last active September 4, 2020 15:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.12+commit.7709ece9.js&optimize=false&gist=
pragma solidity 0.5.12;
// pragma experimental ABIEncoderV2;
import "./Ownable.sol";
contract Destroyable is Ownable{
function close() public onlyOwner { //onlyOwner is custom modifier
address payable receiver = msg.sender;
selfdestruct(receiver);