git.delta.rocks / unique-network / refs/commits / 6edd3f1acfd3

difftreelog

feat implement evm property manipulation

Yaroslav Bolyukin2022-05-17parent: #6020bb0.patch.diff
in: master

12 files changed

modified.maintain/scripts/generate_api.shdiffbeforeafterboth
--- a/.maintain/scripts/generate_api.sh
+++ b/.maintain/scripts/generate_api.sh
@@ -7,6 +7,5 @@
 sed -n '/=== SNIP START ===/, /=== SNIP END ===/{ /=== SNIP START ===/! { /=== SNIP END ===/! p } }' $tmp > $raw
 formatted=$(mktemp)
 prettier --use-tabs $raw > $formatted
-solhint --fix $formatted
 
 mv $formatted $OUTPUT
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -21,7 +21,7 @@
 use sp_std::vec::Vec;
 use up_data_structs::Property;
 
-use crate::{Pallet, CollectionHandle, Config};
+use crate::{Pallet, CollectionHandle, Config, CollectionProperties};
 
 /// Does not always represent a full collection, for RFT it is either
 /// collection (Implementing ERC721), or specific collection token (Implementing ERC20)
@@ -33,24 +33,35 @@
 
 #[solidity_interface(name = "CollectionProperties")]
 impl<T: Config> CollectionHandle<T> {
-	fn set_property(&mut self, caller: caller, key: string, value: string) -> Result<()> {
-		<Pallet<T>>::set_collection_property(
-			self,
-			&T::CrossAccountId::from_eth(caller),
-			Property {
-				key: <Vec<u8>>::from(key)
-					.try_into()
-					.map_err(|_| "key too large")?,
-				value: <Vec<u8>>::from(value)
-					.try_into()
-					.map_err(|_| "value too large")?,
-			},
-		)
-		.map_err(dispatch_to_evm::<T>)?;
-		Ok(())
+	fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too large")?;
+		let value = value.try_into().map_err(|_| "value too large")?;
+
+		<Pallet<T>>::set_collection_property(self, &caller, Property { key, value })
+			.map_err(dispatch_to_evm::<T>)
 	}
 
-	fn delete_property(&mut self, caller: caller, key: string) -> Result<()> {
-		self.set_property(caller, key, string::new())
+	fn delete_collection_property(&mut self, caller: caller, key: string) -> Result<()> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too large")?;
+
+		<Pallet<T>>::delete_collection_property(self, &caller, key).map_err(dispatch_to_evm::<T>)
+	}
+
+	/// Throws error if key not found
+	fn collection_property(&self, key: string) -> Result<bytes> {
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too large")?;
+
+		let props = <CollectionProperties<T>>::get(self.id);
+		let prop = props.get(&key).ok_or("key not found")?;
+
+		Ok(prop.to_vec())
 	}
 }
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -31,12 +31,12 @@
 use pallet_evm::GasWeightMapping;
 use up_data_structs::{
 	COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionId, CreateItemData,
-	MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId,
-	CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
+	MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId, CollectionStats,
+	MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
 	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT,
-	CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState,
-	CreateItemExData, SponsoringRateLimit, budget::Budget, COLLECTION_FIELD_LIMIT, CollectionField,
-	PhantomType, Property, Properties, PropertiesPermissionMap, PropertyKey, PropertyPermission,
+	CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState, CreateItemExData,
+	SponsoringRateLimit, budget::Budget, COLLECTION_FIELD_LIMIT, CollectionField, PhantomType,
+	Property, Properties, PropertiesPermissionMap, PropertyKey, PropertyPermission,
 	PropertiesError, PropertyKeyPermission, TokenData, TrySet,
 };
 pub use pallet::*;
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
before · pallets/fungible/src/stubs/UniqueFungible.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}11contract ERC165 is Dummy {12	function supportsInterface(bytes4 interfaceID) external view returns (bool) {13		require(false, stub_error);14		interfaceID;15		return true;16	}17}1819// Inline20contract ERC20Events {21	event Transfer(address indexed from, address indexed to, uint256 value);22	event Approval(address indexed owner, address indexed spender, uint256 value);23}2425// Selector: 56fd500b26contract CollectionProperties is Dummy, ERC165 {27	// Selector: setProperty(string,string) 62d9491f28	function setProperty(string memory key, string memory value) public {29		require(false, stub_error);30		key;31		value;32		dummy = 0;33	}34	// Selector: deleteProperty(string) 3424191435	function deleteProperty(string memory key) public {36		require(false, stub_error);37		key;38		dummy = 0;39	}40}4142// Selector: 79cc679043contract ERC20UniqueExtensions is Dummy, ERC165 {44	// Selector: burnFrom(address,uint256) 79cc679045	function burnFrom(address from, uint256 amount) public returns (bool) {46		require(false, stub_error);47		from;48		amount;49		dummy = 0;50		return false;51	}52}5354// Selector: 942e8b2255contract ERC20 is Dummy, ERC165, ERC20Events {56	// Selector: name() 06fdde0357	function name() public view returns (string memory) {58		require(false, stub_error);59		dummy;60		return "";61	}62	// Selector: symbol() 95d89b4163	function symbol() public view returns (string memory) {64		require(false, stub_error);65		dummy;66		return "";67	}68	// Selector: totalSupply() 18160ddd69	function totalSupply() public view returns (uint256) {70		require(false, stub_error);71		dummy;72		return 0;73	}74	// Selector: decimals() 313ce56775	function decimals() public view returns (uint8) {76		require(false, stub_error);77		dummy;78		return 0;79	}80	// Selector: balanceOf(address) 70a0823181	function balanceOf(address owner) public view returns (uint256) {82		require(false, stub_error);83		owner;84		dummy;85		return 0;86	}87	// Selector: transfer(address,uint256) a9059cbb88	function transfer(address to, uint256 amount) public returns (bool) {89		require(false, stub_error);90		to;91		amount;92		dummy = 0;93		return false;94	}95	// Selector: transferFrom(address,address,uint256) 23b872dd96	function transferFrom(address from, address to, uint256 amount) public returns (bool) {97		require(false, stub_error);98		from;99		to;100		amount;101		dummy = 0;102		return false;103	}104	// Selector: approve(address,uint256) 095ea7b3105	function approve(address spender, uint256 amount) public returns (bool) {106		require(false, stub_error);107		spender;108		amount;109		dummy = 0;110		return false;111	}112	// Selector: allowance(address,address) dd62ed3e113	function allowance(address owner, address spender) public view returns (uint256) {114		require(false, stub_error);115		owner;116		spender;117		dummy;118		return 0;119	}120}121122contract UniqueFungible is Dummy, ERC165, ERC20, ERC20UniqueExtensions, CollectionProperties {123}124
after · pallets/fungible/src/stubs/UniqueFungible.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID)14		external15		view16		returns (bool)17	{18		require(false, stub_error);19		interfaceID;20		return true;21	}22}2324// Inline25contract ERC20Events {26	event Transfer(address indexed from, address indexed to, uint256 value);27	event Approval(28		address indexed owner,29		address indexed spender,30		uint256 value31	);32}3334// Selector: 79cc679035contract ERC20UniqueExtensions is Dummy, ERC165 {36	// Selector: burnFrom(address,uint256) 79cc679037	function burnFrom(address from, uint256 amount) public returns (bool) {38		require(false, stub_error);39		from;40		amount;41		dummy = 0;42		return false;43	}44}4546// Selector: 942e8b2247contract ERC20 is Dummy, ERC165, ERC20Events {48	// Selector: name() 06fdde0349	function name() public view returns (string memory) {50		require(false, stub_error);51		dummy;52		return "";53	}5455	// Selector: symbol() 95d89b4156	function symbol() public view returns (string memory) {57		require(false, stub_error);58		dummy;59		return "";60	}6162	// Selector: totalSupply() 18160ddd63	function totalSupply() public view returns (uint256) {64		require(false, stub_error);65		dummy;66		return 0;67	}6869	// Selector: decimals() 313ce56770	function decimals() public view returns (uint8) {71		require(false, stub_error);72		dummy;73		return 0;74	}7576	// Selector: balanceOf(address) 70a0823177	function balanceOf(address owner) public view returns (uint256) {78		require(false, stub_error);79		owner;80		dummy;81		return 0;82	}8384	// Selector: transfer(address,uint256) a9059cbb85	function transfer(address to, uint256 amount) public returns (bool) {86		require(false, stub_error);87		to;88		amount;89		dummy = 0;90		return false;91	}9293	// Selector: transferFrom(address,address,uint256) 23b872dd94	function transferFrom(95		address from,96		address to,97		uint256 amount98	) public returns (bool) {99		require(false, stub_error);100		from;101		to;102		amount;103		dummy = 0;104		return false;105	}106107	// Selector: approve(address,uint256) 095ea7b3108	function approve(address spender, uint256 amount) public returns (bool) {109		require(false, stub_error);110		spender;111		amount;112		dummy = 0;113		return false;114	}115116	// Selector: allowance(address,address) dd62ed3e117	function allowance(address owner, address spender)118		public119		view120		returns (uint256)121	{122		require(false, stub_error);123		owner;124		spender;125		dummy;126		return 0;127	}128}129130// Selector: 9b5e29c5131contract CollectionProperties is Dummy, ERC165 {132	// Selector: setCollectionProperty(string,bytes) 2f073f66133	function setCollectionProperty(string memory key, bytes memory value)134		public135	{136		require(false, stub_error);137		key;138		value;139		dummy = 0;140	}141142	// Selector: deleteCollectionProperty(string) 7b7debce143	function deleteCollectionProperty(string memory key) public {144		require(false, stub_error);145		key;146		dummy = 0;147	}148149	// Throws error if key not found150	//151	// Selector: collectionProperty(string) cf24fd6d152	function collectionProperty(string memory key)153		public154		view155		returns (bytes memory)156	{157		require(false, stub_error);158		key;159		dummy;160		return hex"";161	}162}163164contract UniqueFungible is165	Dummy,166	ERC165,167	ERC20,168	ERC20UniqueExtensions,169	CollectionProperties170{}
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -21,7 +21,7 @@
 };
 use evm_coder::{ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*, weight};
 use frame_support::BoundedVec;
