HasNoContracts.sol 647 B

123456789101112131415161718192021
  1. pragma solidity ^0.4.11;
  2. import "./Ownable.sol";
  3. /**
  4. * @title Contracts that should not own Contracts
  5. * @author Remco Bloemen <remco@2π.com>
  6. * @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner
  7. * of this contract to reclaim ownership of the contracts.
  8. */
  9. contract HasNoContracts is Ownable {
  10. /**
  11. * @dev Reclaim ownership of Ownable contracts
  12. * @param contractAddr The address of the Ownable to be reclaimed.
  13. */
  14. function reclaimContract(address contractAddr) external onlyOwner {
  15. Ownable contractInst = Ownable(contractAddr);
  16. contractInst.transferOwnership(owner);
  17. }
  18. }