--- a/pallets/fungible/src/stubs/UniqueFungible.sol +++ b/pallets/fungible/src/stubs/UniqueFungible.sol @@ -487,15 +487,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled } --- a/pallets/nonfungible/src/stubs/UniqueNFT.sol +++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol @@ -42,18 +42,19 @@ /// @param permissions Permissions for keys. /// @dev EVM selector for this function is: 0xbd92983a, /// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[]) - function setTokenPropertyPermissions(Tuple48[] memory permissions) public { + function setTokenPropertyPermissions(Tuple59[] memory permissions) public { require(false, stub_error); permissions; dummy = 0; } + /// @notice Get permissions for token properties. /// @dev EVM selector for this function is: 0xf23d7790, /// or in textual repr: tokenPropertyPermissions() - function tokenPropertyPermissions() public view returns (Tuple48[] memory) { + function tokenPropertyPermissions() public view returns (Tuple59[] memory) { require(false, stub_error); dummy; - return new Tuple48[](0); + return new Tuple59[](0); } // /// @notice Set token property value. @@ -132,20 +133,24 @@ bytes value; } +/// @dev Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration. enum EthTokenPermissions { + /// @dev Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`] Mutable, + /// @dev Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`] TokenOwner, + /// @dev Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`] CollectionAdmin } /// @dev anonymous struct -struct Tuple48 { +struct Tuple59 { string field_0; - Tuple46[] field_1; + Tuple57[] field_1; } /// @dev anonymous struct -struct Tuple46 { +struct Tuple57 { EthTokenPermissions field_0; bool field_1; } @@ -620,15 +625,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled } --- a/pallets/refungible/src/stubs/UniqueRefungible.sol +++ b/pallets/refungible/src/stubs/UniqueRefungible.sol @@ -42,7 +42,7 @@ /// @param permissions Permissions for keys. /// @dev EVM selector for this function is: 0xbd92983a, /// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[]) - function setTokenPropertyPermissions(Tuple53[] memory permissions) public { + function setTokenPropertyPermissions(Tuple58[] memory permissions) public { require(false, stub_error); permissions; dummy = 0; @@ -51,10 +51,10 @@ /// @notice Get permissions for token properties. /// @dev EVM selector for this function is: 0xf23d7790, /// or in textual repr: tokenPropertyPermissions() - function tokenPropertyPermissions() public view returns (Tuple53[] memory) { + function tokenPropertyPermissions() public view returns (Tuple58[] memory) { require(false, stub_error); dummy; - return new Tuple53[](0); + return new Tuple58[](0); } // /// @notice Set token property value. @@ -133,20 +133,24 @@ bytes value; } +/// @dev Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration. enum EthTokenPermissions { + /// @dev Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`] Mutable, + /// @dev Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`] TokenOwner, + /// @dev Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`] CollectionAdmin } /// @dev anonymous struct -struct Tuple53 { +struct Tuple58 { string field_0; - Tuple51[] field_1; + Tuple56[] field_1; } /// @dev anonymous struct -struct Tuple51 { +struct Tuple56 { EthTokenPermissions field_0; bool field_1; } @@ -621,15 +625,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled } --- a/tests/src/eth/abi/nonFungible.json +++ b/tests/src/eth/abi/nonFungible.json @@ -736,12 +736,12 @@ }, { "internalType": "bool", "name": "field_1", "type": "bool" } ], - "internalType": "struct Tuple46[]", + "internalType": "struct Tuple57[]", "name": "field_1", "type": "tuple[]" } ], - "internalType": "struct Tuple48[]", + "internalType": "struct Tuple59[]", "name": "permissions", "type": "tuple[]" } @@ -802,12 +802,12 @@ }, { "internalType": "bool", "name": "field_1", "type": "bool" } ], - "internalType": "struct Tuple46[]", + "internalType": "struct Tuple57[]", "name": "field_1", "type": "tuple[]" } ], - "internalType": "struct Tuple48[]", + "internalType": "struct Tuple59[]", "name": "", "type": "tuple[]" } --- a/tests/src/eth/abi/reFungible.json +++ b/tests/src/eth/abi/reFungible.json @@ -718,12 +718,12 @@ }, { "internalType": "bool", "name": "field_1", "type": "bool" } ], - "internalType": "struct Tuple51[]", + "internalType": "struct Tuple56[]", "name": "field_1", "type": "tuple[]" } ], - "internalType": "struct Tuple53[]", + "internalType": "struct Tuple58[]", "name": "permissions", "type": "tuple[]" } @@ -793,12 +793,12 @@ }, { "internalType": "bool", "name": "field_1", "type": "bool" } ], - "internalType": "struct Tuple51[]", + "internalType": "struct Tuple56[]", "name": "field_1", "type": "tuple[]" } ], - "internalType": "struct Tuple53[]", + "internalType": "struct Tuple58[]", "name": "", "type": "tuple[]" } --- a/tests/src/eth/api/UniqueFungible.sol +++ b/tests/src/eth/api/UniqueFungible.sol @@ -327,15 +327,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled } --- a/tests/src/eth/api/UniqueNFT.sol +++ b/tests/src/eth/api/UniqueNFT.sol @@ -30,11 +30,12 @@ /// @param permissions Permissions for keys. /// @dev EVM selector for this function is: 0xbd92983a, /// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[]) - function setTokenPropertyPermissions(Tuple43[] memory permissions) external; + function setTokenPropertyPermissions(Tuple52[] memory permissions) external; + /// @notice Get permissions for token properties. /// @dev EVM selector for this function is: 0xf23d7790, /// or in textual repr: tokenPropertyPermissions() - function tokenPropertyPermissions() external view returns (Tuple43[] memory); + function tokenPropertyPermissions() external view returns (Tuple52[] memory); // /// @notice Set token property value. // /// @dev Throws error if `msg.sender` has no permission to edit the property. @@ -85,20 +86,24 @@ bytes value; } +/// @dev Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration. enum EthTokenPermissions { + /// @dev Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`] Mutable, + /// @dev Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`] TokenOwner, + /// @dev Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`] CollectionAdmin } /// @dev anonymous struct -struct Tuple43 { +struct Tuple52 { string field_0; - Tuple41[] field_1; + Tuple50[] field_1; } /// @dev anonymous struct -struct Tuple41 { +struct Tuple50 { EthTokenPermissions field_0; bool field_1; } @@ -418,15 +423,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled } --- a/tests/src/eth/api/UniqueRefungible.sol +++ b/tests/src/eth/api/UniqueRefungible.sol @@ -30,12 +30,12 @@ /// @param permissions Permissions for keys. /// @dev EVM selector for this function is: 0xbd92983a, /// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[]) - function setTokenPropertyPermissions(Tuple47[] memory permissions) external; + function setTokenPropertyPermissions(Tuple51[] memory permissions) external; /// @notice Get permissions for token properties. /// @dev EVM selector for this function is: 0xf23d7790, /// or in textual repr: tokenPropertyPermissions() - function tokenPropertyPermissions() external view returns (Tuple47[] memory); + function tokenPropertyPermissions() external view returns (Tuple51[] memory); // /// @notice Set token property value. // /// @dev Throws error if `msg.sender` has no permission to edit the property. @@ -86,20 +86,24 @@ bytes value; } +/// @dev Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration. enum EthTokenPermissions { + /// @dev Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`] Mutable, + /// @dev Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`] TokenOwner, + /// @dev Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`] CollectionAdmin } /// @dev anonymous struct -struct Tuple47 { +struct Tuple51 { string field_0; - Tuple45[] field_1; + Tuple49[] field_1; } /// @dev anonymous struct -struct Tuple45 { +struct Tuple49 { EthTokenPermissions field_0; bool field_1; } @@ -419,15 +423,25 @@ uint256[] field_1; } +/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM. enum CollectionLimits { + /// @dev How many tokens can a user have on one account. AccountTokenOwnership, + /// @dev How many bytes of data are available for sponsorship. SponsoredDataSize, + /// @dev In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] SponsoredDataRateLimit, + /// @dev How many tokens can be mined into this collection. TokenLimit, + /// @dev Timeouts for transfer sponsoring. SponsorTransferTimeout, + /// @dev Timeout for sponsoring an approval in passed blocks. SponsorApproveTimeout, + /// @dev Whether the collection owner of the collection can send tokens (which belong to other users). OwnerCanTransfer, + /// @dev Can the collection owner burn other people's tokens. OwnerCanDestroy, + /// @dev Is it possible to send tokens from this collection between users. TransferEnabled }