Skip to main content

TokenStore

Token Store

TokenStore contract extension allows bundling-up of ERC20/ERC721/ERC1155 and native-token assets and provides logic for storing, releasing, and transferring them from the extending contract.

See {CurrencyTransferLib}

Methods

getTokenCountOfBundle

function getTokenCountOfBundle(uint256 _bundleId) external view returns (uint256)

Returns the total number of assets in a particular bundle.

Parameters

NameTypeDescription
_bundleIduint256undefined

Returns

NameTypeDescription
_0uint256undefined

getTokenOfBundle

function getTokenOfBundle(uint256 _bundleId, uint256 index) external view returns (struct ITokenBundle.Token)

Returns an asset contained in a particular bundle, at a particular index.

Parameters

NameTypeDescription
_bundleIduint256undefined
indexuint256undefined

Returns

NameTypeDescription
_0ITokenBundle.Tokenundefined

getUriOfBundle

function getUriOfBundle(uint256 _bundleId) external view returns (string)

Returns the uri of a particular bundle.

Parameters

NameTypeDescription
_bundleIduint256undefined

Returns

NameTypeDescription
_0stringundefined

onERC1155BatchReceived

function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) external nonpayable returns (bytes4)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256[]undefined
_3uint256[]undefined
_4bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

onERC1155Received

function onERC1155Received(address, address, uint256, uint256, bytes) external nonpayable returns (bytes4)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256undefined
_3uint256undefined
_4bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

onERC721Received

function onERC721Received(address, address, uint256, bytes) external nonpayable returns (bytes4)

See {IERC721Receiver-onERC721Received}. Always returns IERC721Receiver.onERC721Received.selector.

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256undefined
_3bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

supportsInterface

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

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined