difftreelog
Merge pull request #427 from UniqueNetwork/doc/architectural-changes
in: master
19 files changed
client/rpc/src/lib.rsdiffbeforeafterboth42#[rpc(server)]42#[rpc(server)]43#[async_trait]43#[async_trait]44pub trait UniqueApi<BlockHash, CrossAccountId, AccountId> {44pub trait UniqueApi<BlockHash, CrossAccountId, AccountId> {45 /// Get tokens owned by account.45 #[method(name = "unique_accountTokens")]46 #[method(name = "unique_accountTokens")]46 fn account_tokens(47 fn account_tokens(47 &self,48 &self,50 at: Option<BlockHash>,51 at: Option<BlockHash>,51 ) -> Result<Vec<TokenId>>;52 ) -> Result<Vec<TokenId>>;5354 /// Get tokens contained within a collection.52 #[method(name = "unique_collectionTokens")]55 #[method(name = "unique_collectionTokens")]53 fn collection_tokens(56 fn collection_tokens(54 &self,57 &self,55 collection: CollectionId,58 collection: CollectionId,56 at: Option<BlockHash>,59 at: Option<BlockHash>,57 ) -> Result<Vec<TokenId>>;60 ) -> Result<Vec<TokenId>>;6162 /// Check if the token exists.58 #[method(name = "unique_tokenExists")]63 #[method(name = "unique_tokenExists")]59 fn token_exists(64 fn token_exists(60 &self,65 &self,63 at: Option<BlockHash>,68 at: Option<BlockHash>,64 ) -> Result<bool>;69 ) -> Result<bool>;657071 /// Get the token owner.66 #[method(name = "unique_tokenOwner")]72 #[method(name = "unique_tokenOwner")]67 fn token_owner(73 fn token_owner(68 &self,74 &self,80 at: Option<BlockHash>,86 at: Option<BlockHash>,81 ) -> Result<Vec<CrossAccountId>>;87 ) -> Result<Vec<CrossAccountId>>;828889 /// Get the topmost token owner in the hierarchy of a possibly nested token.83 #[method(name = "unique_topmostTokenOwner")]90 #[method(name = "unique_topmostTokenOwner")]84 fn topmost_token_owner(91 fn topmost_token_owner(85 &self,92 &self,88 at: Option<BlockHash>,95 at: Option<BlockHash>,89 ) -> Result<Option<CrossAccountId>>;96 ) -> Result<Option<CrossAccountId>>;9798 /// Get tokens nested directly into the token.90 #[method(name = "unique_tokenChildren")]99 #[method(name = "unique_tokenChildren")]91 fn token_children(100 fn token_children(92 &self,101 &self,95 at: Option<BlockHash>,104 at: Option<BlockHash>,96 ) -> Result<Vec<TokenChild>>;105 ) -> Result<Vec<TokenChild>>;97106107 /// Get collection properties, optionally limited to the provided keys.98 #[method(name = "unique_collectionProperties")]108 #[method(name = "unique_collectionProperties")]99 fn collection_properties(109 fn collection_properties(100 &self,110 &self,103 at: Option<BlockHash>,113 at: Option<BlockHash>,104 ) -> Result<Vec<Property>>;114 ) -> Result<Vec<Property>>;105115116 /// Get token properties, optionally limited to the provided keys.106 #[method(name = "unique_tokenProperties")]117 #[method(name = "unique_tokenProperties")]107 fn token_properties(118 fn token_properties(108 &self,119 &self,112 at: Option<BlockHash>,123 at: Option<BlockHash>,113 ) -> Result<Vec<Property>>;124 ) -> Result<Vec<Property>>;114125126 /// Get property permissions, optionally limited to the provided keys.115 #[method(name = "unique_propertyPermissions")]127 #[method(name = "unique_propertyPermissions")]116 fn property_permissions(128 fn property_permissions(117 &self,129 &self,120 at: Option<BlockHash>,132 at: Option<BlockHash>,121 ) -> Result<Vec<PropertyKeyPermission>>;133 ) -> Result<Vec<PropertyKeyPermission>>;122134135 /// Get token data, including properties, optionally limited to the provided keys, and total pieces for an RFT.123 #[method(name = "unique_tokenData")]136 #[method(name = "unique_tokenData")]124 fn token_data(137 fn token_data(125 &self,138 &self,129 at: Option<BlockHash>,142 at: Option<BlockHash>,130 ) -> Result<TokenData<CrossAccountId>>;143 ) -> Result<TokenData<CrossAccountId>>;131144145 /// Get the amount of distinctive tokens present in a collection.132 #[method(name = "unique_totalSupply")]146 #[method(name = "unique_totalSupply")]133 fn total_supply(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<u32>;147 fn total_supply(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<u32>;148149 /// Get the amount of any user tokens owned by an account.134 #[method(name = "unique_accountBalance")]150 #[method(name = "unique_accountBalance")]135 fn account_balance(151 fn account_balance(136 &self,152 &self,139 at: Option<BlockHash>,155 at: Option<BlockHash>,140 ) -> Result<u32>;156 ) -> Result<u32>;157158 /// Get the amount of a specific token owned by an account.141 #[method(name = "unique_balance")]159 #[method(name = "unique_balance")]142 fn balance(160 fn balance(143 &self,161 &self,147 at: Option<BlockHash>,165 at: Option<BlockHash>,148 ) -> Result<String>;166 ) -> Result<String>;167168 /// Get the amount of currently possible sponsored transactions on a token for the fee to be taken off a sponsor.149 #[method(name = "unique_allowance")]169 #[method(name = "unique_allowance")]150 fn allowance(170 fn allowance(151 &self,171 &self,156 at: Option<BlockHash>,176 at: Option<BlockHash>,157 ) -> Result<String>;177 ) -> Result<String>;158178179 /// Get the list of admin accounts of a collection.159 #[method(name = "unique_adminlist")]180 #[method(name = "unique_adminlist")]160 fn adminlist(181 fn adminlist(161 &self,182 &self,162 collection: CollectionId,183 collection: CollectionId,163 at: Option<BlockHash>,184 at: Option<BlockHash>,164 ) -> Result<Vec<CrossAccountId>>;185 ) -> Result<Vec<CrossAccountId>>;186187 /// Get the list of accounts allowed to operate within a collection.165 #[method(name = "unique_allowlist")]188 #[method(name = "unique_allowlist")]166 fn allowlist(189 fn allowlist(167 &self,190 &self,168 collection: CollectionId,191 collection: CollectionId,169 at: Option<BlockHash>,192 at: Option<BlockHash>,170 ) -> Result<Vec<CrossAccountId>>;193 ) -> Result<Vec<CrossAccountId>>;194195 /// Check if a user is allowed to operate within a collection.171 #[method(name = "unique_allowed")]196 #[method(name = "unique_allowed")]172 fn allowed(197 fn allowed(173 &self,198 &self,176 at: Option<BlockHash>,201 at: Option<BlockHash>,177 ) -> Result<bool>;202 ) -> Result<bool>;203204 /// Get the last token ID created in a collection.178 #[method(name = "unique_lastTokenId")]205 #[method(name = "unique_lastTokenId")]179 fn last_token_id(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<TokenId>;206 fn last_token_id(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<TokenId>;207208 /// Get collection info by the specified ID.180 #[method(name = "unique_collectionById")]209 #[method(name = "unique_collectionById")]181 fn collection_by_id(210 fn collection_by_id(182 &self,211 &self,183 collection: CollectionId,212 collection: CollectionId,184 at: Option<BlockHash>,213 at: Option<BlockHash>,185 ) -> Result<Option<RpcCollection<AccountId>>>;214 ) -> Result<Option<RpcCollection<AccountId>>>;215216 /// Get chain stats about collections.186 #[method(name = "unique_collectionStats")]217 #[method(name = "unique_collectionStats")]187 fn collection_stats(&self, at: Option<BlockHash>) -> Result<CollectionStats>;218 fn collection_stats(&self, at: Option<BlockHash>) -> Result<CollectionStats>;188219220 /// Get the number of blocks until sponsoring a transaction is available.189 #[method(name = "unique_nextSponsored")]221 #[method(name = "unique_nextSponsored")]190 fn next_sponsored(222 fn next_sponsored(191 &self,223 &self,195 at: Option<BlockHash>,227 at: Option<BlockHash>,196 ) -> Result<Option<u64>>;228 ) -> Result<Option<u64>>;197229230 /// Get effective collection limits. If not explicitly set, get the chain defaults.198 #[method(name = "unique_effectiveCollectionLimits")]231 #[method(name = "unique_effectiveCollectionLimits")]199 fn effective_collection_limits(232 fn effective_collection_limits(200 &self,233 &self,201 collection_id: CollectionId,234 collection_id: CollectionId,202 at: Option<BlockHash>,235 at: Option<BlockHash>,203 ) -> Result<Option<CollectionLimits>>;236 ) -> Result<Option<CollectionLimits>>;204237238 /// Get the total amount of pieces of an RFT.205 #[method(name = "unique_totalPieces")]239 #[method(name = "unique_totalPieces")]206 fn total_pieces(240 fn total_pieces(207 &self,241 &self,228 Theme,262 Theme,229 >263 >230 {264 {265 /// Get the latest created collection ID.231 #[method(name = "rmrk_lastCollectionIdx")]266 #[method(name = "rmrk_lastCollectionIdx")]232 /// Get the latest created collection id233 fn last_collection_idx(&self, at: Option<BlockHash>) -> Result<RmrkCollectionId>;267 fn last_collection_idx(&self, at: Option<BlockHash>) -> Result<RmrkCollectionId>;234268269 /// Get collection info by ID.235 #[method(name = "rmrk_collectionById")]270 #[method(name = "rmrk_collectionById")]236 /// Get collection by id237 fn collection_by_id(271 fn collection_by_id(238 &self,272 &self,239 id: RmrkCollectionId,273 id: RmrkCollectionId,240 at: Option<BlockHash>,274 at: Option<BlockHash>,241 ) -> Result<Option<CollectionInfo>>;275 ) -> Result<Option<CollectionInfo>>;242276277 /// Get NFT info by collection and NFT IDs.243 #[method(name = "rmrk_nftById")]278 #[method(name = "rmrk_nftById")]244 /// Get NFT by collection id and NFT id245 fn nft_by_id(279 fn nft_by_id(246 &self,280 &self,247 collection_id: RmrkCollectionId,281 collection_id: RmrkCollectionId,248 nft_id: RmrkNftId,282 nft_id: RmrkNftId,249 at: Option<BlockHash>,283 at: Option<BlockHash>,250 ) -> Result<Option<NftInfo>>;284 ) -> Result<Option<NftInfo>>;251285286 /// Get tokens owned by an account in a collection.252 #[method(name = "rmrk_accountTokens")]287 #[method(name = "rmrk_accountTokens")]253 /// Get tokens owned by an account in a collection254 fn account_tokens(288 fn account_tokens(255 &self,289 &self,256 account_id: AccountId,290 account_id: AccountId,257 collection_id: RmrkCollectionId,291 collection_id: RmrkCollectionId,258 at: Option<BlockHash>,292 at: Option<BlockHash>,259 ) -> Result<Vec<RmrkNftId>>;293 ) -> Result<Vec<RmrkNftId>>;260294295 /// Get tokens nested in an NFT - its direct children (not the children's children).261 #[method(name = "rmrk_nftChildren")]296 #[method(name = "rmrk_nftChildren")]262 /// Get NFT children263 fn nft_children(297 fn nft_children(264 &self,298 &self,265 collection_id: RmrkCollectionId,299 collection_id: RmrkCollectionId,266 nft_id: RmrkNftId,300 nft_id: RmrkNftId,267 at: Option<BlockHash>,301 at: Option<BlockHash>,268 ) -> Result<Vec<RmrkNftChild>>;302 ) -> Result<Vec<RmrkNftChild>>;269303304 /// Get collection properties, created by the user - not the proxy-specific properties.270 #[method(name = "rmrk_collectionProperties")]305 #[method(name = "rmrk_collectionProperties")]271 /// Get collection properties272 fn collection_properties(306 fn collection_properties(273 &self,307 &self,274 collection_id: RmrkCollectionId,308 collection_id: RmrkCollectionId,275 filter_keys: Option<Vec<String>>,309 filter_keys: Option<Vec<String>>,276 at: Option<BlockHash>,310 at: Option<BlockHash>,277 ) -> Result<Vec<PropertyInfo>>;311 ) -> Result<Vec<PropertyInfo>>;278312313 /// Get NFT properties, created by the user - not the proxy-specific properties.279 #[method(name = "rmrk_nftProperties")]314 #[method(name = "rmrk_nftProperties")]280 /// Get NFT properties281 fn nft_properties(315 fn nft_properties(282 &self,316 &self,283 collection_id: RmrkCollectionId,317 collection_id: RmrkCollectionId,286 at: Option<BlockHash>,320 at: Option<BlockHash>,287 ) -> Result<Vec<PropertyInfo>>;321 ) -> Result<Vec<PropertyInfo>>;288322323 /// Get data of resources of an NFT.289 #[method(name = "rmrk_nftResources")]324 #[method(name = "rmrk_nftResources")]290 /// Get NFT resources291 fn nft_resources(325 fn nft_resources(292 &self,326 &self,293 collection_id: RmrkCollectionId,327 collection_id: RmrkCollectionId,294 nft_id: RmrkNftId,328 nft_id: RmrkNftId,295 at: Option<BlockHash>,329 at: Option<BlockHash>,296 ) -> Result<Vec<ResourceInfo>>;330 ) -> Result<Vec<ResourceInfo>>;297331332 /// Get the priority of a resource in an NFT.298 #[method(name = "rmrk_nftResourcePriority")]333 #[method(name = "rmrk_nftResourcePriority")]299 /// Get NFT resource priority300 fn nft_resource_priority(334 fn nft_resource_priority(301 &self,335 &self,302 collection_id: RmrkCollectionId,336 collection_id: RmrkCollectionId,305 at: Option<BlockHash>,339 at: Option<BlockHash>,306 ) -> Result<Option<u32>>;340 ) -> Result<Option<u32>>;307341342 /// Get base info by its ID.308 #[method(name = "rmrk_base")]343 #[method(name = "rmrk_base")]309 /// Get base info310 fn base(&self, base_id: RmrkBaseId, at: Option<BlockHash>) -> Result<Option<BaseInfo>>;344 fn base(&self, base_id: RmrkBaseId, at: Option<BlockHash>) -> Result<Option<BaseInfo>>;311345346 /// Get all parts of a base.312 #[method(name = "rmrk_baseParts")]347 #[method(name = "rmrk_baseParts")]313 /// Get all Base's parts314 fn base_parts(&self, base_id: RmrkBaseId, at: Option<BlockHash>) -> Result<Vec<PartType>>;348 fn base_parts(&self, base_id: RmrkBaseId, at: Option<BlockHash>) -> Result<Vec<PartType>>;315349350 /// Get the theme names belonging to a base.316 #[method(name = "rmrk_themeNames")]351 #[method(name = "rmrk_themeNames")]317 fn theme_names(352 fn theme_names(318 &self,353 &self,319 base_id: RmrkBaseId,354 base_id: RmrkBaseId,320 at: Option<BlockHash>,355 at: Option<BlockHash>,321 ) -> Result<Vec<RmrkThemeName>>;356 ) -> Result<Vec<RmrkThemeName>>;322357358 /// Get theme info, including properties, optionally limited to the provided keys.323 #[method(name = "rmrk_themes")]359 #[method(name = "rmrk_themes")]324 fn theme(360 fn theme(325 &self,361 &self,pallets/common/src/lib.rsdiffbeforeafterboth441 u128,441 u128,442 ),442 ),443443444 /// The colletion property has been set.444 /// The colletion property has been added or edited.445 CollectionPropertySet(445 CollectionPropertySet(446 /// Id of collection to which property has been set.446 /// Id of collection to which property has been set.447 CollectionId,447 CollectionId,457 PropertyKey,457 PropertyKey,458 ),458 ),459459460 /// The token property has been set.460 /// The token property has been added or edited.461 TokenPropertySet(461 TokenPropertySet(462 /// Identifier of the collection whose token has the property set.462 /// Identifier of the collection whose token has the property set.463 CollectionId,463 CollectionId,477 PropertyKey,477 PropertyKey,478 ),478 ),479479480 /// The colletion property permission has been set.480 /// The token property permission of a collection has been set.481 PropertyPermissionSet(481 PropertyPermissionSet(482 /// Id of collection to which property permission has been set.482 /// ID of collection to which property permission has been set.483 CollectionId,483 CollectionId,484 /// The property permission that was set.484 /// The property permission that was set.485 PropertyKey,485 PropertyKey,524 /// Metadata flag frozen524 /// Metadata flag frozen525 MetadataFlagFrozen,525 MetadataFlagFrozen,526526527 /// Item not exists.527 /// Item does not exist528 TokenNotFound,528 TokenNotFound,529 /// Item balance not enough.529 /// Item is balance not enough530 TokenValueTooLow,530 TokenValueTooLow,531 /// Requested value more than approved.531 /// Requested value is more than the approved532 ApprovedValueTooLow,532 ApprovedValueTooLow,533 /// Tried to approve more than owned533 /// Tried to approve more than owned534 CantApproveMoreThanOwned,534 CantApproveMoreThanOwned,535535536 /// Can't transfer tokens to ethereum zero address536 /// Can't transfer tokens to ethereum zero address537 AddressIsZero,537 AddressIsZero,538 /// Target collection doesn't supports this operation538 /// Target collection doesn't support this operation539 UnsupportedOperation,539 UnsupportedOperation,540540541 /// Not sufficient funds to perform action541 /// Insufficient funds to perform an action542 NotSufficientFounds,542 NotSufficientFounds,543543544 /// User not passed nesting rule544 /// User does not satisfy the nesting rule545 UserIsNotAllowedToNest,545 UserIsNotAllowedToNest,546 /// Only tokens from specific collections may nest tokens under this546 /// Only tokens from specific collections may nest tokens under this one547 SourceCollectionIsNotAllowedToNest,547 SourceCollectionIsNotAllowedToNest,548548549 /// Tried to store more data than allowed in collection field549 /// Tried to store more data than allowed in collection field558 /// Property key is too long558 /// Property key is too long559 PropertyKeyIsTooLong,559 PropertyKeyIsTooLong,560560561 /// Only ASCII letters, digits, and '_', '-' are allowed561 /// Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed562 InvalidCharacterInPropertyKey,562 InvalidCharacterInPropertyKey,563563564 /// Empty property keys are forbidden564 /// Empty property keys are forbidden571 CollectionIsInternal,571 CollectionIsInternal,572 }572 }573573574 /// Storage of the count of created collections.574 /// Storage of the count of created collections. Essentially contains the last collection ID.575 #[pallet::storage]575 #[pallet::storage]576 pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;576 pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;577577600 OnEmpty = up_data_structs::CollectionProperties,600 OnEmpty = up_data_structs::CollectionProperties,601 >;601 >;602602603 /// Storage of collection properties permissions.603 /// Storage of token property permissions of a collection.604 #[pallet::storage]604 #[pallet::storage]605 #[pallet::getter(fn property_permissions)]605 #[pallet::getter(fn property_permissions)]606 pub type CollectionPropertyPermissions<T> = StorageMap<606 pub type CollectionPropertyPermissions<T> = StorageMap<610 QueryKind = ValueQuery,610 QueryKind = ValueQuery,611 >;611 >;612612613 /// Storage of collection admins count.613 /// Storage of the amount of collection admins.614 #[pallet::storage]614 #[pallet::storage]615 pub type AdminAmount<T> = StorageMap<615 pub type AdminAmount<T> = StorageMap<616 Hasher = Blake2_128Concat,616 Hasher = Blake2_128Concat,619 QueryKind = ValueQuery,619 QueryKind = ValueQuery,620 >;620 >;621621622 /// List of collection admins622 /// List of collection admins.623 #[pallet::storage]623 #[pallet::storage]624 pub type IsAdmin<T: Config> = StorageNMap<624 pub type IsAdmin<T: Config> = StorageNMap<625 Key = (625 Key = (630 QueryKind = ValueQuery,630 QueryKind = ValueQuery,631 >;631 >;632632633 /// Allowlisted collection users633 /// Allowlisted collection users.634 #[pallet::storage]634 #[pallet::storage]635 pub type Allowlist<T: Config> = StorageNMap<635 pub type Allowlist<T: Config> = StorageNMap<636 Key = (636 Key = (pallets/fungible/src/lib.rsdiffbeforeafterboth119 pub enum Error<T> {119 pub enum Error<T> {120 /// Not Fungible item data used to mint in Fungible collection.120 /// Not Fungible item data used to mint in Fungible collection.121 NotFungibleDataUsedToMintFungibleCollectionToken,121 NotFungibleDataUsedToMintFungibleCollectionToken,122 /// Not default id passed as TokenId argument.123 /// The default value of TokenId for Fungible collection is 0.122 /// Fungible tokens hold no ID, and the default value of TokenId for Fungible collection is 0.124 FungibleItemsHaveNoId,123 FungibleItemsHaveNoId,125 /// Tried to set data for fungible item.124 /// Tried to set data for fungible item.126 FungibleItemsDontHaveData,125 FungibleItemsDontHaveData,157 QueryKind = ValueQuery,156 QueryKind = ValueQuery,158 >;157 >;159158160 /// Storage for delegated assets.159 /// Storage for assets delegated to a limited extent to other users.161 #[pallet::storage]160 #[pallet::storage]162 pub type Allowance<T: Config> = StorageNMap<161 pub type Allowance<T: Config> = StorageNMap<163 Key = (162 Key = (pallets/nonfungible/src/lib.rsdiffbeforeafterboth21//! - [`Config`]21//! - [`Config`]22//! - [`NonfungibleHandle`]22//! - [`NonfungibleHandle`]23//! - [`Pallet`]23//! - [`Pallet`]24//! - [`CommonWeights`]24//! - [`CommonWeights`](common::CommonWeights)25//!25//!26//! ## Overview26//! ## Overview27//!27//!130pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;130pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;131pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;131pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;132132133/// Token data, stored independently from other data used to describe it134/// for the convenience of database access. Notably contains the owner account address.133#[struct_versioning::versioned(version = 2, upper)]135#[struct_versioning::versioned(version = 2, upper)]134#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]136#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]135pub struct ItemData<CrossAccountId> {137pub struct ItemData<CrossAccountId> {176 #[pallet::generate_store(pub(super) trait Store)]178 #[pallet::generate_store(pub(super) trait Store)]177 pub struct Pallet<T>(_);179 pub struct Pallet<T>(_);178180179 /// Amount of tokens minted for collection.181 /// Total amount of minted tokens in a collection.180 #[pallet::storage]182 #[pallet::storage]181 pub type TokensMinted<T: Config> =183 pub type TokensMinted<T: Config> =182 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;184 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;183185184 /// Amount of burnt tokens for collection.186 /// Amount of burnt tokens in a collection.185 #[pallet::storage]187 #[pallet::storage]186 pub type TokensBurnt<T: Config> =188 pub type TokensBurnt<T: Config> =187 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;189 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;188190189 /// Custom data serialized to bytes for token.191 /// Token data, used to partially describe a token.190 #[pallet::storage]192 #[pallet::storage]191 pub type TokenData<T: Config> = StorageNMap<193 pub type TokenData<T: Config> = StorageNMap<192 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),194 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),193 Value = ItemData<T::CrossAccountId>,195 Value = ItemData<T::CrossAccountId>,194 QueryKind = OptionQuery,196 QueryKind = OptionQuery,195 >;197 >;196198197 /// Key-Value map stored for token.199 /// Map of key-value pairs, describing the metadata of a token.198 #[pallet::storage]200 #[pallet::storage]199 #[pallet::getter(fn token_properties)]201 #[pallet::getter(fn token_properties)]200 pub type TokenProperties<T: Config> = StorageNMap<202 pub type TokenProperties<T: Config> = StorageNMap<204 OnEmpty = up_data_structs::TokenProperties,206 OnEmpty = up_data_structs::TokenProperties,205 >;207 >;206208207 /// Custom data that is serialized to bytes and attached to a token property.209 /// Custom data of a token that is serialized to bytes,210 /// primarily reserved for on-chain operations,211 /// normally obscured from the external users.212 ///213 /// Auxiliary properties are slightly different from214 /// usual [`TokenProperties`] due to an unlimited number215 /// and separately stored and written-to key-value pairs.216 ///208 /// Currently used to store RMRK data.217 /// Currently used to store RMRK data.209 #[pallet::storage]218 #[pallet::storage]210 #[pallet::getter(fn token_aux_property)]219 #[pallet::getter(fn token_aux_property)]244 QueryKind = ValueQuery,253 QueryKind = ValueQuery,245 >;254 >;246255247 /// Amount of tokens owned by account.256 /// Amount of tokens owned by an account in a collection.248 #[pallet::storage]257 #[pallet::storage]249 pub type AccountBalance<T: Config> = StorageNMap<258 pub type AccountBalance<T: Config> = StorageNMap<250 Key = (259 Key = (255 QueryKind = ValueQuery,264 QueryKind = ValueQuery,256 >;265 >;257266258 /// Allowance set by an owner for a spender for a token.267 /// Allowance set by a token owner for another user to perform one of certain transactions on a token.259 #[pallet::storage]268 #[pallet::storage]260 pub type Allowance<T: Config> = StorageNMap<269 pub type Allowance<T: Config> = StorageNMap<261 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),270 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),262 Value = T::CrossAccountId,271 Value = T::CrossAccountId,263 QueryKind = OptionQuery,272 QueryKind = OptionQuery,264 >;273 >;265274275 /// Upgrade from the old schema to properties.266 #[pallet::hooks]276 #[pallet::hooks]267 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {277 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {268 fn on_runtime_upgrade() -> Weight {278 fn on_runtime_upgrade() -> Weight {pallets/refungible/src/lib.rsdiffbeforeafterboth21//! - [`Config`]21//! - [`Config`]22//! - [`RefungibleHandle`]22//! - [`RefungibleHandle`]23//! - [`Pallet`]23//! - [`Pallet`]24//! - [`CommonWeights`]24//! - [`CommonWeights`](common::CommonWeights)25//!25//!26//! ## Overview26//! ## Overview27//!27//!119pub mod weights;119pub mod weights;120pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;120pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;121121122/// Token data, stored independently from other data used to describe it123/// for the convenience of database access. Notably contains the token metadata.122#[struct_versioning::versioned(version = 2, upper)]124#[struct_versioning::versioned(version = 2, upper)]123#[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]125#[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]124pub struct ItemData {126pub struct ItemData {143 pub enum Error<T> {145 pub enum Error<T> {144 /// Not Refungible item data used to mint in Refungible collection.146 /// Not Refungible item data used to mint in Refungible collection.145 NotRefungibleDataUsedToMintFungibleCollectionToken,147 NotRefungibleDataUsedToMintFungibleCollectionToken,146 /// Maximum refungibility exceeded148 /// Maximum refungibility exceeded.147 WrongRefungiblePieces,149 WrongRefungiblePieces,148 /// Refungible token can't be repartitioned by user who isn't owns all pieces150 /// Refungible token can't be repartitioned by user who isn't owns all pieces.149 RepartitionWhileNotOwningAllPieces,151 RepartitionWhileNotOwningAllPieces,150 /// Refungible token can't nest other tokens152 /// Refungible token can't nest other tokens.151 RefungibleDisallowsNesting,153 RefungibleDisallowsNesting,152 /// Setting item properties is not allowed154 /// Setting item properties is not allowed.153 SettingPropertiesNotAllowed,155 SettingPropertiesNotAllowed,154 }156 }155157167 #[pallet::generate_store(pub(super) trait Store)]169 #[pallet::generate_store(pub(super) trait Store)]168 pub struct Pallet<T>(_);170 pub struct Pallet<T>(_);169171170 /// Amount of tokens minted for collection172 /// Total amount of minted tokens in a collection.171 #[pallet::storage]173 #[pallet::storage]172 pub type TokensMinted<T: Config> =174 pub type TokensMinted<T: Config> =173 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;175 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;174176175 /// Amount of burnt tokens for collection177 /// Amount of tokens burnt in a collection.176 #[pallet::storage]178 #[pallet::storage]177 pub type TokensBurnt<T: Config> =179 pub type TokensBurnt<T: Config> =178 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;180 StorageMap<Hasher = Twox64Concat, Key = CollectionId, Value = u32, QueryKind = ValueQuery>;179181180 /// Custom data serialized to bytes for token182 /// Token data, used to partially describe a token.181 #[pallet::storage]183 #[pallet::storage]182 pub type TokenData<T: Config> = StorageNMap<184 pub type TokenData<T: Config> = StorageNMap<183 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),185 Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),184 Value = ItemData,186 Value = ItemData,185 QueryKind = ValueQuery,187 QueryKind = ValueQuery,186 >;188 >;187189190 /// Amount of pieces a refungible token is split into.188 #[pallet::storage]191 #[pallet::storage]189 #[pallet::getter(fn token_properties)]192 #[pallet::getter(fn token_properties)]190 pub type TokenProperties<T: Config> = StorageNMap<193 pub type TokenProperties<T: Config> = StorageNMap<202 QueryKind = ValueQuery,205 QueryKind = ValueQuery,203 >;206 >;204207205 /// Used to enumerate tokens owned by account208 /// Used to enumerate tokens owned by account.206 #[pallet::storage]209 #[pallet::storage]207 pub type Owned<T: Config> = StorageNMap<210 pub type Owned<T: Config> = StorageNMap<208 Key = (211 Key = (214 QueryKind = ValueQuery,217 QueryKind = ValueQuery,215 >;218 >;216219217 /// Amount of tokens owned by account220 /// Amount of tokens (not pieces) partially owned by an account within a collection.218 #[pallet::storage]221 #[pallet::storage]219 pub type AccountBalance<T: Config> = StorageNMap<222 pub type AccountBalance<T: Config> = StorageNMap<220 Key = (223 Key = (226 QueryKind = ValueQuery,229 QueryKind = ValueQuery,227 >;230 >;228231229 /// Amount of token pieces owned by account232 /// Amount of token pieces owned by account.230 #[pallet::storage]233 #[pallet::storage]231 pub type Balance<T: Config> = StorageNMap<234 pub type Balance<T: Config> = StorageNMap<232 Key = (235 Key = (239 QueryKind = ValueQuery,242 QueryKind = ValueQuery,240 >;243 >;241244242 /// Allowance set by an owner for a spender for a token245 /// Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.243 #[pallet::storage]246 #[pallet::storage]244 pub type Allowance<T: Config> = StorageNMap<247 pub type Allowance<T: Config> = StorageNMap<245 Key = (248 Key = (pallets/scheduler/src/lib.rsdiffbeforeafterboth24// you may not use this file except in compliance with the License.24// you may not use this file except in compliance with the License.25// You may obtain a copy of the License at25// You may obtain a copy of the License at26//26//27// http://www.apache.org/licenses/LICENSE-2.027// <http://www.apache.org/licenses/LICENSE-2.0>28//28//29// Unless required by applicable law or agreed to in writing, software29// Unless required by applicable law or agreed to in writing, software30// distributed under the License is distributed on an "AS IS" BASIS,30// distributed under the License is distributed on an "AS IS" BASIS,50//! Also possible to book a call with a certain frequency.50//! Also possible to book a call with a certain frequency.51//!51//!52//! Key differences from the original pallet:52//! Key differences from the original pallet:53//! https://crates.io/crates/pallet-scheduler53//! <https://crates.io/crates/pallet-scheduler>54//! Schedule Id restricted by 16 bytes. Identificator for booked call.54//! Schedule Id restricted by 16 bytes. Identificator for booked call.55//! Priority limited by HARD DEADLINE (<= 63). Calls over maximum weight don't include to block.55//! Priority limited by HARD DEADLINE (<= 63). Calls over maximum weight don't include to block.56//! The maximum weight that may be scheduled per block for any dispatchables of less priority than `schedule::HARD_DEADLINE`.56//! The maximum weight that may be scheduled per block for any dispatchables of less priority than `schedule::HARD_DEADLINE`.267267268 /// A Scheduler-Runtime interface for finer payment handling.268 /// A Scheduler-Runtime interface for finer payment handling.269 pub trait DispatchCall<T: frame_system::Config + Config, SelfContainedSignedInfo> {269 pub trait DispatchCall<T: frame_system::Config + Config, SelfContainedSignedInfo> {270 /// Reserve (lock) the maximum spendings on a call, calculated from its weight and the repetition count.270 fn reserve_balance(271 fn reserve_balance(271 id: ScheduledId,272 id: ScheduledId,272 sponsor: <T as frame_system::Config>::AccountId,273 sponsor: <T as frame_system::Config>::AccountId,273 call: <T as Config>::Call,274 call: <T as Config>::Call,274 count: u32,275 count: u32,275 ) -> Result<(), DispatchError>;276 ) -> Result<(), DispatchError>;276277277 /// Unlock centain amount from payer278 /// Unreserve (unlock) a certain amount from the payer's reserved funds, returning the change.278 fn pay_for_call(279 fn pay_for_call(279 id: ScheduledId,280 id: ScheduledId,280 sponsor: <T as frame_system::Config>::AccountId,281 sponsor: <T as frame_system::Config>::AccountId,290 TransactionValidityError,291 TransactionValidityError,291 >;292 >;292293294 /// Release unspent reserved funds in case of a schedule cancel.293 fn cancel_reserve(295 fn cancel_reserve(294 id: ScheduledId,296 id: ScheduledId,295 sponsor: <T as frame_system::Config>::AccountId,297 sponsor: <T as frame_system::Config>::AccountId,494 Agenda::<T>::append(wake, Some(s));496 Agenda::<T>::append(wake, Some(s));495 }497 }496 }498 }497 /// Weight should be 0, because transaction already paid499 // Total weight should be 0, because the transaction is already paid for498 0500 0499 //total_weight500 }501 }501 }502 }502503pallets/structure/src/lib.rsdiffbeforeafterboth787879 #[pallet::error]79 #[pallet::error]80 pub enum Error<T> {80 pub enum Error<T> {81 /// While searched for owner, got already checked account81 /// While nesting, encountered an already checked account, detecting a loop.82 OuroborosDetected,82 OuroborosDetected,83 /// While searched for owner, encountered depth limit83 /// While nesting, reached the depth limit of nesting, exceeding the provided budget.84 DepthLimit,84 DepthLimit,85 /// While iterating over children, encountered breadth limit85 /// While nesting, reached the breadth limit of nesting, exceeding the provided budget.86 BreadthLimit,86 BreadthLimit,87 /// While searched for owner, found token owner by not-yet-existing token87 /// Couldn't find the token owner that is itself a token.88 TokenNotFound,88 TokenNotFound,89 }89 }909091 #[pallet::event]91 #[pallet::event]92 pub enum Event<T> {92 pub enum Event<T> {93 /// Executed call on behalf of token93 /// Executed call on behalf of the token.94 Executed(DispatchResult),94 Executed(DispatchResult),95 }95 }9696126126127#[derive(PartialEq)]127#[derive(PartialEq)]128pub enum Parent<CrossAccountId> {128pub enum Parent<CrossAccountId> {129 /// Token owned by normal account129 /// Token owned by a normal account.130 User(CrossAccountId),130 User(CrossAccountId),131 /// Passed token not found131 /// Could not find the token provided as the owner.132 TokenNotFound,132 TokenNotFound,133 /// Token owner is another token (target token still may not exist)133 /// Token owner is another token (still, the target token may not exist).134 Token(CollectionId, TokenId),134 Token(CollectionId, TokenId),135}135}136136pallets/unique/src/eth/mod.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! Implementation of CollectionHelpers contract.161817use core::marker::PhantomData;19use core::marker::PhantomData;18use evm_coder::{execution::*, generate_stubgen, solidity_interface, weight, types::*};20use evm_coder::{execution::*, generate_stubgen, solidity_interface, weight, types::*};33use sp_std::vec::Vec;35use sp_std::vec::Vec;34use alloc::format;36use alloc::format;353738/// See [`CollectionHelpersCall`]36struct EvmCollectionHelpers<T: Config>(SubstrateRecorder<T>);39pub struct EvmCollectionHelpers<T: Config>(SubstrateRecorder<T>);37impl<T: Config> WithRecorder<T> for EvmCollectionHelpers<T> {40impl<T: Config> WithRecorder<T> for EvmCollectionHelpers<T> {38 fn recorder(&self) -> &SubstrateRecorder<T> {41 fn recorder(&self) -> &SubstrateRecorder<T> {39 &self.042 &self.044 }47 }45}48}464950/// @title Contract, which allows users to operate with collections47#[solidity_interface(name = "CollectionHelpers", events(CollectionHelpersEvents))]51#[solidity_interface(name = "CollectionHelpers", events(CollectionHelpersEvents))]48impl<T: Config + pallet_nonfungible::Config> EvmCollectionHelpers<T> {52impl<T: Config + pallet_nonfungible::Config> EvmCollectionHelpers<T> {53 /// Create an NFT collection54 /// @param name Name of the collection55 /// @param description Informative description of the collection56 /// @param token_prefix Token prefix to represent the collection tokens in UI and user applications57 /// @return address Address of the newly created collection49 #[weight(<SelfWeightOf<T>>::create_collection())]58 #[weight(<SelfWeightOf<T>>::create_collection())]50 fn create_nonfungible_collection(59 fn create_nonfungible_collection(51 &mut self,60 &mut self,100 Ok(address)109 Ok(address)101 }110 }102111112 /// Check if a collection exists113 /// @param collection_address Address of the collection in question114 /// @return bool Does the collection exist?103 fn is_collection_exist(&self, _caller: caller, collection_address: address) -> Result<bool> {115 fn is_collection_exist(&self, _caller: caller, collection_address: address) -> Result<bool> {104 if let Some(id) = pallet_common::eth::map_eth_to_id(&collection_address) {116 if let Some(id) = pallet_common::eth::map_eth_to_id(&collection_address) {105 let collection_id = id;117 let collection_id = id;110 }122 }111}123}112124125/// Implements [`OnMethodCall`], which delegates call to [`EvmCollectionHelpers`]113pub struct CollectionHelpersOnMethodCall<T: Config>(PhantomData<*const T>);126pub struct CollectionHelpersOnMethodCall<T: Config>(PhantomData<*const T>);114impl<T: Config + pallet_nonfungible::Config> OnMethodCall<T> for CollectionHelpersOnMethodCall<T> {127impl<T: Config + pallet_nonfungible::Config> OnMethodCall<T> for CollectionHelpersOnMethodCall<T> {115 fn is_reserved(contract: &sp_core::H160) -> bool {128 fn is_reserved(contract: &sp_core::H160) -> bool {pallets/unique/src/lib.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Unique Pallet18//!19//! A pallet governing Unique transactions.20//!21//! - [`Config`]22//! - [`Call`]23//! - [`Pallet`]24//!25//! ## Overview26//!27//! The Unique pallet's purpose is to be the primary interface between28//! external users and the inner structure of the Unique chains.29//!30//! It also contains an implementation of [`CollectionHelpers`][`eth`],31//! an Ethereum contract dealing with collection operations.32//!33//! ## Interface34//!35//! ### Dispatchables36//!37//! - `create_collection` - Create a collection of tokens. **Deprecated**, use `create_collection_ex`.38//! - `create_collection_ex` - Create a collection of tokens with explicit parameters.39//! - `destroy_collection` - Destroy a collection if no tokens exist within.40//! - `add_to_allow_list` - Add an address to allow list.41//! - `remove_from_allow_list` - Remove an address from allow list.42//! - `change_collection_owner` - Change the owner of the collection.43//! - `add_collection_admin` - Add an admin to a collection.44//! - `remove_collection_admin` - Remove admin of a collection.45//! - `set_collection_sponsor` - Invite a new collection sponsor.46//! - `confirm_sponsorship` - Confirm own sponsorship of a collection, becoming the sponsor.47//! - `remove_collection_sponsor` - Remove a sponsor from a collection.48//! - `create_item` - Create an item within a collection.49//! - `create_multiple_items` - Create multiple items within a collection.50//! - `set_collection_properties` - Add or change collection properties.51//! - `delete_collection_properties` - Delete specified collection properties.52//! - `set_token_properties` - Add or change token properties.53//! - `delete_token_properties` - Delete token properties.54//! - `set_token_property_permissions` - Add or change token property permissions of a collection.55//! - `create_multiple_items_ex` - Create multiple items within a collection with explicitly specified initial parameters.56//! - `set_transfers_enabled_flag` - Completely allow or disallow transfers for a particular collection.57//! - `burn_item` - Destroy an item.58//! - `burn_from` - Destroy an item on behalf of the owner as a non-owner account.59//! - `transfer` - Change ownership of the token.60//! - `transfer_from` - Change ownership of the token on behalf of the owner as a non-owner account.61//! - `approve` - Allow a non-permissioned address to transfer or burn an item.62//! - `set_collection_limits` - Set specific limits of a collection.63//! - `set_collection_permissions` - Set specific permissions of a collection.64//! - `repartition` - Re-partition a refungible token, while owning all of its parts.166517#![recursion_limit = "1024"]66#![recursion_limit = "1024"]18#![cfg_attr(not(feature = "std"), no_std)]67#![cfg_attr(not(feature = "std"), no_std)]54pub mod weights;103pub mod weights;55use weights::WeightInfo;104use weights::WeightInfo;56105106/// Maximum number of levels of depth in the token nesting tree.57const NESTING_BUDGET: u32 = 5;107pub const NESTING_BUDGET: u32 = 5;5810859decl_error! {109decl_error! {60 /// Error for non-fungible-token module.110 /// Errors for the common Unique transactions.61 pub enum Error for Module<T: Config> {111 pub enum Error for Module<T: Config> {62 /// Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.112 /// Decimal_points parameter must be lower than [`up_data_structs::MAX_DECIMAL_POINTS`].63 CollectionDecimalPointLimitExceeded,113 CollectionDecimalPointLimitExceeded,64 /// This address is not set as sponsor, use setCollectionSponsor first.114 /// This address is not set as sponsor, use setCollectionSponsor first.65 ConfirmUnsetSponsorFail,115 ConfirmUnsetSponsorFail,66 /// Length of items properties must be greater than 0.116 /// Length of items properties must be greater than 0.67 EmptyArgument,117 EmptyArgument,68 /// Repertition is only supported by refungible collection118 /// Repertition is only supported by refungible collection.69 RepartitionCalledOnNonRefungibleCollection,119 RepartitionCalledOnNonRefungibleCollection,70 }120 }71}121}72122123/// Configuration trait of this pallet.73pub trait Config: system::Config + pallet_common::Config + Sized + TypeInfo {124pub trait Config: system::Config + pallet_common::Config + Sized + TypeInfo {125 /// Overarching event type.74 type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;126 type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;7512776 /// Weight information for extrinsics in this pallet.128 /// Weight information for extrinsics in this pallet.77 type WeightInfo: WeightInfo;129 type WeightInfo: WeightInfo;130131 /// Weight information for common pallet operations.78 type CommonWeightInfo: CommonWeightInfo<Self::CrossAccountId>;132 type CommonWeightInfo: CommonWeightInfo<Self::CrossAccountId>;133134 /// Weight info information for extra refungible pallet operations.79 type RefungibleExtensionsWeightInfo: RefungibleExtensionsWeightInfo;135 type RefungibleExtensionsWeightInfo: RefungibleExtensionsWeightInfo;80}136}8113788 /// Collection sponsor was removed144 /// Collection sponsor was removed89 ///145 ///90 /// # Arguments146 /// # Arguments91 ///92 /// * collection_id: Globally unique collection identifier.147 /// * collection_id: ID of the affected collection.93 CollectionSponsorRemoved(CollectionId),148 CollectionSponsorRemoved(CollectionId),9414995 /// Collection admin was added150 /// Collection admin was added96 ///151 ///97 /// # Arguments152 /// # Arguments98 ///99 /// * collection_id: Globally unique collection identifier.153 /// * collection_id: ID of the affected collection.100 ///101 /// * admin: Admin address.154 /// * admin: Admin address.102 CollectionAdminAdded(CollectionId, CrossAccountId),155 CollectionAdminAdded(CollectionId, CrossAccountId),103156104 /// Collection owned was change157 /// Collection owned was changed105 ///158 ///106 /// # Arguments159 /// # Arguments107 ///108 /// * collection_id: Globally unique collection identifier.160 /// * collection_id: ID of the affected collection.109 ///110 /// * owner: New owner address.161 /// * owner: New owner address.111 CollectionOwnedChanged(CollectionId, AccountId),162 CollectionOwnedChanged(CollectionId, AccountId),112163113 /// Collection sponsor was set164 /// Collection sponsor was set114 ///165 ///115 /// # Arguments166 /// # Arguments116 ///117 /// * collection_id: Globally unique collection identifier.167 /// * collection_id: ID of the affected collection.118 ///119 /// * owner: New sponsor address.168 /// * owner: New sponsor address.120 CollectionSponsorSet(CollectionId, AccountId),169 CollectionSponsorSet(CollectionId, AccountId),121170122 /// New sponsor was confirm171 /// New sponsor was confirm123 ///172 ///124 /// # Arguments173 /// # Arguments125 ///126 /// * collection_id: Globally unique collection identifier.174 /// * collection_id: ID of the affected collection.127 ///128 /// * sponsor: New sponsor address.175 /// * sponsor: New sponsor address.129 SponsorshipConfirmed(CollectionId, AccountId),176 SponsorshipConfirmed(CollectionId, AccountId),130177131 /// Collection admin was removed178 /// Collection admin was removed132 ///179 ///133 /// # Arguments180 /// # Arguments134 ///135 /// * collection_id: Globally unique collection identifier.181 /// * collection_id: ID of the affected collection.136 ///137 /// * admin: Admin address.182 /// * admin: Removed admin address.138 CollectionAdminRemoved(CollectionId, CrossAccountId),183 CollectionAdminRemoved(CollectionId, CrossAccountId),139184140 /// Address was remove from allow list185 /// Address was removed from the allow list141 ///186 ///142 /// # Arguments187 /// # Arguments143 ///144 /// * collection_id: Globally unique collection identifier.188 /// * collection_id: ID of the affected collection.145 ///146 /// * user: Address.189 /// * user: Address of the removed account.147 AllowListAddressRemoved(CollectionId, CrossAccountId),190 AllowListAddressRemoved(CollectionId, CrossAccountId),148191149 /// Address was add to allow list192 /// Address was added to the allow list150 ///193 ///151 /// # Arguments194 /// # Arguments152 ///153 /// * collection_id: Globally unique collection identifier.195 /// * collection_id: ID of the affected collection.154 ///155 /// * user: Address.196 /// * user: Address of the added account.156 AllowListAddressAdded(CollectionId, CrossAccountId),197 AllowListAddressAdded(CollectionId, CrossAccountId),157198158 /// Collection limits was set199 /// Collection limits were set159 ///200 ///160 /// # Arguments201 /// # Arguments161 ///162 /// * collection_id: Globally unique collection identifier.202 /// * collection_id: ID of the affected collection.163 CollectionLimitSet(CollectionId),203 CollectionLimitSet(CollectionId),164204205 /// Collection permissions were set206 ///207 /// # Arguments208 /// * collection_id: ID of the affected collection.165 CollectionPermissionSet(CollectionId),209 CollectionPermissionSet(CollectionId),166 }210 }167}211}198 ChainVersion: u64;242 ChainVersion: u64;199 //#endregion243 //#endregion200244201 //#region Tokens transfer rate limit baskets245 //#region Tokens transfer sponosoring rate limit baskets202 /// (Collection id (controlled?2), who created (real))246 /// (Collection id (controlled?2), who created (real))203 /// TODO: Off chain worker should remove from this map when collection gets removed247 /// TODO: Off chain worker should remove from this map when collection gets removed204 pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => Option<T::BlockNumber>;248 pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => Option<T::BlockNumber>;214 /// Collection id (controlled?2), token id (controlled?2)258 /// Collection id (controlled?2), token id (controlled?2)215 #[deprecated]259 #[deprecated]216 pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;260 pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;261 /// Last sponsoring of token property setting // todo:doc rephrase this and the following217 pub TokenPropertyBasket get(fn token_property_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;262 pub TokenPropertyBasket get(fn token_property_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;218263219 /// Approval sponsoring264 /// Last sponsoring of NFT approval in a collection220 pub NftApproveBasket get(fn nft_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;265 pub NftApproveBasket get(fn nft_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;266 /// Last sponsoring of fungible tokens approval in a collection221 pub FungibleApproveBasket get(fn fungible_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;267 pub FungibleApproveBasket get(fn fungible_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;268 /// Last sponsoring of RFT approval in a collection222 pub RefungibleApproveBasket get(fn refungible_approve_basket): nmap hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;269 pub RefungibleApproveBasket get(fn refungible_approve_basket): nmap hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;223 }270 }224}271}225272226decl_module! {273decl_module! {274 /// Type alias to Pallet, to be used by construct_runtime.227 pub struct Module<T: Config> for enum Call275 pub struct Module<T: Config> for enum Call228 where276 where229 origin: T::Origin277 origin: T::Origin244 0292 0245 }293 }246294247 /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner of the collection is set to the address that signed the transaction and can be changed later.295 /// Create a collection of tokens.296 ///297 /// Each Token may have multiple properties encoded as an array of bytes298 /// of certain length. The initial owner of the collection is set299 /// to the address that signed the transaction and can be changed later.300 ///301 /// Prefer the more advanced [`create_collection_ex`][`Pallet::create_collection_ex`] instead.248 ///302 ///249 /// # Permissions303 /// # Permissions250 ///304 ///251 /// * Anyone.305 /// * Anyone - becomes the owner of the new collection.252 ///306 ///253 /// # Arguments307 /// # Arguments254 ///308 ///255 /// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.309 /// * `collection_name`: Wide-character string with collection name256 ///310 /// (limit [`MAX_COLLECTION_NAME_LENGTH`]).257 /// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.311 /// * `collection_description`: Wide-character string with collection description258 ///312 /// (limit [`MAX_COLLECTION_DESCRIPTION_LENGTH`]).259 /// * token_prefix: UTF-8 string with token prefix.313 /// * `token_prefix`: Byte string containing the token prefix to mark a collection260 ///314 /// to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).261 /// * mode: [CollectionMode] collection type and type dependent data.315 /// * `mode`: Type of items stored in the collection and type dependent data.262 // returns collection ID316 // returns collection ID263 #[weight = <SelfWeightOf<T>>::create_collection()]317 #[weight = <SelfWeightOf<T>>::create_collection()]264 #[transactional]318 #[transactional]265 #[deprecated]319 #[deprecated(note = "`create_collection_ex` is more up-to-date and advanced, prefer it instead")]266 pub fn create_collection(origin,320 pub fn create_collection(321 origin,267 collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,322 collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,278 Self::create_collection_ex(origin, data)334 Self::create_collection_ex(origin, data)279 }335 }280336281 /// This method creates a collection337 /// Create a collection with explicit parameters.282 ///338 ///283 /// Prefer it to deprecated [`created_collection`] method339 /// Prefer it to the deprecated [`create_collection`][`Pallet::create_collection`] method.340 ///341 /// # Permissions342 ///343 /// * Anyone - becomes the owner of the new collection.344 ///345 /// # Arguments346 ///347 /// * `data`: Explicit data of a collection used for its creation.284 #[weight = <SelfWeightOf<T>>::create_collection()]348 #[weight = <SelfWeightOf<T>>::create_collection()]285 #[transactional]349 #[transactional]286 pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {350 pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {293 Ok(())357 Ok(())294 }358 }295359296 /// Destroys collection if no tokens within this collection360 /// Destroy a collection if no tokens exist within.297 ///361 ///298 /// # Permissions362 /// # Permissions299 ///363 ///300 /// * Collection Owner.364 /// * Collection owner301 ///365 ///302 /// # Arguments366 /// # Arguments303 ///367 ///304 /// * collection_id: collection to destroy.368 /// * `collection_id`: Collection to destroy.305 #[weight = <SelfWeightOf<T>>::destroy_collection()]369 #[weight = <SelfWeightOf<T>>::destroy_collection()]306 #[transactional]370 #[transactional]307 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {371 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {328 ///392 ///329 /// # Permissions393 /// # Permissions330 ///394 ///331 /// * Collection Owner395 /// * Collection owner332 /// * Collection Admin396 /// * Collection admin333 ///397 ///334 /// # Arguments398 /// # Arguments335 ///399 ///336 /// * collection_id.400 /// * `collection_id`: ID of the modified collection.337 ///401 /// * `address`: ID of the address to be added to the allowlist.338 /// * address.339 #[weight = <SelfWeightOf<T>>::add_to_allow_list()]402 #[weight = <SelfWeightOf<T>>::add_to_allow_list()]340 #[transactional]403 #[transactional]341 pub fn add_to_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{404 pub fn add_to_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{363 ///426 ///364 /// # Permissions427 /// # Permissions365 ///428 ///366 /// * Collection Owner429 /// * Collection owner367 /// * Collection Admin430 /// * Collection admin368 ///431 ///369 /// # Arguments432 /// # Arguments370 ///433 ///371 /// * collection_id.434 /// * `collection_id`: ID of the modified collection.372 ///435 /// * `address`: ID of the address to be removed from the allowlist.373 /// * address.374 #[weight = <SelfWeightOf<T>>::remove_from_allow_list()]436 #[weight = <SelfWeightOf<T>>::remove_from_allow_list()]375 #[transactional]437 #[transactional]376 pub fn remove_from_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{438 pub fn remove_from_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{398 ///460 ///399 /// # Permissions461 /// # Permissions400 ///462 ///401 /// * Collection Owner.463 /// * Collection owner402 ///464 ///403 /// # Arguments465 /// # Arguments404 ///466 ///405 /// * collection_id.467 /// * `collection_id`: ID of the modified collection.406 ///468 /// * `new_owner`: ID of the account that will become the owner.407 /// * new_owner.408 #[weight = <SelfWeightOf<T>>::change_collection_owner()]469 #[weight = <SelfWeightOf<T>>::change_collection_owner()]409 #[transactional]470 #[transactional]410 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {471 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {424 target_collection.save()485 target_collection.save()425 }486 }426487427 /// Adds an admin of the Collection.488 /// Add an admin to a collection.428 /// NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership.489 ///490 /// NFT Collection can be controlled by multiple admin addresses491 /// (some which can also be servers, for example). Admins can issue492 /// and burn NFTs, as well as add and remove other admins,493 /// but cannot change NFT or Collection ownership.429 ///494 ///430 /// # Permissions495 /// # Permissions431 ///496 ///432 /// * Collection Owner.497 /// * Collection owner433 /// * Collection Admin.498 /// * Collection admin434 ///499 ///435 /// # Arguments500 /// # Arguments436 ///501 ///437 /// * collection_id: ID of the Collection to add admin for.502 /// * `collection_id`: ID of the Collection to add an admin for.438 ///439 /// * new_admin_id: Address of new admin to add.503 /// * `new_admin`: Address of new admin to add.440 #[weight = <SelfWeightOf<T>>::add_collection_admin()]504 #[weight = <SelfWeightOf<T>>::add_collection_admin()]441 #[transactional]505 #[transactional]442 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {506 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin: T::CrossAccountId) -> DispatchResult {443 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);507 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);444 let collection = <CollectionHandle<T>>::try_get(collection_id)?;508 let collection = <CollectionHandle<T>>::try_get(collection_id)?;445 collection.check_is_internal()?;509 collection.check_is_internal()?;446510447 <Pallet<T>>::deposit_event(Event::<T>::CollectionAdminAdded(511 <Pallet<T>>::deposit_event(Event::<T>::CollectionAdminAdded(448 collection_id,512 collection_id,449 new_admin_id.clone()513 new_admin.clone()450 ));514 ));451515452 <PalletCommon<T>>::toggle_admin(&collection, &sender, &new_admin_id, true)516 <PalletCommon<T>>::toggle_admin(&collection, &sender, &new_admin, true)453 }517 }454518455 /// Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.519 /// Remove admin of a collection.520 ///521 /// An admin address can remove itself. List of admins may become empty,522 /// in which case only Collection Owner will be able to add an Admin.456 ///523 ///457 /// # Permissions524 /// # Permissions458 ///525 ///459 /// * Collection Owner.526 /// * Collection owner460 /// * Collection Admin.527 /// * Collection admin461 ///528 ///462 /// # Arguments529 /// # Arguments463 ///530 ///464 /// * collection_id: ID of the Collection to remove admin for.531 /// * `collection_id`: ID of the collection to remove the admin for.465 ///466 /// * account_id: Address of admin to remove.532 /// * `account_id`: Address of the admin to remove.467 #[weight = <SelfWeightOf<T>>::remove_collection_admin()]533 #[weight = <SelfWeightOf<T>>::remove_collection_admin()]468 #[transactional]534 #[transactional]469 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {535 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {479 <PalletCommon<T>>::toggle_admin(&collection, &sender, &account_id, false)545 <PalletCommon<T>>::toggle_admin(&collection, &sender, &account_id, false)480 }546 }481547548 /// Set (invite) a new collection sponsor.549 ///550 /// If successful, confirmation from the sponsor-to-be will be pending.551 ///482 /// # Permissions552 /// # Permissions483 ///553 ///484 /// * Collection Owner554 /// * Collection owner555 /// * Collection admin485 ///556 ///486 /// # Arguments557 /// # Arguments487 ///558 ///488 /// * collection_id.559 /// * `collection_id`: ID of the modified collection.489 ///560 /// * `new_sponsor`: ID of the account of the sponsor-to-be.490 /// * new_sponsor.491 #[weight = <SelfWeightOf<T>>::set_collection_sponsor()]561 #[weight = <SelfWeightOf<T>>::set_collection_sponsor()]492 #[transactional]562 #[transactional]493 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {563 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {507 target_collection.save()577 target_collection.save()508 }578 }509579580 /// Confirm own sponsorship of a collection, becoming the sponsor.581 ///582 /// An invitation must be pending, see [`set_collection_sponsor`][`Pallet::set_collection_sponsor`].583 /// Sponsor can pay the fees of a transaction instead of the sender,584 /// but only within specified limits.585 ///510 /// # Permissions586 /// # Permissions511 ///587 ///512 /// * Sponsor.588 /// * Sponsor-to-be513 ///589 ///514 /// # Arguments590 /// # Arguments515 ///591 ///516 /// * collection_id.592 /// * `collection_id`: ID of the collection with the pending sponsor.517 #[weight = <SelfWeightOf<T>>::confirm_sponsorship()]593 #[weight = <SelfWeightOf<T>>::confirm_sponsorship()]518 #[transactional]594 #[transactional]519 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {595 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {534 target_collection.save()610 target_collection.save()535 }611 }536612537 /// Switch back to pay-per-own-transaction model.613 /// Remove a collection's a sponsor, making everyone pay for their own transactions.538 ///614 ///539 /// # Permissions615 /// # Permissions540 ///616 ///541 /// * Collection owner.617 /// * Collection owner542 ///618 ///543 /// # Arguments619 /// # Arguments544 ///620 ///545 /// * collection_id.621 /// * `collection_id`: ID of the collection with the sponsor to remove.546 #[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]622 #[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]547 #[transactional]623 #[transactional]548 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {624 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {560 target_collection.save()636 target_collection.save()561 }637 }562638563 /// This method creates a concrete instance of NFT Collection created with CreateCollection method.639 /// Mint an item within a collection.640 ///641 /// A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].564 ///642 ///565 /// # Permissions643 /// # Permissions566 ///644 ///567 /// * Collection Owner.645 /// * Collection owner568 /// * Collection Admin.646 /// * Collection admin569 /// * Anyone if647 /// * Anyone if570 /// * Allow List is enabled, and648 /// * Allow List is enabled, and571 /// * Address is added to allow list, and649 /// * Address is added to allow list, and572 /// * MintPermission is enabled (see SetMintPermission method)650 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])573 ///651 ///574 /// # Arguments652 /// # Arguments575 ///653 ///576 /// * collection_id: ID of the collection.654 /// * `collection_id`: ID of the collection to which an item would belong.577 ///578 /// * owner: Address, initial owner of the NFT.655 /// * `owner`: Address of the initial owner of the item.579 ///580 /// * data: Token data to store on chain.656 /// * `data`: Token data describing the item to store on chain.581 #[weight = T::CommonWeightInfo::create_item()]657 #[weight = T::CommonWeightInfo::create_item()]582 #[transactional]658 #[transactional]583 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResultWithPostInfo {659 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResultWithPostInfo {587 dispatch_tx::<T, _>(collection_id, |d| d.create_item(sender, owner, data, &budget))663 dispatch_tx::<T, _>(collection_id, |d| d.create_item(sender, owner, data, &budget))588 }664 }589665590 /// This method creates multiple items in a collection created with CreateCollection method.666 /// Create multiple items within a collection.667 ///668 /// A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].591 ///669 ///592 /// # Permissions670 /// # Permissions593 ///671 ///594 /// * Collection Owner.672 /// * Collection owner595 /// * Collection Admin.673 /// * Collection admin596 /// * Anyone if674 /// * Anyone if597 /// * Allow List is enabled, and675 /// * Allow List is enabled, and598 /// * Address is added to allow list, and676 /// * Address is added to the allow list, and599 /// * MintPermission is enabled (see SetMintPermission method)677 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])600 ///678 ///601 /// # Arguments679 /// # Arguments602 ///680 ///603 /// * collection_id: ID of the collection.681 /// * `collection_id`: ID of the collection to which the tokens would belong.604 ///605 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].606 ///607 /// * owner: Address, initial owner of the NFT.682 /// * `owner`: Address of the initial owner of the tokens.683 /// * `items_data`: Vector of data describing each item to be created.608 #[weight = T::CommonWeightInfo::create_multiple_items(&items_data)]684 #[weight = T::CommonWeightInfo::create_multiple_items(&items_data)]609 #[transactional]685 #[transactional]610 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResultWithPostInfo {686 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResultWithPostInfo {615 dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items(sender, owner, items_data, &budget))691 dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items(sender, owner, items_data, &budget))616 }692 }617693694 /// Add or change collection properties.695 ///696 /// # Permissions697 ///698 /// * Collection owner699 /// * Collection admin700 ///701 /// # Arguments702 ///703 /// * `collection_id`: ID of the modified collection.704 /// * `properties`: Vector of key-value pairs stored as the collection's metadata.705 /// Keys support Latin letters, `-`, `_`, and `.` as symbols.618 #[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]706 #[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]619 #[transactional]707 #[transactional]620 pub fn set_collection_properties(708 pub fn set_collection_properties(629 dispatch_tx::<T, _>(collection_id, |d| d.set_collection_properties(sender, properties))717 dispatch_tx::<T, _>(collection_id, |d| d.set_collection_properties(sender, properties))630 }718 }631719720 /// Delete specified collection properties.721 ///722 /// # Permissions723 ///724 /// * Collection Owner725 /// * Collection Admin726 ///727 /// # Arguments728 ///729 /// * `collection_id`: ID of the modified collection.730 /// * `property_keys`: Vector of keys of the properties to be deleted.731 /// Keys support Latin letters, `-`, `_`, and `.` as symbols.632 #[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]732 #[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]633 #[transactional]733 #[transactional]634 pub fn delete_collection_properties(734 pub fn delete_collection_properties(643 dispatch_tx::<T, _>(collection_id, |d| d.delete_collection_properties(&sender, property_keys))743 dispatch_tx::<T, _>(collection_id, |d| d.delete_collection_properties(&sender, property_keys))644 }744 }645745746 /// Add or change token properties according to collection's permissions.747 /// Currently properties only work with NFTs.748 ///749 /// # Permissions750 ///751 /// * Depends on collection's token property permissions and specified property mutability:752 /// * Collection owner753 /// * Collection admin754 /// * Token owner755 ///756 /// See [`set_token_property_permissions`][`Pallet::set_token_property_permissions`].757 ///758 /// # Arguments759 ///760 /// * `collection_id: ID of the collection to which the token belongs.761 /// * `token_id`: ID of the modified token.762 /// * `properties`: Vector of key-value pairs stored as the token's metadata.763 /// Keys support Latin letters, `-`, `_`, and `.` as symbols.646 #[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]764 #[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]647 #[transactional]765 #[transactional]648 pub fn set_token_properties(766 pub fn set_token_properties(659 dispatch_tx::<T, _>(collection_id, |d| d.set_token_properties(sender, token_id, properties, &budget))777 dispatch_tx::<T, _>(collection_id, |d| d.set_token_properties(sender, token_id, properties, &budget))660 }778 }661779780 /// Delete specified token properties. Currently properties only work with NFTs.781 ///782 /// # Permissions783 ///784 /// * Depends on collection's token property permissions and specified property mutability:785 /// * Collection owner786 /// * Collection admin787 /// * Token owner788 ///789 /// # Arguments790 ///791 /// * `collection_id`: ID of the collection to which the token belongs.792 /// * `token_id`: ID of the modified token.793 /// * `property_keys`: Vector of keys of the properties to be deleted.794 /// Keys support Latin letters, `-`, `_`, and `.` as symbols.662 #[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]795 #[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]663 #[transactional]796 #[transactional]664 pub fn delete_token_properties(797 pub fn delete_token_properties(675 dispatch_tx::<T, _>(collection_id, |d| d.delete_token_properties(sender, token_id, property_keys, &budget))808 dispatch_tx::<T, _>(collection_id, |d| d.delete_token_properties(sender, token_id, property_keys, &budget))676 }809 }677810811 /// Add or change token property permissions of a collection.812 ///813 /// Without a permission for a particular key, a property with that key814 /// cannot be created in a token.815 ///816 /// # Permissions817 ///818 /// * Collection owner819 /// * Collection admin820 ///821 /// # Arguments822 ///823 /// * `collection_id`: ID of the modified collection.824 /// * `property_permissions`: Vector of permissions for property keys.825 /// Keys support Latin letters, `-`, `_`, and `.` as symbols.678 #[weight = T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32)]826 #[weight = T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32)]679 #[transactional]827 #[transactional]680 pub fn set_token_property_permissions(828 pub fn set_token_property_permissions(689 dispatch_tx::<T, _>(collection_id, |d| d.set_token_property_permissions(&sender, property_permissions))837 dispatch_tx::<T, _>(collection_id, |d| d.set_token_property_permissions(&sender, property_permissions))690 }838 }691839840 /// Create multiple items within a collection with explicitly specified initial parameters.841 ///842 /// # Permissions843 ///844 /// * Collection owner845 /// * Collection admin846 /// * Anyone if847 /// * Allow List is enabled, and848 /// * Address is added to allow list, and849 /// * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])850 ///851 /// # Arguments852 ///853 /// * `collection_id`: ID of the collection to which the tokens would belong.854 /// * `data`: Explicit item creation data.692 #[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]855 #[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]693 #[transactional]856 #[transactional]694 pub fn create_multiple_items_ex(origin, collection_id: CollectionId, data: CreateItemExData<T::CrossAccountId>) -> DispatchResultWithPostInfo {857 pub fn create_multiple_items_ex(origin, collection_id: CollectionId, data: CreateItemExData<T::CrossAccountId>) -> DispatchResultWithPostInfo {698 dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items_ex(sender, data, &budget))861 dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items_ex(sender, data, &budget))699 }862 }700863701 /// Set transfers_enabled value for particular collection864 /// Completely allow or disallow transfers for a particular collection.702 ///865 ///703 /// # Permissions866 /// # Permissions704 ///867 ///705 /// * Collection Owner.868 /// * Collection owner706 ///869 ///707 /// # Arguments870 /// # Arguments708 ///871 ///709 /// * collection_id: ID of the collection.872 /// * `collection_id`: ID of the collection.710 ///873 /// * `value`: New value of the flag, are transfers allowed?711 /// * value: New flag value.712 #[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]874 #[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]713 #[transactional]875 #[transactional]714 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {876 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {723 target_collection.save()885 target_collection.save()724 }886 }725887726 /// Destroys a concrete instance of NFT.888 /// Destroy an item.727 ///889 ///728 /// # Permissions890 /// # Permissions729 ///891 ///730 /// * Collection Owner.892 /// * Collection owner731 /// * Collection Admin.893 /// * Collection admin732 /// * Current NFT Owner.894 /// * Current item owner733 ///895 ///734 /// # Arguments896 /// # Arguments735 ///897 ///736 /// * collection_id: ID of the collection.898 /// * `collection_id`: ID of the collection to which the item belongs.737 ///738 /// * item_id: ID of NFT to burn.899 /// * `item_id`: ID of item to burn.900 /// * `value`: Number of pieces of the item to destroy.901 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.902 /// * Fungible Mode: The desired number of pieces to burn.903 /// * Re-Fungible Mode: The desired number of pieces to burn.739 #[weight = T::CommonWeightInfo::burn_item()]904 #[weight = T::CommonWeightInfo::burn_item()]740 #[transactional]905 #[transactional]741 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {906 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {752 Ok(post_info)917 Ok(post_info)753 }918 }754919755 /// Destroys a concrete instance of NFT on behalf of the owner920 /// Destroy a token on behalf of the owner as a non-owner account.921 ///756 /// See also: [`approve`]922 /// See also: [`approve`][`Pallet::approve`].923 ///924 /// After this method executes, one approval is removed from the total so that925 /// the approved address will not be able to transfer this item again from this owner.757 ///926 ///758 /// # Permissions927 /// # Permissions759 ///928 ///760 /// * Collection Owner.929 /// * Collection owner761 /// * Collection Admin.930 /// * Collection admin762 /// * Current NFT Owner.931 /// * Current token owner932 /// * Address approved by current item owner763 ///933 ///764 /// # Arguments934 /// # Arguments765 ///935 ///936 /// * `from`: The owner of the burning item.766 /// * collection_id: ID of the collection.937 /// * `collection_id`: ID of the collection to which the item belongs.767 ///768 /// * item_id: ID of NFT to burn.938 /// * `item_id`: ID of item to burn.769 ///939 /// * `value`: Number of pieces to burn.770 /// * from: owner of item940 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.941 /// * Fungible Mode: The desired number of pieces to burn.942 /// * Re-Fungible Mode: The desired number of pieces to burn.771 #[weight = T::CommonWeightInfo::burn_from()]943 #[weight = T::CommonWeightInfo::burn_from()]772 #[transactional]944 #[transactional]773 pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {945 pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {781 ///953 ///782 /// # Permissions954 /// # Permissions783 ///955 ///784 /// * Collection Owner956 /// * Collection owner785 /// * Collection Admin957 /// * Collection admin786 /// * Current NFT owner958 /// * Current token owner787 ///959 ///788 /// # Arguments960 /// # Arguments789 ///961 ///790 /// * recipient: Address of token recipient.962 /// * `recipient`: Address of token recipient.791 ///963 /// * `collection_id`: ID of the collection the item belongs to.792 /// * collection_id.793 ///794 /// * item_id: ID of the item964 /// * `item_id`: ID of the item.795 /// * Non-Fungible Mode: Required.965 /// * Non-Fungible Mode: Required.796 /// * Fungible Mode: Ignored.966 /// * Fungible Mode: Ignored.797 /// * Re-Fungible Mode: Required.967 /// * Re-Fungible Mode: Required.798 ///968 ///799 /// * value: Amount to transfer.969 /// * `value`: Amount to transfer.800 /// * Non-Fungible Mode: Ignored970 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.801 /// * Fungible Mode: Must specify transferred amount971 /// * Fungible Mode: The desired number of pieces to transfer.802 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)972 /// * Re-Fungible Mode: The desired number of pieces to transfer.803 #[weight = T::CommonWeightInfo::transfer()]973 #[weight = T::CommonWeightInfo::transfer()]804 #[transactional]974 #[transactional]805 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {975 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {809 dispatch_tx::<T, _>(collection_id, |d| d.transfer(sender, recipient, item_id, value, &budget))979 dispatch_tx::<T, _>(collection_id, |d| d.transfer(sender, recipient, item_id, value, &budget))810 }980 }811981812 /// Set, change, or remove approved address to transfer the ownership of the NFT.982 /// Allow a non-permissioned address to transfer or burn an item.813 ///983 ///814 /// # Permissions984 /// # Permissions815 ///985 ///816 /// * Collection Owner986 /// * Collection owner817 /// * Collection Admin987 /// * Collection admin818 /// * Current NFT owner988 /// * Current item owner819 ///989 ///820 /// # Arguments990 /// # Arguments821 ///991 ///822 /// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).992 /// * `spender`: Account to be approved to make specific transactions on non-owned tokens.823 ///993 /// * `collection_id`: ID of the collection the item belongs to.824 /// * collection_id.825 ///826 /// * item_id: ID of the item.994 /// * `item_id`: ID of the item transactions on which are now approved.995 /// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).996 /// Set to 0 to revoke the approval.827 #[weight = T::CommonWeightInfo::approve()]997 #[weight = T::CommonWeightInfo::approve()]828 #[transactional]998 #[transactional]829 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {999 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {832 dispatch_tx::<T, _>(collection_id, |d| d.approve(sender, spender, item_id, amount))1002 dispatch_tx::<T, _>(collection_id, |d| d.approve(sender, spender, item_id, amount))833 }1003 }8341004835 /// Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.1005 /// Change ownership of an item on behalf of the owner as a non-owner account.836 ///1006 ///837 /// # Permissions1007 /// See the [`approve`][`Pallet::approve`] method for additional information.838 /// * Collection Owner839 /// * Collection Admin840 /// * Current NFT owner841 /// * Address approved by current NFT owner842 ///1008 ///843 /// # Arguments1009 /// After this method executes, one approval is removed from the total so that1010 /// the approved address will not be able to transfer this item again from this owner.844 ///1011 ///845 /// * from: Address that owns token.1012 /// # Permissions846 ///1013 ///847 /// * recipient: Address of token recipient.1014 /// * Collection owner848 ///849 /// * collection_id.1015 /// * Collection admin1016 /// * Current item owner1017 /// * Address approved by current item owner850 ///1018 ///851 /// * item_id: ID of the item.1019 /// # Arguments852 ///1020 ///1021 /// * `from`: Address that currently owns the token.1022 /// * `recipient`: Address of the new token-owner-to-be.1023 /// * `collection_id`: ID of the collection the item.1024 /// * `item_id`: ID of the item to be transferred.853 /// * value: Amount to transfer.1025 /// * `value`: Amount to transfer.1026 /// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.1027 /// * Fungible Mode: The desired number of pieces to transfer.1028 /// * Re-Fungible Mode: The desired number of pieces to transfer.854 #[weight = T::CommonWeightInfo::transfer_from()]1029 #[weight = T::CommonWeightInfo::transfer_from()]855 #[transactional]1030 #[transactional]856 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {1031 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {860 dispatch_tx::<T, _>(collection_id, |d| d.transfer_from(sender, from, recipient, item_id, value, &budget))1035 dispatch_tx::<T, _>(collection_id, |d| d.transfer_from(sender, from, recipient, item_id, value, &budget))861 }1036 }86210371038 /// Set specific limits of a collection. Empty, or None fields mean chain default.1039 ///1040 /// # Permissions1041 ///1042 /// * Collection owner1043 /// * Collection admin1044 ///1045 /// # Arguments1046 ///1047 /// * `collection_id`: ID of the modified collection.1048 /// * `new_limit`: New limits of the collection. Fields that are not set (None)1049 /// will not overwrite the old ones.863 #[weight = <SelfWeightOf<T>>::set_collection_limits()]1050 #[weight = <SelfWeightOf<T>>::set_collection_limits()]864 #[transactional]1051 #[transactional]865 pub fn set_collection_limits(1052 pub fn set_collection_limits(882 target_collection.save()1069 target_collection.save()883 }1070 }88410711072 /// Set specific permissions of a collection. Empty, or None fields mean chain default.1073 ///1074 /// # Permissions1075 ///1076 /// * Collection owner1077 /// * Collection admin1078 ///1079 /// # Arguments1080 ///1081 /// * `collection_id`: ID of the modified collection.1082 /// * `new_permission`: New permissions of the collection. Fields that are not set (None)1083 /// will not overwrite the old ones.885 #[weight = <SelfWeightOf<T>>::set_collection_limits()]1084 #[weight = <SelfWeightOf<T>>::set_collection_limits()]886 #[transactional]1085 #[transactional]887 pub fn set_collection_permissions(1086 pub fn set_collection_permissions(888 origin,1087 origin,889 collection_id: CollectionId,1088 collection_id: CollectionId,890 new_limit: CollectionPermissions,1089 new_permission: CollectionPermissions,891 ) -> DispatchResult {1090 ) -> DispatchResult {892 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1091 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);893 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;1092 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;894 target_collection.check_is_internal()?;1093 target_collection.check_is_internal()?;895 target_collection.check_is_owner_or_admin(&sender)?;1094 target_collection.check_is_owner_or_admin(&sender)?;896 let old_limit = &target_collection.permissions;1095 let old_limit = &target_collection.permissions;8971096898 target_collection.permissions = <PalletCommon<T>>::clamp_permissions(target_collection.mode.clone(), &old_limit, new_limit)?;1097 target_collection.permissions = <PalletCommon<T>>::clamp_permissions(target_collection.mode.clone(), &old_limit, new_permission)?;8991098900 <Pallet<T>>::deposit_event(Event::<T>::CollectionPermissionSet(1099 <Pallet<T>>::deposit_event(Event::<T>::CollectionPermissionSet(901 collection_id1100 collection_id904 target_collection.save()1103 target_collection.save()905 }1104 }90611051106 /// Re-partition a refungible token, while owning all of its parts/pieces.1107 ///1108 /// # Permissions1109 ///1110 /// * Token owner (must own every part)1111 ///1112 /// # Arguments1113 ///1114 /// * `collection_id`: ID of the collection the RFT belongs to.1115 /// * `token_id`: ID of the RFT.1116 /// * `amount`: New number of parts/pieces into which the token shall be partitioned.907 #[weight = T::RefungibleExtensionsWeightInfo::repartition()]1117 #[weight = T::RefungibleExtensionsWeightInfo::repartition()]908 #[transactional]1118 #[transactional]909 pub fn repartition(1119 pub fn repartition(910 origin,1120 origin,911 collection_id: CollectionId,1121 collection_id: CollectionId,912 token: TokenId,1122 token_id: TokenId,913 amount: u128,1123 amount: u128,914 ) -> DispatchResultWithPostInfo {1124 ) -> DispatchResultWithPostInfo {915 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1125 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);916 dispatch_tx::<T, _>(collection_id, |d| {1126 dispatch_tx::<T, _>(collection_id, |d| {917 if let Some(refungible_extensions) = d.refungible_extensions() {1127 if let Some(refungible_extensions) = d.refungible_extensions() {918 refungible_extensions.repartition(&sender, token, amount)1128 refungible_extensions.repartition(&sender, token_id, amount)919 } else {1129 } else {920 fail!(<Error<T>>::RepartitionCalledOnNonRefungibleCollection)1130 fail!(<Error<T>>::RepartitionCalledOnNonRefungibleCollection)921 }1131 }primitives/data-structs/src/lib.rsdiffbeforeafterboth197#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]197#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]198pub enum CollectionMode {198pub enum CollectionMode {199 NFT,199 NFT,200 // decimal points201 Fungible(DecimalPoints),200 Fungible(DecimalPoints),202 ReFungible,201 ReFungible,203}202}252pub enum SponsorshipState<AccountId> {251pub enum SponsorshipState<AccountId> {253 /// The fees are applied to the transaction sender252 /// The fees are applied to the transaction sender254 Disabled,253 Disabled,254 /// Pending confirmation from a sponsor-to-be255 Unconfirmed(AccountId),255 Unconfirmed(AccountId),256 /// Transactions are sponsored by specified account256 /// Transactions are sponsored by specified account257 Confirmed(AccountId),257 Confirmed(AccountId),258}258}259259260impl<AccountId> SponsorshipState<AccountId> {260impl<AccountId> SponsorshipState<AccountId> {261 /// Get the acting sponsor account, if present261 pub fn sponsor(&self) -> Option<&AccountId> {262 pub fn sponsor(&self) -> Option<&AccountId> {262 match self {263 match self {263 Self::Confirmed(sponsor) => Some(sponsor),264 Self::Confirmed(sponsor) => Some(sponsor),264 _ => None,265 _ => None,265 }266 }266 }267 }267268269 /// Get the sponsor account currently pending confirmation, if present268 pub fn pending_sponsor(&self) -> Option<&AccountId> {270 pub fn pending_sponsor(&self) -> Option<&AccountId> {269 match self {271 match self {270 Self::Unconfirmed(sponsor) | Self::Confirmed(sponsor) => Some(sponsor),272 Self::Unconfirmed(sponsor) | Self::Confirmed(sponsor) => Some(sponsor),271 _ => None,273 _ => None,272 }274 }273 }275 }274276277 /// Is sponsorship set and acting275 pub fn confirmed(&self) -> bool {278 pub fn confirmed(&self) -> bool {276 matches!(self, Self::Confirmed(_))279 matches!(self, Self::Confirmed(_))277 }280 }283 }286 }284}287}285288286/// Used in storage289/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version).287#[struct_versioning::versioned(version = 2, upper)]290#[struct_versioning::versioned(version = 2, upper)]288#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]291#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]289pub struct Collection<AccountId> {292pub struct Collection<AccountId> {324 pub meta_update_permission: MetaUpdatePermission,327 pub meta_update_permission: MetaUpdatePermission,325}328}326329327/// Used in RPC calls330/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version).328#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]331#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]329#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]332#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]330pub struct RpcCollection<AccountId> {333pub struct RpcCollection<AccountId> {362365363pub type CollectionPropertiesVec = BoundedVec<Property, ConstU32<MAX_PROPERTIES_PER_ITEM>>;366pub type CollectionPropertiesVec = BoundedVec<Property, ConstU32<MAX_PROPERTIES_PER_ITEM>>;364367368/// Limits and restrictions of a collection.365/// All fields are wrapped in `Option`s, where None means chain default369/// All fields are wrapped in `Option`s, where None means chain default.370///371/// todo:doc links to chain defaults366// When adding/removing fields from this struct - don't forget to also update clamp_limits372// IMPORTANT: When adding/removing fields from this struct - don't forget to also373// update clamp_limits() in pallet-common.367#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]374#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]368#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]375#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]369pub struct CollectionLimits {376pub struct CollectionLimits {377 /// Maximum number of owned tokens per account. Chain default: [`ACCOUNT_TOKEN_OWNERSHIP_LIMIT`]370 pub account_token_ownership_limit: Option<u32>,378 pub account_token_ownership_limit: Option<u32>,379 /// Maximum size of data in bytes of a sponsored transaction. Chain default: [`CUSTOM_DATA_LIMIT`]371 pub sponsored_data_size: Option<u32>,380 pub sponsored_data_size: Option<u32>,372381373 /// FIXME should we delete this or repurpose it?382 /// FIXME should we delete this or repurpose it?374 /// None - setVariableMetadata is not sponsored383 /// None - setVariableMetadata is not sponsored375 /// Some(v) - setVariableMetadata is sponsored384 /// Some(v) - setVariableMetadata is sponsored376 /// if there is v block between txs385 /// if there is v block between txs386 ///387 /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]377 pub sponsored_data_rate_limit: Option<SponsoringRateLimit>,388 pub sponsored_data_rate_limit: Option<SponsoringRateLimit>,389 /// Maximum amount of tokens inside the collection. Chain default: [`COLLECTION_TOKEN_LIMIT`]378 pub token_limit: Option<u32>,390 pub token_limit: Option<u32>,379391380 // Timeouts for item types in passed blocks392 /// Timeout for sponsoring a token transfer in passed blocks. Chain default:393 /// either [`NFT_SPONSOR_TRANSFER_TIMEOUT`], [`FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT`], or [`REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT`],394 /// depending on the collection type.381 pub sponsor_transfer_timeout: Option<u32>,395 pub sponsor_transfer_timeout: Option<u32>,396 /// Timeout for sponsoring an approval in passed blocks. Chain default: [`SPONSOR_APPROVE_TIMEOUT`]382 pub sponsor_approve_timeout: Option<u32>,397 pub sponsor_approve_timeout: Option<u32>,398 /// Can a token be transferred by the owner. Chain default: `false`383 pub owner_can_transfer: Option<bool>,399 pub owner_can_transfer: Option<bool>,400 /// Can a token be burned by the owner. Chain default: `true`384 pub owner_can_destroy: Option<bool>,401 pub owner_can_destroy: Option<bool>,402 /// Can a token be transferred at all. Chain default: `true`385 pub transfers_enabled: Option<bool>,403 pub transfers_enabled: Option<bool>,386}404}387405434 }452 }435}453}436454437// When adding/removing fields from this struct - don't forget to also update clamp_limits455/// Permissions on certain operations within a collection.456/// All fields are wrapped in `Option`s, where None means chain default.457// IMPORTANT: When adding/removing fields from this struct - don't forget to also458// update clamp_limits() in pallet-common.438#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]459#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]439#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]460#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]440pub struct CollectionPermissions {461pub struct CollectionPermissions {489 }510 }490}511}491512513/// Part of collection permissions, if set, defines who is able to nest tokens into other tokens.492#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]514#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]493#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]515#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]494#[derivative(Debug)]516#[derivative(Debug)]505 pub permissive: bool,527 pub permissive: bool,506}528}507529530/// Enum denominating how often can sponsoring occur if it is enabled.508#[derive(Encode, Decode, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen)]531#[derive(Encode, Decode, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen)]509#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]532#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]510pub enum SponsoringRateLimit {533pub enum SponsoringRateLimit {534 /// Sponsoring is disabled, and the collection sponsor will not pay for transactions511 SponsoringDisabled,535 SponsoringDisabled,536 /// Once per how many blocks can sponsorship of a transaction type occur512 Blocks(u32),537 Blocks(u32),513}538}514539540/// Data used to describe an NFT at creation.515#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]541#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]516#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]542#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]517#[derivative(Debug)]543#[derivative(Debug)]518pub struct CreateNftData {544pub struct CreateNftData {545 /// Key-value pairs used to describe the token as metadata519 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]546 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]520 #[derivative(Debug(format_with = "bounded::vec_debug"))]547 #[derivative(Debug(format_with = "bounded::vec_debug"))]521 pub properties: CollectionPropertiesVec,548 pub properties: CollectionPropertiesVec,522}549}523550551/// Data used to describe a Fungible token at creation.524#[derive(Encode, Decode, MaxEncodedLen, Default, Debug, Clone, PartialEq, TypeInfo)]552#[derive(Encode, Decode, MaxEncodedLen, Default, Debug, Clone, PartialEq, TypeInfo)]525#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]553#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]526pub struct CreateFungibleData {554pub struct CreateFungibleData {555 /// Number of fungible coins minted527 pub value: u128,556 pub value: u128,528}557}529558559/// Data used to describe a Refungible token at creation.530#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]560#[derive(Encode, Decode, MaxEncodedLen, Default, PartialEq, Clone, Derivative, TypeInfo)]531#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]561#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]532#[derivative(Debug)]562#[derivative(Debug)]533pub struct CreateReFungibleData {563pub struct CreateReFungibleData {564 /// Immutable metadata of the token534 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]565 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]535 #[derivative(Debug(format_with = "bounded::vec_debug"))]566 #[derivative(Debug(format_with = "bounded::vec_debug"))]536 pub const_data: BoundedVec<u8, CustomDataLimit>,567 pub const_data: BoundedVec<u8, CustomDataLimit>,537568569 /// Number of pieces the RFT is split into538 pub pieces: u128,570 pub pieces: u128,539571572 /// Key-value pairs used to describe the token as metadata540 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]573 #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]541 #[derivative(Debug(format_with = "bounded::vec_debug"))]574 #[derivative(Debug(format_with = "bounded::vec_debug"))]542 pub properties: CollectionPropertiesVec,575 pub properties: CollectionPropertiesVec,550 None,583 None,551}584}552585586/// Enum holding data used for creation of all three item types.553#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]587#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]554#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]588#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]555pub enum CreateItemData {589pub enum CreateItemData {558 ReFungible(CreateReFungibleData),592 ReFungible(CreateReFungibleData),559}593}560594595/// Explicit NFT creation data with meta parameters.561#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]596#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]562#[derivative(Debug)]597#[derivative(Debug)]563pub struct CreateNftExData<CrossAccountId> {598pub struct CreateNftExData<CrossAccountId> {566 pub owner: CrossAccountId,601 pub owner: CrossAccountId,567}602}568603604/// Explicit RFT creation data with meta parameters.569#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]605#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]570#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]606#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]571pub struct CreateRefungibleExData<CrossAccountId> {607pub struct CreateRefungibleExData<CrossAccountId> {577 pub properties: CollectionPropertiesVec,613 pub properties: CollectionPropertiesVec,578}614}579615616/// Explicit item creation data with meta parameters, namely the owner.580#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]617#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]581#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]618#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]582pub enum CreateItemExData<CrossAccountId> {619pub enum CreateItemExData<CrossAccountId> {624 }661 }625}662}626663664/// Token's address, dictated by its collection and token IDs.627#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]665#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]628#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]666#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]629// todo possibly rename to be used generally as an address pair667// todo possibly rename to be used generally as an address pairtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth56 * Address is not in allow list.56 * Address is not in allow list.57 **/57 **/58 AddressNotInAllowlist: AugmentedError<ApiType>;58 AddressNotInAllowlist: AugmentedError<ApiType>;59 /**59 /**60 * Requested value more than approved.60 * Requested value is more than the approved61 **/61 **/62 ApprovedValueTooLow: AugmentedError<ApiType>;62 ApprovedValueTooLow: AugmentedError<ApiType>;63 /**63 /**64 * Tried to approve more than owned64 * Tried to approve more than owned112 * Empty property keys are forbidden112 * Empty property keys are forbidden113 **/113 **/114 EmptyPropertyKey: AugmentedError<ApiType>;114 EmptyPropertyKey: AugmentedError<ApiType>;115 /**115 /**116 * Only ASCII letters, digits, and '_', '-' are allowed116 * Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed117 **/117 **/118 InvalidCharacterInPropertyKey: AugmentedError<ApiType>;118 InvalidCharacterInPropertyKey: AugmentedError<ApiType>;119 /**119 /**120 * Metadata flag frozen120 * Metadata flag frozen132 * Tried to store more property data than allowed132 * Tried to store more property data than allowed133 **/133 **/134 NoSpaceForProperty: AugmentedError<ApiType>;134 NoSpaceForProperty: AugmentedError<ApiType>;135 /**135 /**136 * Not sufficient funds to perform action136 * Insufficient funds to perform an action137 **/137 **/138 NotSufficientFounds: AugmentedError<ApiType>;138 NotSufficientFounds: AugmentedError<ApiType>;139 /**139 /**140 * Tried to enable permissions which are only permitted to be disabled140 * Tried to enable permissions which are only permitted to be disabled152 * Collection is not in mint mode.152 * Collection is not in mint mode.153 **/153 **/154 PublicMintingNotAllowed: AugmentedError<ApiType>;154 PublicMintingNotAllowed: AugmentedError<ApiType>;155 /**155 /**156 * Only tokens from specific collections may nest tokens under this156 * Only tokens from specific collections may nest tokens under this one157 **/157 **/158 SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;158 SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;159 /**159 /**160 * Item not exists.160 * Item does not exist161 **/161 **/162 TokenNotFound: AugmentedError<ApiType>;162 TokenNotFound: AugmentedError<ApiType>;163 /**163 /**164 * Item balance not enough.164 * Item is balance not enough165 **/165 **/166 TokenValueTooLow: AugmentedError<ApiType>;166 TokenValueTooLow: AugmentedError<ApiType>;167 /**167 /**168 * Total collections bound exceeded.168 * Total collections bound exceeded.172 * Collection settings not allowing items transferring172 * Collection settings not allowing items transferring173 **/173 **/174 TransferNotAllowed: AugmentedError<ApiType>;174 TransferNotAllowed: AugmentedError<ApiType>;175 /**175 /**176 * Target collection doesn't supports this operation176 * Target collection doesn't support this operation177 **/177 **/178 UnsupportedOperation: AugmentedError<ApiType>;178 UnsupportedOperation: AugmentedError<ApiType>;179 /**179 /**180 * User not passed nesting rule180 * User does not satisfy the nesting rule181 **/181 **/182 UserIsNotAllowedToNest: AugmentedError<ApiType>;182 UserIsNotAllowedToNest: AugmentedError<ApiType>;183 /**183 /**184 * Generic error184 * Generic error284 * Tried to set data for fungible item.284 * Tried to set data for fungible item.285 **/285 **/286 FungibleItemsDontHaveData: AugmentedError<ApiType>;286 FungibleItemsDontHaveData: AugmentedError<ApiType>;287 /**287 /**288 * Not default id passed as TokenId argument.288 * Fungible tokens hold no ID, and the default value of TokenId for Fungible collection is 0.289 * The default value of TokenId for Fungible collection is 0.289 **/290 **/291 FungibleItemsHaveNoId: AugmentedError<ApiType>;290 FungibleItemsHaveNoId: AugmentedError<ApiType>;292 /**291 /**293 * Not Fungible item data used to mint in Fungible collection.292 * Not Fungible item data used to mint in Fungible collection.425 * Not Refungible item data used to mint in Refungible collection.424 * Not Refungible item data used to mint in Refungible collection.426 **/425 **/427 NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;426 NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;428 /**427 /**429 * Refungible token can't nest other tokens428 * Refungible token can't nest other tokens.430 **/429 **/431 RefungibleDisallowsNesting: AugmentedError<ApiType>;430 RefungibleDisallowsNesting: AugmentedError<ApiType>;432 /**431 /**433 * Refungible token can't be repartitioned by user who isn't owns all pieces432 * Refungible token can't be repartitioned by user who isn't owns all pieces.434 **/433 **/435 RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;434 RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;436 /**435 /**437 * Setting item properties is not allowed436 * Setting item properties is not allowed.438 **/437 **/439 SettingPropertiesNotAllowed: AugmentedError<ApiType>;438 SettingPropertiesNotAllowed: AugmentedError<ApiType>;440 /**439 /**441 * Maximum refungibility exceeded440 * Maximum refungibility exceeded.442 **/441 **/443 WrongRefungiblePieces: AugmentedError<ApiType>;442 WrongRefungiblePieces: AugmentedError<ApiType>;444 /**443 /**445 * Generic error444 * Generic error508 [key: string]: AugmentedError<ApiType>;507 [key: string]: AugmentedError<ApiType>;509 };508 };510 structure: {509 structure: {511 /**510 /**512 * While iterating over children, encountered breadth limit511 * While iterating over children, reached the breadth limit.513 **/512 **/514 BreadthLimit: AugmentedError<ApiType>;513 BreadthLimit: AugmentedError<ApiType>;515 /**514 /**516 * While searched for owner, encountered depth limit515 * While searching for the owner, reached the depth limit.517 **/516 **/518 DepthLimit: AugmentedError<ApiType>;517 DepthLimit: AugmentedError<ApiType>;519 /**518 /**520 * While searched for owner, got already checked account519 * While searching for the owner, encountered an already checked account, detecting a loop.521 **/520 **/522 OuroborosDetected: AugmentedError<ApiType>;521 OuroborosDetected: AugmentedError<ApiType>;523 /**522 /**524 * While searched for owner, found token owner by not-yet-existing token523 * Couldn't find the token owner that is itself a token.525 **/524 **/526 TokenNotFound: AugmentedError<ApiType>;525 TokenNotFound: AugmentedError<ApiType>;527 /**526 /**528 * Generic error527 * Generic error596 [key: string]: AugmentedError<ApiType>;595 [key: string]: AugmentedError<ApiType>;597 };596 };598 unique: {597 unique: {599 /**598 /**600 * Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.599 * Decimal_points parameter must be lower than [`up_data_structs::MAX_DECIMAL_POINTS`].601 **/600 **/602 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;601 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;603 /**602 /**604 * This address is not set as sponsor, use setCollectionSponsor first.603 * This address is not set as sponsor, use setCollectionSponsor first.608 * Length of items properties must be greater than 0.607 * Length of items properties must be greater than 0.609 **/608 **/610 EmptyArgument: AugmentedError<ApiType>;609 EmptyArgument: AugmentedError<ApiType>;611 /**610 /**612 * Repertition is only supported by refungible collection611 * Repertition is only supported by refungible collection.613 **/612 **/614 RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;613 RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;615 /**614 /**616 * Generic error615 * Generic errortests/src/interfaces/augment-api-events.tsdiffbeforeafterboth74 * The property has been deleted.74 * The property has been deleted.75 **/75 **/76 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;76 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;77 /**77 /**78 * The colletion property has been set.78 * The colletion property has been added or edited.79 **/79 **/80 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;80 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;81 /**81 /**82 * New item was created.82 * New item was created.86 * Collection item was burned.86 * Collection item was burned.87 **/87 **/88 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;88 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;89 /**89 /**90 * The colletion property permission has been set.90 * The token property permission of a collection has been set.91 **/91 **/92 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;92 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;93 /**93 /**94 * The token property has been deleted.94 * The token property has been deleted.95 **/95 **/96 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;96 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;97 /**97 /**98 * The token property has been set.98 * The token property has been added or edited.99 **/99 **/100 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;100 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;101 /**101 /**102 * Item was transferred102 * Item was transferred406 [key: string]: AugmentedEvent<ApiType>;406 [key: string]: AugmentedEvent<ApiType>;407 };407 };408 structure: {408 structure: {409 /**409 /**410 * Executed call on behalf of token410 * Executed call on behalf of the token.411 **/411 **/412 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;412 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;413 /**413 /**414 * Generic event414 * Generic event498 [key: string]: AugmentedEvent<ApiType>;498 [key: string]: AugmentedEvent<ApiType>;499 };499 };500 unique: {500 unique: {501 /**501 /**502 * Address was add to allow list502 * Address was added to the allow list503 * 503 * 504 * # Arguments504 * # Arguments505 * 505 * * collection_id: ID of the affected collection.506 * * collection_id: Globally unique collection identifier.506 * * user: Address of the added account.507 * 508 * * user: Address.507 **/509 **/510 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;508 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;511 /**509 /**512 * Address was remove from allow list510 * Address was removed from the allow list513 * 511 * 514 * # Arguments512 * # Arguments515 * 513 * * collection_id: ID of the affected collection.516 * * collection_id: Globally unique collection identifier.514 * * user: Address of the removed account.517 * 518 * * user: Address.515 **/519 **/520 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;516 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;521 /**517 /**522 * Collection admin was added518 * Collection admin was added523 * 519 * 524 * # Arguments520 * # Arguments525 * 521 * * collection_id: ID of the affected collection.526 * * collection_id: Globally unique collection identifier.522 * * admin: Admin address.527 * 528 * * admin: Admin address.523 **/529 **/530 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;524 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;531 /**525 /**532 * Collection admin was removed526 * Collection admin was removed533 * 527 * 534 * # Arguments528 * # Arguments535 * 529 * * collection_id: ID of the affected collection.536 * * collection_id: Globally unique collection identifier.530 * * admin: Removed admin address.537 * 538 * * admin: Admin address.531 **/539 **/540 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;532 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;541 /**533 /**542 * Collection limits was set534 * Collection limits were set543 * 535 * 544 * # Arguments536 * # Arguments545 * 537 * * collection_id: ID of the affected collection.546 * * collection_id: Globally unique collection identifier.538 **/547 **/548 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;539 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;549 /**540 /**550 * Collection owned was change541 * Collection owned was changed551 * 542 * 552 * # Arguments543 * # Arguments553 * 544 * * collection_id: ID of the affected collection.554 * * collection_id: Globally unique collection identifier.545 * * owner: New owner address.555 * 556 * * owner: New owner address.546 **/557 **/558 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;547 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;548 /**549 * Collection permissions were set550 * 551 * # Arguments552 * * collection_id: ID of the affected collection.553 **/559 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;554 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;560 /**555 /**561 * Collection sponsor was removed556 * Collection sponsor was removed562 * 557 * 563 * # Arguments558 * # Arguments564 * 559 * * collection_id: ID of the affected collection.565 * * collection_id: Globally unique collection identifier.560 **/566 **/567 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;561 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;568 /**562 /**569 * Collection sponsor was set563 * Collection sponsor was set570 * 564 * 571 * # Arguments565 * # Arguments572 * 566 * * collection_id: ID of the affected collection.573 * * collection_id: Globally unique collection identifier.567 * * owner: New sponsor address.574 * 575 * * owner: New sponsor address.568 **/576 **/577 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;569 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;578 /**570 /**579 * New sponsor was confirm571 * New sponsor was confirm580 * 572 * 581 * # Arguments573 * # Arguments582 * 574 * * collection_id: ID of the affected collection.583 * * collection_id: Globally unique collection identifier.575 * * sponsor: New sponsor address.584 * 585 * * sponsor: New sponsor address.576 **/586 **/587 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;577 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;588 /**578 /**589 * Generic event579 * Generic eventtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth69 [key: string]: QueryableStorageEntry<ApiType>;69 [key: string]: QueryableStorageEntry<ApiType>;70 };70 };71 common: {71 common: {72 /**72 /**73 * Storage of collection admins count.73 * Storage of the amount of collection admins.74 **/74 **/75 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;75 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;76 /**76 /**77 * Allowlisted collection users77 * Allowlisted collection users.78 **/78 **/79 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;79 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;80 /**80 /**81 * Storage of collection info.81 * Storage of collection info.85 * Storage of collection properties.85 * Storage of collection properties.86 **/86 **/87 collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;87 collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;88 /**88 /**89 * Storage of collection properties permissions.89 * Storage of token property permissions of a collection.90 **/90 **/91 collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;91 collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;92 /**92 /**93 * Storage of the count of created collections.93 * Storage of the count of created collections. Essentially contains the last collection ID.94 **/94 **/95 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;95 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;96 /**96 /**97 * Storage of the count of deleted collections.97 * Storage of the count of deleted collections.101 * Not used by code, exists only to provide some types to metadata.101 * Not used by code, exists only to provide some types to metadata.102 **/102 **/103 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;103 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;104 /**104 /**105 * List of collection admins105 * List of collection admins.106 **/106 **/107 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;107 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;108 /**108 /**109 * Generic query109 * Generic query199 [key: string]: QueryableStorageEntry<ApiType>;199 [key: string]: QueryableStorageEntry<ApiType>;200 };200 };201 fungible: {201 fungible: {202 /**202 /**203 * Storage for delegated assets.203 * Storage for assets delegated to a limited extent to other users.204 **/204 **/205 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;205 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;206 /**206 /**207 * Amount of tokens owned by an account inside a collection.207 * Amount of tokens owned by an account inside a collection.243 [key: string]: QueryableStorageEntry<ApiType>;243 [key: string]: QueryableStorageEntry<ApiType>;244 };244 };245 nonfungible: {245 nonfungible: {246 /**246 /**247 * Amount of tokens owned by account.247 * Amount of tokens owned by an account in a collection.248 **/248 **/249 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;249 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;250 /**250 /**251 * Allowance set by an owner for a spender for a token.251 * Allowance set by a token owner for another user to perform one of certain transactions on a token.252 **/252 **/253 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;253 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;254 /**254 /**255 * Used to enumerate tokens owned by account.255 * Used to enumerate tokens owned by account.256 **/256 **/257 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;257 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;258 /**258 /**259 * Custom data that is serialized to bytes and attached to a token property.259 * Custom data of a token that is serialized to bytes,260 * Currently used to store RMRK data.260 * primarily reserved for on-chain operations,261 **/261 * normally obscured from the external users.262 * 263 * Auxiliary properties are slightly different from264 * usual [`TokenProperties`] due to an unlimited number265 * and separately stored and written-to key-value pairs.266 * 267 * Currently used to store RMRK data.268 **/262 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;269 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;263 /**270 /**264 * Used to enumerate token's children.271 * Used to enumerate token's children.265 **/272 **/266 tokenChildren: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<bool>, [u32, u32, ITuple<[u32, u32]>]> & QueryableStorageEntry<ApiType, [u32, u32, ITuple<[u32, u32]>]>;273 tokenChildren: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<bool>, [u32, u32, ITuple<[u32, u32]>]> & QueryableStorageEntry<ApiType, [u32, u32, ITuple<[u32, u32]>]>;267 /**274 /**268 * Custom data serialized to bytes for token.275 * Token data, used to partially describe a token.269 **/276 **/270 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;277 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;271 /**278 /**272 * Key-Value map stored for token.279 * Map of key-value pairs, describing the metadata of a token.273 **/280 **/274 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;281 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;275 /**282 /**276 * Amount of burnt tokens for collection.283 * Amount of burnt tokens in a collection.277 **/284 **/278 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;285 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;279 /**286 /**280 * Amount of tokens minted for collection.287 * Total amount of minted tokens in a collection.281 **/288 **/282 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;289 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;283 /**290 /**284 * Generic query291 * Generic query443 [key: string]: QueryableStorageEntry<ApiType>;450 [key: string]: QueryableStorageEntry<ApiType>;444 };451 };445 refungible: {452 refungible: {446 /**453 /**447 * Amount of tokens owned by account454 * Amount of tokens (not pieces) partially owned by an account within a collection.448 **/455 **/449 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;456 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;450 /**457 /**451 * Allowance set by an owner for a spender for a token458 * Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.452 **/459 **/453 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;460 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;454 /**461 /**455 * Amount of token pieces owned by account462 * Amount of token pieces owned by account.456 **/463 **/457 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;464 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;458 /**465 /**459 * Used to enumerate tokens owned by account466 * Used to enumerate tokens owned by account.460 **/467 **/461 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;468 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;462 /**469 /**463 * Custom data serialized to bytes for token470 * Token data, used to partially describe a token.464 **/471 **/465 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;472 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;473 /**474 * Amount of pieces a refungible token is split into.475 **/466 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;476 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;467 /**477 /**468 * Amount of burnt tokens for collection478 * Amount of tokens burnt in a collection.469 **/479 **/470 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;480 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;471 /**481 /**472 * Amount of tokens minted for collection482 * Total amount of minted tokens in a collection.473 **/483 **/474 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;484 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;475 /**485 /**476 * Total amount of pieces for token486 * Total amount of pieces for token663 * TODO: Off chain worker should remove from this map when collection gets removed673 * TODO: Off chain worker should remove from this map when collection gets removed664 **/674 **/665 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;675 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;676 /**677 * Last sponsoring of fungible tokens approval in a collection678 **/666 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;679 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;667 /**680 /**668 * Collection id (controlled?2), owning user (real)681 * Collection id (controlled?2), owning user (real)669 **/682 **/670 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;683 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;671 /**684 /**672 * Approval sponsoring685 * Last sponsoring of NFT approval in a collection673 **/686 **/674 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;687 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;675 /**688 /**676 * Collection id (controlled?2), token id (controlled?2)689 * Collection id (controlled?2), token id (controlled?2)677 **/690 **/678 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;691 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;692 /**693 * Last sponsoring of RFT approval in a collection694 **/679 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;695 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;680 /**696 /**681 * Collection id (controlled?2), token id (controlled?2)697 * Collection id (controlled?2), token id (controlled?2)682 **/698 **/683 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;699 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;700 /**701 * Last sponsoring of token property setting // todo:doc rephrase this and the following702 **/684 tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;703 tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;685 /**704 /**686 * Variable metadata sponsoring705 * Variable metadata sponsoringtests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth628 version: AugmentedRpc<() => Observable<Text>>;628 version: AugmentedRpc<() => Observable<Text>>;629 };629 };630 unique: {630 unique: {631 /**631 /**632 * Get amount of different user tokens632 * Get the amount of any user tokens owned by an account633 **/633 **/634 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;634 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;635 /**635 /**636 * Get tokens owned by account636 * Get tokens owned by an account in a collection637 **/637 **/638 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;638 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;639 /**639 /**640 * Get admin list640 * Get the list of admin accounts of a collection641 **/641 **/642 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;642 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;643 /**643 /**644 * Get allowed amount644 * Get the amount of currently possible sponsored transactions on a token for the fee to be taken off a sponsor645 **/645 **/646 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;646 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;647 /**647 /**648 * Check if user is allowed to use collection648 * Check if a user is allowed to operate within a collection649 **/649 **/650 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;650 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;651 /**651 /**652 * Get allowlist652 * Get the list of accounts allowed to operate within a collection653 **/653 **/654 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;654 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;655 /**655 /**656 * Get amount of specific account token656 * Get the amount of a specific token owned by an account657 **/657 **/658 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;658 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;659 /**659 /**660 * Get collection by specified id660 * Get a collection by the specified ID661 **/661 **/662 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRpcCollection>>>;662 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRpcCollection>>>;663 /**663 /**664 * Get collection properties664 * Get collection properties, optionally limited to the provided keys665 **/665 **/666 collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;666 collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;667 /**667 /**668 * Get collection stats668 * Get chain stats about collections669 **/669 **/670 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;670 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;671 /**671 /**672 * Get tokens contained in collection672 * Get tokens contained within a collection673 **/673 **/674 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;674 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;675 /**675 /**676 * Get token constant metadata676 * Get token constant metadata680 * Get effective collection limits680 * Get effective collection limits681 **/681 **/682 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;682 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;683 /**683 /**684 * Get last token id684 * Get the last token ID created in a collection685 **/685 **/686 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;686 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;687 /**687 /**688 * Get number of blocks when sponsored transaction is available688 * Get the number of blocks until sponsoring a transaction is available689 **/689 **/690 nextSponsored: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;690 nextSponsored: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;691 /**691 /**692 * Get property permissions692 * Get property permissions, optionally limited to the provided keys693 **/693 **/694 propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;694 propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;695 /**695 /**696 * Get tokens nested directly into the token696 * Get tokens nested directly into the token697 **/697 **/698 tokenChildren: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenChild>>>;698 tokenChildren: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenChild>>>;699 /**699 /**700 * Get token data700 * Get token data, including properties, optionally limited to the provided keys, and total pieces for an RFT701 **/701 **/702 tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;702 tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;703 /**703 /**704 * Check if token exists704 * Check if the token exists705 **/705 **/706 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;706 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;707 /**707 /**708 * Get token owner708 * Get the token owner709 **/709 **/710 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;710 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;711 /**711 /**712 * Returns 10 tokens owners in no particular order712 * Returns 10 tokens owners in no particular order713 **/713 **/714 tokenOwners: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;714 tokenOwners: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;715 /**715 /**716 * Get token properties716 * Get token properties, optionally limited to the provided keys717 **/717 **/718 tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;718 tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;719 /**719 /**720 * Get token owner, in case of nested token - find parent recursive720 * Get the topmost token owner in the hierarchy of a possibly nested token721 **/721 **/722 topmostTokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;722 topmostTokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;723 /**723 /**724 * Get total pieces of token724 * Get the total amount of pieces of an RFT725 **/725 **/726 totalPieces: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u128>>>;726 totalPieces: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u128>>>;727 /**727 /**728 * Get amount of unique collection tokens728 * Get the amount of distinctive tokens present in a collection729 **/729 **/730 totalSupply: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;730 totalSupply: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;731 /**731 /**732 * Get token variable metadata732 * Get token variable metadatatests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth729 [key: string]: SubmittableExtrinsicFunction<ApiType>;729 [key: string]: SubmittableExtrinsicFunction<ApiType>;730 };730 };731 unique: {731 unique: {732 /**732 /**733 * Adds an admin of the Collection.733 * Add an admin to a collection.734 * NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership.734 * 735 * NFT Collection can be controlled by multiple admin addresses736 * (some which can also be servers, for example). Admins can issue737 * and burn NFTs, as well as add and remove other admins,738 * but cannot change NFT or Collection ownership.735 * 739 * 736 * # Permissions740 * # Permissions737 * 741 * 738 * * Collection Owner.742 * * Collection owner739 * * Collection Admin.743 * * Collection admin740 * 744 * 741 * # Arguments745 * # Arguments742 * 746 * 743 * * collection_id: ID of the Collection to add admin for.747 * * `collection_id`: ID of the Collection to add an admin for.744 * 748 * * `new_admin`: Address of new admin to add.745 * * new_admin_id: Address of new admin to add.749 **/746 **/747 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;750 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdmin: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;748 /**751 /**749 * Add an address to allow list.752 * Add an address to allow list.750 * 753 * 751 * # Permissions754 * # Permissions752 * 755 * 753 * * Collection Owner756 * * Collection owner754 * * Collection Admin757 * * Collection admin755 * 758 * 756 * # Arguments759 * # Arguments757 * 760 * 758 * * collection_id.761 * * `collection_id`: ID of the modified collection.759 * 762 * * `address`: ID of the address to be added to the allowlist.760 * * address.763 **/761 **/762 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;764 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;763 /**765 /**764 * Set, change, or remove approved address to transfer the ownership of the NFT.766 * Allow a non-permissioned address to transfer or burn an item.765 * 767 * 766 * # Permissions768 * # Permissions767 * 769 * 768 * * Collection Owner770 * * Collection owner769 * * Collection Admin771 * * Collection admin770 * * Current NFT owner772 * * Current item owner771 * 773 * 772 * # Arguments774 * # Arguments773 * 775 * 774 * * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).776 * * `spender`: Account to be approved to make specific transactions on non-owned tokens.775 * 777 * * `collection_id`: ID of the collection the item belongs to.776 * * collection_id.778 * * `item_id`: ID of the item transactions on which are now approved.777 * 779 * * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).778 * * item_id: ID of the item.780 * Set to 0 to revoke the approval.779 **/781 **/780 approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;782 approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;781 /**783 /**782 * Destroys a concrete instance of NFT on behalf of the owner784 * Destroy a token on behalf of the owner as a non-owner account.783 * See also: [`approve`]785 * 784 * 786 * See also: [`approve`][`Pallet::approve`].785 * # Permissions787 * 786 * 788 * After this method executes, one approval is removed from the total so that787 * * Collection Owner.789 * the approved address will not be able to transfer this item again from this owner.788 * * Collection Admin.790 * 789 * * Current NFT Owner.791 * # Permissions790 * 792 * 791 * # Arguments793 * * Collection owner792 * 794 * * Collection admin793 * * collection_id: ID of the collection.795 * * Current token owner794 * 796 * * Address approved by current item owner795 * * item_id: ID of NFT to burn.797 * 796 * 798 * # Arguments797 * * from: owner of item799 * 798 **/800 * * `from`: The owner of the burning item.801 * * `collection_id`: ID of the collection to which the item belongs.802 * * `item_id`: ID of item to burn.803 * * `value`: Number of pieces to burn.804 * * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.805 * * Fungible Mode: The desired number of pieces to burn.806 * * Re-Fungible Mode: The desired number of pieces to burn.807 **/799 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32, u128]>;808 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32, u128]>;800 /**809 /**801 * Destroys a concrete instance of NFT.810 * Destroy an item.802 * 811 * 803 * # Permissions812 * # Permissions804 * 813 * 805 * * Collection Owner.814 * * Collection owner806 * * Collection Admin.815 * * Collection admin807 * * Current NFT Owner.816 * * Current item owner808 * 817 * 809 * # Arguments818 * # Arguments810 * 819 * 811 * * collection_id: ID of the collection.820 * * `collection_id`: ID of the collection to which the item belongs.812 * 821 * * `item_id`: ID of item to burn.813 * * item_id: ID of NFT to burn.822 * * `value`: Number of pieces of the item to destroy.814 **/823 * * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.824 * * Fungible Mode: The desired number of pieces to burn.825 * * Re-Fungible Mode: The desired number of pieces to burn.826 **/815 burnItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;827 burnItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;816 /**828 /**817 * Change the owner of the collection.829 * Change the owner of the collection.818 * 830 * 819 * # Permissions831 * # Permissions820 * 832 * 821 * * Collection Owner.833 * * Collection owner822 * 834 * 823 * # Arguments835 * # Arguments824 * 836 * 825 * * collection_id.837 * * `collection_id`: ID of the modified collection.826 * 838 * * `new_owner`: ID of the account that will become the owner.827 * * new_owner.839 **/828 **/829 changeCollectionOwner: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newOwner: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;840 changeCollectionOwner: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newOwner: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;830 /**841 /**831 * # Permissions842 * Confirm own sponsorship of a collection, becoming the sponsor.832 * 843 * 833 * * Sponsor.844 * An invitation must be pending, see [`set_collection_sponsor`][`Pallet::set_collection_sponsor`].834 * 845 * Sponsor can pay the fees of a transaction instead of the sender,835 * # Arguments846 * but only within specified limits.836 * 847 * 837 * * collection_id.848 * # Permissions838 **/849 * 850 * * Sponsor-to-be851 * 852 * # Arguments853 * 854 * * `collection_id`: ID of the collection with the pending sponsor.855 **/839 confirmSponsorship: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;856 confirmSponsorship: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;840 /**857 /**841 * This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner of the collection is set to the address that signed the transaction and can be changed later.858 * Create a collection of tokens.842 * 859 * 843 * # Permissions860 * Each Token may have multiple properties encoded as an array of bytes844 * 861 * of certain length. The initial owner of the collection is set845 * * Anyone.862 * to the address that signed the transaction and can be changed later.846 * 863 * 847 * # Arguments864 * Prefer the more advanced [`create_collection_ex`][`Pallet::create_collection_ex`] instead.848 * 865 * 849 * * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.866 * # Permissions850 * 867 * 851 * * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.868 * * Anyone - becomes the owner of the new collection.852 * 869 * 853 * * token_prefix: UTF-8 string with token prefix.870 * # Arguments854 * 871 * 855 * * mode: [CollectionMode] collection type and type dependent data.872 * * `collection_name`: Wide-character string with collection name856 **/873 * (limit [`MAX_COLLECTION_NAME_LENGTH`]).874 * * `collection_description`: Wide-character string with collection description875 * (limit [`MAX_COLLECTION_DESCRIPTION_LENGTH`]).876 * * `token_prefix`: Byte string containing the token prefix to mark a collection877 * to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).878 * * `mode`: Type of items stored in the collection and type dependent data.879 **/857 createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: UpDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, UpDataStructsCollectionMode]>;880 createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: UpDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, UpDataStructsCollectionMode]>;858 /**881 /**859 * This method creates a collection882 * Create a collection with explicit parameters.860 * 883 * 861 * Prefer it to deprecated [`created_collection`] method884 * Prefer it to the deprecated [`create_collection`][`Pallet::create_collection`] method.862 **/885 * 886 * # Permissions887 * 888 * * Anyone - becomes the owner of the new collection.889 * 890 * # Arguments891 * 892 * * `data`: Explicit data of a collection used for its creation.893 **/863 createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; pendingSponsor?: any; limits?: any; permissions?: any; tokenPropertyPermissions?: any; properties?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;894 createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; pendingSponsor?: any; limits?: any; permissions?: any; tokenPropertyPermissions?: any; properties?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;864 /**895 /**865 * This method creates a concrete instance of NFT Collection created with CreateCollection method.896 * Mint an item within a collection.897 * 898 * A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].866 * 899 * 867 * # Permissions900 * # Permissions868 * 901 * 869 * * Collection Owner.902 * * Collection owner870 * * Collection Admin.903 * * Collection admin871 * * Anyone if904 * * Anyone if872 * * Allow List is enabled, and905 * * Allow List is enabled, and873 * * Address is added to allow list, and906 * * Address is added to allow list, and874 * * MintPermission is enabled (see SetMintPermission method)907 * * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])875 * 908 * 876 * # Arguments909 * # Arguments877 * 910 * 878 * * collection_id: ID of the collection.911 * * `collection_id`: ID of the collection to which an item would belong.879 * 912 * * `owner`: Address of the initial owner of the item.880 * * owner: Address, initial owner of the NFT.913 * * `data`: Token data describing the item to store on chain.881 * 882 * * data: Token data to store on chain.914 **/883 **/884 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;915 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;885 /**916 /**886 * This method creates multiple items in a collection created with CreateCollection method.917 * Create multiple items within a collection.918 * 919 * A collection must exist first, see [`create_collection_ex`][`Pallet::create_collection_ex`].887 * 920 * 888 * # Permissions921 * # Permissions889 * 922 * 890 * * Collection Owner.923 * * Collection owner891 * * Collection Admin.924 * * Collection admin892 * * Anyone if925 * * Anyone if893 * * Allow List is enabled, and926 * * Allow List is enabled, and894 * * Address is added to allow list, and927 * * Address is added to the allow list, and895 * * MintPermission is enabled (see SetMintPermission method)928 * * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])896 * 929 * 897 * # Arguments930 * # Arguments898 * 931 * 899 * * collection_id: ID of the collection.932 * * `collection_id`: ID of the collection to which the tokens would belong.900 * 933 * * `owner`: Address of the initial owner of the tokens.901 * * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].934 * * `items_data`: Vector of data describing each item to be created.902 * 903 * * owner: Address, initial owner of the NFT.935 **/904 **/905 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;936 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;937 /**938 * Create multiple items within a collection with explicitly specified initial parameters.939 * 940 * # Permissions941 * 942 * * Collection owner943 * * Collection admin944 * * Anyone if945 * * Allow List is enabled, and946 * * Address is added to allow list, and947 * * MintPermission is enabled (see [`set_collection_permissions`][`Pallet::set_collection_permissions`])948 * 949 * # Arguments950 * 951 * * `collection_id`: ID of the collection to which the tokens would belong.952 * * `data`: Explicit item creation data.953 **/906 createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCreateItemExData]>;954 createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCreateItemExData]>;955 /**956 * Delete specified collection properties.957 * 958 * # Permissions959 * 960 * * Collection Owner961 * * Collection Admin962 * 963 * # Arguments964 * 965 * * `collection_id`: ID of the modified collection.966 * * `property_keys`: Vector of keys of the properties to be deleted.967 * Keys support Latin letters, `-`, `_`, and `.` as symbols.968 **/907 deleteCollectionProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<Bytes>]>;969 deleteCollectionProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<Bytes>]>;970 /**971 * Delete specified token properties. Currently properties only work with NFTs.972 * 973 * # Permissions974 * 975 * * Depends on collection's token property permissions and specified property mutability:976 * * Collection owner977 * * Collection admin978 * * Token owner979 * 980 * # Arguments981 * 982 * * `collection_id`: ID of the collection to which the token belongs.983 * * `token_id`: ID of the modified token.984 * * `property_keys`: Vector of keys of the properties to be deleted.985 * Keys support Latin letters, `-`, `_`, and `.` as symbols.986 **/908 deleteTokenProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, u32, Vec<Bytes>]>;987 deleteTokenProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, u32, Vec<Bytes>]>;909 /**988 /**910 * Destroys collection if no tokens within this collection989 * Destroy a collection if no tokens exist within.911 * 990 * 912 * # Permissions991 * # Permissions913 * 992 * 914 * * Collection Owner.993 * * Collection owner915 * 994 * 916 * # Arguments995 * # Arguments917 * 996 * 918 * * collection_id: collection to destroy.997 * * `collection_id`: Collection to destroy.919 **/998 **/920 destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;999 destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;921 /**1000 /**922 * Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.1001 * Remove admin of a collection.1002 * 1003 * An admin address can remove itself. List of admins may become empty,1004 * in which case only Collection Owner will be able to add an Admin.923 * 1005 * 924 * # Permissions1006 * # Permissions925 * 1007 * 926 * * Collection Owner.1008 * * Collection owner927 * * Collection Admin.1009 * * Collection admin928 * 1010 * 929 * # Arguments1011 * # Arguments930 * 1012 * 931 * * collection_id: ID of the Collection to remove admin for.1013 * * `collection_id`: ID of the collection to remove the admin for.932 * 1014 * * `account_id`: Address of the admin to remove.933 * * account_id: Address of admin to remove.1015 **/934 **/935 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1016 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;936 /**1017 /**937 * Switch back to pay-per-own-transaction model.1018 * Remove a collection's a sponsor, making everyone pay for their own transactions.938 * 1019 * 939 * # Permissions1020 * # Permissions940 * 1021 * 941 * * Collection owner.1022 * * Collection owner942 * 1023 * 943 * # Arguments1024 * # Arguments944 * 1025 * 945 * * collection_id.1026 * * `collection_id`: ID of the collection with the sponsor to remove.946 **/1027 **/947 removeCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;1028 removeCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;948 /**1029 /**949 * Remove an address from allow list.1030 * Remove an address from allow list.950 * 1031 * 951 * # Permissions1032 * # Permissions952 * 1033 * 953 * * Collection Owner1034 * * Collection owner954 * * Collection Admin1035 * * Collection admin955 * 1036 * 956 * # Arguments1037 * # Arguments957 * 1038 * 958 * * collection_id.1039 * * `collection_id`: ID of the modified collection.959 * 1040 * * `address`: ID of the address to be removed from the allowlist.960 * * address.1041 **/961 **/962 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1042 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1043 /**1044 * Re-partition a refungible token, while owning all of its parts/pieces.1045 * 1046 * # Permissions1047 * 1048 * * Token owner (must own every part)1049 * 1050 * # Arguments1051 * 1052 * * `collection_id`: ID of the collection the RFT belongs to.1053 * * `token_id`: ID of the RFT.1054 * * `amount`: New number of parts/pieces into which the token shall be partitioned.1055 **/963 repartition: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, token: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;1056 repartition: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;1057 /**1058 * Set specific limits of a collection. Empty, or None fields mean chain default.1059 * 1060 * # Permissions1061 * 1062 * * Collection owner1063 * * Collection admin1064 * 1065 * # Arguments1066 * 1067 * * `collection_id`: ID of the modified collection.1068 * * `new_limit`: New limits of the collection. Fields that are not set (None)1069 * will not overwrite the old ones.1070 **/964 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;1071 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;1072 /**1073 * Set specific permissions of a collection. Empty, or None fields mean chain default.1074 * 1075 * # Permissions1076 * 1077 * * Collection owner1078 * * Collection admin1079 * 1080 * # Arguments1081 * 1082 * * `collection_id`: ID of the modified collection.1083 * * `new_permission`: New permissions of the collection. Fields that are not set (None)1084 * will not overwrite the old ones.1085 **/965 setCollectionPermissions: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionPermissions | { access?: any; mintMode?: any; nesting?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionPermissions]>;1086 setCollectionPermissions: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newPermission: UpDataStructsCollectionPermissions | { access?: any; mintMode?: any; nesting?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionPermissions]>;1087 /**1088 * Add or change collection properties.1089 * 1090 * # Permissions1091 * 1092 * * Collection owner1093 * * Collection admin1094 * 1095 * # Arguments1096 * 1097 * * `collection_id`: ID of the modified collection.1098 * * `properties`: Vector of key-value pairs stored as the collection's metadata.1099 * Keys support Latin letters, `-`, `_`, and `.` as symbols.1100 **/966 setCollectionProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, properties: Vec<UpDataStructsProperty> | (UpDataStructsProperty | { key?: any; value?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<UpDataStructsProperty>]>;1101 setCollectionProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, properties: Vec<UpDataStructsProperty> | (UpDataStructsProperty | { key?: any; value?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<UpDataStructsProperty>]>;967 /**1102 /**968 * # Permissions1103 * Set (invite) a new collection sponsor.969 * 1104 * 970 * * Collection Owner1105 * If successful, confirmation from the sponsor-to-be will be pending.971 * 1106 * 972 * # Arguments1107 * # Permissions973 * 1108 * 974 * * collection_id.1109 * * Collection owner975 * 1110 * * Collection admin976 * * new_sponsor.1111 * 977 **/1112 * # Arguments1113 * 1114 * * `collection_id`: ID of the modified collection.1115 * * `new_sponsor`: ID of the account of the sponsor-to-be.1116 **/978 setCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newSponsor: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;1117 setCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newSponsor: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;1118 /**1119 * Add or change token properties according to collection's permissions.1120 * Currently properties only work with NFTs.1121 * 1122 * # Permissions1123 * 1124 * * Depends on collection's token property permissions and specified property mutability:1125 * * Collection owner1126 * * Collection admin1127 * * Token owner1128 * 1129 * See [`set_token_property_permissions`][`Pallet::set_token_property_permissions`].1130 * 1131 * # Arguments1132 * 1133 * * `collection_id: ID of the collection to which the token belongs.1134 * * `token_id`: ID of the modified token.1135 * * `properties`: Vector of key-value pairs stored as the token's metadata.1136 * Keys support Latin letters, `-`, `_`, and `.` as symbols.1137 **/979 setTokenProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, properties: Vec<UpDataStructsProperty> | (UpDataStructsProperty | { key?: any; value?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, u32, Vec<UpDataStructsProperty>]>;1138 setTokenProperties: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, properties: Vec<UpDataStructsProperty> | (UpDataStructsProperty | { key?: any; value?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, u32, Vec<UpDataStructsProperty>]>;1139 /**1140 * Add or change token property permissions of a collection.1141 * 1142 * Without a permission for a particular key, a property with that key1143 * cannot be created in a token.1144 * 1145 * # Permissions1146 * 1147 * * Collection owner1148 * * Collection admin1149 * 1150 * # Arguments1151 * 1152 * * `collection_id`: ID of the modified collection.1153 * * `property_permissions`: Vector of permissions for property keys.1154 * Keys support Latin letters, `-`, `_`, and `.` as symbols.1155 **/980 setTokenPropertyPermissions: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, propertyPermissions: Vec<UpDataStructsPropertyKeyPermission> | (UpDataStructsPropertyKeyPermission | { key?: any; permission?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<UpDataStructsPropertyKeyPermission>]>;1156 setTokenPropertyPermissions: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, propertyPermissions: Vec<UpDataStructsPropertyKeyPermission> | (UpDataStructsPropertyKeyPermission | { key?: any; permission?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<UpDataStructsPropertyKeyPermission>]>;981 /**1157 /**982 * Set transfers_enabled value for particular collection1158 * Completely allow or disallow transfers for a particular collection.983 * 1159 * 984 * # Permissions1160 * # Permissions985 * 1161 * 986 * * Collection Owner.1162 * * Collection owner987 * 1163 * 988 * # Arguments1164 * # Arguments989 * 1165 * 990 * * collection_id: ID of the collection.1166 * * `collection_id`: ID of the collection.991 * 1167 * * `value`: New value of the flag, are transfers allowed?992 * * value: New flag value.1168 **/993 **/994 setTransfersEnabledFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;1169 setTransfersEnabledFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;995 /**1170 /**996 * Change ownership of the token.1171 * Change ownership of the token.997 * 1172 * 998 * # Permissions1173 * # Permissions999 * 1174 * 1000 * * Collection Owner1175 * * Collection owner1001 * * Collection Admin1176 * * Collection admin1002 * * Current NFT owner1177 * * Current token owner1003 * 1178 * 1004 * # Arguments1179 * # Arguments1005 * 1180 * 1006 * * recipient: Address of token recipient.1181 * * `recipient`: Address of token recipient.1007 * 1182 * * `collection_id`: ID of the collection the item belongs to.1008 * * collection_id.1009 * 1183 * * `item_id`: ID of the item.1010 * * item_id: ID of the item1184 * * Non-Fungible Mode: Required.1011 * * Non-Fungible Mode: Required.1185 * * Fungible Mode: Ignored.1012 * * Fungible Mode: Ignored.1186 * * Re-Fungible Mode: Required.1013 * * Re-Fungible Mode: Required.1187 * 1014 * 1188 * * `value`: Amount to transfer.1015 * * value: Amount to transfer.1189 * * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.1016 * * Non-Fungible Mode: Ignored1190 * * Fungible Mode: The desired number of pieces to transfer.1017 * * Fungible Mode: Must specify transferred amount1191 * * Re-Fungible Mode: The desired number of pieces to transfer.1018 * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)1192 **/1019 **/1020 transfer: AugmentedSubmittable<(recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;1193 transfer: AugmentedSubmittable<(recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;1021 /**1194 /**1022 * Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.1195 * Change ownership of an item on behalf of the owner as a non-owner account.1023 * 1196 * 1024 * # Permissions1197 * See the [`approve`][`Pallet::approve`] method for additional information.1025 * * Collection Owner1198 * 1026 * * Collection Admin1199 * After this method executes, one approval is removed from the total so that1027 * * Current NFT owner1200 * the approved address will not be able to transfer this item again from this owner.1028 * * Address approved by current NFT owner1201 * 1029 * 1202 * # Permissions1030 * # Arguments1203 * 1031 * 1204 * * Collection owner1032 * * from: Address that owns token.1205 * * Collection admin1033 * 1206 * * Current item owner1034 * * recipient: Address of token recipient.1207 * * Address approved by current item owner1035 * 1208 * 1036 * * collection_id.1209 * # Arguments1037 * 1210 * 1038 * * item_id: ID of the item.1211 * * `from`: Address that currently owns the token.1039 * 1212 * * `recipient`: Address of the new token-owner-to-be.1040 * * value: Amount to transfer.1213 * * `collection_id`: ID of the collection the item.1041 **/1214 * * `item_id`: ID of the item to be transferred.1215 * * `value`: Amount to transfer.1216 * * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.1217 * * Fungible Mode: The desired number of pieces to transfer.1218 * * Re-Fungible Mode: The desired number of pieces to transfer.1219 **/1042 transferFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;1220 transferFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;1043 /**1221 /**1044 * Generic tx1222 * Generic txtests/src/interfaces/default/types.tsdiffbeforeafterboth1672 readonly isAddCollectionAdmin: boolean;1672 readonly isAddCollectionAdmin: boolean;1673 readonly asAddCollectionAdmin: {1673 readonly asAddCollectionAdmin: {1674 readonly collectionId: u32;1674 readonly collectionId: u32;1675 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;1675 readonly newAdmin: PalletEvmAccountBasicCrossAccountIdRepr;1676 } & Struct;1676 } & Struct;1677 readonly isRemoveCollectionAdmin: boolean;1677 readonly isRemoveCollectionAdmin: boolean;1678 readonly asRemoveCollectionAdmin: {1678 readonly asRemoveCollectionAdmin: {1784 readonly isSetCollectionPermissions: boolean;1784 readonly isSetCollectionPermissions: boolean;1785 readonly asSetCollectionPermissions: {1785 readonly asSetCollectionPermissions: {1786 readonly collectionId: u32;1786 readonly collectionId: u32;1787 readonly newLimit: UpDataStructsCollectionPermissions;1787 readonly newPermission: UpDataStructsCollectionPermissions;1788 } & Struct;1788 } & Struct;1789 readonly isRepartition: boolean;1789 readonly isRepartition: boolean;1790 readonly asRepartition: {1790 readonly asRepartition: {1791 readonly collectionId: u32;1791 readonly collectionId: u32;1792 readonly token: u32;1792 readonly tokenId: u32;1793 readonly amount: u128;1793 readonly amount: u128;1794 } & Struct;1794 } & Struct;1795 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';1795 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';tests/src/interfaces/lookup.tsdiffbeforeafterboth1269 },1269 },1270 add_collection_admin: {1270 add_collection_admin: {1271 collectionId: 'u32',1271 collectionId: 'u32',1272 newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr',1272 newAdmin: 'PalletEvmAccountBasicCrossAccountIdRepr',1273 },1273 },1274 remove_collection_admin: {1274 remove_collection_admin: {1275 collectionId: 'u32',1275 collectionId: 'u32',1361 },1361 },1362 set_collection_permissions: {1362 set_collection_permissions: {1363 collectionId: 'u32',1363 collectionId: 'u32',1364 newLimit: 'UpDataStructsCollectionPermissions',1364 newPermission: 'UpDataStructsCollectionPermissions',1365 },1365 },1366 repartition: {1366 repartition: {1367 collectionId: 'u32',1367 collectionId: 'u32',1368 token: 'u32',1368 tokenId: 'u32',1369 amount: 'u128'1369 amount: 'u128'1370 }1370 }1371 }1371 }tests/src/interfaces/types-lookup.tsdiffbeforeafterboth1385 readonly isAddCollectionAdmin: boolean;1385 readonly isAddCollectionAdmin: boolean;1386 readonly asAddCollectionAdmin: {1386 readonly asAddCollectionAdmin: {1387 readonly collectionId: u32;1387 readonly collectionId: u32;1388 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;1388 readonly newAdmin: PalletEvmAccountBasicCrossAccountIdRepr;1389 } & Struct;1389 } & Struct;1390 readonly isRemoveCollectionAdmin: boolean;1390 readonly isRemoveCollectionAdmin: boolean;1391 readonly asRemoveCollectionAdmin: {1391 readonly asRemoveCollectionAdmin: {1497 readonly isSetCollectionPermissions: boolean;1497 readonly isSetCollectionPermissions: boolean;1498 readonly asSetCollectionPermissions: {1498 readonly asSetCollectionPermissions: {1499 readonly collectionId: u32;1499 readonly collectionId: u32;1500 readonly newLimit: UpDataStructsCollectionPermissions;1500 readonly newPermission: UpDataStructsCollectionPermissions;1501 } & Struct;1501 } & Struct;1502 readonly isRepartition: boolean;1502 readonly isRepartition: boolean;1503 readonly asRepartition: {1503 readonly asRepartition: {1504 readonly collectionId: u32;1504 readonly collectionId: u32;1505 readonly token: u32;1505 readonly tokenId: u32;1506 readonly amount: u128;1506 readonly amount: u128;1507 } & Struct;1507 } & Struct;1508 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';1508 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth37export default {37export default {38 types: {},38 types: {},39 rpc: {39 rpc: {40 adminlist: fun('Get admin list', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),41 allowlist: fun('Get allowlist', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),4243 accountTokens: fun('Get tokens owned by account', [collectionParam, crossAccountParam()], 'Vec<u32>'),40 accountTokens: fun(41 'Get tokens owned by an account in a collection', 42 [collectionParam, crossAccountParam()], 43 'Vec<u32>',44 ),44 collectionTokens: fun('Get tokens contained in collection', [collectionParam], 'Vec<u32>'),45 collectionTokens: fun(4546 'Get tokens contained within a collection', 47 [collectionParam], 48 'Vec<u32>',49 ),46 lastTokenId: fun('Get last token id', [collectionParam], 'u32'),50 tokenExists: fun(47 totalSupply: fun('Get amount of unique collection tokens', [collectionParam], 'u32'),51 'Check if the token exists', 52 [collectionParam, tokenParam], 53 'bool',54 ),5548 accountBalance: fun('Get amount of different user tokens', [collectionParam, crossAccountParam()], 'u32'),56 tokenOwner: fun(57 'Get the token owner', 58 [collectionParam, tokenParam], 59 `Option<${CROSS_ACCOUNT_ID_TYPE}>`,60 ),49 balance: fun('Get amount of specific account token', [collectionParam, crossAccountParam(), tokenParam], 'u128'),61 topmostTokenOwner: fun(62 'Get the topmost token owner in the hierarchy of a possibly nested token', 63 [collectionParam, tokenParam], 64 `Option<${CROSS_ACCOUNT_ID_TYPE}>`,65 ),50 allowance: fun('Get allowed amount', [collectionParam, crossAccountParam('sender'), crossAccountParam('spender'), tokenParam], 'u128'),66 tokenOwners: fun(67 'Returns 10 tokens owners in no particular order', 68 [collectionParam, tokenParam], 69 `Vec<${CROSS_ACCOUNT_ID_TYPE}>`,70 ),51 tokenOwner: fun('Get token owner', [collectionParam, tokenParam], `Option<${CROSS_ACCOUNT_ID_TYPE}>`),71 tokenChildren: fun(72 'Get tokens nested directly into the token', 73 [collectionParam, tokenParam], 74 'Vec<UpDataStructsTokenChild>',75 ),7652 tokenOwners: fun('Returns 10 tokens owners in no particular order', [collectionParam, tokenParam], `Vec<${CROSS_ACCOUNT_ID_TYPE}>`),77 collectionProperties: fun(78 'Get collection properties, optionally limited to the provided keys',79 [collectionParam, propertyKeysParam],80 'Vec<UpDataStructsProperty>',81 ),53 topmostTokenOwner: fun('Get token owner, in case of nested token - find parent recursive', [collectionParam, tokenParam], `Option<${CROSS_ACCOUNT_ID_TYPE}>`),82 tokenProperties: fun(83 'Get token properties, optionally limited to the provided keys',84 [collectionParam, tokenParam, propertyKeysParam],85 'Vec<UpDataStructsProperty>',86 ),54 tokenChildren: fun('Get tokens nested directly into the token', [collectionParam, tokenParam], 'Vec<UpDataStructsTokenChild>'),87 propertyPermissions: fun(88 'Get property permissions, optionally limited to the provided keys',89 [collectionParam, propertyKeysParam],90 'Vec<UpDataStructsPropertyKeyPermission>',91 ),9255 constMetadata: fun('Get token constant metadata', [collectionParam, tokenParam], 'Vec<u8>'),93 constMetadata: fun(94 'Get token constant metadata', 95 [collectionParam, tokenParam], 96 'Vec<u8>',97 ),56 variableMetadata: fun('Get token variable metadata', [collectionParam, tokenParam], 'Vec<u8>'),98 variableMetadata: fun(99 'Get token variable metadata', 100 [collectionParam, tokenParam], 101 'Vec<u8>',102 ),10357 collectionProperties: fun(104 tokenData: fun(58 'Get collection properties',105 'Get token data, including properties, optionally limited to the provided keys, and total pieces for an RFT',59 [collectionParam, propertyKeysParam],106 [collectionParam, tokenParam, propertyKeysParam],60 'Vec<UpDataStructsProperty>',107 'UpDataStructsTokenData',61 ),108 ),62 tokenProperties: fun(109 totalSupply: fun(63 'Get token properties',110 'Get the amount of distinctive tokens present in a collection', 64 [collectionParam, tokenParam, propertyKeysParam],111 [collectionParam], 65 'Vec<UpDataStructsProperty>',112 'u32',66 ),113 ),11467 propertyPermissions: fun(115 accountBalance: fun(68 'Get property permissions',116 'Get the amount of any user tokens owned by an account', 69 [collectionParam, propertyKeysParam],117 [collectionParam, crossAccountParam()], 70 'Vec<UpDataStructsPropertyKeyPermission>',118 'u32',71 ),119 ),72 tokenData: fun(120 balance: fun(73 'Get token data',121 'Get the amount of a specific token owned by an account', 74 [collectionParam, tokenParam, propertyKeysParam],122 [collectionParam, crossAccountParam(), tokenParam], 75 'UpDataStructsTokenData',123 'u128',76 ),124 ),77 tokenExists: fun('Check if token exists', [collectionParam, tokenParam], 'bool'),125 allowance: fun(126 'Get the amount of currently possible sponsored transactions on a token for the fee to be taken off a sponsor', 127 [collectionParam, crossAccountParam('sender'), crossAccountParam('spender'), tokenParam], 128 'u128',129 ),13078 collectionById: fun('Get collection by specified id', [collectionParam], 'Option<UpDataStructsRpcCollection>'),131 adminlist: fun(132 'Get the list of admin accounts of a collection', 133 [collectionParam], 134 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>',135 ),79 collectionStats: fun('Get collection stats', [], 'UpDataStructsCollectionStats'),136 allowlist: fun(137 'Get the list of accounts allowed to operate within a collection', 138 [collectionParam], 139 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>',140 ),80 allowed: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam()], 'bool'),141 allowed: fun(142 'Check if a user is allowed to operate within a collection', 143 [collectionParam, crossAccountParam()], 144 'bool',145 ),146147 lastTokenId: fun(148 'Get the last token ID created in a collection', 149 [collectionParam], 150 'u32',151 ),152 collectionById: fun(153 'Get a collection by the specified ID', 154 [collectionParam], 155 'Option<UpDataStructsRpcCollection>',156 ),157 collectionStats: fun(158 'Get chain stats about collections', 159 [], 160 'UpDataStructsCollectionStats',161 ),16281 nextSponsored: fun('Get number of blocks when sponsored transaction is available', [collectionParam, crossAccountParam(), tokenParam], 'Option<u64>'),163 nextSponsored: fun(164 'Get the number of blocks until sponsoring a transaction is available', 165 [collectionParam, crossAccountParam(), tokenParam], 166 'Option<u64>',167 ),82 effectiveCollectionLimits: fun('Get effective collection limits', [collectionParam], 'Option<UpDataStructsCollectionLimits>'),168 effectiveCollectionLimits: fun(169 'Get effective collection limits', 170 [collectionParam], 171 'Option<UpDataStructsCollectionLimits>',172 ),83 totalPieces: fun('Get total pieces of token', [collectionParam, tokenParam], 'Option<u128>'),173 totalPieces: fun(174 'Get the total amount of pieces of an RFT', 175 [collectionParam, tokenParam], 176 'Option<u128>',177 ),84 },178 },85};179};