* fixed visibility warnings * solved visibility and line length warning * change a test assertion that fails due to chai dependence update * linter, constructor style and solved visibility warnings * Changed Windows line endings to Unix.
23 lines
498 B
Solidity
23 lines
498 B
Solidity
pragma solidity ^0.4.24;
|
|
|
|
|
|
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 {
|
|
/**
|
|
* @dev Transfers the current balance to the owner and terminates the contract.
|
|
*/
|
|
function destroy() public onlyOwner {
|
|
selfdestruct(owner);
|
|
}
|
|
|
|
function destroyAndSend(address _recipient) public onlyOwner {
|
|
selfdestruct(_recipient);
|
|
}
|
|
}
|