HasNoContracts.sol 651 B

12345678910111213141516171819202122
  1. pragma solidity ^0.4.24;
  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. }