Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ERC: Named NFT #320

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
96 changes: 96 additions & 0 deletions ERCS/erc-7653.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
eip: 7653
title: Named NFT
description: An extension to ERC-721 based on ERC-7632.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your description doesn't really say anything about what's in this proposal. It only says where to look for more information.

It'd be nice to see at a glance what's actually in this document.

author: Zainan Victor Zhou (@xinbenlv)
discussions-to: https://ethereum-magicians.org/t/erc-tbd-named-nfts-extending-erc-721/18550
xinbenlv marked this conversation as resolved.
Show resolved Hide resolved
status: Draft
type: Standards Track
category: ERC
created: 2024-03-13
requires: 165, 721, 7632
---

## Abstract

An extension to `ERC-721` based on `ERC-7632` to enable named `ERC-721`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An extension to `ERC-721` based on `ERC-7632` to enable named `ERC-721`
An extension to [ERC-721](./eip-721.md) based on [ERC-7632](./eip-7632.md) to enable named ERC-721.

Don't use backticks to bypass the linter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your abstract is certainly terse, but it doesn't contain enough information about what the proposal actually does. What is a named NFT? How do the names work?


## Motivation


## Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

1. A compliant contract MUST implement `ERC-721` and following interface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. A compliant contract MUST implement `ERC-721` and following interface
1. A compliant contract MUST implement `ERC721` and following interface


```solidity
interface IERCNamedNFT {
/// @notice Find the owner of an NFT
/// @dev NFTs assigned to zero address are considered invalid, and queries
/// about them do throw.
/// @param _tokenName The name for an NFT
/// @return The address of the owner of the NFT
function ownerOfByName(string memory _tokenName) external view returns (address);

/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenName The NFT to transfer
/// @param data Additional data with no specified format, sent in call to `_to`
function safeTransferFromByName(address _from, address _to, string memory _tokenName, bytes data) external payable;

/// @notice Transfers the ownership of an NFT from one address to another address
/// @dev This works identically to the other function with an extra data parameter,
/// except this function just sets data to "".
/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenId The NFT to transfer
function safeTransferFromByName(address _from, address _to, string memory _tokenName) external payable;

/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// not the current owner. Throws if `_to` is the zero address. Throws if
/// `_tokenId` is not a valid NFT.
/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenId The NFT to transfer
function transferFromByName(address _from, address _to, string memory _tokenName) external payable;

/// @notice Change or reaffirm the approved address for an NFT
/// @dev The zero address indicates there is no approved address.
/// Throws unless `msg.sender` is the current NFT owner, or an authorized
/// operator of the current owner.
/// @param _approved The new approved NFT controller
/// @param _tokenId The NFT to approve
function approveByName(address _approved, string memory _tokenName) external payable;

/// @notice Get the approved address for a single NFT
/// @dev Throws if `_tokenId` is not a valid NFT.
/// @param _tokenId The NFT to find the approved address for
/// @return The approved address for this NFT, or the zero address if there is none
function getApprovedByName(string memory _tokenName) external view returns (address);
}
```

2. A compliant contract MUST implement the `ERC-165`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. A compliant contract MUST implement the `ERC-165`
2. A compliant contract MUST implement the `ERC165` interface


<!-- TODO: inlcude `ERC-165` interface id -->

Check warning on line 80 in ERCS/erc-7653.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

HTML comments are only allowed while `status` is one of: `Draft`, `Withdrawn`

warning[markdown-html-comments]: HTML comments are only allowed while `status` is one of: `Draft`, `Withdrawn` --> ERCS/erc-7653.md | 80 | <!-- TODO: inlcude `ERC-165` interface id --> | = help: see https://ethereum.github.io/eipw/markdown-html-comments/

## Rationale

Needs discussion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Needs discussion
Needs discussion <!-- TODO -->


## Backwards Compatibility

This ERC is designed to be backward compatible with `ERC-721`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This ERC is designed to be backward compatible with `ERC-721`
This ERC is designed to be backward compatible with ERC-721.


## Security Considerations

Needs discussion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Needs discussion.
Needs discussion. <!-- TODO -->


## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).
Loading