Skip to content

Commit

Permalink
Update ERC-7631: Move to Review
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
Vectorized authored Aug 2, 2024
1 parent 10f0120 commit e402021
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions ERCS/erc-7631.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Dual Nature Token Pair
description: A specification for a co-joined fungible and non-fungible token pair
author: vectorized (@vectorized), Thomas (@0xth0mas), Quit (@quitcrypto), Michael Amadi (@AmadiMichael), cygaar (@cygaar), Harrison (@pop-punk)
discussions-to: https://ethereum-magicians.org/t/erc-7631-dual-nature-token-pair/18796
status: Draft
status: Review
type: Standards Track
category: ERC
created: 2024-02-21
Expand Down Expand Up @@ -62,17 +62,24 @@ The ERC-20 contract MAY implement the following interface.
interface IERC7631BaseNFTSkippable {
/// @dev Implementations SHOULD emit this event when the skip NFT status
/// of `owner` is updated to `status`.
///
/// The purpose of this event is to signal to indexers that the
/// skip NFT status has been changed.
///
/// For simplicity of implementation,
/// this event MAY be emitted even if the status is unchanged.
event SkipNFTSet(address indexed owner, bool status);
/// @dev Returns true if ERC-721 mints and transfers to `owner` SHOULD be
/// skipped during ERC-20 to ERC-721 synchronization. Otherwise false.
/// skipped during ERC-20 to ERC-721 synchronization.
/// Otherwise, returns false.
///
/// This method MAY revert
/// (e.g. contract not initialized, method not supported).
///
/// If this method reverts:
/// - Interacting code SHOULD interpret `setSkipNFT` functionality as
/// unavailable (and hide any functionality to call `setSkipNFT`).
/// unavailable and hide any functionality to call `setSkipNFT`.
/// - The skip NFT status for `owner` SHOULD be interpreted as undefined.
///
/// Once a true or false value has been returned for a given `owner`,
Expand Down Expand Up @@ -123,7 +130,7 @@ The `getSkipNFT` and `setSkipNFT` methods MAY revert. As contracts compiled with

The skip NFT methods allow accounts to avoid having ERC-721 tokens automatically minted to it whenever there is an ERC-20 transfer.

This is useful in the following situations:
They are helpful in the following situations:

- Loading vesting contracts with large amounts ERC-20 tokens to be vested to many users.
- Loading candy machine contracts with large amounts of ERC-20 tokens to sell ERC-721 tokens to customers.
Expand All @@ -132,7 +139,9 @@ This is useful in the following situations:

Including the skip NFT methods in the standard will:
- Enable applications to conveniently display the option for users to skip NFTs.
- Enable applications to transfer any amount of ERC-20 tokens without the O(n) gas costs associated with minting multiple ERC-721 tokens, which could surpass the block gas limit.
- Enable applications to transfer any amount of ERC-20 tokens without the O(n) gas costs associated with minting multiple ERC-721 tokens, which can surpass the block gas limit.

These methods are recommended even on EVM chains with low gas costs, because bulk automatic ERC-721 transfers can still surpass the block gas limit.

A useful pattern is to make `getSkipNFT` return true by default if `owner` is a smart contract.

Expand Down

0 comments on commit e402021

Please sign in to comment.