Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC-6268, which proposes a mechanism for making ERC-1155 tokens non-transferable.

This explanation is based on the following specification.

For other Ethereum improvement proposals, see the following page.

Overview

ERC-6268 standardizes an interface for indicating the non-transferability of ERC-1155 tokens. It uses ERC-165 interface detection so applications can discover support for the locking interface.

For more information about ERC-165, see the following article.

ERC-165: Detecting Supported Contract Interfaces

Motivation

Soulbound tokens (SBTs) are tokens that their holders cannot freely transfer.

ERC-5192 standardizes a locking interface for ERC-721 NFTs, but the motivation for ERC-6268 was the absence of a corresponding common interface for semi-fungible and fungible tokens.

For more information about ERC-5192, see the following article.

ERC-5192: Minimal Soulbound NFTs

The proposed interface allows ERC-1155 tokens to expose non-transferability regardless of whether the tokens are fungible. The aim is to support adoption of semi-fungible and fungible soulbound tokens.

Specification

The following requirements describe the ERC-6268 locking interface. The original Japanese article refers to EIP-5192 in parts of this section; the interface and identifier discussed here are those of ERC-6268.

Key Requirements

ERC-1155 Compliance

A conforming contract must implement ERC-1155. The basic token management mechanism therefore remains ERC-1155, with additional locking functionality.

Implementing IERC6268

The contract must implement the functions and events defined in IERC6268, which expose token locking status and notify applications of changes to that status.

Implementing ERC-165 supportsInterface

The contract must return true from supportsInterface for interface identifier 0xd87116f3. This allows applications to discover the ERC-6268 interface.

Locked Tokens Cannot Be Transferred

When locked(_id) returns true, transfer functions such as safeTransferFrom and safeBatchTransferFrom must reject transfers of the locked token.

IERC6268 Functionality

The interface defines events and functions for exposing and managing information about token locking status.

IERC6268

IERC6268.sol
// 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);
}

Events

LockedSingle(uint256 _id)

Emitted when an individual token ID becomes locked.

LockedBatch(uint256[] _ids)

Emitted when multiple token IDs become locked.

UnlockedSingle(uint256 _id)

Emitted when an individual token ID becomes unlocked.

UnlockedBatch(uint256[] _ids)

Emitted when multiple token IDs become unlocked.

Functions

locked(uint256 _id)

Returns whether the specified token ID is locked.

lockedBatch(uint256[] _ids)

Queries the locking status of multiple token IDs together. The interface shown above declares a single boolean return value.

Backward Compatibility

ERC-6268 is designed to be compatible with ERC-1155.

Citation

Yuki Aoki (@yuki-js), "ERC-6268: Untransferability Indicator for EIP-1155 [DRAFT]," Ethereum Improvement Proposals, no. 6268, January 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6268.

Conclusion

ERC-6268 proposes a standardized locking interface for ERC-1155 tokens, allowing applications to identify non-transferable tokens.