-use up_data_structs::{TokenId, SchemaVersion};
+use up_data_structs::{TokenId, SchemaVersion, PropertyPermission, PropertyKeyPermission, Property};
 use pallet_evm_coder_substrate::dispatch_to_evm;
 use sp_core::{H160, U256};
 use sp_std::vec::Vec;
@@ -35,9 +35,80 @@
 
 use crate::{
 	AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
-	SelfWeightOf, weights::WeightInfo,
+	SelfWeightOf, weights::WeightInfo, TokenProperties,
 };
 
+#[solidity_interface(name = "TokenProperties")]
+impl<T: Config> NonfungibleHandle<T> {
+	fn set_token_property_permission(
+		&mut self,
+		caller: caller,
+		key: string,
+		is_mutable: bool,
+		collection_admin: bool,
+		token_owner: bool,
+	) -> Result<()> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		<Pallet<T>>::set_property_permission(
+			self,
+			&caller,
+			PropertyKeyPermission {
+				key: <Vec<u8>>::from(key)
+					.try_into()
+					.map_err(|_| "too long key")?,
+				permission: PropertyPermission {
+					mutable: is_mutable,
+					collection_admin,
+					token_owner,
+				},
+			},
+		)
+		.map_err(dispatch_to_evm::<T>)
+	}
+
+	fn set_property(
+		&mut self,
+		caller: caller,
+		token_id: uint256,
+		key: string,
+		value: bytes,
+	) -> Result<()> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too long")?;
+		let value = value.try_into().map_err(|_| "value too long")?;
+
+		<Pallet<T>>::set_token_property(self, &caller, TokenId(token_id), Property { key, value })
+			.map_err(dispatch_to_evm::<T>)
+	}
+
+	fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too long")?;
+
+		<Pallet<T>>::delete_token_property(self, &caller, TokenId(token_id), key)
+			.map_err(dispatch_to_evm::<T>)
+	}
+
+	/// Throws error if key not found
+	fn property(&self, token_id: uint256, key: string) -> Result<bytes> {
+		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+		let key = <Vec<u8>>::from(key)
+			.try_into()
+			.map_err(|_| "key too long")?;
+
+		let props = <TokenProperties<T>>::get((self.id, token_id));
+		let prop = props.get(&key).ok_or("key not found")?;
+
+		Ok(prop.to_vec())
+	}
+}
+
 fn error_unsupported_schema_version() -> Error {
 	alloc::format!(
 		"Unsupported schema version! Support only {:?}",
@@ -470,7 +541,8 @@
 		ERC721UniqueExtensions,
 		ERC721Mintable,
 		ERC721Burnable,
-		via("CollectionHandle<T>", common_mut, CollectionProperties)
+		via("CollectionHandle<T>", common_mut, CollectionProperties),
+		TokenProperties,
 	)
 )]
 impl<T: Config> NonfungibleHandle<T> {}
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -63,7 +63,9 @@
 #[frame_support::pallet]
 pub mod pallet {
 	use super::*;
-	use frame_support::{Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};
+	use frame_support::{
+		Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, traits::StorageVersion,
+	};
 	use frame_system::pallet_prelude::*;
 	use up_data_structs::{CollectionId, TokenId};
 	use super::weights::WeightInfo;
@@ -429,6 +431,14 @@
 		<PalletCommon<T>>::set_property_permissions(collection, sender, property_permissions)
 	}
 
