ERC-173: Contract Ownership Standard
ERC-173 standardises the basic admin-ownership pattern: a contract has a single owner, ownership can be transferred, admin functions check ownership.
Required Interface
solidity
function owner() external view returns (address);
function transferOwnership(address newOwner) external;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);OpenZeppelin's Ownable is the de facto reference; the two-step Ownable2Step variant avoids the "transfer to wrong address, lose contract" footgun.
Neo Equivalent
Neo doesn't standardise owner() because it would be redundant. Every Neo contract:
- Has its
_deploycallback (NEP-29) where you set the initial owner. - Has a manifest-defined
updatemethod (NEP-22) for admin operations. - Uses
Runtime.CheckWitness(owner)to gate any admin function.
Most production contracts expose a getOwner view as a convention but it's not required by any standard.
Live on Neo TestNet
Both implementations deployed on Neo N3 TestNet.
| Implementation | TestNet Address | Contract Hash |
|---|---|---|
Solidity (neo-solc) | NgmPfqiGc6weStAM5PYBgC4SYgTGUZzPVh | 0x19977aea…1156bbe4 |
Neo C# (nccs) | NU3yPrTayUJRB16Lu8RjFX8ERJ7pMYvxup | 0xce89aec2…11824459 |
Verified: getOwner == deployer, claimOwnership (Solidity), _deploy-time owner init (C#). docs/standards-mirror/deployments/erc-173/.
