The key word “MUST” in this document is to be interpreted as described in RFC 2119.
Every contract compliant with this SIP MUST implement the SIP5313 interface.
// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.15;/// @title SIP-5313 Light Contract Ownership Standard
interfaceSIP5313{/// @notice Get the address of the owner
/// @return The address of the owner
functionowner()viewexternalreturns(address);}
Rationale
Key factors influencing the standard:
Minimize the number of functions in the interface
Backwards compatibility with existing contracts
This standard can be (and has been) extended by other standards to add additional ownership functionality. The smaller scope of this specification allows more and more straightforward ownership implementations, see limitations explained in SIP-173 under “other schemes that were considered”.
Implementing SIP-165 could be a valuable addition to this interface specification. However, this SIP is being written to codify existing protocols that connect contracts (often NFTs), with third-party websites (often a well-known NFT marketplace).
Backwards Compatibility
Every contract that implements SIP-173 already implements this specification.
Security Considerations
Because this specification does not extend SIP-165, calling this SIP’s owner function cannot result in complete certainty that the result is indeed the owner. For example, another function with the same function signature may return some value that is then interpreted to be the true owner. If this SIP is used solely to identify if an account is the owner of a contract, then the impact of this risk is minimized. But if the interrogator is, for example, sending a valuable NFT to the identified owner of any contract on the network, then the risk is heightened.