Add operators extension, a starting point

This commit is contained in:
William Entriken 2018-02-16 05:56:40 -05:00 committed by GitHub
parent d45177e6b1
commit 992bbff14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -212,6 +212,28 @@ interface ERC721Enumerable {
}
```
Here is a also an optional **ERC-721 Operators Extension** for delegating access to your deeds. This is copied from the ERC-777 efforts. At this time DO NOT recommend this extension because of [a security considuration](https://github.com/ethereum/EIPs/issues/777#issuecomment-366182824) but we are putting it forth as a starting point for discussion.
```solidity
/// WARNING: THIS INTERFACE IS TO PROMOTO DISCUSSION, WE DO NOT RECOMMEND YOU
/// IMPLEMENT IT YET AS THERE ARE SECURITY CONSIDERATIONS
/// @title Delegated operator extension to ERC-721 interface
/// @author William Entriken (https://phor.net)
/// @dev Specification at https://github.com/ethereum/eips/issues/XXXX
interface ERC721Operators {
/// @dev ERC-165 (draft) interface signature for ERC721 ...
function authorizeOperator(address operator) external;
function revokeOperator(address operator) external;
function isOperatorFor(address operator, address tokenHolder) external view returns (bool);
function operatorSend(address from, address to, uint256 _deedId) external;
event AuthorizedOperator(address indexed operator, address indexed tokenHolder);
event RevokedOperator(address indexed operator, address indexed tokenHolder);
}
```
### Caveats
The 0.4.19 Solidity interface grammar is not expressive enough to document the ERC-721 specification. A contract which complies with ERC-721 must also abide by the following: