Description
Opening discussion to nail down semantics for a common pattern that should be standardized.
Many smart-contracts have adopted some pattern of representing the ownership of that contract, and it's such a common and simple pattern, that the exact phrasing should be standardized into an Application-layer protocol, to allow leveraging cross-compatibility.
This standard could be called the Owned
standard. I've also heard it called the Asset
standard. The standard defines at least one method, either:
setOwner(address _newOwner)
transferOwner(address _newOwner)
This might be paired with an event, maybe called OwnerTransfer
.
It would also probably benefit from having a support method, either one of:
getOwner() returns address
owner() returns address
isOwner(address _owner) returns bool
Places I've seen this used
- AuctionHouse, a Dapp that allows users to auction any on-chain asset adhering to their own Asset protocol.
- The proposed Proxy Standard includes a loose implementation of this standard.
- The Dapple DSAuthorized class essentially implements this pattern.
You can read a more formally specified version of this proposal here:
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md