git.delta.rocks / unique-network / refs/commits / c07e1d724b0d

difftreelog

Merge pull request #368 from UniqueNetwork/feature/CORE-386_1

bugrazoid2022-06-10parents: #3151280 #0aa9474.patch.diff
in: master
Feature/core 386 1

27 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
22pub 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;
2729
28use crate::{Pallet, CollectionHandle, Config, CollectionProperties};30use crate::{Pallet, CollectionHandle, Config, CollectionProperties};
4749
48#[solidity_interface(name = "Collection")]50#[solidity_interface(name = "Collection")]
49impl<T: Config> CollectionHandle<T>51impl<T: Config> CollectionHandle<T>
50// where52where
51// 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 }
8491
85 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)?;
8794
88 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 }
104111
105 #[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();
109116
110 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 limit
133 )))140 )))
134 }141 }
140147
141 #[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();
145152
146 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 limit
160 )))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 }
171178
172 // 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 }
182188
183 // 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 }
193203
194 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 }
203210
204 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 }
212217
213 #[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>)?;
218221
219 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>)?;
248249
249 let mut permissions = self.collection.permissions.clone();250 let mut permissions = self.collection.permissions.clone();
250 match enable {251 match enable {
280 }281 }
281282
282 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>)?;
299
292 Ok(())300 save(self)
293 }301 }
294302
295 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 }
301309
302 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 }
308316
309 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>)?;
329
313 Ok(())330 save(self)
314 }331 }
315}
316
317fn check_is_owner<T: Config>(caller: caller, collection: &CollectionHandle<T>) -> Result<void> {
318 let caller = T::CrossAccountId::from_eth(caller);
319 collection
320 .check_is_owner(&caller)
321 .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
322 Ok(())
323}332}
324333
325fn check_is_owner_or_admin<T: Config>(334fn check_is_owner_or_admin<T: Config>(
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
148 .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 }
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
152 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]> {}
156156
157generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);157generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);
158generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);158generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);
159159
160impl<T: Config> CommonEvmHandler for FungibleHandle<T> {160impl<T: Config> CommonEvmHandler for FungibleHandle<T>
161where
162 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");
162165
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
583 TokenProperties,583 TokenProperties,
584 )584 )
585)]585)]
586impl<T: Config> NonfungibleHandle<T> {}586impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> {}
587587
588// Not a tests, but code generators588// Not a tests, but code generators
589generate_stubgen!(gen_impl, UniqueNFTCall<()>, true);589generate_stubgen!(gen_impl, UniqueNFTCall<()>, true);
590generate_stubgen!(gen_iface, UniqueNFTCall<()>, false);590generate_stubgen!(gen_iface, UniqueNFTCall<()>, false);
591591
592impl<T: Config> CommonEvmHandler for NonfungibleHandle<T> {592impl<T: Config> CommonEvmHandler for NonfungibleHandle<T>
593where
594 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");
594597
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
297 }297 }
298}298}
299
300// Selector: 6aea9834
301contract Collection is Dummy, ERC165 {
302 // Selector: setCollectionProperty(string,bytes) 2f073f66
303 function setCollectionProperty(string memory key, bytes memory value)
304 public
305 {
306 require(false, stub_error);
307 key;
308 value;
309 dummy = 0;
310 }
311
312 // Selector: deleteCollectionProperty(string) 7b7debce
313 function deleteCollectionProperty(string memory key) public {
314 require(false, stub_error);
315 key;
316 dummy = 0;
317 }
318
319 // Throws error if key not found
320 //
321 // Selector: collectionProperty(string) cf24fd6d
322 function collectionProperty(string memory key)
323 public
324 view
325 returns (bytes memory)
326 {
327 require(false, stub_error);
328 key;
329 dummy;
330 return hex"";
331 }
332
333 // Selector: setCollectionSponsor(address) 7623402e
334 function setCollectionSponsor(address sponsor) public {
335 require(false, stub_error);
336 sponsor;
337 dummy = 0;
338 }
339
340 // Selector: confirmCollectionSponsorship() 3c50e97a
341 function confirmCollectionSponsorship() public {
342 require(false, stub_error);
343 dummy = 0;
344 }
345
346 // Selector: setCollectionLimit(string,uint32) 6a3841db
347 function setCollectionLimit(string memory limit, uint32 value) public {
348 require(false, stub_error);
349 limit;
350 value;
351 dummy = 0;
352 }
353
354 // Selector: setCollectionLimit(string,bool) 993b7fba
355 function setCollectionLimit(string memory limit, bool value) public {
356 require(false, stub_error);
357 limit;
358 value;
359 dummy = 0;
360 }
361
362 // Selector: contractAddress() f6b4dfb4
363 function contractAddress() public view returns (address) {
364 require(false, stub_error);
365 dummy;
366 return 0x0000000000000000000000000000000000000000;
367 }
368
369 // Selector: addCollectionAdmin(address) 92e462c7
370 function addCollectionAdmin(address newAdmin) public view {
371 require(false, stub_error);
372 newAdmin;
373 dummy;
374 }
375
376 // Selector: removeCollectionAdmin(address) fafd7b42
377 function removeCollectionAdmin(address admin) public view {
378 require(false, stub_error);
379 admin;
380 dummy;
381 }
382
383 // Selector: setCollectionNesting(bool) 112d4586
384 function setCollectionNesting(bool enable) public {
385 require(false, stub_error);
386 enable;
387 dummy = 0;
388 }
389
390 // Selector: setCollectionNesting(bool,address[]) 64872396
391 function setCollectionNesting(bool enable, address[] memory collections)
392 public
393 {
394 require(false, stub_error);
395 enable;
396 collections;
397 dummy = 0;
398 }
399
400 // Selector: setCollectionAccess(uint8) 41835d4c
401 function setCollectionAccess(uint8 mode) public {
402 require(false, stub_error);
403 mode;
404 dummy = 0;
405 }
406
407 // Selector: addToCollectionAllowList(address) 67844fe6
408 function addToCollectionAllowList(address user) public view {
409 require(false, stub_error);
410 user;
411 dummy;
412 }
413
414 // Selector: removeFromCollectionAllowList(address) 85c51acb
415 function removeFromCollectionAllowList(address user) public view {
416 require(false, stub_error);
417 user;
418 dummy;
419 }
420
421 // Selector: setCollectionMintMode(bool) 00018e84
422 function setCollectionMintMode(bool mode) public {
423 require(false, stub_error);
424 mode;
425 dummy = 0;
426 }
427}
428299
429// Selector: 780e9d63300// Selector: 780e9d63
430contract ERC721Enumerable is Dummy, ERC165 {301contract ERC721Enumerable is Dummy, ERC165 {
459 }330 }
460}331}
332
333// Selector: 7d9262e6
334contract Collection is Dummy, ERC165 {
335 // Selector: setCollectionProperty(string,bytes) 2f073f66
336 function setCollectionProperty(string memory key, bytes memory value)
337 public
338 {
339 require(false, stub_error);
340 key;
341 value;
342 dummy = 0;
343 }
344
345 // Selector: deleteCollectionProperty(string) 7b7debce
346 function deleteCollectionProperty(string memory key) public {
347 require(false, stub_error);
348 key;
349 dummy = 0;
350 }
351
352 // Throws error if key not found
353 //
354 // Selector: collectionProperty(string) cf24fd6d
355 function collectionProperty(string memory key)
356 public
357 view
358 returns (bytes memory)
359 {
360 require(false, stub_error);
361 key;
362 dummy;
363 return hex"";
364 }
365
366 // Selector: setCollectionSponsor(address) 7623402e
367 function setCollectionSponsor(address sponsor) public {
368 require(false, stub_error);
369 sponsor;
370 dummy = 0;
371 }
372
373 // Selector: confirmCollectionSponsorship() 3c50e97a
374 function confirmCollectionSponsorship() public {
375 require(false, stub_error);
376 dummy = 0;
377 }
378
379 // Selector: setCollectionLimit(string,uint32) 6a3841db
380 function setCollectionLimit(string memory limit, uint32 value) public {
381 require(false, stub_error);
382 limit;
383 value;
384 dummy = 0;
385 }
386
387 // Selector: setCollectionLimit(string,bool) 993b7fba
388 function setCollectionLimit(string memory limit, bool value) public {
389 require(false, stub_error);
390 limit;
391 value;
392 dummy = 0;
393 }
394
395 // Selector: contractAddress() f6b4dfb4
396 function contractAddress() public view returns (address) {
397 require(false, stub_error);
398 dummy;
399 return 0x0000000000000000000000000000000000000000;
400 }
401
402 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
403 function addCollectionAdminSubstrate(uint256 newAdmin) public view {
404 require(false, stub_error);
405 newAdmin;
406 dummy;
407 }
408
409 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
410 function removeCollectionAdminSubstrate(uint256 newAdmin) public view {
411 require(false, stub_error);
412 newAdmin;
413 dummy;
414 }
415
416 // Selector: addCollectionAdmin(address) 92e462c7
417 function addCollectionAdmin(address newAdmin) public view {
418 require(false, stub_error);
419 newAdmin;
420 dummy;
421 }
422
423 // Selector: removeCollectionAdmin(address) fafd7b42
424 function removeCollectionAdmin(address admin) public view {
425 require(false, stub_error);
426 admin;
427 dummy;
428 }
429
430 // Selector: setCollectionNesting(bool) 112d4586
431 function setCollectionNesting(bool enable) public {
432 require(false, stub_error);
433 enable;
434 dummy = 0;
435 }
436
437 // Selector: setCollectionNesting(bool,address[]) 64872396
438 function setCollectionNesting(bool enable, address[] memory collections)
439 public
440 {
441 require(false, stub_error);
442 enable;
443 collections;
444 dummy = 0;
445 }
446
447 // Selector: setCollectionAccess(uint8) 41835d4c
448 function setCollectionAccess(uint8 mode) public {
449 require(false, stub_error);
450 mode;
451 dummy = 0;
452 }
453
454 // Selector: addToCollectionAllowList(address) 67844fe6
455 function addToCollectionAllowList(address user) public view {
456 require(false, stub_error);
457 user;
458 dummy;
459 }
460
461 // Selector: removeFromCollectionAllowList(address) 85c51acb
462 function removeFromCollectionAllowList(address user) public view {
463 require(false, stub_error);
464 user;
465 dummy;
466 }
467
468 // Selector: setCollectionMintMode(bool) 00018e84
469 function setCollectionMintMode(bool mode) public {
470 require(false, stub_error);
471 mode;
472 dummy = 0;
473 }
474}
461475
462// Selector: d74d154f476// Selector: d74d154f
463contract ERC721UniqueExtensions is Dummy, ERC165 {477contract ERC721UniqueExtensions is Dummy, ERC165 {
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
491 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);491 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
492492
493 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()?;
496496
497 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;
872872
873 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;
894894
895 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)?;
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
812 for byte in key.as_slice().iter() {812 for byte in key.as_slice().iter() {
813 let byte = *byte;813 let byte = *byte;
814814
815 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 }
modifiedruntime/common/src/dispatch.rsdiffbeforeafterboth
112 + pallet_fungible::Config112 + pallet_fungible::Config
113 + pallet_nonfungible::Config113 + pallet_nonfungible::Config
114 + 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()
modifiedruntime/tests/src/tests.rsdiffbeforeafterboth
1264 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);
12681267
1269 // Add collection admins 2 and 31268 // Add collection admins 2 and 3
1270 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 ));
12891288
1290 // remove admin 31289 // remove admin 3
1291 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 ));
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
174 function finishMinting() external returns (bool);174 function finishMinting() external returns (bool);
175}175}
176
177// Selector: 6aea9834
178interface Collection is Dummy, ERC165 {
179 // Selector: setCollectionProperty(string,bytes) 2f073f66
180 function setCollectionProperty(string memory key, bytes memory value)
181 external;
182
183 // Selector: deleteCollectionProperty(string) 7b7debce
184 function deleteCollectionProperty(string memory key) external;
185
186 // Throws error if key not found
187 //
188 // Selector: collectionProperty(string) cf24fd6d
189 function collectionProperty(string memory key)
190 external
191 view
192 returns (bytes memory);
193
194 // Selector: setCollectionSponsor(address) 7623402e
195 function setCollectionSponsor(address sponsor) external;
196
197 // Selector: confirmCollectionSponsorship() 3c50e97a
198 function confirmCollectionSponsorship() external;
199
200 // Selector: setCollectionLimit(string,uint32) 6a3841db
201 function setCollectionLimit(string memory limit, uint32 value) external;
202
203 // Selector: setCollectionLimit(string,bool) 993b7fba
204 function setCollectionLimit(string memory limit, bool value) external;
205
206 // Selector: contractAddress() f6b4dfb4
207 function contractAddress() external view returns (address);
208
209 // Selector: addCollectionAdmin(address) 92e462c7
210 function addCollectionAdmin(address newAdmin) external view;
211
212 // Selector: removeCollectionAdmin(address) fafd7b42
213 function removeCollectionAdmin(address admin) external view;
214
215 // Selector: setCollectionNesting(bool) 112d4586
216 function setCollectionNesting(bool enable) external;
217
218 // Selector: setCollectionNesting(bool,address[]) 64872396
219 function setCollectionNesting(bool enable, address[] memory collections)
220 external;
221
222 // Selector: setCollectionAccess(uint8) 41835d4c
223 function setCollectionAccess(uint8 mode) external;
224
225 // Selector: addToCollectionAllowList(address) 67844fe6
226 function addToCollectionAllowList(address user) external view;
227
228 // Selector: removeFromCollectionAllowList(address) 85c51acb
229 function removeFromCollectionAllowList(address user) external view;
230
231 // Selector: setCollectionMintMode(bool) 00018e84
232 function setCollectionMintMode(bool mode) external;
233}
234176
235// Selector: 780e9d63177// Selector: 780e9d63
236interface 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}
193
194// Selector: 7d9262e6
195interface Collection is Dummy, ERC165 {
196 // Selector: setCollectionProperty(string,bytes) 2f073f66
197 function setCollectionProperty(string memory key, bytes memory value)
198 external;
199
200 // Selector: deleteCollectionProperty(string) 7b7debce
201 function deleteCollectionProperty(string memory key) external;
202
203 // Throws error if key not found
204 //
205 // Selector: collectionProperty(string) cf24fd6d
206 function collectionProperty(string memory key)
207 external
208 view
209 returns (bytes memory);
210
211 // Selector: setCollectionSponsor(address) 7623402e
212 function setCollectionSponsor(address sponsor) external;
213
214 // Selector: confirmCollectionSponsorship() 3c50e97a
215 function confirmCollectionSponsorship() external;
216
217 // Selector: setCollectionLimit(string,uint32) 6a3841db
218 function setCollectionLimit(string memory limit, uint32 value) external;
219
220 // Selector: setCollectionLimit(string,bool) 993b7fba
221 function setCollectionLimit(string memory limit, bool value) external;
222
223 // Selector: contractAddress() f6b4dfb4
224 function contractAddress() external view returns (address);
225
226 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
227 function addCollectionAdminSubstrate(uint256 newAdmin) external view;
228
229 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
230 function removeCollectionAdminSubstrate(uint256 newAdmin) external view;
231
232 // Selector: addCollectionAdmin(address) 92e462c7
233 function addCollectionAdmin(address newAdmin) external view;
234
235 // Selector: removeCollectionAdmin(address) fafd7b42
236 function removeCollectionAdmin(address admin) external view;
237
238 // Selector: setCollectionNesting(bool) 112d4586
239 function setCollectionNesting(bool enable) external;
240
241 // Selector: setCollectionNesting(bool,address[]) 64872396
242 function setCollectionNesting(bool enable, address[] memory collections)
243 external;
244
245 // Selector: setCollectionAccess(uint8) 41835d4c
246 function setCollectionAccess(uint8 mode) external;
247
248 // Selector: addToCollectionAllowList(address) 67844fe6
249 function addToCollectionAllowList(address user) external view;
250
251 // Selector: removeFromCollectionAllowList(address) 85c51acb
252 function removeFromCollectionAllowList(address user) external view;
253
254 // Selector: setCollectionMintMode(bool) 00018e84
255 function setCollectionMintMode(bool mode) external;
256}
251257
252// Selector: d74d154f258// Selector: d74d154f
253interface ERC721UniqueExtensions is Dummy, ERC165 {259interface ERC721UniqueExtensions is Dummy, ERC165 {
addedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
233 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');
237237
238 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)));
242242
243 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');
246246
247 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');
250250
251 //TODO: change value, when enum generated
252 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);
262261
262 {
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();
272271
273 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 ]);
283
284 const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
285 const sponsorBalanceAfter = await ethBalanceViaSub(api, sponsor);
284286
285 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');
286
287 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 });
292292
293 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))!;
modifiedtests/src/eth/createCollection.test.tsdiffbeforeafterboth
80 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.methods
210 .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.methods
225 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);225 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
226 await expect(collectionEvm.methods226 await expect(collectionEvm.methods
227 .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});
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
89 "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" }
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
5import 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';
1010
11declare 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 **/
modifiedtests/src/interfaces/augment-types.tsdiffbeforeafterboth
1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
2/* eslint-disable */2/* eslint-disable */
33
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, 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;
modifiedtests/src/interfaces/default/types.tsdiffbeforeafterboth
1784 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}
17861786
1787/** @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}
18111811
1812/** @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}
18201820
1821/** @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}
18471847
1848/** @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;
modifiedtests/src/interfaces/lookup.tsdiffbeforeafterboth
1525 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::Void
2748 **/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 /**
modifiedtests/src/interfaces/registry.tsdiffbeforeafterboth
1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
2/* eslint-disable */2/* eslint-disable */
33
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, 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';
55
6declare 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;
modifiedtests/src/interfaces/types-lookup.tsdiffbeforeafterboth
1650 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;1650 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
1651 }1651 }
16521652
1653 /** @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 }
23522352
2353 /** @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 }
28072807
2808 /** @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;
28662866
2867 /** @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;
modifiedtests/src/nesting/properties.test.tsdiffbeforeafterboth
106 });106 });
107 });107 });
108
109 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);
113
114 // alpha symbols
115 await expect(executeTransaction(
116 api,
117 bob,
118 api.tx.unique.setCollectionProperties(collectionId, [{key: 'alpha'}]),
119 )).to.not.be.rejected;
120
121 // numeric symbols
122 await expect(executeTransaction(
123 api,
124 bob,
125 api.tx.unique.setCollectionProperties(collectionId, [{key: '123'}]),
126 )).to.not.be.rejected;
127
128 // underscore symbol
129 await expect(executeTransaction(
130 api,
131 bob,
132 api.tx.unique.setCollectionProperties(collectionId, [{key: 'black_hole'}]),
133 )).to.not.be.rejected;
134
135 // dash symbol
136 await expect(executeTransaction(
137 api,
138 bob,
139 api.tx.unique.setCollectionProperties(collectionId, [{key: 'semi-automatic'}]),
140 )).to.not.be.rejected;
141
142 // underscore symbol
143 await expect(executeTransaction(
144 api,
145 bob,
146 api.tx.unique.setCollectionProperties(collectionId, [{key: 'build.rs'}]),
147 )).to.not.be.rejected;
148
149 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 });
108160
109 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 => {
241293
242 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 ];
247299
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
118 const bob = privateKeyWrapper('//Bob');118 const bob = privateKeyWrapper('//Bob');
119 const charlie = privateKeyWrapper('//Charlie');119 const charlie = privateKeyWrapper('//Charlie');
120
121 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);
120125
121 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));
123129
124 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;
126132
127 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));
modifiedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth
46 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 });
117118
119 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});
119135
120describe('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 });
174175
175 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();
modifiedtests/src/setCollectionSponsor.test.tsdiffbeforeafterboth
65 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});
6974
70describe('(!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});
103103
modifiedtests/src/setMintPermission.test.tsdiffbeforeafterboth
68 });68 });
69 });69 });
70
71 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});
7179
72describe('Negative Integration Test setMintPermission', () => {80describe('Negative Integration Test setMintPermission', () => {
102 await setMintPermissionExpectFailure(bob, collectionId, true);110 await setMintPermissionExpectFailure(bob, collectionId, true);
103 });111 });
104
105 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 });
112112
113 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 () => {
modifiedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth
104 });104 });
105 });105 });
106
107 it('setPublicAccessMode by collection admin', async () => {
108 await usingApi(async (api: ApiPromise) => {
109 // tslint:disable-next-line: no-bitwise
110 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});
107117
108describe('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-bitwise
118 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