diff --git a/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol b/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol index aee29ba31..e58f38915 100644 --- a/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +++ b/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol @@ -47,17 +47,18 @@ abstract contract LSP7DigitalAsset is { /** * @notice Sets the token-Metadata - * @param name_ The name of the token - * @param symbol_ The symbol of the token - * @param newOwner_ The owner of the the token-Metadata - * @param isNonDivisible_ Specify if the LSP7 token is a fungible or non-fungible token + * @param name_ The name of the token. + * @param symbol_ The symbol of the token. + * @param newOwner_ The owner of the the token-Metadata. + * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param isNonDivisible_ Specify if the LSP7 token is a fungible or non-fungible token. */ constructor( string memory name_, string memory symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) LSP4DigitalAssetMetadata(name_, symbol_, newOwner_, lsp4TokenType_) { _isNonDivisible = isNonDivisible_; } diff --git a/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol b/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol index 19e4bcdd8..80169e687 100644 --- a/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +++ b/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol @@ -46,17 +46,17 @@ abstract contract LSP7DigitalAssetInitAbstract is string memory name_, string memory symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) internal virtual onlyInitializing { - _isNonDivisible = isNonDivisible_; - LSP4DigitalAssetMetadataInitAbstract._initialize( name_, symbol_, newOwner_, lsp4TokenType_ ); + + _isNonDivisible = isNonDivisible_; } // fallback function diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol index 9f15ac366..525584001 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol @@ -34,7 +34,7 @@ abstract contract LSP7CompatibleERC20 is IERC20Metadata, LSP7DigitalAsset { string memory symbol_, address newOwner_, uint256 lsp4TokenType_ - ) LSP7DigitalAsset(name_, symbol_, newOwner_, false, lsp4TokenType_) {} + ) LSP7DigitalAsset(name_, symbol_, newOwner_, lsp4TokenType_, false) {} /** * @inheritdoc IERC20Metadata diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol index 11321124d..d2176e60f 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol @@ -45,8 +45,8 @@ abstract contract LSP7CompatibleERC20InitAbstract is name_, symbol_, newOwner_, - false, - lsp4TokenType_ + lsp4TokenType_, + false ); } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol b/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol index ace26d5f7..397059e8c 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol @@ -21,20 +21,21 @@ contract LSP7Mintable is LSP7DigitalAsset, ILSP7Mintable { * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param isNonDivisible_ Specify if the LSP7 token is a fungible or non-fungible token. */ constructor( string memory name_, string memory symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) LSP7DigitalAsset( name_, symbol_, newOwner_, - isNonDivisible_, - lsp4TokenType_ + lsp4TokenType_, + isNonDivisible_ ) {} diff --git a/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol b/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol index 753082337..0f2dc1f62 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol @@ -24,20 +24,21 @@ contract LSP7MintableInit is LSP7MintableInitAbstract { * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param isNonDivisible_ Specify if the LSP7 token is a fungible or non-fungible token. */ function initialize( string memory name_, string memory symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) external virtual initializer { LSP7MintableInitAbstract._initialize( name_, symbol_, newOwner_, - isNonDivisible_, - lsp4TokenType_ + lsp4TokenType_, + isNonDivisible_ ); } } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol b/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol index 7e2fe43f5..81708365a 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol @@ -25,20 +25,21 @@ abstract contract LSP7MintableInitAbstract is * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param isNonDivisible_ Specify if the LSP7 token is a fungible or non-fungible token. */ function _initialize( string memory name_, string memory symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) internal virtual override onlyInitializing { LSP7DigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - isNonDivisible_, - lsp4TokenType_ + lsp4TokenType_, + isNonDivisible_ ); } diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol index 911441eb2..2b9d741d5 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol @@ -57,7 +57,7 @@ abstract contract LSP8IdentifiableDigitalAsset is { /** * @notice Deploying a LSP8IdentifiableDigitalAsset with name `name_`, symbol `symbol_`, owned by address `newOwner_` - * with tokenId type `tokenIdType_`. + * with tokenId type `lsp8TokenIdType_`. * * @dev Deploy a `LSP8IdentifiableDigitalAsset` contract and set the tokenId type inside the ERC725Y storage of the contract. * This will also set the token `name_` and `symbol_` under the ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol`. @@ -65,9 +65,9 @@ abstract contract LSP8IdentifiableDigitalAsset is * @param name_ The name of the token * @param symbol_ The symbol of the token * @param newOwner_ The owner of the the token-Metadata - * @param tokenIdType_ The type of tokenIds (= NFTs) that this contract will create. - * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. * * @custom:warning Make sure the tokenId type provided on deployment is correct, as it can only be set once * and cannot be changed in the ERC725Y storage after the contract has been deployed. @@ -76,12 +76,12 @@ abstract contract LSP8IdentifiableDigitalAsset is string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP4DigitalAssetMetadata(name_, symbol_, newOwner_, lsp4TokenType_) { LSP4DigitalAssetMetadata._setData( _LSP8_TOKENID_TYPE_KEY, - abi.encode(tokenIdType_) + abi.encode(lsp8TokenIdType_) ); } diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol index caadbd6c8..ed0e43260 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol @@ -62,9 +62,9 @@ abstract contract LSP8IdentifiableDigitalAssetInitAbstract is * @param name_ The name of the token * @param symbol_ The symbol of the token * @param newOwner_ The owner of the the token-Metadata - * @param tokenIdType_ The type of tokenIds (= NFTs) that this contract will create. - * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. * * @custom:warning Make sure the tokenId type provided on deployment is correct, as it can only be set once * and cannot be changed in the ERC725Y storage after the contract has been initialized. @@ -73,8 +73,8 @@ abstract contract LSP8IdentifiableDigitalAssetInitAbstract is string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) internal virtual onlyInitializing { LSP4DigitalAssetMetadataInitAbstract._initialize( name_, @@ -85,7 +85,7 @@ abstract contract LSP8IdentifiableDigitalAssetInitAbstract is LSP4DigitalAssetMetadataInitAbstract._setData( _LSP8_TOKENID_TYPE_KEY, - abi.encode(tokenIdType_) + abi.encode(lsp8TokenIdType_) ); } diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol index e3fe0d906..cb7bb01c6 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol @@ -65,20 +65,22 @@ abstract contract LSP8CompatibleERC721 is * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ constructor( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol index 6c5e5c3bb..ceef8f14e 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol @@ -65,21 +65,23 @@ abstract contract LSP8CompatibleERC721InitAbstract is * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ function _initialize( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) internal virtual override onlyInitializing { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol index 3d9423b4e..32c34d705 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol @@ -15,20 +15,22 @@ contract LSP8CompatibleERC721Mintable is LSP8CompatibleERC721 { * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ constructor( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8CompatibleERC721( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol index b94628cce..bc9355ee5 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol @@ -27,20 +27,22 @@ contract LSP8CompatibleERC721MintableInit is * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ function initialize( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) external virtual initializer { LSP8CompatibleERC721MintableInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol index 92d1c3591..9777aa926 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol @@ -19,15 +19,15 @@ contract LSP8CompatibleERC721MintableInitAbstract is string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) internal virtual override onlyInitializing { LSP8CompatibleERC721InitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol index 71016bd81..275a3a229 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol @@ -22,20 +22,22 @@ contract LSP8Mintable is LSP8IdentifiableDigitalAsset, ILSP8Mintable { * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ constructor( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol index ab2c12fb3..75bea8902 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol @@ -24,20 +24,22 @@ contract LSP8MintableInit is LSP8MintableInitAbstract { * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ function initialize( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) external virtual initializer { LSP8MintableInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol index eefcf50a4..5284e265a 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol @@ -23,20 +23,23 @@ abstract contract LSP8MintableInitAbstract is * @param name_ The name of the token. * @param symbol_ The symbol of the token. * @param newOwner_ The owner of the token contract. + * @param lsp4TokenType_ The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). + * @param lsp8TokenIdType_ The type of tokenIds (= NFTs) that this contract will create. + * Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. */ function _initialize( string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) internal virtual override onlyInitializing { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol b/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol index 10448ca6d..0e9c44e1b 100644 --- a/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol +++ b/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol @@ -15,15 +15,15 @@ contract LSP7CappedSupplyInitTester is LSP7CappedSupplyInitAbstract { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenSupplyCap_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 tokenSupplyCap_ ) public virtual initializer { LSP7DigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - true, - lsp4TokenType_ + lsp4TokenType_, + true ); LSP7CappedSupplyInitAbstract._initialize(tokenSupplyCap_); } diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol b/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol index ab445935b..de76f80d2 100644 --- a/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol +++ b/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol @@ -13,10 +13,10 @@ contract LSP7CappedSupplyTester is LSP7CappedSupply { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenSupplyCap_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 tokenSupplyCap_ ) - LSP7DigitalAsset(name_, symbol_, newOwner_, true, lsp4TokenType_) + LSP7DigitalAsset(name_, symbol_, newOwner_, lsp4TokenType_, true) LSP7CappedSupply(tokenSupplyCap_) {} diff --git a/contracts/Mocks/Tokens/LSP7InitTester.sol b/contracts/Mocks/Tokens/LSP7InitTester.sol index 4877eb159..731591bd1 100644 --- a/contracts/Mocks/Tokens/LSP7InitTester.sol +++ b/contracts/Mocks/Tokens/LSP7InitTester.sol @@ -18,15 +18,15 @@ contract LSP7InitTester is string memory tokenName_, string memory tokenSymbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ) public initializer { LSP7DigitalAssetInitAbstract._initialize( tokenName_, tokenSymbol_, newOwner_, - isNonDivisible_, - lsp4TokenType_ + lsp4TokenType_, + isNonDivisible_ ); } diff --git a/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol b/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol index fd25565a9..f90f5daf8 100644 --- a/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol +++ b/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol @@ -9,7 +9,7 @@ contract LSP7MintWhenDeployed is LSP7DigitalAsset { string memory symbol_, address newOwner_, uint256 lsp4TokenType_ - ) LSP7DigitalAsset(name_, symbol_, newOwner_, false, lsp4TokenType_) { + ) LSP7DigitalAsset(name_, symbol_, newOwner_, lsp4TokenType_, false) { _mint(newOwner_, 1_000, true, ""); } } diff --git a/contracts/Mocks/Tokens/LSP7Tester.sol b/contracts/Mocks/Tokens/LSP7Tester.sol index 0dfa40742..76a1a4404 100644 --- a/contracts/Mocks/Tokens/LSP7Tester.sol +++ b/contracts/Mocks/Tokens/LSP7Tester.sol @@ -11,7 +11,7 @@ contract LSP7Tester is LSP7DigitalAsset, LSP7Burnable { string memory symbol_, address newOwner_, uint256 lsp4TokenType_ - ) LSP7DigitalAsset(name_, symbol_, newOwner_, false, lsp4TokenType_) {} + ) LSP7DigitalAsset(name_, symbol_, newOwner_, lsp4TokenType_, false) {} function mint( address to, diff --git a/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol b/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol index 79128af6d..b0526f8ea 100644 --- a/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol +++ b/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol @@ -15,15 +15,15 @@ contract LSP8BurnableInitTester is LSP8BurnableInitAbstract { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) public virtual initializer { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } } diff --git a/contracts/Mocks/Tokens/LSP8BurnableTester.sol b/contracts/Mocks/Tokens/LSP8BurnableTester.sol index a8dcf0cd9..e6b0ad3a7 100644 --- a/contracts/Mocks/Tokens/LSP8BurnableTester.sol +++ b/contracts/Mocks/Tokens/LSP8BurnableTester.sol @@ -15,15 +15,15 @@ contract LSP8BurnableTester is LSP8Burnable { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} } diff --git a/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol b/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol index b73503f1f..b59edd2d1 100644 --- a/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol +++ b/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol @@ -15,16 +15,16 @@ contract LSP8CappedSupplyInitTester is LSP8CappedSupplyInitAbstract { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 tokenSupplyCap_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_, + uint256 tokenSupplyCap_ ) public virtual initializer { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); LSP8CappedSupplyInitAbstract._initialize(tokenSupplyCap_); } diff --git a/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol b/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol index c0ad07698..f29e9459b 100644 --- a/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol +++ b/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol @@ -15,16 +15,16 @@ contract LSP8CappedSupplyTester is LSP8CappedSupply { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 tokenSupplyCap_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_, + uint256 tokenSupplyCap_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) LSP8CappedSupply(tokenSupplyCap_) {} diff --git a/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol b/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol index 8e400d4c4..611b1b06e 100644 --- a/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol +++ b/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol @@ -17,16 +17,16 @@ contract LSP8CompatibleERC721Tester is LSP8CompatibleERC721 { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - bytes memory tokenURIValue_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_, + bytes memory tokenURIValue_ ) LSP8CompatibleERC721( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) { _setData(_LSP4_METADATA_KEY, tokenURIValue_); diff --git a/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol b/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol index a7e3b65b6..2f65ee39e 100644 --- a/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol +++ b/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol @@ -24,16 +24,16 @@ contract LSP8CompatibleERC721InitTester is LSP8CompatibleERC721InitAbstract { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - bytes memory tokenURIValue_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_, + bytes memory tokenURIValue_ ) public virtual initializer { LSP8CompatibleERC721InitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); _setData(_LSP4_METADATA_KEY, tokenURIValue_); diff --git a/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol b/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol index 05e2f7313..99aa816f2 100644 --- a/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol +++ b/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol @@ -15,15 +15,15 @@ contract LSP8EnumerableInitTester is LSP8EnumerableInitAbstract { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) public virtual initializer { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } diff --git a/contracts/Mocks/Tokens/LSP8EnumerableTester.sol b/contracts/Mocks/Tokens/LSP8EnumerableTester.sol index cf46ca5be..a8edcde1b 100644 --- a/contracts/Mocks/Tokens/LSP8EnumerableTester.sol +++ b/contracts/Mocks/Tokens/LSP8EnumerableTester.sol @@ -15,15 +15,15 @@ contract LSP8EnumerableTester is LSP8Enumerable { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} diff --git a/contracts/Mocks/Tokens/LSP8InitTester.sol b/contracts/Mocks/Tokens/LSP8InitTester.sol index 633f776f0..5036ea8e4 100644 --- a/contracts/Mocks/Tokens/LSP8InitTester.sol +++ b/contracts/Mocks/Tokens/LSP8InitTester.sol @@ -18,15 +18,15 @@ contract LSP8InitTester is string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) public initializer { LSP8IdentifiableDigitalAssetInitAbstract._initialize( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ); } diff --git a/contracts/Mocks/Tokens/LSP8Tester.sol b/contracts/Mocks/Tokens/LSP8Tester.sol index 080752ac6..ae1d18a5b 100644 --- a/contracts/Mocks/Tokens/LSP8Tester.sol +++ b/contracts/Mocks/Tokens/LSP8Tester.sol @@ -15,15 +15,15 @@ contract LSP8Tester is LSP8IdentifiableDigitalAsset, LSP8Burnable { string memory name_, string memory symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ) LSP8IdentifiableDigitalAsset( name_, symbol_, newOwner_, - tokenIdType_, - lsp4TokenType_ + lsp4TokenType_, + lsp8TokenIdType_ ) {} diff --git a/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md b/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md index b3d511af8..c991c7fc7 100644 --- a/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md +++ b/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md @@ -35,8 +35,8 @@ constructor( string name_, string symbol_, address newOwner_, - bool isNonDivisible_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + bool isNonDivisible_ ); ``` @@ -49,8 +49,8 @@ _Deploying a `LSP7Mintable` token contract with: token name = `name_`, token sym | `name_` | `string` | The name of the token. | | `symbol_` | `string` | The symbol of the token. | | `newOwner_` | `address` | The owner of the token contract. | -| `isNonDivisible_` | `bool` | - | | `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). | +| `isNonDivisible_` | `bool` | Specify if the LSP7 token is a fungible or non-fungible token. |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md index c6992231e..402cbbfe5 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md @@ -35,8 +35,8 @@ constructor( string name_, string symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ); ``` @@ -44,13 +44,13 @@ _Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `n #### Parameters -| Name | Type | Description | -| ---------------- | :-------: | ---------------------------------------------------------------------------------------------------- | -| `name_` | `string` | The name of the token. | -| `symbol_` | `string` | The symbol of the token. | -| `newOwner_` | `address` | The owner of the token contract. | -| `tokenIdType_` | `uint256` | - | -| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). | +| Name | Type | Description | +| ------------------ | :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name_` | `string` | The name of the token. | +| `symbol_` | `string` | The symbol of the token. | +| `newOwner_` | `address` | The owner of the token contract. | +| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). | +| `lsp8TokenIdType_` | `uint256` | The type of tokenIds (= NFTs) that this contract will create. Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md index 958dd5ebe..c669f007b 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md @@ -35,8 +35,8 @@ constructor( string name_, string symbol_, address newOwner_, - uint256 tokenIdType_, - uint256 lsp4TokenType_ + uint256 lsp4TokenType_, + uint256 lsp8TokenIdType_ ); ``` @@ -44,13 +44,13 @@ _Deploying a `LSP8Mintable` token contract with: token name = `name_`, token sym #### Parameters -| Name | Type | Description | -| ---------------- | :-------: | ---------------------------------------------------------------------------------------------------- | -| `name_` | `string` | The name of the token. | -| `symbol_` | `string` | The symbol of the token. | -| `newOwner_` | `address` | The owner of the token contract. | -| `tokenIdType_` | `uint256` | - | -| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). | +| Name | Type | Description | +| ------------------ | :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name_` | `string` | The name of the token. | +| `symbol_` | `string` | The symbol of the token. | +| `newOwner_` | `address` | The owner of the token contract. | +| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`1` = Token, `2` = NFT, `3` = Collection). | +| `lsp8TokenIdType_` | `uint256` | The type of tokenIds (= NFTs) that this contract will create. Available options are: NUMBER = `0`; STRING = `1`; UNIQUE_ID = `2`; HASH = `3`; ADDRESS = `4`. |
diff --git a/tests/Benchmark.test.ts b/tests/Benchmark.test.ts index 441a173f7..52e99959c 100644 --- a/tests/Benchmark.test.ts +++ b/tests/Benchmark.test.ts @@ -129,8 +129,8 @@ describe('⛽📊 Gas Benchmark', () => { 'Token', 'MTKN', accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); const lsp7DeployTransaction = lsp7Mintable.deployTransaction; @@ -143,8 +143,8 @@ describe('⛽📊 Gas Benchmark', () => { 'My NFT', 'MNFT', accounts[0].address, - LSP8_TOKEN_ID_TYPES.NUMBER, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.NUMBER, ); const lsp8DeployTransaction = lsp8Mintable.deployTransaction; @@ -554,8 +554,8 @@ describe('⛽📊 Gas Benchmark', () => { 'Token', 'MTKN', context.mainController.address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // deploy a LSP8 token @@ -563,8 +563,8 @@ describe('⛽📊 Gas Benchmark', () => { 'My NFT', 'MNFT', context.mainController.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); universalProfile1 = await new UniversalProfile__factory(context.mainController).deploy( @@ -708,8 +708,8 @@ describe('⛽📊 Gas Benchmark', () => { 'MetaCoin', 'MTC', context.mainController.address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // deploy a LSP8 NFT @@ -717,8 +717,8 @@ describe('⛽📊 Gas Benchmark', () => { 'MetaNFT', 'MNF', context.mainController.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); // mint some tokens to the UP @@ -897,16 +897,16 @@ describe('⛽📊 Gas Benchmark', () => { 'MetaCoin', 'MTC', context.mainController.address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); lsp7LyxDai = await new LSP7Mintable__factory(context.mainController).deploy( 'LyxDai', 'LDAI', context.mainController.address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); [lsp7MetaCoin, lsp7LyxDai].forEach(async (token) => { @@ -920,16 +920,16 @@ describe('⛽📊 Gas Benchmark', () => { 'MetaNFT', 'MNF', context.mainController.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); lsp8LyxPunks = await new LSP8Mintable__factory(context.mainController).deploy( 'LyxPunks', 'LPK', context.mainController.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); [ diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts index be9afd648..f37dcbe96 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts +++ b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts @@ -1788,24 +1788,24 @@ export const shouldBehaveLikeLSP1Delegate = ( 'TokenAlpha', 'TA', context.accounts.random.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); lsp8TokenB = await new LSP8Tester__factory(context.accounts.random).deploy( 'TokenBeta', 'TB', context.accounts.random.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); lsp8TokenC = await new LSP8Tester__factory(context.accounts.random).deploy( 'TokenGamma', 'TA', context.accounts.random.address, - LSP8_TOKEN_ID_TYPES.UNIQUE_ID, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.UNIQUE_ID, ); }); @@ -3129,8 +3129,8 @@ export const shouldBehaveLikeLSP1Delegate = ( 'MyToken', 'MTK', context.universalProfile1.address, - LSP8_TOKEN_ID_TYPES.NUMBER, LSP4_TOKEN_TYPES.NFT, + LSP8_TOKEN_ID_TYPES.NUMBER, ); // Mint token for UP1 await LSP8.mint(context.universalProfile1.address, '0x' + '0'.repeat(64), true, '0x'); diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts index 21dc57bbe..bafca29bd 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts +++ b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts @@ -1174,24 +1174,24 @@ export const shouldBehaveLikeLSP1Delegate = (buildContext: () => Promise Promise Promise Promise { // step 1 - deploy token contract const lsp7ConstructorArguments = abiCoder.encode( - ['string', 'string', 'address', 'bool'], - ['My UP LSP7 Token', 'UPLSP7', context.universalProfile.address, false], + ['string', 'string', 'address', 'uint256', 'bool'], + [ + 'My UP LSP7 Token', + 'UPLSP7', + context.universalProfile.address, + LSP4_TOKEN_TYPES.TOKEN, + false, + ], ); // we simulate deploying the token contract to know the future address of the LSP7 Token contract, diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts b/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts index b45229381..5ddbef075 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts +++ b/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts @@ -600,8 +600,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); targetContract = await new TargetPayableContract__factory(context.accounts[0]).deploy(); @@ -757,8 +757,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'New LSP7 Token', 'LSP7TKN', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); const lsp7TransferPayload = newLSP7Token.interface.encodeFunctionData('transfer', [ @@ -997,8 +997,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // give some tokens to the UP @@ -1160,8 +1160,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // give some tokens to the UP diff --git a/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts b/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts index 157285db6..3d34f37cf 100644 --- a/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts +++ b/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts @@ -335,16 +335,16 @@ export const shouldBehaveLikeAllowedFunctions = (buildContext: () => Promise Promise { // step 1 - deploy token contract const lsp7ConstructorArguments = abiCoder.encode( - ['string', 'string', 'address', 'bool'], - ['My UP LSP7 Token', 'UPLSP7', context.universalProfile.address, false], + ['string', 'string', 'address', 'uint256', 'bool'], + [ + 'My UP LSP7 Token', + 'UPLSP7', + context.universalProfile.address, + LSP4_TOKEN_TYPES.TOKEN, + false, + ], ); const lsp7DeploymentPayload = context.universalProfile.interface.encodeFunctionData( diff --git a/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts b/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts index 479a6a5f3..1d3626f4d 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts +++ b/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts @@ -883,8 +883,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); targetContract = await new TargetPayableContract__factory(context.accounts[0]).deploy(); @@ -1066,8 +1066,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'New LSP7 Token', 'LSP7TKN', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); const lsp7TransferPayload = newLSP7Token.interface.encodeFunctionData('transfer', [ @@ -1335,8 +1335,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // give some tokens to the UP @@ -1516,8 +1516,8 @@ export const shouldBehaveLikePermissionTransferValue = ( 'LSP7 Token', 'LSP7', context.accounts[0].address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); // give some tokens to the UP diff --git a/tests/LSP6KeyManager/LSP6ControlledToken.test.ts b/tests/LSP6KeyManager/LSP6ControlledToken.test.ts index 86758ebe0..ccd5e6eeb 100644 --- a/tests/LSP6KeyManager/LSP6ControlledToken.test.ts +++ b/tests/LSP6KeyManager/LSP6ControlledToken.test.ts @@ -36,8 +36,8 @@ const buildContext = async () => { 'name', 'symbol', accounts[0].address, - true, LSP4_TOKEN_TYPES.TOKEN, + true, ); const keyManager = await new LSP6KeyManager__factory(accounts[0]).deploy(lsp7.address); diff --git a/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts b/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts index 38a36bb75..34d7cc193 100644 --- a/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts +++ b/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts @@ -1379,8 +1379,8 @@ export const shouldBehaveLikeExecuteRelayCall = ( 'My LSP7 Token', 'LSP7', context.universalProfile.address, - false, LSP4_TOKEN_TYPES.TOKEN, + false, ); const permissionKeys = [ diff --git a/tests/LSP7DigitalAsset/LSP7CompatibleERC20.behaviour.ts b/tests/LSP7DigitalAsset/LSP7CompatibleERC20.behaviour.ts index 56fe715f5..03ca8905b 100644 --- a/tests/LSP7DigitalAsset/LSP7CompatibleERC20.behaviour.ts +++ b/tests/LSP7DigitalAsset/LSP7CompatibleERC20.behaviour.ts @@ -18,6 +18,7 @@ import { UniversalReceiverDelegateRevert__factory, } from '../../types'; import { ERC725YDataKeys } from '../../constants'; +import { abiCoder } from '../utils/helpers'; type LSP7CompatibleERC20TestAccounts = { owner: SignerWithAddress; @@ -1287,6 +1288,15 @@ export const shouldInitializeLikeLSP7CompatibleERC20 = ( .to.emit(context.lsp7CompatibleERC20, 'DataChanged') .withArgs(symbolKey, expectedSymbolValue); expect(await context.lsp7CompatibleERC20.getData(symbolKey)).to.equal(expectedSymbolValue); + + const tokenTypeKey = ERC725YDataKeys.LSP4['LSP4TokenType']; + const expectedTokenTypeValue = abiCoder.encode( + ['uint256'], + [context.deployParams.lsp4TokenType], + ); + expect(await context.lsp7CompatibleERC20.getData(tokenTypeKey)).to.equal( + expectedTokenTypeValue, + ); }); describe('when using the functions from IERC20Metadata', () => { diff --git a/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts b/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts index 6976b5c5a..69b4a762c 100644 --- a/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts +++ b/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts @@ -2261,6 +2261,9 @@ export const shouldInitializeLikeLSP7 = ( ['uint256'], [context.deployParams.lsp4TokenType], ); + await expect(context.initializeTransaction) + .to.emit(context.lsp7, 'DataChanged') + .withArgs(tokenTypeKey, expectedTokenTypeValue); expect(await context.lsp7.getData(tokenTypeKey)).to.equal(expectedTokenTypeValue); }); }); diff --git a/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts b/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts index 8c7533931..d4209cef6 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts +++ b/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts @@ -20,8 +20,8 @@ describe('LSP7CappedSupplyInit with proxy', () => { name: 'LSP7 capped supply - deployed with proxy', symbol: 'CAP', newOwner: accounts.owner.address, - tokenSupplyCap: ethers.BigNumber.from('2'), lsp4TokenType: LSP4_TOKEN_TYPES.TOKEN, + tokenSupplyCap: ethers.BigNumber.from('2'), }; const lsp7CappedSupplyInit = await new LSP7CappedSupplyInitTester__factory( accounts.owner, @@ -37,8 +37,8 @@ describe('LSP7CappedSupplyInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenSupplyCap, context.deployParams.lsp4TokenType, + context.deployParams.tokenSupplyCap, ); }; diff --git a/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts b/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts index 3a87705f1..fbf2b4107 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts +++ b/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts @@ -59,12 +59,12 @@ describe('LSP7DigitalAssetInit with proxy', () => { }; const initializeProxy = async (context: LSP7TestContext) => { - return context.lsp7['initialize(string,string,address,bool,uint256)']( + return context.lsp7['initialize(string,string,address,uint256,bool)']( context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - false, context.deployParams.lsp4TokenType, + false, ); }; @@ -77,12 +77,12 @@ describe('LSP7DigitalAssetInit with proxy', () => { it('should revert when initializing with address(0) as owner', async () => { await expect( - context.lsp7['initialize(string,string,address,bool,uint256)']( + context.lsp7['initialize(string,string,address,uint256,bool)']( context.deployParams.name, context.deployParams.symbol, ethers.constants.AddressZero, - false, 12345, + false, ), ).to.be.revertedWithCustomError(context.lsp7, 'OwnableCannotSetZeroAddressAsOwner'); }); @@ -113,12 +113,12 @@ describe('LSP7DigitalAssetInit with proxy', () => { shouldBehaveLikeLSP4DigitalAssetMetadata(async () => { const lsp4Context = await buildLSP4DigitalAssetMetadataTestContext(); - await lsp4Context.contract['initialize(string,string,address,bool,uint256)']( + await lsp4Context.contract['initialize(string,string,address,uint256,bool)']( 'LSP7 - deployed with proxy', 'TKN', lsp4Context.deployParams.owner.address, - false, lsp4Context.deployParams.lsp4TokenType, + false, ); return lsp4Context; diff --git a/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts b/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts index 8133684d0..0ee2d4782 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts +++ b/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts @@ -36,12 +36,12 @@ describe('LSP7MintableInit with proxy', () => { }; const initializeProxy = async (context: LSP7MintableTestContext) => { - return context.lsp7Mintable['initialize(string,string,address,bool,uint256)']( + return context.lsp7Mintable['initialize(string,string,address,uint256,bool)']( context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.isNFT, context.deployParams.lsp4TokenType, + context.deployParams.isNFT, ); }; @@ -67,12 +67,12 @@ describe('LSP7MintableInit with proxy', () => { const randomCaller = accounts[1]; await expect( - lsp7MintableInit['initialize(string,string,address,bool,uint256)']( + lsp7MintableInit['initialize(string,string,address,uint256,bool)']( 'XXXXXXXXXXX', 'XXX', randomCaller.address, - false, 12345, + false, ), ).to.be.revertedWith('Initializable: contract is already initialized'); }); diff --git a/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts b/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts index 353c572bb..1c9e546b6 100644 --- a/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts +++ b/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts @@ -17,16 +17,16 @@ describe('LSP7CappedSupply with constructor', () => { name: 'LSP7 capped supply - deployed with constructor', symbol: 'CAP', newOwner: accounts.owner.address, - tokenSupplyCap: ethers.BigNumber.from('2'), lsp4TokenType: LSP4_TOKEN_TYPES.TOKEN, + tokenSupplyCap: ethers.BigNumber.from('2'), }; const lsp7CappedSupply = await new LSP7CappedSupplyTester__factory(accounts.owner).deploy( deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenSupplyCap, deployParams.lsp4TokenType, + deployParams.tokenSupplyCap, ); return { accounts, lsp7CappedSupply, deployParams }; diff --git a/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts b/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts index 1dd2ccf62..c9afcaf9d 100644 --- a/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts +++ b/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts @@ -25,8 +25,8 @@ describe('LSP7Mintable with constructor', () => { deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.isNFT, deployParams.lsp4TokenType, + deployParams.isNFT, ); return { accounts, lsp7Mintable, deployParams }; diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts b/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts index e96a4ea32..8cbeecb82 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts +++ b/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts @@ -23,7 +23,7 @@ export type LSP8CappedSupplyTestContext = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; tokenSupplyCap: BigNumber; }; }; diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8CompatibleERC721.behaviour.ts b/tests/LSP8IdentifiableDigitalAsset/LSP8CompatibleERC721.behaviour.ts index c47bcf774..995666073 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8CompatibleERC721.behaviour.ts +++ b/tests/LSP8IdentifiableDigitalAsset/LSP8CompatibleERC721.behaviour.ts @@ -28,6 +28,7 @@ import { ERC725YDataKeys, INTERFACE_IDS, SupportedStandards } from '../../consta import type { BytesLike } from 'ethers'; import type { TransactionResponse } from '@ethersproject/abstract-provider'; +import { abiCoder } from '../utils/helpers'; export type LSP8CompatibleERC721TestAccounts = { owner: SignerWithAddress; @@ -46,9 +47,9 @@ type LSP8CompatibleERC721DeployParams = { name: string; symbol: string; newOwner: string; - lsp4MetadataValue: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; + lsp4MetadataValue: string; }; export type LSP8CompatibleERC721TestContext = { @@ -1291,6 +1292,18 @@ export const shouldInitializeLikeLSP8CompatibleERC721 = ( .to.emit(context.lsp8CompatibleERC721, 'DataChanged') .withArgs(symbolKey, expectedSymbolValue); expect(await context.lsp8CompatibleERC721.getData(symbolKey)).to.equal(expectedSymbolValue); + + const tokenTypeKey = ERC725YDataKeys.LSP4['LSP4TokenType']; + const expectedTokenTypeValue = abiCoder.encode( + ['uint256'], + [context.deployParams.lsp4TokenType], + ); + await expect(context.initializeTransaction) + .to.emit(context.lsp8CompatibleERC721, 'DataChanged') + .withArgs(tokenTypeKey, expectedTokenTypeValue); + expect(await context.lsp8CompatibleERC721.getData(tokenTypeKey)).to.equal( + expectedTokenTypeValue, + ); }); describe('when using the functions from IERC721Metadata', () => { diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts b/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts index 2c5066783..623c8098c 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts +++ b/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts @@ -19,7 +19,7 @@ export type LSP8EnumerableDeployParams = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; }; export type LSP8EnumerableTestContext = { diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts b/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts index 1ac94fdf4..e504a73bd 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts +++ b/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts @@ -43,7 +43,7 @@ export type LSP8DeployParams = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; }; export type LSP8TestContext = { @@ -1857,17 +1857,20 @@ export const shouldInitializeLikeLSP8 = ( .withArgs(symbolKey, expectedSymbolValue); expect(await context.lsp8.getData(symbolKey)).to.equal(expectedSymbolValue); - const tokenTypeKey = ERC725YDataKeys.LSP4['LSP4TokenType']; + const lsp4TokenTypeKey = ERC725YDataKeys.LSP4['LSP4TokenType']; const expectedTokenTypeValue = abiCoder.encode( ['uint256'], [context.deployParams.lsp4TokenType], ); - expect(await context.lsp8.getData(tokenTypeKey)).to.equal(expectedTokenTypeValue); + await expect(context.initializeTransaction) + .to.emit(context.lsp8, 'DataChanged') + .withArgs(lsp4TokenTypeKey, expectedTokenTypeValue); + expect(await context.lsp8.getData(lsp4TokenTypeKey)).to.equal(expectedTokenTypeValue); const lsp8TokenIdTypeDataKey = ERC725YDataKeys.LSP8['LSP8TokenIdType']; const expectedTokenIdDataValue = abiCoder.encode( ['uint256'], - [context.deployParams.tokenIdType], + [context.deployParams.lsp8TokenIdType], ); await expect(context.initializeTransaction) .to.emit(context.lsp8, 'DataChanged') diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts b/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts index 59c687015..c43537782 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts +++ b/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts @@ -29,7 +29,7 @@ export type LSP8MintableDeployParams = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; }; export type LSP8MintableTestContext = { diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts index 6d0980361..9d9d99c88 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts @@ -17,7 +17,7 @@ type LSP8BurnableInitTestContext = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; }; }; @@ -29,7 +29,7 @@ describe('LSP8BurnableInit with proxy', () => { symbol: 'BRN', newOwner: accounts[0].address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const lsp8BurnableImplementation = await new LSP8BurnableInitTester__factory( @@ -46,8 +46,8 @@ describe('LSP8BurnableInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, ); }; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts index 8463c9e0e..60a959160 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts @@ -20,7 +20,7 @@ describe('LSP8CappedSupplyInit with proxy', () => { symbol: 'CAP', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, tokenSupplyCap: ethers.BigNumber.from('2'), }; const lsp8CappedSupplyInit = await new LSP8CappedSupplyInitTester__factory( @@ -37,9 +37,9 @@ describe('LSP8CappedSupplyInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, - context.deployParams.tokenSupplyCap, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, + context.deployParams.tokenSupplyCap, ); }; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CompatibleERC721Init.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CompatibleERC721Init.test.ts index be586e4e5..55237103d 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CompatibleERC721Init.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CompatibleERC721Init.test.ts @@ -33,7 +33,7 @@ describe('LSP8CompatibleERC721Init with proxy', () => { symbol: 'NFT', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, lsp4MetadataValue, }; @@ -50,13 +50,13 @@ describe('LSP8CompatibleERC721Init with proxy', () => { }; const initializeProxy = async (context: LSP8CompatibleERC721TestContext) => { - return context.lsp8CompatibleERC721['initialize(string,string,address,uint256,bytes,uint256)']( + return context.lsp8CompatibleERC721['initialize(string,string,address,uint256,uint256,bytes)']( context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, - context.deployParams.lsp4MetadataValue, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, + context.deployParams.lsp4MetadataValue, ); }; @@ -74,9 +74,9 @@ describe('LSP8CompatibleERC721Init with proxy', () => { 'XXXXXXXXXXX', 'XXX', randomCaller.address, - 0, - '0x', 12345, + 6789, + '0x', ), ).to.be.revertedWith('Initializable: contract is already initialized'); }); @@ -95,8 +95,8 @@ describe('LSP8CompatibleERC721Init with proxy', () => { 'XXXXXXXXXXX', 'XXX', randomCaller.address, - 0, 12345, + 6789, ), ).to.be.revertedWith('Initializable: contract is already initialized'); }); diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts index c03240fa7..144374655 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts @@ -19,7 +19,7 @@ describe('LSP8EnumerableInit with proxy', () => { symbol: 'LSP8 NMRBL', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const LSP8EnumerableInit: LSP8EnumerableInitTester = @@ -36,8 +36,8 @@ describe('LSP8EnumerableInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, ); }; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts index 79ee91081..bb2362d2c 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts @@ -26,7 +26,7 @@ describe('LSP8IdentifiableDigitalAssetInit with proxy', () => { symbol: 'NFT', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: nftType, + lsp8TokenIdType: nftType, }; const lsp8TesterInit = await new LSP8InitTester__factory(accounts.owner).deploy(); @@ -58,8 +58,8 @@ describe('LSP8IdentifiableDigitalAssetInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, ); }; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts index 4ef49929a..a51cd4f8b 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts @@ -20,7 +20,7 @@ describe('LSP8MintableInit with proxy', () => { symbol: 'MNTBL', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const LSP8MintableInit: LSP8MintableInit = await new LSP8MintableInit__factory( @@ -38,8 +38,8 @@ describe('LSP8MintableInit with proxy', () => { context.deployParams.name, context.deployParams.symbol, context.deployParams.newOwner, - context.deployParams.tokenIdType, context.deployParams.lsp4TokenType, + context.deployParams.lsp8TokenIdType, ); }; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts index 05d691467..d423d2961 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts @@ -14,7 +14,7 @@ type LSP8BurnableTestContext = { symbol: string; newOwner: string; lsp4TokenType: number; - tokenIdType: number; + lsp8TokenIdType: number; }; }; @@ -26,15 +26,15 @@ describe('LSP8Burnable with constructor', () => { symbol: 'BRN', newOwner: accounts[0].address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const lsp8Burnable = await new LSP8BurnableTester__factory(accounts[0]).deploy( deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, ); return { accounts, lsp8Burnable, deployParams }; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts index c6c332724..ddb5bcd45 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts @@ -18,16 +18,16 @@ describe('LSP8CappedSupply with constructor', () => { symbol: 'CAP', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, tokenSupplyCap: ethers.BigNumber.from('2'), }; const lsp8CappedSupply = await new LSP8CappedSupplyTester__factory(accounts.owner).deploy( deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, - deployParams.tokenSupplyCap, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, + deployParams.tokenSupplyCap, ); return { accounts, lsp8CappedSupply, deployParams }; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CompatibleERC721.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CompatibleERC721.test.ts index 50d3a59d5..25e8891df 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CompatibleERC721.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CompatibleERC721.test.ts @@ -27,7 +27,7 @@ describe('LSP8CompatibleERC721 with constructor', () => { symbol: 'NFT', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, lsp4MetadataValue, }; @@ -37,9 +37,9 @@ describe('LSP8CompatibleERC721 with constructor', () => { deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, - deployParams.lsp4MetadataValue, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, + deployParams.lsp4MetadataValue, ); return { accounts, lsp8CompatibleERC721, deployParams }; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts index 7310947d0..1e290c049 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts @@ -17,7 +17,7 @@ describe('LSP8Enumerable with constructor', () => { symbol: 'LSP8 NMRBL', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const lsp8Enumerable: LSP8EnumerableTester = await new LSP8EnumerableTester__factory( @@ -26,8 +26,8 @@ describe('LSP8Enumerable with constructor', () => { deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, ); return { accounts, lsp8Enumerable, deployParams }; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts index 0fb923317..86016cefc 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts @@ -29,14 +29,14 @@ describe('LSP8IdentifiableDigitalAsset with constructor', () => { symbol: 'NFT', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: nftType, + lsp8TokenIdType: nftType, }; const lsp8 = await new LSP8Tester__factory(accounts.owner).deploy( deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, ); return { accounts, lsp8, deployParams }; @@ -67,14 +67,14 @@ describe('LSP8IdentifiableDigitalAsset with constructor', () => { symbol: 'NFT', owner: accounts[0], lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const contract = await new LSP8Tester__factory(accounts[0]).deploy( deployParams.name, deployParams.symbol, deployParams.owner.address, - deployParams.tokenIdType, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, ); return { accounts, contract, deployParams }; @@ -98,8 +98,8 @@ describe('LSP8IdentifiableDigitalAsset with constructor', () => { deployParams.name, deployParams.symbol, ethers.constants.AddressZero, - LSP8_TOKEN_ID_TYPES.NUMBER, deployParams.lsp4TokenType, + LSP8_TOKEN_ID_TYPES.NUMBER, ), ).to.be.revertedWithCustomError(contractToDeploy, 'OwnableCannotSetZeroAddressAsOwner'); }); diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts index 3c50646fc..136748419 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts +++ b/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts @@ -17,15 +17,15 @@ describe('LSP8Mintable with constructor', () => { symbol: 'LSP8 MNTBL', newOwner: accounts.owner.address, lsp4TokenType: LSP4_TOKEN_TYPES.NFT, - tokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, + lsp8TokenIdType: LSP8_TOKEN_ID_TYPES.NUMBER, }; const lsp8Mintable: LSP8Mintable = await new LSP8Mintable__factory(accounts.owner).deploy( deployParams.name, deployParams.symbol, deployParams.newOwner, - deployParams.tokenIdType, deployParams.lsp4TokenType, + deployParams.lsp8TokenIdType, ); return { accounts, lsp8Mintable, deployParams }; diff --git a/tests/foundry/GasTests/execute/RestrictedController.sol b/tests/foundry/GasTests/execute/RestrictedController.sol index d6a7497b0..0f1f6b7bf 100644 --- a/tests/foundry/GasTests/execute/RestrictedController.sol +++ b/tests/foundry/GasTests/execute/RestrictedController.sol @@ -446,8 +446,8 @@ contract ExecuteRestrictedController is UniversalProfileTestsHelper { "TestLSP8", "TSTLSP8", digitalAssetsOwner, - _LSP8_TOKENID_TYPE_NUMBER, - _LSP4_TOKEN_TYPE_NFT + _LSP4_TOKEN_TYPE_NFT, + _LSP8_TOKENID_TYPE_NUMBER ); bytes32 tokenID = bytes32(uint256(1)); diff --git a/tests/foundry/GasTests/execute/UnrestrictedController.sol b/tests/foundry/GasTests/execute/UnrestrictedController.sol index f2fdcbc19..892599d1f 100644 --- a/tests/foundry/GasTests/execute/UnrestrictedController.sol +++ b/tests/foundry/GasTests/execute/UnrestrictedController.sol @@ -268,8 +268,8 @@ contract ExecuteUnrestrictedController is UniversalProfileTestsHelper { "TestLSP8", "TSTLSP8", digitalAssetsOwner, - _LSP8_TOKENID_TYPE_NUMBER, - _LSP4_TOKEN_TYPE_NFT + _LSP4_TOKEN_TYPE_NFT, + _LSP8_TOKENID_TYPE_NUMBER ); bytes32 tokenID = bytes32(uint256(1));