主页EIPs
EIPsERC-6268
ERC-6268

Untransferability Indicator for EIP-1155

An extension of EIP-1155 for indicating the transferability of the token.
StagnantStandards Track: ERC
创建时间: 2022-01-06
关联 EIP: EIP-165, EIP-1155
Yuki Aoki (@yuki-js)
社区讨论原文链接编辑
1 分钟了解
欢迎补充好内容
去提交
相关视频
欢迎补充好内容
去提交
正文

Abstract

This EIP standardizes an interface indicating EIP-1155-compatible token non-transferability using EIP-165 feature detection.

Motivation

Soulbound Tokens (SBT) are non-transferable tokens. While EIP-5192 standardizes non-fungible SBTs, a standard for Soulbound semi-fungible or fungible tokens does not yet exist. The introduction of a standard non-transferability indicator that is agnostic to fungibility promotes the usage of Souldbound semi-fungible or fungible tokens.

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.

Smart contracts implementing this standard MUST comform to the EIP-1155 specification.

Smart contracts implementing this standard MUST implement all of the functions in the IERC6268 interface.

Smart contracts implementing this standard MUST implement the EIP-165 supportsInterface function and MUST return the constant value true if 0xd87116f3 is passed through the interfaceID argument.

For the token identifier _id that is marked as locked, locked(_id) MUST return the constant value true and any functions that try transferring the token, including safeTransferFrom and safeBatchTransferFrom function MUST throw.

// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; interface IERC6268 { /// @notice Either `LockedSingle` or `LockedBatch` MUST emit when the locking status is changed to locked. /// @dev If a token is minted and the status is locked, this event should be emitted. /// @param _id The identifier for a token. event LockedSingle(uint256 _id); /// @notice Either `LockedSingle` or `LockedBatch` MUST emit when the locking status is changed to locked. /// @dev If a token is minted and the status is locked, this event should be emitted. /// @param _ids The list of identifiers for tokens. event LockedBatch(uint256[] _ids); /// @notice Either `UnlockedSingle` or `UnlockedBatch` MUST emit when the locking status is changed to unlocked. /// @dev If a token is minted and the status is unlocked, this event should be emitted. /// @param _id The identifier for a token. event UnlockedSingle(uint256 _id); /// @notice Either `UnlockedSingle` or `UnlockedBatch` MUST emit when the locking status is changed to unlocked. /// @dev If a token is minted and the status is unlocked, this event should be emitted. /// @param _ids The list of identifiers for tokens. event UnlockedBatch(uint256[] _ids); /// @notice Returns the locking status of the token. /// @dev SBTs assigned to zero address are considered invalid, and queries /// about them do throw. /// @param _id The identifier for a token. function locked(uint256 _id) external view returns (bool); /// @notice Returns the locking statuses of the multiple tokens. /// @dev SBTs assigned to zero address are considered invalid, and queries /// about them do throw. /// @param _ids The list of identifiers for tokens function lockedBatch(uint256[] _ids) external view returns (bool); }

Rationale

Needs discussion.

Backwards Compatibility

This proposal is fully backward compatible with EIP-1155.

Security Considerations

Needs discussion.

Copyright and related rights waived via CC0.

扩展阅读
欢迎补充好内容
去提交
相关项目
欢迎补充好内容
去提交

不想错过最新的 EIP 动态?

订阅 EIPs Fun 周刊以跟进相关更新,建⽴你与 EIP 之间的连接 ,更好地建设以太坊。

详情
支持以太坊贡献者,推动生态建设
资源
GitHub
支持社区