Skip to main content

SBTEnumerable

This implements an optional extension of {SBT} defined in the EIP that adds enumerability of all the token ids in the contract as well as all token ids owned by each account.

Methods

balanceOf

function balanceOf(address owner) external view returns (uint256)

See {ISBT-balanceOf}.

Parameters

NameTypeDescription
owneraddressundefined

Returns

NameTypeDescription
_0uint256undefined

name

function name() external view returns (string)

See {ISBTMetadata-name}.

Returns

NameTypeDescription
_0stringundefined

ownerOf

function ownerOf(uint256 tokenId) external view returns (address)

See {ISBT-ownerOf}.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0addressundefined

supportsInterface

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

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

symbol

function symbol() external view returns (string)

See {ISBTMetadata-symbol}.

Returns

NameTypeDescription
_0stringundefined

tokenByIndex

function tokenByIndex(uint256 index) external view returns (uint256)

See {ISBTEnumerable-tokenByIndex}.

Parameters

NameTypeDescription
indexuint256undefined

Returns

NameTypeDescription
_0uint256undefined

tokenOfOwnerByIndex

function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256)

See {ISBTEnumerable-tokenOfOwnerByIndex}.

Parameters

NameTypeDescription
owneraddressundefined
indexuint256undefined

Returns

NameTypeDescription
_0uint256undefined

tokenURI

function tokenURI(uint256 tokenId) external view returns (string)

See {ISBTMetadata-tokenURI}.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0stringundefined

totalSupply

function totalSupply() external view returns (uint256)

See {ISBTEnumerable-totalSupply}.

Returns

NameTypeDescription
_0uint256undefined

Events

Burn

event Burn(address indexed _owner, uint256 indexed _tokenId)

This emits when an SBT is burned This event emits when SBTs are destroyed

Parameters

NameTypeDescription
_owner indexedaddressundefined
_tokenId indexeduint256undefined

Mint

event Mint(address indexed _owner, uint256 indexed _tokenId)

This emits when an SBT is newly minted. This event emits when SBTs are created

Parameters

NameTypeDescription
_owner indexedaddressundefined
_tokenId indexeduint256undefined