Destructible.sol 499 B

1234567891011121314151617181920212223
  1. pragma solidity ^0.4.8;
  2. import "../ownership/Ownable.sol";
  3. /*
  4. * @title Destructible
  5. * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.
  6. */
  7. contract Destructible is Ownable {
  8. /*
  9. *@dev The destroy function transfer the current balance to the owner and terminate de lifecycle
  10. */
  11. function destroy() onlyOwner {
  12. selfdestruct(owner);
  13. }
  14. function destroyAndSend(address _recipient) onlyOwner {
  15. selfdestruct(_recipient);
  16. }
  17. }