@@ -4,11 +4,16 @@ pragma solidity ^0.8.0;
44/**
55 * Group together arbitrary ERC20, ERC721 and ERC1155 tokens into a single bundle.
66 *
7- * This bundle of tokens is a generic list of tokens that can have multiple use cases,
8- * such as mapping to an NFT, or put in an escrow, etc.
7+ * The `Token` struct is a generic type that can describe any ERC20, ERC721 or ERC1155 token.
8+ * The `Bundle` struct is a data structure to track a group/bundle of multiple assets i.e. ERC20,
9+ * ERC721 and ERC1155 tokens, each described as a `Token`.
10+ *
11+ * Expressing tokens as the `Token` type, and grouping them as a `Bundle` allows for writing generic
12+ * logic to handle any ERC20, ERC721 or ERC1155 tokens.
913 */
1014
1115interface ITokenBundle {
16+
1217 /// @notice The type of assets that can be wrapped.
1318 enum TokenType {
1419 ERC20 ,
@@ -17,12 +22,12 @@ interface ITokenBundle {
1722 }
1823
1924 /**
20- * @notice A generic interface to describe a token to be put in a bundle .
25+ * @notice A generic interface to describe any ERC20, ERC721 or ERC1155 token .
2126 *
22- * @param assetContract The contract address of the asset to bind .
23- * @param tokenType The token type (ERC20 / ERC721 / ERC1155) of the asset to bind .
24- * @param tokenId The token Id of the asset to bind , if the asset is an ERC721 / ERC1155 NFT.
25- * @param totalAmount The amount of the asset to bind , if the asset is an ERC20 / ERC1155 fungible token.
27+ * @param assetContract The contract address of the asset.
28+ * @param tokenType The token type (ERC20 / ERC721 / ERC1155) of the asset.
29+ * @param tokenId The token Id of the asset, if the asset is an ERC721 / ERC1155 NFT.
30+ * @param totalAmount The amount of the asset, if the asset is an ERC20 / ERC1155 fungible token.
2631 */
2732 struct Token {
2833 address assetContract;
@@ -32,11 +37,11 @@ interface ITokenBundle {
3237 }
3338
3439 /**
35- * @notice An internal data structure to track the contents of a bundle .
40+ * @notice An internal data structure to track a group / bundle of multiple assets i.e. `Token`s .
3641 *
37- * @param count The total kinds of assets i.e. `Token` inside a bundle.
42+ * @param count The total number of assets i.e. `Token` in a bundle.
3843 * @param uri The (metadata) URI assigned to the bundle created
39- * @param tokens Mapping from a UID -> to the asset i.e. `Token` at that UID .
44+ * @param tokens Mapping from a UID -> to a unique asset i.e. `Token` in the bundle .
4045 */
4146 struct BundleInfo {
4247 uint256 count;
0 commit comments