* update solidity-coverage to ^0.5.0 * update truffle dependency to ^4.1.8 * update solium to ^1.1.7 * update all contracts to solidity ^0.4.23
26 lines
535 B
Solidity
26 lines
535 B
Solidity
pragma solidity ^0.4.23;
|
|
|
|
|
|
import "../ownership/Ownable.sol";
|
|
|
|
|
|
/**
|
|
* @title Destructible
|
|
* @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.
|
|
*/
|
|
contract Destructible is Ownable {
|
|
|
|
constructor() public payable { }
|
|
|
|
/**
|
|
* @dev Transfers the current balance to the owner and terminates the contract.
|
|
*/
|
|
function destroy() onlyOwner public {
|
|
selfdestruct(owner);
|
|
}
|
|
|
|
function destroyAndSend(address _recipient) onlyOwner public {
|
|
selfdestruct(_recipient);
|
|
}
|
|
}
|