+	pub fn set_property_permission(
+		collection: &CollectionHandle<T>,
+		sender: &T::CrossAccountId,
+		permission: PropertyKeyPermission,
+	) -> DispatchResult {
+		<PalletCommon<T>>::set_property_permission(collection, sender, permission)
+	}
+
 	pub fn transfer(
 		collection: &NonfungibleHandle<T>,
 		from: &T::CrossAccountId,
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -51,32 +51,68 @@
 	event MintingFinished();
 }
 
-// Selector: 42966c68
-contract ERC721Burnable is Dummy, ERC165 {
-	// Selector: burn(uint256) 42966c68
-	function burn(uint256 tokenId) public {
+// Selector: 41369377
+contract TokenProperties is Dummy, ERC165 {
+	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	function setTokenPropertyPermission(
+		string memory key,
+		bool isMutable,
+		bool collectionAdmin,
+		bool tokenOwner
+	) public {
 		require(false, stub_error);
-		tokenId;
+		key;
+		isMutable;
+		collectionAdmin;
+		tokenOwner;
 		dummy = 0;
 	}
-}
 
-// Selector: 56fd500b
-contract CollectionProperties is Dummy, ERC165 {
-	// Selector: setProperty(string,string) 62d9491f
-	function setProperty(string memory key, string memory value) public {
+	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	function setProperty(
+		uint256 tokenId,
+		string memory key,
+		bytes memory value
+	) public {
 		require(false, stub_error);
+		tokenId;
 		key;
 		value;
 		dummy = 0;
 	}
 
-	// Selector: deleteProperty(string) 34241914
-	function deleteProperty(string memory key) public {
+	// Selector: deleteProperty(uint256,string) 066111d1
+	function deleteProperty(uint256 tokenId, string memory key) public {
 		require(false, stub_error);
+		tokenId;
 		key;
 		dummy = 0;
 	}
+
+	// Throws error if key not found
+	//
+	// Selector: property(uint256,string) 7228c327
+	function property(uint256 tokenId, string memory key)
+		public
+		view
+		returns (bytes memory)
+	{
+		require(false, stub_error);
+		tokenId;
+		key;
+		dummy;
+		return hex"";
+	}
+}
+
+// Selector: 42966c68
+contract ERC721Burnable is Dummy, ERC165 {
+	// Selector: burn(uint256) 42966c68
+	function burn(uint256 tokenId) public {
+		require(false, stub_error);
+		tokenId;
+		dummy = 0;
+	}
 }
 
 // Selector: 58800161
@@ -294,6 +330,40 @@
 	}
 }
 
+// Selector: 9b5e29c5
+contract CollectionProperties is Dummy, ERC165 {
+	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	function setCollectionProperty(string memory key, bytes memory value)
+		public
+	{
+		require(false, stub_error);
+		key;
+		value;
+		dummy = 0;
+	}
+
+	// Selector: deleteCollectionProperty(string) 7b7debce
+	function deleteCollectionProperty(string memory key) public {
+		require(false, stub_error);
+		key;
+		dummy = 0;
+	}
+
+	// Throws error if key not found
+	//
+	// Selector: collectionProperty(string) cf24fd6d
+	function collectionProperty(string memory key)
+		public
+		view
+		returns (bytes memory)
+	{
+		require(false, stub_error);
+		key;
+		dummy;
+		return hex"";
+	}
+}
+
 // Selector: d74d154f
 contract ERC721UniqueExtensions is Dummy, ERC165 {
 	// Selector: transfer(address,uint256) a9059cbb
@@ -353,5 +423,6 @@
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
-	CollectionProperties
+	CollectionProperties,
+	TokenProperties
 {}
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -22,15 +22,6 @@
 	);
 }
 
-// Selector: 56fd500b
-interface CollectionProperties is Dummy, ERC165 {
-	// Selector: setProperty(string,string) 62d9491f
-	function setProperty(string memory key, string memory value) external;
-
-	// Selector: deleteProperty(string) 34241914
-	function deleteProperty(string memory key) external;
-}
-
 // Selector: 79cc6790
 interface ERC20UniqueExtensions is Dummy, ERC165 {
 	// Selector: burnFrom(address,uint256) 79cc6790
@@ -74,6 +65,24 @@
 		returns (uint256);
 }
 
+// Selector: 9b5e29c5
+interface CollectionProperties is Dummy, ERC165 {
+	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	function setCollectionProperty(string memory key, bytes memory value)
+		external;
+
+	// Selector: deleteCollectionProperty(string) 7b7debce
+	function deleteCollectionProperty(string memory key) external;
+
+	// Throws error if key not found
+	//
+	// Selector: collectionProperty(string) cf24fd6d
+	function collectionProperty(string memory key)
+		external
+		view
+		returns (bytes memory);
+}
+
 interface UniqueFungible is
 	Dummy,
 	ERC165,
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -42,21 +42,41 @@
 	event MintingFinished();
 }
 
