Core
Other
Extension
Soulbound
Soulbound Per Token

RMRKSoulboundPerToken

RMRK team

RMRKSoulboundPerToken

Smart contract of the RMRK Soulbound module where the transfers are permitted or prohibited on a per-token basis.

Methods

isTransferable

function isTransferable(uint256 tokenId, address from, address to) external view returns (bool isTransferable_)

Used to check whether the given token is transferable or not.

If this function returns false, the transfer of the token MUST revert execution.If the tokenId does not exist, this method MUST revert execution, unless the token is being checked for minting.

Parameters

NameTypeDescription
tokenIduint256ID of the token being checked
fromaddressAddress from which the token is being transferred
toaddressAddress to which the token is being transferred

Returns

NameTypeDescription
isTransferable_boolBoolean value indicating whether the given token is transferable

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP (opens in a new tab) section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

Events

Soulbound

event Soulbound(uint256 indexed tokenId, bool state)

Emitted when a token's soulbound state changes.

Parameters

NameTypeDescription
tokenId indexeduint256ID of the token
stateboolA boolean value signifying whether the token became soulbound (true) or transferrable (false)