mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-28 14:40:32 +00:00
Specify functions that cannot throw
This commit is contained in:
parent
992bbff14e
commit
1d613bab25
@ -77,6 +77,7 @@ interface ERC721 /* is ERC165 */ {
|
||||
|
||||
/// @notice Count all deeds assigned to an owner
|
||||
/// @dev Throws if `_owner` is the zero address, representing invalid deeds.
|
||||
/// Otherwise this function must not throw.
|
||||
/// @param _owner An address where we are interested in deeds owned by them
|
||||
/// @return The number of deeds owned by `_owner`, possibly zero
|
||||
function countOfDeedsByOwner(address _owner) external view returns (uint256 _count);
|
||||
@ -84,6 +85,7 @@ interface ERC721 /* is ERC165 */ {
|
||||
/// @notice Enumerate deeds assigned to an owner
|
||||
/// @dev Throws if `_index` >= `countOfDeedsByOwner(_owner)` or if
|
||||
/// `_owner` is the zero address, representing invalid deeds.
|
||||
/// Otherwise this must not throw.
|
||||
/// @param _owner An address where we are interested in deeds owned by them
|
||||
/// @param _index A counter less than `countOfDeedsByOwner(_owner)`
|
||||
/// @return The identifier for the `_index`th deed assigned to `_owner`,
|
||||
@ -194,18 +196,21 @@ interface ERC721Enumerable {
|
||||
// this.ownerByIndex.selector;
|
||||
|
||||
/// @notice Enumerate active deeds
|
||||
/// @dev Throws if `_index` >= `countOfDeeds()`
|
||||
/// @dev Throws if `_index` >= `countOfDeeds()`.
|
||||
/// Otherwise must not throw.
|
||||
/// @param _index A counter less than `countOfDeeds()`
|
||||
/// @return The identifier for the `_index`th deed, (sort order not
|
||||
/// specified)
|
||||
function deedByIndex(uint256 _index) external view returns (uint256 _deedId);
|
||||
|
||||
/// @notice Count of owners which own at least one deed
|
||||
/// Must not throw.
|
||||
/// @return A count of the number of owners which own deeds
|
||||
function countOfOwners() external view returns (uint256 _count);
|
||||
|
||||
/// @notice Enumerate owners
|
||||
/// @dev Throws if `_index` >= `countOfOwners()`
|
||||
/// Otherwise must not throw.
|
||||
/// @param _index A counter less than `countOfOwners()`
|
||||
/// @return The address of the `_index`th owner (sort order not specified)
|
||||
function ownerByIndex(uint256 _index) external view returns (address _owner);
|
||||
@ -215,7 +220,7 @@ 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
|
||||
/// WARNING: THIS INTERFACE IS TO PROMOTE 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user