+// Selector: 41369377
+interface TokenProperties is Dummy, ERC165 {
+	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	function setTokenPropertyPermission(
+		string memory key,
+		bool isMutable,
+		bool collectionAdmin,
+		bool tokenOwner
+	) external;
+
+	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	function setProperty(
+		uint256 tokenId,
+		string memory key,
+		bytes memory value
+	) external;
+
+	// Selector: deleteProperty(uint256,string) 066111d1
+	function deleteProperty(uint256 tokenId, string memory key) external;
+
+	// Throws error if key not found
+	//
+	// Selector: property(uint256,string) 7228c327
+	function property(uint256 tokenId, string memory key)
+		external
+		view
+		returns (bytes memory);
+}
+
 // Selector: 42966c68
 interface ERC721Burnable is Dummy, ERC165 {
 	// Selector: burn(uint256) 42966c68
 	function burn(uint256 tokenId) external;
 }
 
-// Selector: 56fd500b
-interface CollectionProperties is Dummy, ERC165 {
-	// Selector: setProperty(string,string) 62d9491f
-	function setProperty(string memory key, string memory value) external;
-
-	// Selector: deleteProperty(string) 34241914
-	function deleteProperty(string memory key) external;
-}
-
 // Selector: 58800161
 interface ERC721 is Dummy, ERC165, ERC721Events {
 	// Selector: balanceOf(address) 70a08231
@@ -171,6 +191,24 @@
 	function totalSupply() external view returns (uint256);
 }
 
+// Selector: 9b5e29c5
+interface CollectionProperties is Dummy, ERC165 {
+	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	function setCollectionProperty(string memory key, bytes memory value)
+		external;
+
+	// Selector: deleteCollectionProperty(string) 7b7debce
+	function deleteCollectionProperty(string memory key) external;
+
+	// Throws error if key not found
+	//
+	// Selector: collectionProperty(string) cf24fd6d
+	function collectionProperty(string memory key)
+		external
+		view
+		returns (bytes memory);
+}
+
 // Selector: d74d154f
 interface ERC721UniqueExtensions is Dummy, ERC165 {
 	// Selector: transfer(address,uint256) a9059cbb
@@ -202,5 +240,6 @@
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
-	CollectionProperties
+	CollectionProperties,
+	TokenProperties
 {}