Skip to main content

TokenBundle

Token Bundle

TokenBundle contract extension allows bundling-up of ERC20/ERC721/ERC1155 and native-token assets in a data structure, and provides logic for setting/getting IDs and URIs for created bundles.

See {ITokenBundle}

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