eth-owned

EIP-173 interface and tools for chainlib-eth
git clone git://holbrook.no/eth-owned.git
Info | Log | Files | Refs

OwnedSimple.sol (417B)


      1 pragma solidity >= 0.6.11;
      2 
      3 // SPDX-License-Identifier: GPL-3.0-or-later
      4 
      5 contract Owned {
      6 
      7 	// EIP173
      8 	address public owner;
      9 
     10 	// EIP173
     11 	event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner);
     12 
     13 	constructor() public {
     14 		owner = msg.sender;
     15 	}
     16 
     17 	// EIP173
     18 	function transferOwnership(address _newOwner) public returns (bool) {
     19 		require(owner == msg.sender);
     20 		owner = _newOwner;
     21 	}
     22 }