difftreelog
Merge pull request #368 from UniqueNetwork/feature/CORE-386_1
in: master
Feature/core 386 1
27 files changed
pallets/common/src/erc.rsdiffbeforeafterboth22pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};22pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};23use pallet_evm_coder_substrate::dispatch_to_evm;23use pallet_evm_coder_substrate::dispatch_to_evm;24use sp_std::vec::Vec;24use sp_std::vec::Vec;25use up_data_structs::{Property, SponsoringRateLimit, OwnerRestrictedSet, AccessMode};25use up_data_structs::{26 Property, SponsoringRateLimit, OwnerRestrictedSet, AccessMode, CollectionPermissions,27};26use alloc::format;28use alloc::format;272928use crate::{Pallet, CollectionHandle, Config, CollectionProperties};30use crate::{Pallet, CollectionHandle, Config, CollectionProperties};474948#[solidity_interface(name = "Collection")]50#[solidity_interface(name = "Collection")]49impl<T: Config> CollectionHandle<T>51impl<T: Config> CollectionHandle<T>50// where52where51// T::AccountId: From<H256>53 T::AccountId: From<[u8; 32]>,52{54{53 fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {55 fn set_collection_property(56 &mut self,57 caller: caller,58 key: string,59 value: bytes,60 ) -> Result<void> {54 let caller = T::CrossAccountId::from_eth(caller);61 let caller = T::CrossAccountId::from_eth(caller);55 let key = <Vec<u8>>::from(key)62 let key = <Vec<u8>>::from(key)56 .try_into()63 .try_into()83 }90 }849185 fn set_collection_sponsor(&mut self, caller: caller, sponsor: address) -> Result<void> {92 fn set_collection_sponsor(&mut self, caller: caller, sponsor: address) -> Result<void> {86 check_is_owner(caller, self)?;93 check_is_owner_or_admin(caller, self)?;879488 let sponsor = T::CrossAccountId::from_eth(sponsor);95 let sponsor = T::CrossAccountId::from_eth(sponsor);89 self.set_sponsor(sponsor.as_sub().clone())96 self.set_sponsor(sponsor.as_sub().clone())97 .confirm_sponsorship(caller.as_sub())104 .confirm_sponsorship(caller.as_sub())98 .map_err(dispatch_to_evm::<T>)?105 .map_err(dispatch_to_evm::<T>)?99 {106 {100 return Err(Error::Revert("Caller is not set as sponsor".into()));107 return Err("caller is not set as sponsor".into());101 }108 }102 save(self)109 save(self)103 }110 }104111105 #[solidity(rename_selector = "setCollectionLimit")]112 #[solidity(rename_selector = "setCollectionLimit")]106 fn set_int_limit(&mut self, caller: caller, limit: string, value: uint32) -> Result<void> {113 fn set_int_limit(&mut self, caller: caller, limit: string, value: uint32) -> Result<void> {107 check_is_owner(caller, self)?;114 check_is_owner_or_admin(caller, self)?;108 let mut limits = self.limits.clone();115 let mut limits = self.limits.clone();109116110 match limit.as_str() {117 match limit.as_str() {128 }135 }129 _ => {136 _ => {130 return Err(Error::Revert(format!(137 return Err(Error::Revert(format!(131 "Unknown integer limit \"{}\"",138 "unknown integer limit \"{}\"",132 limit139 limit133 )))140 )))134 }141 }140147141 #[solidity(rename_selector = "setCollectionLimit")]148 #[solidity(rename_selector = "setCollectionLimit")]142 fn set_bool_limit(&mut self, caller: caller, limit: string, value: bool) -> Result<void> {149 fn set_bool_limit(&mut self, caller: caller, limit: string, value: bool) -> Result<void> {143 check_is_owner(caller, self)?;150 check_is_owner_or_admin(caller, self)?;144 let mut limits = self.limits.clone();151 let mut limits = self.limits.clone();145152146 match limit.as_str() {153 match limit.as_str() {155 }162 }156 _ => {163 _ => {157 return Err(Error::Revert(format!(164 return Err(Error::Revert(format!(158 "Unknown boolean limit \"{}\"",165 "unknown boolean limit \"{}\"",159 limit166 limit160 )))167 )))161 }168 }169 Ok(crate::eth::collection_id_to_address(self.id))176 Ok(crate::eth::collection_id_to_address(self.id))170 }177 }171178172 // fn add_admin_substrate(&self, caller: caller, new_admin: uint256) -> Result<void> {179 fn add_collection_admin_substrate(&self, caller: caller, new_admin: uint256) -> Result<void> {173 // let mut new_admin_h256 = H256::default();180 let caller = T::CrossAccountId::from_eth(caller);181 let mut new_admin_arr: [u8; 32] = Default::default();174 // new_admin.to_little_endian(&mut new_admin_h256.0);182 new_admin.to_big_endian(&mut new_admin_arr);175 // let account_id = T::AccountId::from(new_admin_h256);183 let account_id = T::AccountId::from(new_admin_arr);176 // let caller = T::CrossAccountId::from_eth(caller);184 let new_admin = T::CrossAccountId::from_sub(account_id);177 // let new_admin = T::CrossAccountId::from_sub(account_id);178 // <Pallet<T>>::toggle_admin(&self, &caller, &new_admin, true)185 <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;179 // .map_err(dispatch_to_evm::<T>)?;180 // Ok(())186 Ok(())181 // }187 }182188183 // fn remove_admin_substrate(&self, caller: caller, new_admin: uint256) -> Result<void> {189 fn remove_collection_admin_substrate(190 &self,191 caller: caller,192 new_admin: uint256,193 ) -> Result<void> {184 // let mut new_admin_h256 = H256::default();194 let caller = T::CrossAccountId::from_eth(caller);195 let mut new_admin_arr: [u8; 32] = Default::default();185 // new_admin.to_little_endian(&mut new_admin_h256.0);196 new_admin.to_big_endian(&mut new_admin_arr);186 // let account_id = T::AccountId::from(new_admin_h256);197 let account_id = T::AccountId::from(new_admin_arr);187 // let caller = T::CrossAccountId::from_eth(caller);198 let new_admin = T::CrossAccountId::from_sub(account_id);188 // let new_admin = T::CrossAccountId::from_sub(account_id);189 // <Pallet<T>>::toggle_admin(&self, &caller, &new_admin, false)199 <Pallet<T>>::toggle_admin(self, &caller, &new_admin, false)190 // .map_err(dispatch_to_evm::<T>)?;200 .map_err(dispatch_to_evm::<T>)?;191 // Ok(())201 Ok(())192 // }202 }193203194 fn add_collection_admin(&self, caller: caller, new_admin: address) -> Result<void> {204 fn add_collection_admin(&self, caller: caller, new_admin: address) -> Result<void> {195 let caller = T::CrossAccountId::from_eth(caller);205 let caller = T::CrossAccountId::from_eth(caller);196 self.check_is_owner_or_admin(&caller)197 .map_err(dispatch_to_evm::<T>)?;198 let new_admin = T::CrossAccountId::from_eth(new_admin);206 let new_admin = T::CrossAccountId::from_eth(new_admin);199 <Pallet<T>>::toggle_admin(&self, &caller, &new_admin, true)207 <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;200 .map_err(dispatch_to_evm::<T>)?;201 Ok(())208 Ok(())202 }209 }203210204 fn remove_collection_admin(&self, caller: caller, admin: address) -> Result<void> {211 fn remove_collection_admin(&self, caller: caller, admin: address) -> Result<void> {205 let caller = T::CrossAccountId::from_eth(caller);212 let caller = T::CrossAccountId::from_eth(caller);206 self.check_is_owner_or_admin(&caller)207 .map_err(dispatch_to_evm::<T>)?;208 let admin = T::CrossAccountId::from_eth(admin);213 let admin = T::CrossAccountId::from_eth(admin);209 <Pallet<T>>::toggle_admin(&self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;214 <Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;210 Ok(())215 Ok(())211 }216 }212217213 #[solidity(rename_selector = "setCollectionNesting")]218 #[solidity(rename_selector = "setCollectionNesting")]214 fn set_nesting_bool(&mut self, caller: caller, enable: bool) -> Result<void> {219 fn set_nesting_bool(&mut self, caller: caller, enable: bool) -> Result<void> {215 let caller = T::CrossAccountId::from_eth(caller);220 check_is_owner_or_admin(caller, self)?;216 self.check_is_owner_or_admin(&caller)217 .map_err(dispatch_to_evm::<T>)?;218221219 let mut permissions = self.collection.permissions.clone();222 let mut permissions = self.collection.permissions.clone();220 let mut nesting = permissions.nesting().clone();223 let mut nesting = permissions.nesting().clone();240 collections: Vec<address>,243 collections: Vec<address>,241 ) -> Result<void> {244 ) -> Result<void> {242 if collections.is_empty() {245 if collections.is_empty() {243 return Err("No addresses provided".into());246 return Err("no addresses provided".into());244 }247 }245 let caller = T::CrossAccountId::from_eth(caller);248 check_is_owner_or_admin(caller, self)?;246 self.check_is_owner_or_admin(&caller)247 .map_err(dispatch_to_evm::<T>)?;248249249 let mut permissions = self.collection.permissions.clone();250 let mut permissions = self.collection.permissions.clone();250 match enable {251 match enable {280 }281 }281282282 fn set_collection_access(&mut self, caller: caller, mode: uint8) -> Result<void> {283 fn set_collection_access(&mut self, caller: caller, mode: uint8) -> Result<void> {283 let caller = T::CrossAccountId::from_eth(caller);284 check_is_owner_or_admin(caller, self)?;284 self.check_is_owner_or_admin(&caller)285 let permissions = CollectionPermissions {285 .map_err(dispatch_to_evm::<T>)?;286 access: Some(match mode {286 self.collection.permissions.access = Some(match mode {287 0 => AccessMode::Normal,287 0 => AccessMode::Normal,288 1 => AccessMode::AllowList,288 1 => AccessMode::AllowList,289 _ => return Err("Not supported access mode".into()),289 _ => return Err("not supported access mode".into()),290 });290 }),291 ..Default::default()292 };291 save(self)?;293 self.collection.permissions = <Pallet<T>>::clamp_permissions(294 self.collection.mode.clone(),295 &self.collection.permissions,296 permissions,297 )298 .map_err(dispatch_to_evm::<T>)?;299292 Ok(())300 save(self)293 }301 }294302295 fn add_to_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {303 fn add_to_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {296 let caller = check_is_owner_or_admin(caller, self)?;304 let caller = T::CrossAccountId::from_eth(caller);297 let user = T::CrossAccountId::from_eth(user);305 let user = T::CrossAccountId::from_eth(user);298 <Pallet<T>>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;306 <Pallet<T>>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;299 Ok(())307 Ok(())300 }308 }301309302 fn remove_from_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {310 fn remove_from_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {303 let caller = check_is_owner_or_admin(caller, self)?;311 let caller = T::CrossAccountId::from_eth(caller);304 let user = T::CrossAccountId::from_eth(user);312 let user = T::CrossAccountId::from_eth(user);305 <Pallet<T>>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;313 <Pallet<T>>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;306 Ok(())314 Ok(())307 }315 }308316309 fn set_collection_mint_mode(&mut self, caller: caller, mode: bool) -> Result<void> {317 fn set_collection_mint_mode(&mut self, caller: caller, mode: bool) -> Result<void> {310 check_is_owner_or_admin(caller, self)?;318 check_is_owner_or_admin(caller, self)?;311 self.collection.permissions.mint_mode = Some(mode);319 let permissions = CollectionPermissions {320 mint_mode: Some(mode),321 ..Default::default()322 };323 self.collection.permissions = <Pallet<T>>::clamp_permissions(324 self.collection.mode.clone(),312 save(self)?;325 &self.collection.permissions,326 permissions,327 )328 .map_err(dispatch_to_evm::<T>)?;329313 Ok(())330 save(self)314 }331 }315}316317fn check_is_owner<T: Config>(caller: caller, collection: &CollectionHandle<T>) -> Result<void> {318 let caller = T::CrossAccountId::from_eth(caller);319 collection320 .check_is_owner(&caller)321 .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;322 Ok(())323}332}324333325fn check_is_owner_or_admin<T: Config>(334fn check_is_owner_or_admin<T: Config>(pallets/common/src/lib.rsdiffbeforeafterboth148 .saturating_mul(writes),148 .saturating_mul(writes),149 ))149 ))150 }150 }151 pub fn save(self) -> Result<(), DispatchError> {151 pub fn save(self) -> DispatchResult {152 <CollectionById<T>>::insert(self.id, self.collection);152 <CollectionById<T>>::insert(self.id, self.collection);153 Ok(())153 Ok(())154 }154 }pallets/fungible/src/erc.rsdiffbeforeafterboth152 via("CollectionHandle<T>", common_mut, Collection)152 via("CollectionHandle<T>", common_mut, Collection)153 )153 )154)]154)]155impl<T: Config> FungibleHandle<T> {}155impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> {}156156157generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);157generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);158generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);158generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);159159160impl<T: Config> CommonEvmHandler for FungibleHandle<T> {160impl<T: Config> CommonEvmHandler for FungibleHandle<T>161where162 T::AccountId: From<[u8; 32]>,163{161 const CODE: &'static [u8] = include_bytes!("./stubs/UniqueFungible.raw");164 const CODE: &'static [u8] = include_bytes!("./stubs/UniqueFungible.raw");162165pallets/nonfungible/src/erc.rsdiffbeforeafterboth583 TokenProperties,583 TokenProperties,584 )584 )585)]585)]586impl<T: Config> NonfungibleHandle<T> {}586impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> {}587587588// Not a tests, but code generators588// Not a tests, but code generators589generate_stubgen!(gen_impl, UniqueNFTCall<()>, true);589generate_stubgen!(gen_impl, UniqueNFTCall<()>, true);590generate_stubgen!(gen_iface, UniqueNFTCall<()>, false);590generate_stubgen!(gen_iface, UniqueNFTCall<()>, false);591591592impl<T: Config> CommonEvmHandler for NonfungibleHandle<T> {592impl<T: Config> CommonEvmHandler for NonfungibleHandle<T>593where594 T::AccountId: From<[u8; 32]>,595{593 const CODE: &'static [u8] = include_bytes!("./stubs/UniqueNFT.raw");596 const CODE: &'static [u8] = include_bytes!("./stubs/UniqueNFT.raw");594597pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth297 }297 }298}298}299300// Selector: 6aea9834301contract Collection is Dummy, ERC165 {302 // Selector: setCollectionProperty(string,bytes) 2f073f66303 function setCollectionProperty(string memory key, bytes memory value)304 public305 {306 require(false, stub_error);307 key;308 value;309 dummy = 0;310 }311312 // Selector: deleteCollectionProperty(string) 7b7debce313 function deleteCollectionProperty(string memory key) public {314 require(false, stub_error);315 key;316 dummy = 0;317 }318319 // Throws error if key not found320 //321 // Selector: collectionProperty(string) cf24fd6d322 function collectionProperty(string memory key)323 public324 view325 returns (bytes memory)326 {327 require(false, stub_error);328 key;329 dummy;330 return hex"";331 }332333 // Selector: setCollectionSponsor(address) 7623402e334 function setCollectionSponsor(address sponsor) public {335 require(false, stub_error);336 sponsor;337 dummy = 0;338 }339340 // Selector: confirmCollectionSponsorship() 3c50e97a341 function confirmCollectionSponsorship() public {342 require(false, stub_error);343 dummy = 0;344 }345346 // Selector: setCollectionLimit(string,uint32) 6a3841db347 function setCollectionLimit(string memory limit, uint32 value) public {348 require(false, stub_error);349 limit;350 value;351 dummy = 0;352 }353354 // Selector: setCollectionLimit(string,bool) 993b7fba355 function setCollectionLimit(string memory limit, bool value) public {356 require(false, stub_error);357 limit;358 value;359 dummy = 0;360 }361362 // Selector: contractAddress() f6b4dfb4363 function contractAddress() public view returns (address) {364 require(false, stub_error);365 dummy;366 return 0x0000000000000000000000000000000000000000;367 }368369 // Selector: addCollectionAdmin(address) 92e462c7370 function addCollectionAdmin(address newAdmin) public view {371 require(false, stub_error);372 newAdmin;373 dummy;374 }375376 // Selector: removeCollectionAdmin(address) fafd7b42377 function removeCollectionAdmin(address admin) public view {378 require(false, stub_error);379 admin;380 dummy;381 }382383 // Selector: setCollectionNesting(bool) 112d4586384 function setCollectionNesting(bool enable) public {385 require(false, stub_error);386 enable;387 dummy = 0;388 }389390 // Selector: setCollectionNesting(bool,address[]) 64872396391 function setCollectionNesting(bool enable, address[] memory collections)392 public393 {394 require(false, stub_error);395 enable;396 collections;397 dummy = 0;398 }399400 // Selector: setCollectionAccess(uint8) 41835d4c401 function setCollectionAccess(uint8 mode) public {402 require(false, stub_error);403 mode;404 dummy = 0;405 }406407 // Selector: addToCollectionAllowList(address) 67844fe6408 function addToCollectionAllowList(address user) public view {409 require(false, stub_error);410 user;411 dummy;412 }413414 // Selector: removeFromCollectionAllowList(address) 85c51acb415 function removeFromCollectionAllowList(address user) public view {416 require(false, stub_error);417 user;418 dummy;419 }420421 // Selector: setCollectionMintMode(bool) 00018e84422 function setCollectionMintMode(bool mode) public {423 require(false, stub_error);424 mode;425 dummy = 0;426 }427}428299429// Selector: 780e9d63300// Selector: 780e9d63430contract ERC721Enumerable is Dummy, ERC165 {301contract ERC721Enumerable is Dummy, ERC165 {459 }330 }460}331}332333// Selector: 7d9262e6334contract Collection is Dummy, ERC165 {335 // Selector: setCollectionProperty(string,bytes) 2f073f66336 function setCollectionProperty(string memory key, bytes memory value)337 public338 {339 require(false, stub_error);340 key;341 value;342 dummy = 0;343 }344345 // Selector: deleteCollectionProperty(string) 7b7debce346 function deleteCollectionProperty(string memory key) public {347 require(false, stub_error);348 key;349 dummy = 0;350 }351352 // Throws error if key not found353 //354 // Selector: collectionProperty(string) cf24fd6d355 function collectionProperty(string memory key)356 public357 view358 returns (bytes memory)359 {360 require(false, stub_error);361 key;362 dummy;363 return hex"";364 }365366 // Selector: setCollectionSponsor(address) 7623402e367 function setCollectionSponsor(address sponsor) public {368 require(false, stub_error);369 sponsor;370 dummy = 0;371 }372373 // Selector: confirmCollectionSponsorship() 3c50e97a374 function confirmCollectionSponsorship() public {375 require(false, stub_error);376 dummy = 0;377 }378379 // Selector: setCollectionLimit(string,uint32) 6a3841db380 function setCollectionLimit(string memory limit, uint32 value) public {381 require(false, stub_error);382 limit;383 value;384 dummy = 0;385 }386387 // Selector: setCollectionLimit(string,bool) 993b7fba388 function setCollectionLimit(string memory limit, bool value) public {389 require(false, stub_error);390 limit;391 value;392 dummy = 0;393 }394395 // Selector: contractAddress() f6b4dfb4396 function contractAddress() public view returns (address) {397 require(false, stub_error);398 dummy;399 return 0x0000000000000000000000000000000000000000;400 }401402 // Selector: addCollectionAdminSubstrate(uint256) 5730062b403 function addCollectionAdminSubstrate(uint256 newAdmin) public view {404 require(false, stub_error);405 newAdmin;406 dummy;407 }408409 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9410 function removeCollectionAdminSubstrate(uint256 newAdmin) public view {411 require(false, stub_error);412 newAdmin;413 dummy;414 }415416 // Selector: addCollectionAdmin(address) 92e462c7417 function addCollectionAdmin(address newAdmin) public view {418 require(false, stub_error);419 newAdmin;420 dummy;421 }422423 // Selector: removeCollectionAdmin(address) fafd7b42424 function removeCollectionAdmin(address admin) public view {425 require(false, stub_error);426 admin;427 dummy;428 }429430 // Selector: setCollectionNesting(bool) 112d4586431 function setCollectionNesting(bool enable) public {432 require(false, stub_error);433 enable;434 dummy = 0;435 }436437 // Selector: setCollectionNesting(bool,address[]) 64872396438 function setCollectionNesting(bool enable, address[] memory collections)439 public440 {441 require(false, stub_error);442 enable;443 collections;444 dummy = 0;445 }446447 // Selector: setCollectionAccess(uint8) 41835d4c448 function setCollectionAccess(uint8 mode) public {449 require(false, stub_error);450 mode;451 dummy = 0;452 }453454 // Selector: addToCollectionAllowList(address) 67844fe6455 function addToCollectionAllowList(address user) public view {456 require(false, stub_error);457 user;458 dummy;459 }460461 // Selector: removeFromCollectionAllowList(address) 85c51acb462 function removeFromCollectionAllowList(address user) public view {463 require(false, stub_error);464 user;465 dummy;466 }467468 // Selector: setCollectionMintMode(bool) 00018e84469 function setCollectionMintMode(bool mode) public {470 require(false, stub_error);471 mode;472 dummy = 0;473 }474}461475462// Selector: d74d154f476// Selector: d74d154f463contract ERC721UniqueExtensions is Dummy, ERC165 {477contract ERC721UniqueExtensions is Dummy, ERC165 {pallets/unique/src/lib.rsdiffbeforeafterboth491 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);491 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);492492493 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;493 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;494 target_collection.check_is_owner(&sender)?;494 target_collection.check_is_owner_or_admin(&sender)?;495 target_collection.check_is_internal()?;495 target_collection.check_is_internal()?;496496497 target_collection.set_sponsor(new_sponsor.clone())?;497 target_collection.set_sponsor(new_sponsor.clone())?;867 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);867 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);868 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;868 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;869 target_collection.check_is_internal()?;869 target_collection.check_is_internal()?;870 target_collection.check_is_owner(&sender)?;870 target_collection.check_is_owner_or_admin(&sender)?;871 let old_limit = &target_collection.limits;871 let old_limit = &target_collection.limits;872872873 target_collection.limits = <PalletCommon<T>>::clamp_limits(target_collection.mode.clone(), &old_limit, new_limit)?;873 target_collection.limits = <PalletCommon<T>>::clamp_limits(target_collection.mode.clone(), &old_limit, new_limit)?;889 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);889 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);890 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;890 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;891 target_collection.check_is_internal()?;891 target_collection.check_is_internal()?;892 target_collection.check_is_owner(&sender)?;892 target_collection.check_is_owner_or_admin(&sender)?;893 let old_limit = &target_collection.permissions;893 let old_limit = &target_collection.permissions;894894895 target_collection.permissions = <PalletCommon<T>>::clamp_permissions(target_collection.mode.clone(), &old_limit, new_limit)?;895 target_collection.permissions = <PalletCommon<T>>::clamp_permissions(target_collection.mode.clone(), &old_limit, new_limit)?;primitives/data-structs/src/lib.rsdiffbeforeafterboth812 for byte in key.as_slice().iter() {812 for byte in key.as_slice().iter() {813 let byte = *byte;813 let byte = *byte;814814815 if !byte.is_ascii_alphanumeric() && byte != b'_' && byte != b'-' {815 if !byte.is_ascii_alphanumeric() && byte != b'_' && byte != b'-' && byte != b'.' {816 return Err(PropertiesError::InvalidCharacterInPropertyKey);816 return Err(PropertiesError::InvalidCharacterInPropertyKey);817 }817 }818 }818 }runtime/common/src/dispatch.rsdiffbeforeafterboth112 + pallet_fungible::Config112 + pallet_fungible::Config113 + pallet_nonfungible::Config113 + pallet_nonfungible::Config114 + pallet_refungible::Config,114 + pallet_refungible::Config,115 T::AccountId: From<[u8; 32]>,115{116{116 fn is_reserved(target: &H160) -> bool {117 fn is_reserved(target: &H160) -> bool {117 map_eth_to_id(target).is_some()118 map_eth_to_id(target).is_some()runtime/tests/src/tests.rsdiffbeforeafterboth1264 let collection1_id =1264 let collection1_id =1265 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1265 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1266 let origin1 = Origin::signed(1);1266 let origin1 = Origin::signed(1);1267 let origin2 = Origin::signed(2);126812671269 // Add collection admins 2 and 31268 // Add collection admins 2 and 31270 assert_ok!(Unique::add_collection_admin(1269 assert_ok!(Unique::add_collection_admin(1273 account(2)1272 account(2)1274 ));1273 ));1275 assert_ok!(Unique::add_collection_admin(1274 assert_ok!(Unique::add_collection_admin(1276 origin1,1275 origin1.clone(),1277 collection1_id,1276 collection1_id,1278 account(3)1277 account(3)1279 ));1278 ));128912881290 // remove admin 31289 // remove admin 31291 assert_ok!(Unique::remove_collection_admin(1290 assert_ok!(Unique::remove_collection_admin(1292 origin2,1291 origin1,1293 CollectionId(1),1292 CollectionId(1),1294 account(3)1293 account(3)1295 ));1294 ));tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth174 function finishMinting() external returns (bool);174 function finishMinting() external returns (bool);175}175}176177// Selector: 6aea9834178interface Collection is Dummy, ERC165 {179 // Selector: setCollectionProperty(string,bytes) 2f073f66180 function setCollectionProperty(string memory key, bytes memory value)181 external;182183 // Selector: deleteCollectionProperty(string) 7b7debce184 function deleteCollectionProperty(string memory key) external;185186 // Throws error if key not found187 //188 // Selector: collectionProperty(string) cf24fd6d189 function collectionProperty(string memory key)190 external191 view192 returns (bytes memory);193194 // Selector: setCollectionSponsor(address) 7623402e195 function setCollectionSponsor(address sponsor) external;196197 // Selector: confirmCollectionSponsorship() 3c50e97a198 function confirmCollectionSponsorship() external;199200 // Selector: setCollectionLimit(string,uint32) 6a3841db201 function setCollectionLimit(string memory limit, uint32 value) external;202203 // Selector: setCollectionLimit(string,bool) 993b7fba204 function setCollectionLimit(string memory limit, bool value) external;205206 // Selector: contractAddress() f6b4dfb4207 function contractAddress() external view returns (address);208209 // Selector: addCollectionAdmin(address) 92e462c7210 function addCollectionAdmin(address newAdmin) external view;211212 // Selector: removeCollectionAdmin(address) fafd7b42213 function removeCollectionAdmin(address admin) external view;214215 // Selector: setCollectionNesting(bool) 112d4586216 function setCollectionNesting(bool enable) external;217218 // Selector: setCollectionNesting(bool,address[]) 64872396219 function setCollectionNesting(bool enable, address[] memory collections)220 external;221222 // Selector: setCollectionAccess(uint8) 41835d4c223 function setCollectionAccess(uint8 mode) external;224225 // Selector: addToCollectionAllowList(address) 67844fe6226 function addToCollectionAllowList(address user) external view;227228 // Selector: removeFromCollectionAllowList(address) 85c51acb229 function removeFromCollectionAllowList(address user) external view;230231 // Selector: setCollectionMintMode(bool) 00018e84232 function setCollectionMintMode(bool mode) external;233}234176235// Selector: 780e9d63177// Selector: 780e9d63236interface ERC721Enumerable is Dummy, ERC165 {178interface ERC721Enumerable is Dummy, ERC165 {249 function totalSupply() external view returns (uint256);191 function totalSupply() external view returns (uint256);250}192}193194// Selector: 7d9262e6195interface Collection is Dummy, ERC165 {196 // Selector: setCollectionProperty(string,bytes) 2f073f66197 function setCollectionProperty(string memory key, bytes memory value)198 external;199200 // Selector: deleteCollectionProperty(string) 7b7debce201 function deleteCollectionProperty(string memory key) external;202203 // Throws error if key not found204 //205 // Selector: collectionProperty(string) cf24fd6d206 function collectionProperty(string memory key)207 external208 view209 returns (bytes memory);210211 // Selector: setCollectionSponsor(address) 7623402e212 function setCollectionSponsor(address sponsor) external;213214 // Selector: confirmCollectionSponsorship() 3c50e97a215 function confirmCollectionSponsorship() external;216217 // Selector: setCollectionLimit(string,uint32) 6a3841db218 function setCollectionLimit(string memory limit, uint32 value) external;219220 // Selector: setCollectionLimit(string,bool) 993b7fba221 function setCollectionLimit(string memory limit, bool value) external;222223 // Selector: contractAddress() f6b4dfb4224 function contractAddress() external view returns (address);225226 // Selector: addCollectionAdminSubstrate(uint256) 5730062b227 function addCollectionAdminSubstrate(uint256 newAdmin) external view;228229 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9230 function removeCollectionAdminSubstrate(uint256 newAdmin) external view;231232 // Selector: addCollectionAdmin(address) 92e462c7233 function addCollectionAdmin(address newAdmin) external view;234235 // Selector: removeCollectionAdmin(address) fafd7b42236 function removeCollectionAdmin(address admin) external view;237238 // Selector: setCollectionNesting(bool) 112d4586239 function setCollectionNesting(bool enable) external;240241 // Selector: setCollectionNesting(bool,address[]) 64872396242 function setCollectionNesting(bool enable, address[] memory collections)243 external;244245 // Selector: setCollectionAccess(uint8) 41835d4c246 function setCollectionAccess(uint8 mode) external;247248 // Selector: addToCollectionAllowList(address) 67844fe6249 function addToCollectionAllowList(address user) external view;250251 // Selector: removeFromCollectionAllowList(address) 85c51acb252 function removeFromCollectionAllowList(address user) external view;253254 // Selector: setCollectionMintMode(bool) 00018e84255 function setCollectionMintMode(bool mode) external;256}251257252// Selector: d74d154f258// Selector: d74d154f253interface ERC721UniqueExtensions is Dummy, ERC165 {259interface ERC721UniqueExtensions is Dummy, ERC165 {tests/src/eth/collectionAdmin.test.tsdiffbeforeafterbothno changes
tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth233 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;233 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;234 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;234 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;235 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));235 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));236 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');236 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');237237238 await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});238 await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});239 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;239 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;240 expect(collectionSub.sponsorship.isConfirmed).to.be.true;240 expect(collectionSub.sponsorship.isConfirmed).to.be.true;241 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));241 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));242242243 const user = createEthAccount(web3);243 const user = createEthAccount(web3);244 let nextTokenId = await collectionEvm.methods.nextTokenId().call();244 const nextTokenId = await collectionEvm.methods.nextTokenId().call();245 expect(nextTokenId).to.be.equal('1');245 expect(nextTokenId).to.be.equal('1');246246247 const oldPermissions = (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();247 const oldPermissions = (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();248 expect(oldPermissions.mintMode).to.be.false;248 expect(oldPermissions.mintMode).to.be.false;249 expect(oldPermissions.access).to.be.equal('Normal');249 expect(oldPermissions.access).to.be.equal('Normal');250250251 //TODO: change value, when enum generated252 await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});251 await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});253 await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});252 await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});254 await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});253 await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});260 const ownerBalanceBefore = await ethBalanceViaSub(api, owner);259 const ownerBalanceBefore = await ethBalanceViaSub(api, owner);261 const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);260 const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);262261262 {263 nextTokenId = await collectionEvm.methods.nextTokenId().call({from: user});263 const nextTokenId = await collectionEvm.methods.nextTokenId().call();264 expect(nextTokenId).to.be.equal('1');264 expect(nextTokenId).to.be.equal('1');265 result = await collectionEvm.methods.mintWithTokenURI(265 const result = await collectionEvm.methods.mintWithTokenURI(266 user,266 user,267 nextTokenId,267 nextTokenId,268 'Test URI',268 'Test URI',269 ).send({from: user});269 ).send({from: user});270 const events = normalizeEvents(result.events);270 const events = normalizeEvents(result.events);271 events[0].address = events[0].address.toLocaleLowerCase();272271273 expect(events).to.be.deep.equal([272 expect(events).to.be.deep.equal([274 {273 {275 address: collectionIdAddress.toLocaleLowerCase(),274 address: collectionIdAddress,276 event: 'Transfer',275 event: 'Transfer',277 args: {276 args: {278 from: '0x0000000000000000000000000000000000000000',277 from: '0x0000000000000000000000000000000000000000',282 },281 },283 ]);282 ]);283284 const ownerBalanceAfter = await ethBalanceViaSub(api, owner);285 const sponsorBalanceAfter = await ethBalanceViaSub(api, sponsor);284286285 expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');287 expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');286287 const ownerBalanceAfter = await ethBalanceViaSub(api, owner);288 expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);288 expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);289 const sponsorBalanceAfter = await ethBalanceViaSub(api, sponsor);290 expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;289 expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;290 }291 });291 });292292293 itWeb3('Check that transaction via EVM spend money from sponsor address', async ({api, web3, privateKeyWrapper}) => {293 itWeb3('Check that transaction via EVM spend money from sponsor address', async ({api, web3, privateKeyWrapper}) => {302 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;302 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;303 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;303 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;304 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));304 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));305 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');305 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');306 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);306 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);307 await sponsorCollection.methods.confirmCollectionSponsorship().send();307 await sponsorCollection.methods.confirmCollectionSponsorship().send();308 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;308 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;tests/src/eth/createCollection.test.tsdiffbeforeafterboth80 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;80 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;81 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;81 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;82 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));82 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor, Number(ss58Format)));83 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');83 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('caller is not set as sponsor');84 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);84 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);85 await sponsorCollection.methods.confirmCollectionSponsorship().send();85 await sponsorCollection.methods.confirmCollectionSponsorship().send();86 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;86 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;208 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);208 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);209 await expect(sponsorCollection.methods209 await expect(sponsorCollection.methods210 .confirmCollectionSponsorship()210 .confirmCollectionSponsorship()211 .call()).to.be.rejectedWith('Caller is not set as sponsor');211 .call()).to.be.rejectedWith('caller is not set as sponsor');212 }212 }213 {213 {214 await expect(contractEvmFromNotOwner.methods214 await expect(contractEvmFromNotOwner.methods225 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);225 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);226 await expect(collectionEvm.methods226 await expect(collectionEvm.methods227 .setCollectionLimit('badLimit', 'true')227 .setCollectionLimit('badLimit', 'true')228 .call()).to.be.rejectedWith('Unknown boolean limit "badLimit"');228 .call()).to.be.rejectedWith('unknown boolean limit "badLimit"');229 });229 });230});230});tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth89 "stateMutability": "view",89 "stateMutability": "view",90 "type": "function"90 "type": "function"91 },91 },92 {93 "inputs": [94 { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }95 ],96 "name": "addCollectionAdminSubstrate",97 "outputs": [],98 "stateMutability": "view",99 "type": "function"100 },92 {101 {93 "inputs": [102 "inputs": [94 { "internalType": "address", "name": "user", "type": "address" }103 { "internalType": "address", "name": "user", "type": "address" }298 "stateMutability": "view",307 "stateMutability": "view",299 "type": "function"308 "type": "function"300 },309 },310 {311 "inputs": [312 { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }313 ],314 "name": "removeCollectionAdminSubstrate",315 "outputs": [],316 "stateMutability": "view",317 "type": "function"318 },301 {319 {302 "inputs": [320 "inputs": [303 { "internalType": "address", "name": "user", "type": "address" }321 { "internalType": "address", "name": "user", "type": "address" }tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth5import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';5import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';6import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';7import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';7import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';8import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUnqSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsTokenChild } from '@polkadot/types/lookup';8import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsTokenChild } from '@polkadot/types/lookup';9import type { Observable } from '@polkadot/types/types';9import type { Observable } from '@polkadot/types/types';101011declare module '@polkadot/api-base/types/storage' {11declare module '@polkadot/api-base/types/storage' {436 /**436 /**437 * Items to be executed, indexed by the block number that they should be executed on.437 * Items to be executed, indexed by the block number that they should be executed on.438 **/438 **/439 agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUnqSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;439 agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUniqueSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;440 /**440 /**441 * Lookup from identity to the block number and index of the task.441 * Lookup from identity to the block number and index of the task.442 **/442 **/tests/src/interfaces/augment-types.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */2/* eslint-disable */334import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';4import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';5import type { Data, StorageKey } from '@polkadot/types';5import type { Data, StorageKey } from '@polkadot/types';6import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';6import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';7import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';7import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';819 PalletUniqueCall: PalletUniqueCall;819 PalletUniqueCall: PalletUniqueCall;820 PalletUniqueError: PalletUniqueError;820 PalletUniqueError: PalletUniqueError;821 PalletUniqueRawEvent: PalletUniqueRawEvent;821 PalletUniqueRawEvent: PalletUniqueRawEvent;822 PalletUnqSchedulerCall: PalletUnqSchedulerCall;822 PalletUniqueSchedulerCall: PalletUniqueSchedulerCall;823 PalletUnqSchedulerError: PalletUnqSchedulerError;823 PalletUniqueSchedulerError: PalletUniqueSchedulerError;824 PalletUnqSchedulerEvent: PalletUnqSchedulerEvent;824 PalletUniqueSchedulerEvent: PalletUniqueSchedulerEvent;825 PalletUnqSchedulerScheduledV3: PalletUnqSchedulerScheduledV3;825 PalletUniqueSchedulerScheduledV3: PalletUniqueSchedulerScheduledV3;826 PalletVersion: PalletVersion;826 PalletVersion: PalletVersion;827 PalletXcmCall: PalletXcmCall;827 PalletXcmCall: PalletXcmCall;828 PalletXcmError: PalletXcmError;828 PalletXcmError: PalletXcmError;tests/src/interfaces/default/types.tsdiffbeforeafterboth1784 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';1784 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';1785}1785}178617861787/** @name PalletUnqSchedulerCall */1787/** @name PalletUniqueSchedulerCall */1788export interface PalletUnqSchedulerCall extends Enum {1788export interface PalletUniqueSchedulerCall extends Enum {1789 readonly isScheduleNamed: boolean;1789 readonly isScheduleNamed: boolean;1790 readonly asScheduleNamed: {1790 readonly asScheduleNamed: {1791 readonly id: U8aFixed;1791 readonly id: U8aFixed;1809 readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';1809 readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';1810}1810}181118111812/** @name PalletUnqSchedulerError */1812/** @name PalletUniqueSchedulerError */1813export interface PalletUnqSchedulerError extends Enum {1813export interface PalletUniqueSchedulerError extends Enum {1814 readonly isFailedToSchedule: boolean;1814 readonly isFailedToSchedule: boolean;1815 readonly isNotFound: boolean;1815 readonly isNotFound: boolean;1816 readonly isTargetBlockNumberInPast: boolean;1816 readonly isTargetBlockNumberInPast: boolean;1817 readonly isRescheduleNoChange: boolean;1817 readonly isRescheduleNoChange: boolean;1818 readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';1818 readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';1819}1819}182018201821/** @name PalletUnqSchedulerEvent */1821/** @name PalletUniqueSchedulerEvent */1822export interface PalletUnqSchedulerEvent extends Enum {1822export interface PalletUniqueSchedulerEvent extends Enum {1823 readonly isScheduled: boolean;1823 readonly isScheduled: boolean;1824 readonly asScheduled: {1824 readonly asScheduled: {1825 readonly when: u32;1825 readonly when: u32;1845 readonly type: 'Scheduled' | 'Canceled' | 'Dispatched' | 'CallLookupFailed';1845 readonly type: 'Scheduled' | 'Canceled' | 'Dispatched' | 'CallLookupFailed';1846}1846}184718471848/** @name PalletUnqSchedulerScheduledV3 */1848/** @name PalletUniqueSchedulerScheduledV3 */1849export interface PalletUnqSchedulerScheduledV3 extends Struct {1849export interface PalletUniqueSchedulerScheduledV3 extends Struct {1850 readonly maybeId: Option<U8aFixed>;1850 readonly maybeId: Option<U8aFixed>;1851 readonly priority: u8;1851 readonly priority: u8;1852 readonly call: FrameSupportScheduleMaybeHashed;1852 readonly call: FrameSupportScheduleMaybeHashed;tests/src/interfaces/lookup.tsdiffbeforeafterboth1525 constData: 'Bytes',1525 constData: 'Bytes',1526 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'1526 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'1527 },1527 },1528 /**1528 /**1529 * Lookup206: pallet_unq_scheduler::pallet::Call<T>1529 * Lookup206: pallet_unique_scheduler::pallet::Call<T>1530 **/1530 **/1531 PalletUnqSchedulerCall: {1531 PalletUniqueSchedulerCall: {1532 _enum: {1532 _enum: {1533 schedule_named: {1533 schedule_named: {1534 id: '[u8;16]',1534 id: '[u8;16]',2180 CollectionPermissionSet: 'u32'2180 CollectionPermissionSet: 'u32'2181 }2181 }2182 },2182 },2183 /**2183 /**2184 * Lookup283: pallet_unq_scheduler::pallet::Event<T>2184 * Lookup283: pallet_unique_scheduler::pallet::Event<T>2185 **/2185 **/2186 PalletUnqSchedulerEvent: {2186 PalletUniqueSchedulerEvent: {2187 _enum: {2187 _enum: {2188 Scheduled: {2188 Scheduled: {2189 when: 'u32',2189 when: 'u32',2588 PalletUniqueError: {2588 PalletUniqueError: {2589 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']2589 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']2590 },2590 },2591 /**2591 /**2592 * Lookup344: pallet_unq_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>2592 * Lookup344: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>2593 **/2593 **/2594 PalletUnqSchedulerScheduledV3: {2594 PalletUniqueSchedulerScheduledV3: {2595 maybeId: 'Option<[u8;16]>',2595 maybeId: 'Option<[u8;16]>',2596 priority: 'u8',2596 priority: 'u8',2597 call: 'FrameSupportScheduleMaybeHashed',2597 call: 'FrameSupportScheduleMaybeHashed',2747 * Lookup350: sp_core::Void2747 * Lookup350: sp_core::Void2748 **/2748 **/2749 SpCoreVoid: 'Null',2749 SpCoreVoid: 'Null',2750 /**2750 /**2751 * Lookup351: pallet_unq_scheduler::pallet::Error<T>2751 * Lookup351: pallet_unique_scheduler::pallet::Error<T>2752 **/2752 **/2753 PalletUnqSchedulerError: {2753 PalletUniqueSchedulerError: {2754 _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']2754 _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']2755 },2755 },2756 /**2756 /**tests/src/interfaces/registry.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */2/* eslint-disable */334import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';4import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';556declare module '@polkadot/types/types/registry' {6declare module '@polkadot/types/types/registry' {7 export interface InterfaceTypes {7 export interface InterfaceTypes {133 PalletUniqueCall: PalletUniqueCall;133 PalletUniqueCall: PalletUniqueCall;134 PalletUniqueError: PalletUniqueError;134 PalletUniqueError: PalletUniqueError;135 PalletUniqueRawEvent: PalletUniqueRawEvent;135 PalletUniqueRawEvent: PalletUniqueRawEvent;136 PalletUnqSchedulerCall: PalletUnqSchedulerCall;136 PalletUniqueSchedulerCall: PalletUniqueSchedulerCall;137 PalletUnqSchedulerError: PalletUnqSchedulerError;137 PalletUniqueSchedulerError: PalletUniqueSchedulerError;138 PalletUnqSchedulerEvent: PalletUnqSchedulerEvent;138 PalletUniqueSchedulerEvent: PalletUniqueSchedulerEvent;139 PalletUnqSchedulerScheduledV3: PalletUnqSchedulerScheduledV3;139 PalletUniqueSchedulerScheduledV3: PalletUniqueSchedulerScheduledV3;140 PalletXcmCall: PalletXcmCall;140 PalletXcmCall: PalletXcmCall;141 PalletXcmError: PalletXcmError;141 PalletXcmError: PalletXcmError;142 PalletXcmEvent: PalletXcmEvent;142 PalletXcmEvent: PalletXcmEvent;tests/src/interfaces/types-lookup.tsdiffbeforeafterboth1650 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1650 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1651 }1651 }165216521653 /** @name PalletUnqSchedulerCall (206) */1653 /** @name PalletUniqueSchedulerCall (206) */1654 export interface PalletUnqSchedulerCall extends Enum {1654 export interface PalletUniqueSchedulerCall extends Enum {1655 readonly isScheduleNamed: boolean;1655 readonly isScheduleNamed: boolean;1656 readonly asScheduleNamed: {1656 readonly asScheduleNamed: {1657 readonly id: U8aFixed;1657 readonly id: U8aFixed;2350 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';2350 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';2351 }2351 }235223522353 /** @name PalletUnqSchedulerEvent (283) */2353 /** @name PalletUniqueSchedulerEvent (283) */2354 export interface PalletUnqSchedulerEvent extends Enum {2354 export interface PalletUniqueSchedulerEvent extends Enum {2355 readonly isScheduled: boolean;2355 readonly isScheduled: boolean;2356 readonly asScheduled: {2356 readonly asScheduled: {2357 readonly when: u32;2357 readonly when: u32;2805 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';2805 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';2806 }2806 }280728072808 /** @name PalletUnqSchedulerScheduledV3 (344) */2808 /** @name PalletUniqueSchedulerScheduledV3 (344) */2809 export interface PalletUnqSchedulerScheduledV3 extends Struct {2809 export interface PalletUniqueSchedulerScheduledV3 extends Struct {2810 readonly maybeId: Option<U8aFixed>;2810 readonly maybeId: Option<U8aFixed>;2811 readonly priority: u8;2811 readonly priority: u8;2812 readonly call: FrameSupportScheduleMaybeHashed;2812 readonly call: FrameSupportScheduleMaybeHashed;2864 /** @name SpCoreVoid (350) */2864 /** @name SpCoreVoid (350) */2865 export type SpCoreVoid = Null;2865 export type SpCoreVoid = Null;286628662867 /** @name PalletUnqSchedulerError (351) */2867 /** @name PalletUniqueSchedulerError (351) */2868 export interface PalletUnqSchedulerError extends Enum {2868 export interface PalletUniqueSchedulerError extends Enum {2869 readonly isFailedToSchedule: boolean;2869 readonly isFailedToSchedule: boolean;2870 readonly isNotFound: boolean;2870 readonly isNotFound: boolean;2871 readonly isTargetBlockNumberInPast: boolean;2871 readonly isTargetBlockNumberInPast: boolean;tests/src/nesting/properties.test.tsdiffbeforeafterboth106 });106 });107 });107 });108109 it('Check valid names for collection properties keys', async () => {110 await usingApi(async api => {111 const events = await executeTransaction(api, bob, api.tx.unique.createCollectionEx({mode: 'NFT'}));112 const {collectionId} = getCreateCollectionResult(events);113114 // alpha symbols115 await expect(executeTransaction(116 api, 117 bob, 118 api.tx.unique.setCollectionProperties(collectionId, [{key: 'alpha'}]), 119 )).to.not.be.rejected;120121 // numeric symbols122 await expect(executeTransaction(123 api, 124 bob, 125 api.tx.unique.setCollectionProperties(collectionId, [{key: '123'}]), 126 )).to.not.be.rejected;127128 // underscore symbol129 await expect(executeTransaction(130 api, 131 bob, 132 api.tx.unique.setCollectionProperties(collectionId, [{key: 'black_hole'}]), 133 )).to.not.be.rejected;134135 // dash symbol136 await expect(executeTransaction(137 api, 138 bob, 139 api.tx.unique.setCollectionProperties(collectionId, [{key: 'semi-automatic'}]), 140 )).to.not.be.rejected;141142 // underscore symbol143 await expect(executeTransaction(144 api, 145 bob, 146 api.tx.unique.setCollectionProperties(collectionId, [{key: 'build.rs'}]), 147 )).to.not.be.rejected;148149 const propertyKeys = ['alpha', '123', 'black_hole', 'semi-automatic', 'build.rs'];150 const properties = (await api.rpc.unique.collectionProperties(collectionId, propertyKeys)).toHuman();151 expect(properties).to.be.deep.equal([152 {key: 'alpha', value: ''},153 {key: '123', value: ''},154 {key: 'black_hole', value: ''},155 {key: 'semi-automatic', value: ''},156 {key: 'build.rs', value: ''},157 ]);158 });159 });108160109 it('Changes properties of a collection', async () => {161 it('Changes properties of a collection', async () => {110 await usingApi(async api => {162 await usingApi(async api => {241293242 const invalidProperties = [294 const invalidProperties = [243 [{key: 'electron', value: 'negative'}, {key: 'string theory', value: 'understandable'}],295 [{key: 'electron', value: 'negative'}, {key: 'string theory', value: 'understandable'}],244 [{key: 'Mr.Sandman', value: 'Bring me a gene'}],296 [{key: 'Mr/Sandman', value: 'Bring me a gene'}],245 [{key: 'déjà vu', value: 'hmm...'}],297 [{key: 'déjà vu', value: 'hmm...'}],246 ];298 ];247299tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth118 const bob = privateKeyWrapper('//Bob');118 const bob = privateKeyWrapper('//Bob');119 const charlie = privateKeyWrapper('//Charlie');119 const charlie = privateKeyWrapper('//Charlie');120121 const addBobAdminTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));122 await submitTransactionAsync(alice, addBobAdminTx);123 const addCharlieAdminTx = api.tx.unique.addCollectionAdmin(collectionId, normalizeAccountId(charlie.address));124 await submitTransactionAsync(alice, addCharlieAdminTx);120125121 const adminListAfterAddAdmin = await getAdminList(api, collectionId);126 const adminListAfterAddAdmin = await getAdminList(api, collectionId);122 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(bob.address));127 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(bob.address));128 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(charlie.address));123129124 const removeAdminTx = api.tx.unique.removeCollectionAdmin(collectionId, normalizeAccountId(bob.address));130 const removeAdminTx = api.tx.unique.removeCollectionAdmin(collectionId, normalizeAccountId(bob.address));125 await expect(submitTransactionAsync(charlie, removeAdminTx)).to.be.rejected;131 await expect(submitTransactionExpectFailAsync(charlie, removeAdminTx)).to.be.rejected;126132127 const adminListAfterRemoveAdmin = await getAdminList(api, collectionId);133 const adminListAfterRemoveAdmin = await getAdminList(api, collectionId);128 expect(adminListAfterRemoveAdmin).to.be.deep.contains(normalizeAccountId(bob.address));134 expect(adminListAfterRemoveAdmin).to.be.deep.contains(normalizeAccountId(bob.address));tests/src/setCollectionLimits.test.tsdiffbeforeafterboth46 before(async () => {46 before(async () => {47 await usingApi(async (api, privateKeyWrapper) => {47 await usingApi(async (api, privateKeyWrapper) => {48 alice = privateKeyWrapper('//Alice');48 alice = privateKeyWrapper('//Alice');49 bob = privateKeyWrapper('//Bob');49 collectionIdForTesting = await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});50 collectionIdForTesting = await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});50 });51 });51 });52 });115 });116 });116 });117 });117118119 it('execute setCollectionLimits from admin collection', async () => {120 await addCollectionAdminExpectSuccess(alice, collectionIdForTesting, bob.address);121 await usingApi(async (api: ApiPromise) => {122 tx = api.tx.unique.setCollectionLimits(123 collectionIdForTesting,124 {125 accountTokenOwnershipLimit,126 sponsoredDataSize,127 // sponsoredMintSize,128 tokenLimit,129 },130 );131 await expect(submitTransactionAsync(bob, tx)).to.be.not.rejected;132 });133 });118});134});119135120describe('setCollectionLimits negative', () => {136describe('setCollectionLimits negative', () => {156 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;172 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;157 });173 });158 });174 });159 it('execute setCollectionLimits from admin collection', async () => {160 await addCollectionAdminExpectSuccess(alice, collectionIdForTesting, bob.address);161 await usingApi(async (api: ApiPromise) => {162 tx = api.tx.unique.setCollectionLimits(163 collectionIdForTesting,164 {165 accountTokenOwnershipLimit,166 sponsoredDataSize,167 // sponsoredMintSize,168 tokenLimit,169 },170 );171 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;172 });173 });174175175 it('fails when trying to enable OwnerCanTransfer after it was disabled', async () => {176 it('fails when trying to enable OwnerCanTransfer after it was disabled', async () => {176 const collectionId = await createCollectionExpectSuccess();177 const collectionId = await createCollectionExpectSuccess();tests/src/setCollectionSponsor.test.tsdiffbeforeafterboth65 await setCollectionSponsorExpectSuccess(collectionId, bob.address);65 await setCollectionSponsorExpectSuccess(collectionId, bob.address);66 await setCollectionSponsorExpectSuccess(collectionId, charlie.address);66 await setCollectionSponsorExpectSuccess(collectionId, charlie.address);67 });67 });68 it('Collection admin add sponsor', async () => {69 const collectionId = await createCollectionExpectSuccess();70 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);71 await setCollectionSponsorExpectSuccess(collectionId, charlie.address, '//Bob');72 });68});73});697470describe('(!negative test!) integration test: ext. setCollectionSponsor():', () => {75describe('(!negative test!) integration test: ext. setCollectionSponsor():', () => {94 await destroyCollectionExpectSuccess(collectionId);99 await destroyCollectionExpectSuccess(collectionId);95 await setCollectionSponsorExpectFailure(collectionId, bob.address);100 await setCollectionSponsorExpectFailure(collectionId, bob.address);96 });101 });97 it('(!negative test!) Collection admin add sponsor', async () => {98 const collectionId = await createCollectionExpectSuccess();99 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);100 await setCollectionSponsorExpectFailure(collectionId, charlie.address, '//Bob');101 });102});102});103103tests/src/setMintPermission.test.tsdiffbeforeafterboth68 });68 });69 });69 });7071 it('Collection admin success on set', async () => {72 await usingApi(async () => {73 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});74 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);75 await setMintPermissionExpectSuccess(bob, collectionId, true);76 });77 });70});78});717972describe('Negative Integration Test setMintPermission', () => {80describe('Negative Integration Test setMintPermission', () => {102 await setMintPermissionExpectFailure(bob, collectionId, true);110 await setMintPermissionExpectFailure(bob, collectionId, true);103 });111 });104105 it('Collection admin fails on set', async () => {106 await usingApi(async () => {107 const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});108 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);109 await setMintPermissionExpectFailure(bob, collectionId, true);110 });111 });112112113 it('ensure non-allow-listed non-privileged address can\'t mint tokens', async () => {113 it('ensure non-allow-listed non-privileged address can\'t mint tokens', async () => {114 await usingApi(async () => {114 await usingApi(async () => {tests/src/setPublicAccessMode.test.tsdiffbeforeafterboth104 });104 });105 });105 });106107 it('setPublicAccessMode by collection admin', async () => {108 await usingApi(async (api: ApiPromise) => {109 // tslint:disable-next-line: no-bitwise110 const collectionId = await createCollectionExpectSuccess();111 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);112 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});113 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.not.rejected;114 });115 });106});116});107117108describe('Negative Integration Test ext. collection admin setPublicAccessMode(): ', () => {118describe('Negative Integration Test ext. collection admin setPublicAccessMode(): ', () => {112 bob = privateKeyWrapper('//Bob');122 bob = privateKeyWrapper('//Bob');113 });123 });114 });124 });115 it('setPublicAccessMode by collection admin', async () => {116 await usingApi(async (api: ApiPromise) => {117 // tslint:disable-next-line: no-bitwise118 const collectionId = await createCollectionExpectSuccess();119 await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);120 const tx = api.tx.unique.setCollectionPermissions(collectionId, {access: 'AllowList'});121 await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;122 });123 });124});125});125126