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 EIP: ERC-721 Holding Time Tracking #6806

Merged
merged 23 commits into from
Jun 2, 2023

Conversation

saitama2009
Copy link
Contributor

An extension of ERC-721 that adds an interface to track and describe the holding time of a Non-Fungible Token (NFT) by an account.

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-erc labels Mar 30, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented Mar 30, 2023

✅ All reviewers have approved.

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Mar 30, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Mar 30, 2023
@eth-bot eth-bot changed the title Add EIP: ERC721 Holding Time Tracking Add EIP: ERC-721 Holding Time Tracking Mar 30, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Mar 30, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Mar 30, 2023
EIPS/eip-0000.md Outdated Show resolved Hide resolved

An implementation of this EIP will be provided upon acceptance of the proposal.

## Security Considerations
Copy link
Contributor

Choose a reason for hiding this comment

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

The content of this section seems boilerplate generated by ChatGPT since it appear to be unrelated to the actual technicality of providing holding time

EIPS/eip-6806.md Outdated

interface IERC721HoldingTime {
  function getHoldingInfo(uint256 tokenId) external view returns (address holder, uint256 holdingTime);
  function setWhitelistedContract(address whitelistContract, bool ignoreReset) external;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to enable an event to be emitted when contract is being allowlisted?
Also, can you change the setWhitelistedContract to more specific to ERC721HoldingTime since this method name is not very obvious related to holding time

Does it have to be a "contract" or it could be a general address of EOA/Contract?

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Apr 17, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Apr 18, 2023
@eth-bot eth-bot changed the base branch from master to eipbot/6806 May 2, 2023 00:35
@eth-bot eth-bot changed the base branch from eipbot/6806 to master May 2, 2023 00:35
@github-actions github-actions bot added the w-ci Waiting on CI to pass label May 2, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label May 2, 2023
@eth-bot eth-bot changed the base branch from master to eipbot/6806 May 2, 2023 00:52
@eth-bot eth-bot changed the base branch from eipbot/6806 to master May 2, 2023 00:52
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels May 2, 2023
@github-actions
Copy link

github-actions bot commented May 4, 2023

The commit 55c0fa5 (as a parent of 11b7e3e) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label May 4, 2023
@saitama2009
Copy link
Contributor Author

The commit 55c0fa5 (as a parent of 11b7e3e) contains errors. Please inspect the Run Summary for details.

@saitama2009 saitama2009 closed this May 4, 2023
@saitama2009 saitama2009 reopened this May 4, 2023
@saitama2009
Copy link
Contributor Author

saitama2009 commented May 4, 2023

EIPS/eip-6806.md Outdated

The `setHoldingTimeWhitelistedAddress` function introduces flexibility in determining which transfers should affect holding time calculations. By allowing the contract owner or authorized accounts to whitelist specific addresses, transfers involving these addresses will not reset the holding time. This is particularly important for NFT-based financial transactions or special cases where holding time should not be affected by transfers.

Together, these functions enhance the utility of the ERC-721 standard, enabling developers to create more sophisticated applications and experiences based on NFT holding time and offering the ability to selectively ignore holding time resets during transfers to or from whitelisted addresses.
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks more like motivation. The rationale section should describe technical decisions made within the EIP itself, not justify the EIP as a whole.

The addition of the `getHoldingInfo` function to an extension of the ERC-721 standard enables developers to implement NFT-based applications that require holding time information. This extension maintains compatibility with existing ERC-721 implementations while offering additional functionality for new use cases.

The `getHoldingInfo` function provides a straightforward method for retrieving the holding time and holder address of an NFT. By using seconds as the unit of time for holding duration, it ensures precision and compatibility with other time-based functions in smart contracts.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about something like this, to explain the return values of getHoldingInfo?

Suggested change
`getHoldingInfo` returns both `holder` and `holdingTime` so that some token owners (as decided by the implementation) can be ignored for the purposes of calculating holding time. For example, a contract may take ownership of an NFT as collateral for a loan. Such a loan contract could be ignored, so the real owner's holding time increases properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, it looks good

@eth-bot eth-bot enabled auto-merge (squash) June 2, 2023 16:39
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit 3b42b46 into ethereum:master Jun 2, 2023
@derodero24
Copy link

Is the argument firstotTokenId in the function _afterTokenTransfer() a typo for firstTokenId?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-erc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants