difftreelog
feat(rmrk-proxy) add resource
in: master
21 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6335,6 +6335,7 @@
"pallet-common",
"pallet-evm",
"pallet-nonfungible",
+ "pallet-structure",
"parity-scale-codec 3.1.2",
"scale-info",
"sp-core",
pallets/proxy-rmrk-core/Cargo.tomldiffbeforeafterboth--- a/pallets/proxy-rmrk-core/Cargo.toml
+++ b/pallets/proxy-rmrk-core/Cargo.toml
@@ -18,6 +18,7 @@
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
pallet-common = { default-features = false, path = '../common' }
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
+pallet-structure = { default-features = false, path = "../../pallets/structure" }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
@@ -33,6 +34,7 @@
"up-data-structs/std",
"pallet-common/std",
"pallet-nonfungible/std",
+ "pallet-structure/std",
"pallet-evm/std",
'frame-benchmarking/std',
]
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -25,6 +25,7 @@
Pallet as PalletCommon, Error as CommonError, CollectionHandle, CommonCollectionOperations,
};
use pallet_nonfungible::{Pallet as PalletNft, NonfungibleHandle, TokenData};
+use pallet_structure::Pallet as PalletStructure;
use pallet_evm::account::CrossAccountId;
use core::convert::AsRef;
@@ -56,7 +57,7 @@
#[pallet::storage]
#[pallet::getter(fn collection_index_map)]
- pub type CollectionIndexMap<T: Config> =
+ pub type CollectionIndexMap<T: Config> =
StorageMap<_, Twox64Concat, RmrkCollectionId, CollectionId, ValueQuery>;
#[pallet::pallet]
@@ -98,6 +99,10 @@
key: RmrkKeyString,
value: RmrkValueString,
},
+ ResourceAdded {
+ nft_id: RmrkNftId,
+ resource_id: RmrkResourceId,
+ },
}
#[pallet::error]
@@ -106,7 +111,7 @@
CorruptedCollectionType,
NftTypeEncodeError,
RmrkPropertyKeyIsTooLong,
- RmrkPropertyValueIsTooLong,
+ RmrkPropertyValueIsTooLong, // todo utilize that in RPCs
/* RMRK compatible events */
CollectionNotEmpty,
@@ -115,6 +120,7 @@
CollectionUnknown,
NoPermission,
CollectionFullOrLocked,
+ // todo add resource errors?
}
#[pallet::call]
@@ -143,29 +149,21 @@
.map_err(|_| <CommonError<T>>::CollectionTokenPrefixLimitExceeded)?,
..Default::default()
};
-
- let collection_id_res =
- <PalletNft<T>>::init_collection(T::CrossAccountId::from_sub(sender.clone()), data);
-
- if let Err(DispatchError::Arithmetic(_)) = &collection_id_res {
- return Err(<Error<T>>::NoAvailableCollectionId.into());
- }
- let unique_collection_id = collection_id_res?;
- let rmrk_collection_id = <CollectionIndex<T>>::get();
-
<CollectionIndex<T>>::mutate(|n| *n += 1);
- <CollectionIndexMap<T>>::insert(rmrk_collection_id, unique_collection_id);
- <PalletCommon<T>>::set_scoped_collection_properties(
- unique_collection_id,
- PropertyScope::Rmrk,
+ let unique_collection_id = Self::init_collection(
+ T::CrossAccountId::from_sub(sender.clone()),
+ data,
[
Self::rmrk_property(Metadata, &metadata)?,
Self::rmrk_property(CollectionType, &misc::CollectionType::Regular)?,
]
.into_iter(),
- )?;
+ )?; //collection_id_res?;
+ let rmrk_collection_id = <CollectionIndex<T>>::get();
+
+ <CollectionIndexMap<T>>::insert(rmrk_collection_id, unique_collection_id);
Self::deposit_event(Event::CollectionCreated {
issuer: sender,
@@ -290,13 +288,26 @@
&sender,
&cross_owner,
&collection,
- NftType::Regular,
[
+ Self::rmrk_property(TokenType, &NftType::Regular)?,
Self::rmrk_property(RoyaltyInfo, &royalty_info)?,
Self::rmrk_property(Metadata, &metadata)?,
Self::rmrk_property(Equipped, &false)?,
- Self::rmrk_property(ResourceCollection, &None::<CollectionId>)?,
- Self::rmrk_property(ResourcePriorities, &<Vec<u8>>::new())?,
+ Self::rmrk_property(
+ ResourceCollection,
+ &Self::init_collection(
+ sender.clone(),
+ CreateCollectionData {
+ ..Default::default()
+ },
+ [Self::rmrk_property(
+ CollectionType,
+ &misc::CollectionType::Resource,
+ )?]
+ .into_iter(),
+ )?,
+ )?, // todo possibly add limits to the collection if rmrk warrants them
+ Self::rmrk_property(ResourcePriorities, &<Vec<u8>>::new())?, // todo create resource priorities?
]
.into_iter(),
)
@@ -392,6 +403,107 @@
Ok(())
}
+
+ #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
+ #[transactional]
+ pub fn add_basic_resource(
+ origin: OriginFor<T>,
+ collection_id: RmrkCollectionId,
+ nft_id: RmrkNftId,
+ resource: RmrkBasicResource,
+ ) -> DispatchResult {
+ let sender = ensure_signed(origin.clone())?;
+
+ let resource_id = Self::resource_add(
+ sender,
+ Self::unique_collection_id(collection_id)?,
+ nft_id.into(),
+ [
+ Self::rmrk_property(TokenType, &NftType::Resource)?,
+ Self::rmrk_property(ResourceType, &misc::ResourceType::Basic)?,
+ Self::rmrk_property(Src, &resource.src)?,
+ Self::rmrk_property(Metadata, &resource.metadata)?,
+ Self::rmrk_property(License, &resource.license)?,
+ Self::rmrk_property(Thumb, &resource.thumb)?,
+ ]
+ .into_iter(),
+ )?;
+
+ Self::deposit_event(Event::ResourceAdded {
+ nft_id,
+ resource_id,
+ });
+ Ok(())
+ }
+
+ #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
+ #[transactional]
+ pub fn add_composable_resource(
+ origin: OriginFor<T>,
+ collection_id: RmrkCollectionId,
+ nft_id: RmrkNftId,
+ _resource_id: RmrkBoundedResource,
+ resource: RmrkComposableResource,
+ ) -> DispatchResult {
+ let sender = ensure_signed(origin.clone())?;
+
+ let resource_id = Self::resource_add(
+ sender,
+ Self::unique_collection_id(collection_id)?,
+ nft_id.into(),
+ [
+ Self::rmrk_property(TokenType, &NftType::Resource)?,
+ Self::rmrk_property(ResourceType, &misc::ResourceType::Composable)?,
+ Self::rmrk_property(Parts, &resource.parts)?,
+ Self::rmrk_property(Base, &resource.base)?,
+ Self::rmrk_property(Src, &resource.src)?,
+ Self::rmrk_property(Metadata, &resource.metadata)?,
+ Self::rmrk_property(License, &resource.license)?,
+ Self::rmrk_property(Thumb, &resource.thumb)?,
+ ]
+ .into_iter(),
+ )?;
+
+ Self::deposit_event(Event::ResourceAdded {
+ nft_id,
+ resource_id,
+ });
+ Ok(())
+ }
+
+ #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
+ #[transactional]
+ pub fn add_slot_resource(
+ origin: OriginFor<T>,
+ collection_id: RmrkCollectionId,
+ nft_id: RmrkNftId,
+ resource: RmrkSlotResource,
+ ) -> DispatchResult {
+ let sender = ensure_signed(origin.clone())?;
+
+ let resource_id = Self::resource_add(
+ sender,
+ Self::unique_collection_id(collection_id)?,
+ nft_id.into(),
+ [
+ Self::rmrk_property(TokenType, &NftType::Resource)?,
+ Self::rmrk_property(ResourceType, &misc::ResourceType::Slot)?,
+ Self::rmrk_property(Base, &resource.base)?,
+ Self::rmrk_property(Src, &resource.src)?,
+ Self::rmrk_property(Metadata, &resource.metadata)?,
+ Self::rmrk_property(Slot, &resource.slot)?,
+ Self::rmrk_property(License, &resource.license)?,
+ Self::rmrk_property(Thumb, &resource.thumb)?,
+ ]
+ .into_iter(),
+ )?;
+
+ Self::deposit_event(Event::ResourceAdded {
+ nft_id,
+ resource_id,
+ });
+ Ok(())
+ }
}
}
@@ -422,14 +534,32 @@
Ok(property)
}
+ fn init_collection(
+ sender: T::CrossAccountId,
+ data: CreateCollectionData<T::AccountId>,
+ properties: impl Iterator<Item = Property>,
+ ) -> Result<CollectionId, DispatchError> {
+ let collection_id = <PalletNft<T>>::init_collection(sender, data);
+
+ if let Err(DispatchError::Arithmetic(_)) = &collection_id {
+ return Err(<Error<T>>::NoAvailableCollectionId.into());
+ }
+
+ <PalletCommon<T>>::set_scoped_collection_properties(
+ collection_id?,
+ PropertyScope::Rmrk,
+ properties,
+ )?;
+
+ collection_id
+ }
+
pub fn create_nft(
sender: &T::CrossAccountId,
owner: &T::CrossAccountId,
collection: &NonfungibleHandle<T>,
- nft_type: NftType,
properties: impl Iterator<Item = Property>,
) -> Result<TokenId, DispatchError> {
- todo!("store nft type");
let data = CreateNftExData {
properties: BoundedVec::default(),
owner: owner.clone(),
@@ -465,6 +595,57 @@
Ok(())
}
+ fn resource_add(
+ sender: T::AccountId,
+ collection_id: CollectionId,
+ token_id: TokenId,
+ resource_properties: impl Iterator<Item = Property>,
+ ) -> Result<RmrkResourceId, DispatchError> {
+ let collection =
+ Self::get_typed_nft_collection(collection_id, misc::CollectionType::Regular)?;
+ ensure!(collection.owner == sender, Error::<T>::NoPermission);
+
+ // Check NFT lock status // todo depends on market, maybe later
+ //ensure!(!Pallet::<T>::is_locked(collection_id, nft_id), pallet_uniques::Error::<T>::Locked);
+
+ let sender = T::CrossAccountId::from_sub(sender);
+ let budget = budget::Value::new(10);
+ let pending = <PalletStructure<T>>::check_indirectly_owned(
+ sender.clone(),
+ collection_id,
+ token_id,
+ None,
+ &budget,
+ )?;
+
+ let resource_collection_id: CollectionId =
+ Self::get_nft_property(collection_id, token_id, ResourceCollection)?
+ .decode_or_default();
+ let resource_collection =
+ Self::get_typed_nft_collection(resource_collection_id, misc::CollectionType::Resource)?;
+
+ // todo probably add extra connections to bases, slots, etc., when RMRK starts to use them
+
+ let resource_id = Self::create_nft(
+ &sender, // todo owner of the nft?
+ &sender,
+ &resource_collection,
+ resource_properties.chain(
+ [
+ Self::rmrk_property(PendingResourceAccept, &pending)?,
+ Self::rmrk_property(PendingResourceRemoval, &false)?,
+ ]
+ .into_iter(),
+ ),
+ )
+ .map_err(|err| match err {
+ DispatchError::Arithmetic(_) => <Error<T>>::NoAvailableNftId.into(),
+ err => Self::map_common_err_to_proxy(err),
+ })?;
+
+ Ok(resource_id.0)
+ }
+
fn change_collection_owner(
collection_id: CollectionId,
collection_type: misc::CollectionType,
@@ -493,8 +674,11 @@
<CollectionIndex<T>>::get()
}
- pub fn unique_collection_id(rmrk_collection_id: RmrkCollectionId) -> Result<CollectionId, DispatchError> {
- <CollectionIndexMap<T>>::try_get(rmrk_collection_id).map_err(|_| <Error<T>>::CollectionUnknown.into())
+ pub fn unique_collection_id(
+ rmrk_collection_id: RmrkCollectionId,
+ ) -> Result<CollectionId, DispatchError> {
+ <CollectionIndexMap<T>>::try_get(rmrk_collection_id)
+ .map_err(|_| <Error<T>>::CollectionUnknown.into())
}
pub fn get_nft_collection(
@@ -513,10 +697,6 @@
<CollectionHandle<T>>::try_get(collection_id).is_ok()
}
- pub fn nft_exists(collection_id: CollectionId, nft_id: TokenId) -> bool {
- <TokenData<T>>::contains_key((collection_id, nft_id))
- }
-
pub fn get_collection_property(
collection_id: CollectionId,
key: RmrkProperty,
@@ -553,6 +733,15 @@
Ok(())
}
+ pub fn get_typed_nft_collection(
+ collection_id: CollectionId,
+ collection_type: misc::CollectionType,
+ ) -> Result<NonfungibleHandle<T>, DispatchError> {
+ Self::ensure_collection_type(collection_id, collection_type)?;
+
+ Self::get_nft_collection(collection_id)
+ }
+
pub fn get_nft_property(
collection_id: CollectionId,
nft_id: TokenId,
@@ -560,17 +749,23 @@
) -> Result<PropertyValue, DispatchError> {
let nft_property = <PalletNft<T>>::token_properties((collection_id, nft_id))
.get(&Self::rmrk_property_key(key)?)
- .ok_or(<Error<T>>::NoAvailableNftId)?
+ .ok_or(<Error<T>>::NoAvailableNftId)? // todo replace with better error
.clone();
Ok(nft_property)
}
+ pub fn nft_exists(collection_id: CollectionId, nft_id: TokenId) -> bool {
+ <TokenData<T>>::contains_key((collection_id, nft_id))
+ }
+
pub fn get_nft_type(
- _collection_id: CollectionId,
- _token_id: TokenId,
+ collection_id: CollectionId,
+ token_id: TokenId,
) -> Result<NftType, DispatchError> {
- todo!("should get it from properties?")
+ Ok(Self::get_nft_property(collection_id, token_id, TokenType)?.decode_or_default())
+ // todo throw error
+ // NftTypeEncodeError?
}
pub fn ensure_nft_type(
@@ -673,15 +868,6 @@
});
Ok(properties)
- }
-
- pub fn get_typed_nft_collection(
- collection_id: CollectionId,
- collection_type: misc::CollectionType,
- ) -> Result<NonfungibleHandle<T>, DispatchError> {
- Self::ensure_collection_type(collection_id, collection_type)?;
-
- Self::get_nft_collection(collection_id)
}
fn map_common_err_to_proxy(err: DispatchError) -> DispatchError {
pallets/proxy-rmrk-core/src/misc.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/misc.rs
+++ b/pallets/proxy-rmrk-core/src/misc.rs
@@ -18,6 +18,7 @@
fn decode_or_default(&self) -> T;
}
+// todo fail if unwrap doesn't work
impl<T: Decode + Default, S> RmrkDecode<T, S> for BoundedVec<u8, S> {
fn decode_or_default(&self) -> T {
let mut value = self.as_slice();
@@ -30,6 +31,7 @@
fn rebind(&self) -> BoundedVec<u8, S>;
}
+// todo fail if unwrap doesn't work
impl<T, S> RmrkRebind<T, S> for BoundedVec<u8, T>
where
BoundedVec<u8, S>: TryFrom<Vec<u8>>,
@@ -46,11 +48,22 @@
Base,
}
-#[derive(Encode, Decode, PartialEq, Eq)]
+// todo remove default?
+#[derive(Encode, Decode, PartialEq, Eq, Default)]
pub enum NftType {
+ #[default]
Regular,
Resource,
FixedPart,
SlotPart,
Theme,
}
+
+// todo remove default?
+#[derive(Encode, Decode, PartialEq, Eq, Default)]
+pub enum ResourceType {
+ #[default]
+ Basic,
+ Composable,
+ Slot,
+}
pallets/proxy-rmrk-core/src/property.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/property.rs
+++ b/pallets/proxy-rmrk-core/src/property.rs
@@ -4,6 +4,7 @@
pub enum RmrkProperty<'r> {
Metadata,
CollectionType,
+ TokenType,
RoyaltyInfo,
Equipped,
ResourceCollection,
@@ -47,6 +48,7 @@
match self {
Self::Metadata => key!("metadata"),
Self::CollectionType => key!("collection-type"),
+ Self::TokenType => key!("token-type"),
Self::RoyaltyInfo => key!("royalty-info"),
Self::Equipped => key!("equipped"),
Self::ResourceCollection => key!("resource-collection"),
pallets/proxy-rmrk-equip/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-equip/src/lib.rs
+++ b/pallets/proxy-rmrk-equip/src/lib.rs
@@ -166,8 +166,8 @@
&sender,
owner,
&collection,
- NftType::Theme,
[
+ <PalletCore<T>>::rmrk_property(TokenType, &NftType::Theme)?,
<PalletCore<T>>::rmrk_property(ThemeName, &theme.name)?,
<PalletCore<T>>::rmrk_property(ThemeInherit, &theme.inherit)?,
]
@@ -212,8 +212,8 @@
sender,
owner,
collection,
- nft_type,
[
+ <PalletCore<T>>::rmrk_property(TokenType, &nft_type)?,
<PalletCore<T>>::rmrk_property(Src, &src)?,
<PalletCore<T>>::rmrk_property(ZIndex, &z_index)?,
]
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -41,6 +41,7 @@
// RMRK
use rmrk::{
CollectionInfo, NftInfo, ResourceInfo, PropertyInfo, BaseInfo, PartType, Theme, ThemeProperty,
+ ResourceTypes, BasicResource, ComposableResource, SlotResource,
};
pub use rmrk::{
primitives::{
@@ -49,8 +50,6 @@
},
NftChild as RmrkNftChild, AccountIdOrCollectionNftTuple as RmrkAccountIdOrCollectionNftTuple,
FixedPart as RmrkFixedPart, SlotPart as RmrkSlotPart, EquippableList as RmrkEquippableList,
- BasicResource as RmrkBasicResource, ComposableResource as RmrkComposableResource,
- SlotResource as RmrkSlotResource,
};
mod bounded;
@@ -942,23 +941,26 @@
pub type RmrkCollectionInfo<AccountId> =
CollectionInfo<RmrkString, RmrkCollectionSymbol, AccountId>;
pub type RmrkInstanceInfo<AccountId> = NftInfo<AccountId, Permill, RmrkString>;
-pub type RmrkResourceInfo = ResourceInfo<RmrkBoundedResource, RmrkString, RmrkBoundedParts>;
+pub type RmrkResourceInfo = ResourceInfo<RmrkString, RmrkBoundedParts>;
pub type RmrkPropertyInfo = PropertyInfo<RmrkKeyString, RmrkValueString>;
pub type RmrkBaseInfo<AccountId> = BaseInfo<AccountId, RmrkString>;
pub type RmrkPartType =
PartType<RmrkString, BoundedVec<RmrkCollectionId, RmrkMaxCollectionsEquippablePerPart>>;
pub type RmrkThemeProperty = ThemeProperty<RmrkString>;
pub type RmrkTheme = Theme<RmrkString, Vec<RmrkThemeProperty>>;
+pub type RmrkResourceTypes = ResourceTypes<RmrkString, RmrkBoundedParts>;
+
+pub type RmrkBasicResource = BasicResource<RmrkString>;
+pub type RmrkComposableResource = ComposableResource<RmrkString, RmrkBoundedParts>;
+pub type RmrkSlotResource = SlotResource<RmrkString>;
+pub type RmrkString = BoundedVec<u8, RmrkStringLimit>;
pub type RmrkCollectionSymbol = BoundedVec<u8, RmrkCollectionSymbolLimit>;
pub type RmrkKeyString = BoundedVec<u8, RmrkKeyLimit>;
pub type RmrkValueString = BoundedVec<u8, RmrkValueLimit>;
-
-type RmrkBoundedResource = BoundedVec<u8, RmrkResourceSymbolLimit>;
-type RmrkBoundedParts = BoundedVec<RmrkPartId, RmrkPartsLimit>;
+pub type RmrkBoundedResource = BoundedVec<u8, RmrkResourceSymbolLimit>;
+pub type RmrkBoundedParts = BoundedVec<RmrkPartId, RmrkPartsLimit>; // todo make sure it is needed
pub type RmrkRpcString = Vec<u8>;
pub type RmrkThemeName = RmrkRpcString;
pub type RmrkPropertyKey = RmrkRpcString;
-
-pub type RmrkString = BoundedVec<u8, RmrkStringLimit>;
primitives/data-structs/src/rmrk.rsdiffbeforeafterboth--- a/primitives/data-structs/src/rmrk.rs
+++ b/primitives/data-structs/src/rmrk.rs
@@ -282,17 +282,16 @@
#[cfg_attr(
feature = "std",
serde(bound = r#"
- BoundedResource: AsRef<[u8]>,
BoundedString: AsRef<[u8]>,
BoundedParts: AsRef<[PartId]>
"#)
)]
-pub struct ResourceInfo<BoundedResource, BoundedString: Default, BoundedParts> {
+pub struct ResourceInfo<BoundedString: Default, BoundedParts> {
/// id is a 5-character string of reasonable uniqueness.
/// The combination of base ID and resource id should be unique across the entire RMRK
/// ecosystem which
- #[cfg_attr(feature = "std", serde(with = "serialize::vec"))]
- pub id: BoundedResource,
+ //#[cfg_attr(feature = "std", serde(with = "serialize::vec"))]
+ pub id: ResourceId,
/// Resource
pub resource: ResourceTypes<BoundedString, BoundedParts>,
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -152,6 +152,7 @@
Err(_) => return Ok(None),
};
+ // todo replace dispatch... calls with calls to rmrkcore and NFT collection. There's no point trying non-NFT collections
let nfts_count = dispatch_unique_runtime!(collection_id.total_supply())?;
Ok(Some(RmrkCollectionInfo {
@@ -171,6 +172,7 @@
let nft_id = TokenId(nft_by_id);
if !RmrkCore::nft_exists(collection_id, nft_id) { return Ok(None); }
+ // todo replace dispatch with collection
let owner = match dispatch_unique_runtime!(collection_id.token_owner(nft_id))? {
Some(owner) => match <Runtime as pallet_common::Config>::CrossTokenAddressMapping::address_to_token(&owner) {
Some((col, tok)) => RmrkAccountIdOrCollectionNftTuple::CollectionAndNftTuple(col.0, tok.0),
@@ -270,34 +272,51 @@
fn nft_resources(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
use frame_support::BoundedVec;
- use pallet_proxy_rmrk_core::{RmrkProperty, misc::{CollectionType, NftType, RmrkDecode}};
+ use pallet_proxy_rmrk_core::{RmrkProperty, misc::{CollectionType, NftType, ResourceType, RmrkDecode}};
+ use pallet_common::CommonCollectionOperations;
let collection_id = RmrkCore::unique_collection_id(collection_id)?;
- if !RmrkCore::collection_exists(collection_id) { return Ok(Vec::new()); } // todo make sure the collection type doesn't matter
+ if RmrkCore::ensure_collection_type(collection_id, CollectionType::Regular).is_err() { return Ok(Vec::new()); }
let nft_id = TokenId(nft_id);
- if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Resource).is_err() { return Ok(Vec::new()); }
+ if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }
- let resource_collection_id: CollectionId = RmrkCore::get_nft_property(collection_id, nft_id, RmrkProperty::ResourceCollection)
- .unwrap()
+ let res_collection_id: CollectionId = RmrkCore::get_nft_property(collection_id, nft_id, RmrkProperty::ResourceCollection)?
.decode_or_default();
- if RmrkCore::ensure_collection_type(collection_id, CollectionType::Resource).is_err() { return Ok(Vec::new()); }
+ let resource_collection = RmrkCore::get_typed_nft_collection(res_collection_id, CollectionType::Resource)?;
- let resources = pallet_nonfungible::TokenProperties::<Runtime>::iter_prefix((resource_collection_id,))
- .filter_map(|(resource_id, properties)| Some(RmrkResourceInfo {
- id: BoundedVec::default(), // todo ResourceId property
- pending: RmrkCore::get_nft_property(resource_collection_id, resource_id, RmrkProperty::PendingResourceAccept).unwrap().decode_or_default(),
- pending_removal: RmrkCore::get_nft_property(resource_collection_id, resource_id, RmrkProperty::PendingResourceRemoval).unwrap().decode_or_default(),
- resource: RmrkCore::get_nft_property(resource_collection_id, resource_id, RmrkProperty::ResourceType).unwrap().decode_or_default(),/* {
- RmrkResourceTypes::Basic(resource) => RmrkResourceTypes::Basic(),/*(RmrkBasicResource {
- src: RmrkCore::get_nft_property_inner(properties, RmrkProperty::Src).unwrap().decode_or_default(),
- metadata: RmrkCore::get_nft_property_inner(properties, RmrkProperty::Metadata).unwrap().decode_or_default(),
- license: RmrkCore::get_nft_property_inner(properties, RmrkProperty::License).unwrap().decode_or_default(),
- thumb: RmrkCore::get_nft_property_inner(properties, RmrkProperty::Thumb).unwrap().decode_or_default(),
- },*///BasicResource<BoundedString>)
- _ => todo!(), //RmrkResourceTypes::Composable(ComposableResource<BoundedString, BoundedParts>),
- //RmrkResourceTypes::Slot(SlotResource<BoundedString>),
- },*/
+ let resources = resource_collection
+ .collection_tokens()
+ .iter()
+ .filter_map(|(res_id)| Some(RmrkResourceInfo {
+ id: res_id.0,
+ pending: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::PendingResourceAccept).unwrap().decode_or_default(),
+ pending_removal: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::PendingResourceRemoval).unwrap().decode_or_default(),
+ resource: match RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::ResourceType).unwrap().decode_or_default() {
+ ResourceType::Basic => RmrkResourceTypes::Basic(RmrkBasicResource {
+ src: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Src).unwrap().decode_or_default(),
+ metadata: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Metadata).unwrap().decode_or_default(),
+ license: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::License).unwrap().decode_or_default(),
+ thumb: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Thumb).unwrap().decode_or_default(),
+ }),
+ ResourceType::Composable => RmrkResourceTypes::Composable(RmrkComposableResource {
+ parts: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Parts).unwrap().decode_or_default(),
+ base: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Base).unwrap().decode_or_default(),
+ src: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Src).unwrap().decode_or_default(),
+ metadata: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Metadata).unwrap().decode_or_default(),
+ license: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::License).unwrap().decode_or_default(),
+ thumb: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Thumb).unwrap().decode_or_default(),
+ }),
+ ResourceType::Slot => RmrkResourceTypes::Slot(RmrkSlotResource {
+ base: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Base).unwrap().decode_or_default(),
+ src: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Src).unwrap().decode_or_default(),
+ metadata: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Metadata).unwrap().decode_or_default(),
+ slot: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Slot).unwrap().decode_or_default(),
+ license: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::License).unwrap().decode_or_default(),
+ thumb: RmrkCore::get_nft_property(res_collection_id, *res_id, RmrkProperty::Thumb).unwrap().decode_or_default(),
+ }),
+ // todo refactor :|
+ },
}))
.collect();
@@ -308,10 +327,10 @@
use pallet_proxy_rmrk_core::{RmrkProperty, misc::{CollectionType, NftType, RmrkDecode}};
let collection_id = RmrkCore::unique_collection_id(collection_id)?;
- if !RmrkCore::collection_exists(collection_id) { return Ok(Vec::new()); } // todo ensure the collection type doesn't matter
+ if RmrkCore::ensure_collection_type(collection_id, CollectionType::Regular).is_err() { return Ok(Vec::new()); }
let nft_id = TokenId(nft_id);
- if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Resource).is_err() { return Ok(Vec::new()); }
+ if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }
/*let resource_collection_id: CollectionId = RmrkCore::get_nft_property(collection_id, nft_id, RmrkProperty::ResourceCollection)
.unwrap()
@@ -327,6 +346,7 @@
.sort_by_key(|(_, index)| *index)
.into_iter().map(|(resource_id, _)| resource_id)*/
let priorities = RmrkCore::get_nft_property(collection_id, nft_id, RmrkProperty::ResourcePriorities)?.decode_or_default();
+ // todo let it simply be default here after removing default from decode
Ok(priorities)
}
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -437,6 +437,33 @@
**/
[key: string]: AugmentedError<ApiType>;
};
+ rmrkCore: {
+ CollectionFullOrLocked: AugmentedError<ApiType>;
+ CollectionNotEmpty: AugmentedError<ApiType>;
+ CollectionUnknown: AugmentedError<ApiType>;
+ CorruptedCollectionType: AugmentedError<ApiType>;
+ NftTypeEncodeError: AugmentedError<ApiType>;
+ NoAvailableCollectionId: AugmentedError<ApiType>;
+ NoAvailableNftId: AugmentedError<ApiType>;
+ NoPermission: AugmentedError<ApiType>;
+ RmrkPropertyKeyIsTooLong: AugmentedError<ApiType>;
+ RmrkPropertyValueIsTooLong: AugmentedError<ApiType>;
+ /**
+ * Generic error
+ **/
+ [key: string]: AugmentedError<ApiType>;
+ };
+ rmrkEquip: {
+ BaseDoesntExist: AugmentedError<ApiType>;
+ NeedsDefaultThemeFirst: AugmentedError<ApiType>;
+ NoAvailableBaseId: AugmentedError<ApiType>;
+ NoAvailablePartId: AugmentedError<ApiType>;
+ PermissionError: AugmentedError<ApiType>;
+ /**
+ * Generic error
+ **/
+ [key: string]: AugmentedError<ApiType>;
+ };
structure: {
/**
* While searched for owner, encountered depth limit
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -396,6 +396,27 @@
**/
[key: string]: AugmentedEvent<ApiType>;
};
+ rmrkCore: {
+ CollectionCreated: AugmentedEvent<ApiType, [AccountId32, u32]>;
+ CollectionDestroyed: AugmentedEvent<ApiType, [AccountId32, u32]>;
+ CollectionLocked: AugmentedEvent<ApiType, [AccountId32, u32]>;
+ IssuerChanged: AugmentedEvent<ApiType, [AccountId32, AccountId32, u32]>;
+ NFTBurned: AugmentedEvent<ApiType, [AccountId32, u32]>;
+ NftMinted: AugmentedEvent<ApiType, [AccountId32, u32, u32]>;
+ PropertySet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>;
+ ResourceAdded: AugmentedEvent<ApiType, [u32, u32]>;
+ /**
+ * Generic event
+ **/
+ [key: string]: AugmentedEvent<ApiType>;
+ };
+ rmrkEquip: {
+ BaseCreated: AugmentedEvent<ApiType, [AccountId32, u32]>;
+ /**
+ * Generic event
+ **/
+ [key: string]: AugmentedEvent<ApiType>;
+ };
structure: {
/**
* Executed call on behalf of token
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -415,6 +415,22 @@
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
+ rmrkCore: {
+ collectionIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+ collectionIndexMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
+ /**
+ * Generic query
+ **/
+ [key: string]: QueryableStorageEntry<ApiType>;
+ };
+ rmrkEquip: {
+ baseHasDefaultTheme: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
+ inernalPartId: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
+ /**
+ * Generic query
+ **/
+ [key: string]: QueryableStorageEntry<ApiType>;
+ };
structure: {
/**
* Generic query
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -22,7 +22,7 @@
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
-import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
+import type { AccountId, AccountId32, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
import type { IExtrinsic, Observable } from '@polkadot/types/types';
@@ -397,6 +397,60 @@
**/
queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;
};
+ rmrk: {
+ /**
+ * Get tokens owned by an account in a collection
+ **/
+ accountTokens: AugmentedRpc<(accountId: AccountId32 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;
+ /**
+ * Get base info
+ **/
+ base: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRmrkBaseInfo>>>;
+ /**
+ * Get all Base's parts
+ **/
+ baseParts: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsRmrkPartType>>>;
+ /**
+ * Get collection by id
+ **/
+ collectionById: AugmentedRpc<(id: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRmrkCollectionInfo>>>;
+ /**
+ * Get collection properties
+ **/
+ collectionProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsRmrkPropertyInfo>>>;
+ /**
+ * Get the latest created collection id
+ **/
+ lastCollectionIdx: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<u32>>;
+ /**
+ * Get NFT by collection id and NFT id
+ **/
+ nftById: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRmrkNftInfo>>>;
+ /**
+ * Get NFT children
+ **/
+ nftChildren: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsRmrkNftChild>>>;
+ /**
+ * Get NFT properties
+ **/
+ nftProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsRmrkPropertyInfo>>>;
+ /**
+ * Get NFT resource priorities
+ **/
+ nftResourcePriorities: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<Bytes>>>;
+ /**
+ * Get NFT resources
+ **/
+ nftResources: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsRmrkResourceInfo>>>;
+ /**
+ * Get Base's theme names
+ **/
+ themeNames: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<Bytes>>>;
+ /**
+ * Get Theme's keys values
+ **/
+ themes: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, themeName: Text | string, keys: Option<Vec<Text>> | null | object | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRmrkTheme>>>;
+ };
rpc: {
/**
* Retrieves the list of RPC methods that are exposed by the node
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -4,8 +4,8 @@
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
-import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
+import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsRmrkBasicResource, UpDataStructsRmrkComposableResource, UpDataStructsRmrkPartType, UpDataStructsRmrkSlotResource, UpDataStructsRmrkTheme, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -346,6 +346,30 @@
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
+ rmrkCore: {
+ addBasicResource: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resource: UpDataStructsRmrkBasicResource | { src?: any; metadata?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, UpDataStructsRmrkBasicResource]>;
+ addComposableResource: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resourceId: Bytes | string | Uint8Array, resource: UpDataStructsRmrkComposableResource | { parts?: any; base?: any; src?: any; metadata?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, UpDataStructsRmrkComposableResource]>;
+ addSlotResource: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resource: UpDataStructsRmrkSlotResource | { base?: any; src?: any; metadata?: any; slot?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, UpDataStructsRmrkSlotResource]>;
+ burnNft: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
+ changeCollectionIssuer: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newIssuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
+ createCollection: AugmentedSubmittable<(metadata: Bytes | string | Uint8Array, max: Option<u32> | null | object | string | Uint8Array, symbol: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Option<u32>, Bytes]>;
+ destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+ lockCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+ mintNft: AugmentedSubmittable<(owner: AccountId32 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, recipient: Option<AccountId32> | null | object | string | Uint8Array, royaltyAmount: Option<Permill> | null | object | string | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, Option<AccountId32>, Option<Permill>, Bytes]>;
+ setProperty: AugmentedSubmittable<(rmrkCollectionId: Compact<u32> | AnyNumber | Uint8Array, maybeNftId: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes, Bytes]>;
+ /**
+ * Generic tx
+ **/
+ [key: string]: SubmittableExtrinsicFunction<ApiType>;
+ };
+ rmrkEquip: {
+ createBase: AugmentedSubmittable<(baseType: Bytes | string | Uint8Array, symbol: Bytes | string | Uint8Array, parts: Vec<UpDataStructsRmrkPartType> | (UpDataStructsRmrkPartType | { FixedPart: any } | { SlotPart: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes, Vec<UpDataStructsRmrkPartType>]>;
+ themeAdd: AugmentedSubmittable<(baseId: u32 | AnyNumber | Uint8Array, theme: UpDataStructsRmrkTheme | { name?: any; properties?: any; inherit?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsRmrkTheme]>;
+ /**
+ * Generic tx
+ **/
+ [key: string]: SubmittableExtrinsicFunction<ApiType>;
+ };
structure: {
/**
* Generic tx
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -788,6 +788,12 @@
PalletNonfungibleItemData: PalletNonfungibleItemData;
PalletRefungibleError: PalletRefungibleError;
PalletRefungibleItemData: PalletRefungibleItemData;
+ PalletRmrkCoreCall: PalletRmrkCoreCall;
+ PalletRmrkCoreError: PalletRmrkCoreError;
+ PalletRmrkCoreEvent: PalletRmrkCoreEvent;
+ PalletRmrkEquipCall: PalletRmrkEquipCall;
+ PalletRmrkEquipError: PalletRmrkEquipError;
+ PalletRmrkEquipEvent: PalletRmrkEquipEvent;
PalletsOrigin: PalletsOrigin;
PalletStorageMetadataLatest: PalletStorageMetadataLatest;
PalletStorageMetadataV14: PalletStorageMetadataV14;
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -1129,6 +1129,169 @@
readonly constData: Bytes;
}
+/** @name PalletRmrkCoreCall */
+export interface PalletRmrkCoreCall extends Enum {
+ readonly isCreateCollection: boolean;
+ readonly asCreateCollection: {
+ readonly metadata: Bytes;
+ readonly max: Option<u32>;
+ readonly symbol: Bytes;
+ } & Struct;
+ readonly isDestroyCollection: boolean;
+ readonly asDestroyCollection: {
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isChangeCollectionIssuer: boolean;
+ readonly asChangeCollectionIssuer: {
+ readonly collectionId: u32;
+ readonly newIssuer: MultiAddress;
+ } & Struct;
+ readonly isLockCollection: boolean;
+ readonly asLockCollection: {
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isMintNft: boolean;
+ readonly asMintNft: {
+ readonly owner: AccountId32;
+ readonly collectionId: u32;
+ readonly recipient: Option<AccountId32>;
+ readonly royaltyAmount: Option<Permill>;
+ readonly metadata: Bytes;
+ } & Struct;
+ readonly isBurnNft: boolean;
+ readonly asBurnNft: {
+ readonly collectionId: u32;
+ readonly nftId: u32;
+ } & Struct;
+ readonly isSetProperty: boolean;
+ readonly asSetProperty: {
+ readonly rmrkCollectionId: Compact<u32>;
+ readonly maybeNftId: Option<u32>;
+ readonly key: Bytes;
+ readonly value: Bytes;
+ } & Struct;
+ readonly isAddBasicResource: boolean;
+ readonly asAddBasicResource: {
+ readonly collectionId: u32;
+ readonly nftId: u32;
+ readonly resource: UpDataStructsRmrkBasicResource;
+ } & Struct;
+ readonly isAddComposableResource: boolean;
+ readonly asAddComposableResource: {
+ readonly collectionId: u32;
+ readonly nftId: u32;
+ readonly resourceId: Bytes;
+ readonly resource: UpDataStructsRmrkComposableResource;
+ } & Struct;
+ readonly isAddSlotResource: boolean;
+ readonly asAddSlotResource: {
+ readonly collectionId: u32;
+ readonly nftId: u32;
+ readonly resource: UpDataStructsRmrkSlotResource;
+ } & Struct;
+ readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'SetProperty' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource';
+}
+
+/** @name PalletRmrkCoreError */
+export interface PalletRmrkCoreError extends Enum {
+ readonly isCorruptedCollectionType: boolean;
+ readonly isNftTypeEncodeError: boolean;
+ readonly isRmrkPropertyKeyIsTooLong: boolean;
+ readonly isRmrkPropertyValueIsTooLong: boolean;
+ readonly isCollectionNotEmpty: boolean;
+ readonly isNoAvailableCollectionId: boolean;
+ readonly isNoAvailableNftId: boolean;
+ readonly isCollectionUnknown: boolean;
+ readonly isNoPermission: boolean;
+ readonly isCollectionFullOrLocked: boolean;
+ readonly type: 'CorruptedCollectionType' | 'NftTypeEncodeError' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'CollectionFullOrLocked';
+}
+
+/** @name PalletRmrkCoreEvent */
+export interface PalletRmrkCoreEvent extends Enum {
+ readonly isCollectionCreated: boolean;
+ readonly asCollectionCreated: {
+ readonly issuer: AccountId32;
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isCollectionDestroyed: boolean;
+ readonly asCollectionDestroyed: {
+ readonly issuer: AccountId32;
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isIssuerChanged: boolean;
+ readonly asIssuerChanged: {
+ readonly oldIssuer: AccountId32;
+ readonly newIssuer: AccountId32;
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isCollectionLocked: boolean;
+ readonly asCollectionLocked: {
+ readonly issuer: AccountId32;
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isNftMinted: boolean;
+ readonly asNftMinted: {
+ readonly owner: AccountId32;
+ readonly collectionId: u32;
+ readonly nftId: u32;
+ } & Struct;
+ readonly isNftBurned: boolean;
+ readonly asNftBurned: {
+ readonly owner: AccountId32;
+ readonly nftId: u32;
+ } & Struct;
+ readonly isPropertySet: boolean;
+ readonly asPropertySet: {
+ readonly collectionId: u32;
+ readonly maybeNftId: Option<u32>;
+ readonly key: Bytes;
+ readonly value: Bytes;
+ } & Struct;
+ readonly isResourceAdded: boolean;
+ readonly asResourceAdded: {
+ readonly nftId: u32;
+ readonly resourceId: u32;
+ } & Struct;
+ readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'PropertySet' | 'ResourceAdded';
+}
+
+/** @name PalletRmrkEquipCall */
+export interface PalletRmrkEquipCall extends Enum {
+ readonly isCreateBase: boolean;
+ readonly asCreateBase: {
+ readonly baseType: Bytes;
+ readonly symbol: Bytes;
+ readonly parts: Vec<UpDataStructsRmrkPartType>;
+ } & Struct;
+ readonly isThemeAdd: boolean;
+ readonly asThemeAdd: {
+ readonly baseId: u32;
+ readonly theme: UpDataStructsRmrkTheme;
+ } & Struct;
+ readonly type: 'CreateBase' | 'ThemeAdd';
+}
+
+/** @name PalletRmrkEquipError */
+export interface PalletRmrkEquipError extends Enum {
+ readonly isPermissionError: boolean;
+ readonly isNoAvailableBaseId: boolean;
+ readonly isNoAvailablePartId: boolean;
+ readonly isBaseDoesntExist: boolean;
+ readonly isNeedsDefaultThemeFirst: boolean;
+ readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst';
+}
+
+/** @name PalletRmrkEquipEvent */
+export interface PalletRmrkEquipEvent extends Enum {
+ readonly isBaseCreated: boolean;
+ readonly asBaseCreated: {
+ readonly issuer: AccountId32;
+ readonly baseId: u32;
+ } & Struct;
+ readonly type: 'BaseCreated';
+}
+
/** @name PalletStructureCall */
export interface PalletStructureCall extends Null {}
@@ -2014,7 +2177,7 @@
/** @name UpDataStructsRmrkResourceInfo */
export interface UpDataStructsRmrkResourceInfo extends Struct {
- readonly id: Bytes;
+ readonly id: u32;
readonly resource: UpDataStructsRmrkResourceTypes;
readonly pending: bool;
readonly pendingRemoval: bool;
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1528,8 +1528,161 @@
**/
PalletStructureCall: 'Null',
/**
- * Lookup206: pallet_evm::pallet::Call<T>
+ * Lookup206: pallet_rmrk_core::pallet::Call<T>
+ **/
+ PalletRmrkCoreCall: {
+ _enum: {
+ create_collection: {
+ metadata: 'Bytes',
+ max: 'Option<u32>',
+ symbol: 'Bytes',
+ },
+ destroy_collection: {
+ collectionId: 'u32',
+ },
+ change_collection_issuer: {
+ collectionId: 'u32',
+ newIssuer: 'MultiAddress',
+ },
+ lock_collection: {
+ collectionId: 'u32',
+ },
+ mint_nft: {
+ owner: 'AccountId32',
+ collectionId: 'u32',
+ recipient: 'Option<AccountId32>',
+ royaltyAmount: 'Option<Permill>',
+ metadata: 'Bytes',
+ },
+ burn_nft: {
+ collectionId: 'u32',
+ nftId: 'u32',
+ },
+ set_property: {
+ rmrkCollectionId: 'Compact<u32>',
+ maybeNftId: 'Option<u32>',
+ key: 'Bytes',
+ value: 'Bytes',
+ },
+ add_basic_resource: {
+ collectionId: 'u32',
+ nftId: 'u32',
+ resource: 'UpDataStructsRmrkBasicResource',
+ },
+ add_composable_resource: {
+ collectionId: 'u32',
+ nftId: 'u32',
+ resourceId: 'Bytes',
+ resource: 'UpDataStructsRmrkComposableResource',
+ },
+ add_slot_resource: {
+ collectionId: 'u32',
+ nftId: 'u32',
+ resource: 'UpDataStructsRmrkSlotResource'
+ }
+ }
+ },
+ /**
+ * Lookup212: up_data_structs::rmrk::BasicResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkBasicResource: {
+ src: 'Option<Bytes>',
+ metadata: 'Option<Bytes>',
+ license: 'Option<Bytes>',
+ thumb: 'Option<Bytes>'
+ },
+ /**
+ * Lookup215: up_data_structs::rmrk::ComposableResource<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkComposableResource: {
+ parts: 'Vec<u32>',
+ base: 'u32',
+ src: 'Option<Bytes>',
+ metadata: 'Option<Bytes>',
+ license: 'Option<Bytes>',
+ thumb: 'Option<Bytes>'
+ },
+ /**
+ * Lookup217: up_data_structs::rmrk::SlotResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkSlotResource: {
+ base: 'u32',
+ src: 'Option<Bytes>',
+ metadata: 'Option<Bytes>',
+ slot: 'u32',
+ license: 'Option<Bytes>',
+ thumb: 'Option<Bytes>'
+ },
+ /**
+ * Lookup218: pallet_rmrk_equip::pallet::Call<T>
+ **/
+ PalletRmrkEquipCall: {
+ _enum: {
+ create_base: {
+ baseType: 'Bytes',
+ symbol: 'Bytes',
+ parts: 'Vec<UpDataStructsRmrkPartType>',
+ },
+ theme_add: {
+ baseId: 'u32',
+ theme: 'UpDataStructsRmrkTheme'
+ }
+ }
+ },
+ /**
+ * Lookup220: up_data_structs::rmrk::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
+ UpDataStructsRmrkPartType: {
+ _enum: {
+ FixedPart: 'UpDataStructsRmrkFixedPart',
+ SlotPart: 'UpDataStructsRmrkSlotPart'
+ }
+ },
+ /**
+ * Lookup222: up_data_structs::rmrk::FixedPart<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkFixedPart: {
+ id: 'u32',
+ z: 'u32',
+ src: 'Bytes'
+ },
+ /**
+ * Lookup223: up_data_structs::rmrk::SlotPart<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkSlotPart: {
+ id: 'u32',
+ equippable: 'UpDataStructsRmrkEquippableList',
+ src: 'Bytes',
+ z: 'u32'
+ },
+ /**
+ * Lookup224: up_data_structs::rmrk::EquippableList<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkEquippableList: {
+ _enum: {
+ All: 'Null',
+ Empty: 'Null',
+ Custom: 'Vec<u32>'
+ }
+ },
+ /**
+ * Lookup226: up_data_structs::rmrk::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, PropertyList>
+ **/
+ UpDataStructsRmrkTheme: {
+ name: 'Bytes',
+ properties: 'Vec<UpDataStructsRmrkThemeProperty>',
+ inherit: 'bool'
+ },
+ /**
+ * Lookup228: up_data_structs::rmrk::ThemeProperty<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ **/
+ UpDataStructsRmrkThemeProperty: {
+ key: 'Bytes',
+ value: 'Bytes'
+ },
+ /**
+ * Lookup229: pallet_evm::pallet::Call<T>
+ **/
PalletEvmCall: {
_enum: {
withdraw: {
@@ -1571,7 +1724,7 @@
}
},
/**
- * Lookup212: pallet_ethereum::pallet::Call<T>
+ * Lookup235: pallet_ethereum::pallet::Call<T>
**/
PalletEthereumCall: {
_enum: {
@@ -1581,7 +1734,7 @@
}
},
/**
- * Lookup213: ethereum::transaction::TransactionV2
+ * Lookup236: ethereum::transaction::TransactionV2
**/
EthereumTransactionTransactionV2: {
_enum: {
@@ -1591,7 +1744,7 @@
}
},
/**
- * Lookup214: ethereum::transaction::LegacyTransaction
+ * Lookup237: ethereum::transaction::LegacyTransaction
**/
EthereumTransactionLegacyTransaction: {
nonce: 'U256',
@@ -1603,7 +1756,7 @@
signature: 'EthereumTransactionTransactionSignature'
},
/**
- * Lookup215: ethereum::transaction::TransactionAction
+ * Lookup238: ethereum::transaction::TransactionAction
**/
EthereumTransactionTransactionAction: {
_enum: {
@@ -1612,7 +1765,7 @@
}
},
/**
- * Lookup216: ethereum::transaction::TransactionSignature
+ * Lookup239: ethereum::transaction::TransactionSignature
**/
EthereumTransactionTransactionSignature: {
v: 'u64',
@@ -1620,7 +1773,7 @@
s: 'H256'
},
/**
- * Lookup218: ethereum::transaction::EIP2930Transaction
+ * Lookup241: ethereum::transaction::EIP2930Transaction
**/
EthereumTransactionEip2930Transaction: {
chainId: 'u64',
@@ -1636,14 +1789,14 @@
s: 'H256'
},
/**
- * Lookup220: ethereum::transaction::AccessListItem
+ * Lookup243: ethereum::transaction::AccessListItem
**/
EthereumTransactionAccessListItem: {
address: 'H160',
storageKeys: 'Vec<H256>'
},
/**
- * Lookup221: ethereum::transaction::EIP1559Transaction
+ * Lookup244: ethereum::transaction::EIP1559Transaction
**/
EthereumTransactionEip1559Transaction: {
chainId: 'u64',
@@ -1660,7 +1813,7 @@
s: 'H256'
},
/**
- * Lookup222: pallet_evm_migration::pallet::Call<T>
+ * Lookup245: pallet_evm_migration::pallet::Call<T>
**/
PalletEvmMigrationCall: {
_enum: {
@@ -1678,7 +1831,7 @@
}
},
/**
- * Lookup225: pallet_sudo::pallet::Event<T>
+ * Lookup248: pallet_sudo::pallet::Event<T>
**/
PalletSudoEvent: {
_enum: {
@@ -1694,7 +1847,7 @@
}
},
/**
- * Lookup227: sp_runtime::DispatchError
+ * Lookup250: sp_runtime::DispatchError
**/
SpRuntimeDispatchError: {
_enum: {
@@ -1711,38 +1864,38 @@
}
},
/**
- * Lookup228: sp_runtime::ModuleError
+ * Lookup251: sp_runtime::ModuleError
**/
SpRuntimeModuleError: {
index: 'u8',
error: '[u8;4]'
},
/**
- * Lookup229: sp_runtime::TokenError
+ * Lookup252: sp_runtime::TokenError
**/
SpRuntimeTokenError: {
_enum: ['NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported']
},
/**
- * Lookup230: sp_runtime::ArithmeticError
+ * Lookup253: sp_runtime::ArithmeticError
**/
SpRuntimeArithmeticError: {
_enum: ['Underflow', 'Overflow', 'DivisionByZero']
},
/**
- * Lookup231: sp_runtime::TransactionalError
+ * Lookup254: sp_runtime::TransactionalError
**/
SpRuntimeTransactionalError: {
_enum: ['LimitReached', 'NoLayer']
},
/**
- * Lookup232: pallet_sudo::pallet::Error<T>
+ * Lookup255: pallet_sudo::pallet::Error<T>
**/
PalletSudoError: {
_enum: ['RequireSudo']
},
/**
- * Lookup233: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>
+ * Lookup256: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>
**/
FrameSystemAccountInfo: {
nonce: 'u32',
@@ -1752,7 +1905,7 @@
data: 'PalletBalancesAccountData'
},
/**
- * Lookup234: frame_support::weights::PerDispatchClass<T>
+ * Lookup257: frame_support::weights::PerDispatchClass<T>
**/
FrameSupportWeightsPerDispatchClassU64: {
normal: 'u64',
@@ -1760,13 +1913,13 @@
mandatory: 'u64'
},
/**
- * Lookup235: sp_runtime::generic::digest::Digest
+ * Lookup258: sp_runtime::generic::digest::Digest
**/
SpRuntimeDigest: {
logs: 'Vec<SpRuntimeDigestDigestItem>'
},
/**
- * Lookup237: sp_runtime::generic::digest::DigestItem
+ * Lookup260: sp_runtime::generic::digest::DigestItem
**/
SpRuntimeDigestDigestItem: {
_enum: {
@@ -1782,7 +1935,7 @@
}
},
/**
- * Lookup239: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
+ * Lookup262: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
**/
FrameSystemEventRecord: {
phase: 'FrameSystemPhase',
@@ -1790,7 +1943,7 @@
topics: 'Vec<H256>'
},
/**
- * Lookup241: frame_system::pallet::Event<T>
+ * Lookup264: frame_system::pallet::Event<T>
**/
FrameSystemEvent: {
_enum: {
@@ -1818,7 +1971,7 @@
}
},
/**
- * Lookup242: frame_support::weights::DispatchInfo
+ * Lookup265: frame_support::weights::DispatchInfo
**/
FrameSupportWeightsDispatchInfo: {
weight: 'u64',
@@ -1826,19 +1979,19 @@
paysFee: 'FrameSupportWeightsPays'
},
/**
- * Lookup243: frame_support::weights::DispatchClass
+ * Lookup266: frame_support::weights::DispatchClass
**/
FrameSupportWeightsDispatchClass: {
_enum: ['Normal', 'Operational', 'Mandatory']
},
/**
- * Lookup244: frame_support::weights::Pays
+ * Lookup267: frame_support::weights::Pays
**/
FrameSupportWeightsPays: {
_enum: ['Yes', 'No']
},
/**
- * Lookup245: orml_vesting::module::Event<T>
+ * Lookup268: orml_vesting::module::Event<T>
**/
OrmlVestingModuleEvent: {
_enum: {
@@ -1857,7 +2010,7 @@
}
},
/**
- * Lookup246: cumulus_pallet_xcmp_queue::pallet::Event<T>
+ * Lookup269: cumulus_pallet_xcmp_queue::pallet::Event<T>
**/
CumulusPalletXcmpQueueEvent: {
_enum: {
@@ -1872,7 +2025,7 @@
}
},
/**
- * Lookup247: pallet_xcm::pallet::Event<T>
+ * Lookup270: pallet_xcm::pallet::Event<T>
**/
PalletXcmEvent: {
_enum: {
@@ -1895,7 +2048,7 @@
}
},
/**
- * Lookup248: xcm::v2::traits::Outcome
+ * Lookup271: xcm::v2::traits::Outcome
**/
XcmV2TraitsOutcome: {
_enum: {
@@ -1905,7 +2058,7 @@
}
},
/**
- * Lookup250: cumulus_pallet_xcm::pallet::Event<T>
+ * Lookup273: cumulus_pallet_xcm::pallet::Event<T>
**/
CumulusPalletXcmEvent: {
_enum: {
@@ -1915,7 +2068,7 @@
}
},
/**
- * Lookup251: cumulus_pallet_dmp_queue::pallet::Event<T>
+ * Lookup274: cumulus_pallet_dmp_queue::pallet::Event<T>
**/
CumulusPalletDmpQueueEvent: {
_enum: {
@@ -1928,7 +2081,7 @@
}
},
/**
- * Lookup252: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup275: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
PalletUniqueRawEvent: {
_enum: {
@@ -1945,7 +2098,7 @@
}
},
/**
- * Lookup253: pallet_common::pallet::Event<T>
+ * Lookup276: pallet_common::pallet::Event<T>
**/
PalletCommonEvent: {
_enum: {
@@ -1963,7 +2116,7 @@
}
},
/**
- * Lookup254: pallet_structure::pallet::Event<T>
+ * Lookup277: pallet_structure::pallet::Event<T>
**/
PalletStructureEvent: {
_enum: {
@@ -1971,8 +2124,62 @@
}
},
/**
- * Lookup255: pallet_evm::pallet::Event<T>
+ * Lookup278: pallet_rmrk_core::pallet::Event<T>
**/
+ PalletRmrkCoreEvent: {
+ _enum: {
+ CollectionCreated: {
+ issuer: 'AccountId32',
+ collectionId: 'u32',
+ },
+ CollectionDestroyed: {
+ issuer: 'AccountId32',
+ collectionId: 'u32',
+ },
+ IssuerChanged: {
+ oldIssuer: 'AccountId32',
+ newIssuer: 'AccountId32',
+ collectionId: 'u32',
+ },
+ CollectionLocked: {
+ issuer: 'AccountId32',
+ collectionId: 'u32',
+ },
+ NftMinted: {
+ owner: 'AccountId32',
+ collectionId: 'u32',
+ nftId: 'u32',
+ },
+ NFTBurned: {
+ owner: 'AccountId32',
+ nftId: 'u32',
+ },
+ PropertySet: {
+ collectionId: 'u32',
+ maybeNftId: 'Option<u32>',
+ key: 'Bytes',
+ value: 'Bytes',
+ },
+ ResourceAdded: {
+ nftId: 'u32',
+ resourceId: 'u32'
+ }
+ }
+ },
+ /**
+ * Lookup279: pallet_rmrk_equip::pallet::Event<T>
+ **/
+ PalletRmrkEquipEvent: {
+ _enum: {
+ BaseCreated: {
+ issuer: 'AccountId32',
+ baseId: 'u32'
+ }
+ }
+ },
+ /**
+ * Lookup280: pallet_evm::pallet::Event<T>
+ **/
PalletEvmEvent: {
_enum: {
Log: 'EthereumLog',
@@ -1985,7 +2192,7 @@
}
},
/**
- * Lookup256: ethereum::log::Log
+ * Lookup281: ethereum::log::Log
**/
EthereumLog: {
address: 'H160',
@@ -1993,7 +2200,7 @@
data: 'Bytes'
},
/**
- * Lookup257: pallet_ethereum::pallet::Event
+ * Lookup282: pallet_ethereum::pallet::Event
**/
PalletEthereumEvent: {
_enum: {
@@ -2001,7 +2208,7 @@
}
},
/**
- * Lookup258: evm_core::error::ExitReason
+ * Lookup283: evm_core::error::ExitReason
**/
EvmCoreErrorExitReason: {
_enum: {
@@ -2012,13 +2219,13 @@
}
},
/**
- * Lookup259: evm_core::error::ExitSucceed
+ * Lookup284: evm_core::error::ExitSucceed
**/
EvmCoreErrorExitSucceed: {
_enum: ['Stopped', 'Returned', 'Suicided']
},
/**
- * Lookup260: evm_core::error::ExitError
+ * Lookup285: evm_core::error::ExitError
**/
EvmCoreErrorExitError: {
_enum: {
@@ -2040,13 +2247,13 @@
}
},
/**
- * Lookup263: evm_core::error::ExitRevert
+ * Lookup288: evm_core::error::ExitRevert
**/
EvmCoreErrorExitRevert: {
_enum: ['Reverted']
},
/**
- * Lookup264: evm_core::error::ExitFatal
+ * Lookup289: evm_core::error::ExitFatal
**/
EvmCoreErrorExitFatal: {
_enum: {
@@ -2057,7 +2264,7 @@
}
},
/**
- * Lookup265: frame_system::Phase
+ * Lookup290: frame_system::Phase
**/
FrameSystemPhase: {
_enum: {
@@ -2067,14 +2274,14 @@
}
},
/**
- * Lookup267: frame_system::LastRuntimeUpgradeInfo
+ * Lookup292: frame_system::LastRuntimeUpgradeInfo
**/
FrameSystemLastRuntimeUpgradeInfo: {
specVersion: 'Compact<u32>',
specName: 'Text'
},
/**
- * Lookup268: frame_system::limits::BlockWeights
+ * Lookup293: frame_system::limits::BlockWeights
**/
FrameSystemLimitsBlockWeights: {
baseBlock: 'u64',
@@ -2082,7 +2289,7 @@
perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'
},
/**
- * Lookup269: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
+ * Lookup294: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
**/
FrameSupportWeightsPerDispatchClassWeightsPerClass: {
normal: 'FrameSystemLimitsWeightsPerClass',
@@ -2090,7 +2297,7 @@
mandatory: 'FrameSystemLimitsWeightsPerClass'
},
/**
- * Lookup270: frame_system::limits::WeightsPerClass
+ * Lookup295: frame_system::limits::WeightsPerClass
**/
FrameSystemLimitsWeightsPerClass: {
baseExtrinsic: 'u64',
@@ -2099,13 +2306,13 @@
reserved: 'Option<u64>'
},
/**
- * Lookup272: frame_system::limits::BlockLength
+ * Lookup297: frame_system::limits::BlockLength
**/
FrameSystemLimitsBlockLength: {
max: 'FrameSupportWeightsPerDispatchClassU32'
},
/**
- * Lookup273: frame_support::weights::PerDispatchClass<T>
+ * Lookup298: frame_support::weights::PerDispatchClass<T>
**/
FrameSupportWeightsPerDispatchClassU32: {
normal: 'u32',
@@ -2113,14 +2320,14 @@
mandatory: 'u32'
},
/**
- * Lookup274: frame_support::weights::RuntimeDbWeight
+ * Lookup299: frame_support::weights::RuntimeDbWeight
**/
FrameSupportWeightsRuntimeDbWeight: {
read: 'u64',
write: 'u64'
},
/**
- * Lookup275: sp_version::RuntimeVersion
+ * Lookup300: sp_version::RuntimeVersion
**/
SpVersionRuntimeVersion: {
specName: 'Text',
@@ -2133,19 +2340,19 @@
stateVersion: 'u8'
},
/**
- * Lookup279: frame_system::pallet::Error<T>
+ * Lookup304: frame_system::pallet::Error<T>
**/
FrameSystemError: {
_enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']
},
/**
- * Lookup281: orml_vesting::module::Error<T>
+ * Lookup306: orml_vesting::module::Error<T>
**/
OrmlVestingModuleError: {
_enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']
},
/**
- * Lookup283: cumulus_pallet_xcmp_queue::InboundChannelDetails
+ * Lookup308: cumulus_pallet_xcmp_queue::InboundChannelDetails
**/
CumulusPalletXcmpQueueInboundChannelDetails: {
sender: 'u32',
@@ -2153,19 +2360,19 @@
messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'
},
/**
- * Lookup284: cumulus_pallet_xcmp_queue::InboundState
+ * Lookup309: cumulus_pallet_xcmp_queue::InboundState
**/
CumulusPalletXcmpQueueInboundState: {
_enum: ['Ok', 'Suspended']
},
/**
- * Lookup287: polkadot_parachain::primitives::XcmpMessageFormat
+ * Lookup312: polkadot_parachain::primitives::XcmpMessageFormat
**/
PolkadotParachainPrimitivesXcmpMessageFormat: {
_enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
},
/**
- * Lookup290: cumulus_pallet_xcmp_queue::OutboundChannelDetails
+ * Lookup315: cumulus_pallet_xcmp_queue::OutboundChannelDetails
**/
CumulusPalletXcmpQueueOutboundChannelDetails: {
recipient: 'u32',
@@ -2175,13 +2382,13 @@
lastIndex: 'u16'
},
/**
- * Lookup291: cumulus_pallet_xcmp_queue::OutboundState
+ * Lookup316: cumulus_pallet_xcmp_queue::OutboundState
**/
CumulusPalletXcmpQueueOutboundState: {
_enum: ['Ok', 'Suspended']
},
/**
- * Lookup293: cumulus_pallet_xcmp_queue::QueueConfigData
+ * Lookup318: cumulus_pallet_xcmp_queue::QueueConfigData
**/
CumulusPalletXcmpQueueQueueConfigData: {
suspendThreshold: 'u32',
@@ -2192,29 +2399,29 @@
xcmpMaxIndividualWeight: 'u64'
},
/**
- * Lookup295: cumulus_pallet_xcmp_queue::pallet::Error<T>
+ * Lookup320: cumulus_pallet_xcmp_queue::pallet::Error<T>
**/
CumulusPalletXcmpQueueError: {
_enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']
},
/**
- * Lookup296: pallet_xcm::pallet::Error<T>
+ * Lookup321: pallet_xcm::pallet::Error<T>
**/
PalletXcmError: {
_enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']
},
/**
- * Lookup297: cumulus_pallet_xcm::pallet::Error<T>
+ * Lookup322: cumulus_pallet_xcm::pallet::Error<T>
**/
CumulusPalletXcmError: 'Null',
/**
- * Lookup298: cumulus_pallet_dmp_queue::ConfigData
+ * Lookup323: cumulus_pallet_dmp_queue::ConfigData
**/
CumulusPalletDmpQueueConfigData: {
maxIndividual: 'u64'
},
/**
- * Lookup299: cumulus_pallet_dmp_queue::PageIndexData
+ * Lookup324: cumulus_pallet_dmp_queue::PageIndexData
**/
CumulusPalletDmpQueuePageIndexData: {
beginUsed: 'u32',
@@ -2222,19 +2429,19 @@
overweightCount: 'u64'
},
/**
- * Lookup302: cumulus_pallet_dmp_queue::pallet::Error<T>
+ * Lookup327: cumulus_pallet_dmp_queue::pallet::Error<T>
**/
CumulusPalletDmpQueueError: {
_enum: ['Unknown', 'OverLimit']
},
/**
- * Lookup306: pallet_unique::Error<T>
+ * Lookup331: pallet_unique::Error<T>
**/
PalletUniqueError: {
_enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']
},
/**
- * Lookup307: up_data_structs::Collection<sp_core::crypto::AccountId32>
+ * Lookup332: up_data_structs::Collection<sp_core::crypto::AccountId32>
**/
UpDataStructsCollection: {
owner: 'AccountId32',
@@ -2247,7 +2454,7 @@
permissions: 'UpDataStructsCollectionPermissions'
},
/**
- * Lookup308: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
+ * Lookup333: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
**/
UpDataStructsSponsorshipState: {
_enum: {
@@ -2257,7 +2464,7 @@
}
},
/**
- * Lookup309: up_data_structs::Properties
+ * Lookup334: up_data_structs::Properties
**/
UpDataStructsProperties: {
map: 'UpDataStructsPropertiesMapBoundedVec',
@@ -2265,15 +2472,15 @@
spaceLimit: 'u32'
},
/**
- * Lookup310: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+ * Lookup335: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',
/**
- * Lookup315: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
+ * Lookup340: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
**/
UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',
/**
- * Lookup322: up_data_structs::CollectionStats
+ * Lookup347: up_data_structs::CollectionStats
**/
UpDataStructsCollectionStats: {
created: 'u32',
@@ -2353,7 +2560,7 @@
* Lookup336: up_data_structs::rmrk::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
UpDataStructsRmrkResourceInfo: {
- id: 'Bytes',
+ id: 'u32',
resource: 'UpDataStructsRmrkResourceTypes',
pending: 'bool',
pendingRemoval: 'bool'
tests/src/interfaces/registry.tsdiffbeforeafterboth--- a/tests/src/interfaces/registry.ts
+++ b/tests/src/interfaces/registry.ts
@@ -104,6 +104,12 @@
PalletNonfungibleItemData: PalletNonfungibleItemData;
PalletRefungibleError: PalletRefungibleError;
PalletRefungibleItemData: PalletRefungibleItemData;
+ PalletRmrkCoreCall: PalletRmrkCoreCall;
+ PalletRmrkCoreError: PalletRmrkCoreError;
+ PalletRmrkCoreEvent: PalletRmrkCoreEvent;
+ PalletRmrkEquipCall: PalletRmrkEquipCall;
+ PalletRmrkEquipError: PalletRmrkEquipError;
+ PalletRmrkEquipEvent: PalletRmrkEquipEvent;
PalletStructureCall: PalletStructureCall;
PalletStructureError: PalletStructureError;
PalletStructureEvent: PalletStructureEvent;
tests/src/interfaces/rmrk/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/rmrk/definitions.ts
+++ b/tests/src/interfaces/rmrk/definitions.ts
@@ -58,7 +58,10 @@
),
collectionProperties: fn(
'Get collection properties',
- [{name: 'collectionId', type: 'u32'}],
+ [
+ {name: 'collectionId', type: 'u32'},
+ {name: 'filterKeys', type: 'Vec<String>', isOptional: true},
+ ],
'Vec<UpDataStructsRmrkPropertyInfo>',
),
nftProperties: fn(
@@ -66,6 +69,7 @@
[
{name: 'collectionId', type: 'u32'},
{name: 'nftId', type: 'u32'},
+ {name: 'filterKeys', type: 'Vec<String>', isOptional: true},
],
'Vec<UpDataStructsRmrkPropertyInfo>',
),
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth1649 /** @name PalletStructureCall (205) */1649 /** @name PalletStructureCall (205) */1650 export type PalletStructureCall = Null;1650 export type PalletStructureCall = Null;16511652 /** @name PalletRmrkCoreCall (206) */1653 export interface PalletRmrkCoreCall extends Enum {1654 readonly isCreateCollection: boolean;1655 readonly asCreateCollection: {1656 readonly metadata: Bytes;1657 readonly max: Option<u32>;1658 readonly symbol: Bytes;1659 } & Struct;1660 readonly isDestroyCollection: boolean;1661 readonly asDestroyCollection: {1662 readonly collectionId: u32;1663 } & Struct;1664 readonly isChangeCollectionIssuer: boolean;1665 readonly asChangeCollectionIssuer: {1666 readonly collectionId: u32;1667 readonly newIssuer: MultiAddress;1668 } & Struct;1669 readonly isLockCollection: boolean;1670 readonly asLockCollection: {1671 readonly collectionId: u32;1672 } & Struct;1673 readonly isMintNft: boolean;1674 readonly asMintNft: {1675 readonly owner: AccountId32;1676 readonly collectionId: u32;1677 readonly recipient: Option<AccountId32>;1678 readonly royaltyAmount: Option<Permill>;1679 readonly metadata: Bytes;1680 } & Struct;1681 readonly isBurnNft: boolean;1682 readonly asBurnNft: {1683 readonly collectionId: u32;1684 readonly nftId: u32;1685 } & Struct;1686 readonly isSetProperty: boolean;1687 readonly asSetProperty: {1688 readonly rmrkCollectionId: Compact<u32>;1689 readonly maybeNftId: Option<u32>;1690 readonly key: Bytes;1691 readonly value: Bytes;1692 } & Struct;1693 readonly isAddBasicResource: boolean;1694 readonly asAddBasicResource: {1695 readonly collectionId: u32;1696 readonly nftId: u32;1697 readonly resource: UpDataStructsRmrkBasicResource;1698 } & Struct;1699 readonly isAddComposableResource: boolean;1700 readonly asAddComposableResource: {1701 readonly collectionId: u32;1702 readonly nftId: u32;1703 readonly resourceId: Bytes;1704 readonly resource: UpDataStructsRmrkComposableResource;1705 } & Struct;1706 readonly isAddSlotResource: boolean;1707 readonly asAddSlotResource: {1708 readonly collectionId: u32;1709 readonly nftId: u32;1710 readonly resource: UpDataStructsRmrkSlotResource;1711 } & Struct;1712 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'SetProperty' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource';1713 }17141715 /** @name UpDataStructsRmrkBasicResource (212) */1716 export interface UpDataStructsRmrkBasicResource extends Struct {1717 readonly src: Option<Bytes>;1718 readonly metadata: Option<Bytes>;1719 readonly license: Option<Bytes>;1720 readonly thumb: Option<Bytes>;1721 }17221723 /** @name UpDataStructsRmrkComposableResource (215) */1724 export interface UpDataStructsRmrkComposableResource extends Struct {1725 readonly parts: Vec<u32>;1726 readonly base: u32;1727 readonly src: Option<Bytes>;1728 readonly metadata: Option<Bytes>;1729 readonly license: Option<Bytes>;1730 readonly thumb: Option<Bytes>;1731 }17321733 /** @name UpDataStructsRmrkSlotResource (217) */1734 export interface UpDataStructsRmrkSlotResource extends Struct {1735 readonly base: u32;1736 readonly src: Option<Bytes>;1737 readonly metadata: Option<Bytes>;1738 readonly slot: u32;1739 readonly license: Option<Bytes>;1740 readonly thumb: Option<Bytes>;1741 }17421743 /** @name PalletRmrkEquipCall (218) */1744 export interface PalletRmrkEquipCall extends Enum {1745 readonly isCreateBase: boolean;1746 readonly asCreateBase: {1747 readonly baseType: Bytes;1748 readonly symbol: Bytes;1749 readonly parts: Vec<UpDataStructsRmrkPartType>;1750 } & Struct;1751 readonly isThemeAdd: boolean;1752 readonly asThemeAdd: {1753 readonly baseId: u32;1754 readonly theme: UpDataStructsRmrkTheme;1755 } & Struct;1756 readonly type: 'CreateBase' | 'ThemeAdd';1757 }17581759 /** @name UpDataStructsRmrkPartType (220) */1760 export interface UpDataStructsRmrkPartType extends Enum {1761 readonly isFixedPart: boolean;1762 readonly asFixedPart: UpDataStructsRmrkFixedPart;1763 readonly isSlotPart: boolean;1764 readonly asSlotPart: UpDataStructsRmrkSlotPart;1765 readonly type: 'FixedPart' | 'SlotPart';1766 }17671768 /** @name UpDataStructsRmrkFixedPart (222) */1769 export interface UpDataStructsRmrkFixedPart extends Struct {1770 readonly id: u32;1771 readonly z: u32;1772 readonly src: Bytes;1773 }17741775 /** @name UpDataStructsRmrkSlotPart (223) */1776 export interface UpDataStructsRmrkSlotPart extends Struct {1777 readonly id: u32;1778 readonly equippable: UpDataStructsRmrkEquippableList;1779 readonly src: Bytes;1780 readonly z: u32;1781 }17821783 /** @name UpDataStructsRmrkEquippableList (224) */1784 export interface UpDataStructsRmrkEquippableList extends Enum {1785 readonly isAll: boolean;1786 readonly isEmpty: boolean;1787 readonly isCustom: boolean;1788 readonly asCustom: Vec<u32>;1789 readonly type: 'All' | 'Empty' | 'Custom';1790 }17911792 /** @name UpDataStructsRmrkTheme (226) */1793 export interface UpDataStructsRmrkTheme extends Struct {1794 readonly name: Bytes;1795 readonly properties: Vec<UpDataStructsRmrkThemeProperty>;1796 readonly inherit: bool;1797 }17981799 /** @name UpDataStructsRmrkThemeProperty (228) */1800 export interface UpDataStructsRmrkThemeProperty extends Struct {1801 readonly key: Bytes;1802 readonly value: Bytes;1803 }165118041652 /** @name PalletEvmCall (206) */1805 /** @name PalletEvmCall (229) */1653 export interface PalletEvmCall extends Enum {1806 export interface PalletEvmCall extends Enum {1654 readonly isWithdraw: boolean;1807 readonly isWithdraw: boolean;1655 readonly asWithdraw: {1808 readonly asWithdraw: {1694 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';1847 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';1695 }1848 }169618491697 /** @name PalletEthereumCall (212) */1850 /** @name PalletEthereumCall (235) */1698 export interface PalletEthereumCall extends Enum {1851 export interface PalletEthereumCall extends Enum {1699 readonly isTransact: boolean;1852 readonly isTransact: boolean;1700 readonly asTransact: {1853 readonly asTransact: {1703 readonly type: 'Transact';1856 readonly type: 'Transact';1704 }1857 }170518581706 /** @name EthereumTransactionTransactionV2 (213) */1859 /** @name EthereumTransactionTransactionV2 (236) */1707 export interface EthereumTransactionTransactionV2 extends Enum {1860 export interface EthereumTransactionTransactionV2 extends Enum {1708 readonly isLegacy: boolean;1861 readonly isLegacy: boolean;1709 readonly asLegacy: EthereumTransactionLegacyTransaction;1862 readonly asLegacy: EthereumTransactionLegacyTransaction;1714 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';1867 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';1715 }1868 }171618691717 /** @name EthereumTransactionLegacyTransaction (214) */1870 /** @name EthereumTransactionLegacyTransaction (237) */1718 export interface EthereumTransactionLegacyTransaction extends Struct {1871 export interface EthereumTransactionLegacyTransaction extends Struct {1719 readonly nonce: U256;1872 readonly nonce: U256;1720 readonly gasPrice: U256;1873 readonly gasPrice: U256;1725 readonly signature: EthereumTransactionTransactionSignature;1878 readonly signature: EthereumTransactionTransactionSignature;1726 }1879 }172718801728 /** @name EthereumTransactionTransactionAction (215) */1881 /** @name EthereumTransactionTransactionAction (238) */1729 export interface EthereumTransactionTransactionAction extends Enum {1882 export interface EthereumTransactionTransactionAction extends Enum {1730 readonly isCall: boolean;1883 readonly isCall: boolean;1731 readonly asCall: H160;1884 readonly asCall: H160;1732 readonly isCreate: boolean;1885 readonly isCreate: boolean;1733 readonly type: 'Call' | 'Create';1886 readonly type: 'Call' | 'Create';1734 }1887 }173518881736 /** @name EthereumTransactionTransactionSignature (216) */1889 /** @name EthereumTransactionTransactionSignature (239) */1737 export interface EthereumTransactionTransactionSignature extends Struct {1890 export interface EthereumTransactionTransactionSignature extends Struct {1738 readonly v: u64;1891 readonly v: u64;1739 readonly r: H256;1892 readonly r: H256;1740 readonly s: H256;1893 readonly s: H256;1741 }1894 }174218951743 /** @name EthereumTransactionEip2930Transaction (218) */1896 /** @name EthereumTransactionEip2930Transaction (241) */1744 export interface EthereumTransactionEip2930Transaction extends Struct {1897 export interface EthereumTransactionEip2930Transaction extends Struct {1745 readonly chainId: u64;1898 readonly chainId: u64;1746 readonly nonce: U256;1899 readonly nonce: U256;1755 readonly s: H256;1908 readonly s: H256;1756 }1909 }175719101758 /** @name EthereumTransactionAccessListItem (220) */1911 /** @name EthereumTransactionAccessListItem (243) */1759 export interface EthereumTransactionAccessListItem extends Struct {1912 export interface EthereumTransactionAccessListItem extends Struct {1760 readonly address: H160;1913 readonly address: H160;1761 readonly storageKeys: Vec<H256>;1914 readonly storageKeys: Vec<H256>;1762 }1915 }176319161764 /** @name EthereumTransactionEip1559Transaction (221) */1917 /** @name EthereumTransactionEip1559Transaction (244) */1765 export interface EthereumTransactionEip1559Transaction extends Struct {1918 export interface EthereumTransactionEip1559Transaction extends Struct {1766 readonly chainId: u64;1919 readonly chainId: u64;1767 readonly nonce: U256;1920 readonly nonce: U256;1777 readonly s: H256;1930 readonly s: H256;1778 }1931 }177919321780 /** @name PalletEvmMigrationCall (222) */1933 /** @name PalletEvmMigrationCall (245) */1781 export interface PalletEvmMigrationCall extends Enum {1934 export interface PalletEvmMigrationCall extends Enum {1782 readonly isBegin: boolean;1935 readonly isBegin: boolean;1783 readonly asBegin: {1936 readonly asBegin: {1796 readonly type: 'Begin' | 'SetData' | 'Finish';1949 readonly type: 'Begin' | 'SetData' | 'Finish';1797 }1950 }179819511799 /** @name PalletSudoEvent (225) */1952 /** @name PalletSudoEvent (248) */1800 export interface PalletSudoEvent extends Enum {1953 export interface PalletSudoEvent extends Enum {1801 readonly isSudid: boolean;1954 readonly isSudid: boolean;1802 readonly asSudid: {1955 readonly asSudid: {1813 readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';1966 readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';1814 }1967 }181519681816 /** @name SpRuntimeDispatchError (227) */1969 /** @name SpRuntimeDispatchError (250) */1817 export interface SpRuntimeDispatchError extends Enum {1970 export interface SpRuntimeDispatchError extends Enum {1818 readonly isOther: boolean;1971 readonly isOther: boolean;1819 readonly isCannotLookup: boolean;1972 readonly isCannotLookup: boolean;1832 readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';1985 readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';1833 }1986 }183419871835 /** @name SpRuntimeModuleError (228) */1988 /** @name SpRuntimeModuleError (251) */1836 export interface SpRuntimeModuleError extends Struct {1989 export interface SpRuntimeModuleError extends Struct {1837 readonly index: u8;1990 readonly index: u8;1838 readonly error: U8aFixed;1991 readonly error: U8aFixed;1839 }1992 }184019931841 /** @name SpRuntimeTokenError (229) */1994 /** @name SpRuntimeTokenError (252) */1842 export interface SpRuntimeTokenError extends Enum {1995 export interface SpRuntimeTokenError extends Enum {1843 readonly isNoFunds: boolean;1996 readonly isNoFunds: boolean;1844 readonly isWouldDie: boolean;1997 readonly isWouldDie: boolean;1850 readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';2003 readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';1851 }2004 }185220051853 /** @name SpRuntimeArithmeticError (230) */2006 /** @name SpRuntimeArithmeticError (253) */1854 export interface SpRuntimeArithmeticError extends Enum {2007 export interface SpRuntimeArithmeticError extends Enum {1855 readonly isUnderflow: boolean;2008 readonly isUnderflow: boolean;1856 readonly isOverflow: boolean;2009 readonly isOverflow: boolean;1857 readonly isDivisionByZero: boolean;2010 readonly isDivisionByZero: boolean;1858 readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';2011 readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';1859 }2012 }186020131861 /** @name SpRuntimeTransactionalError (231) */2014 /** @name SpRuntimeTransactionalError (254) */1862 export interface SpRuntimeTransactionalError extends Enum {2015 export interface SpRuntimeTransactionalError extends Enum {1863 readonly isLimitReached: boolean;2016 readonly isLimitReached: boolean;1864 readonly isNoLayer: boolean;2017 readonly isNoLayer: boolean;1865 readonly type: 'LimitReached' | 'NoLayer';2018 readonly type: 'LimitReached' | 'NoLayer';1866 }2019 }186720201868 /** @name PalletSudoError (232) */2021 /** @name PalletSudoError (255) */1869 export interface PalletSudoError extends Enum {2022 export interface PalletSudoError extends Enum {1870 readonly isRequireSudo: boolean;2023 readonly isRequireSudo: boolean;1871 readonly type: 'RequireSudo';2024 readonly type: 'RequireSudo';1872 }2025 }187320261874 /** @name FrameSystemAccountInfo (233) */2027 /** @name FrameSystemAccountInfo (256) */1875 export interface FrameSystemAccountInfo extends Struct {2028 export interface FrameSystemAccountInfo extends Struct {1876 readonly nonce: u32;2029 readonly nonce: u32;1877 readonly consumers: u32;2030 readonly consumers: u32;1880 readonly data: PalletBalancesAccountData;2033 readonly data: PalletBalancesAccountData;1881 }2034 }188220351883 /** @name FrameSupportWeightsPerDispatchClassU64 (234) */2036 /** @name FrameSupportWeightsPerDispatchClassU64 (257) */1884 export interface FrameSupportWeightsPerDispatchClassU64 extends Struct {2037 export interface FrameSupportWeightsPerDispatchClassU64 extends Struct {1885 readonly normal: u64;2038 readonly normal: u64;1886 readonly operational: u64;2039 readonly operational: u64;1887 readonly mandatory: u64;2040 readonly mandatory: u64;1888 }2041 }188920421890 /** @name SpRuntimeDigest (235) */2043 /** @name SpRuntimeDigest (258) */1891 export interface SpRuntimeDigest extends Struct {2044 export interface SpRuntimeDigest extends Struct {1892 readonly logs: Vec<SpRuntimeDigestDigestItem>;2045 readonly logs: Vec<SpRuntimeDigestDigestItem>;1893 }2046 }189420471895 /** @name SpRuntimeDigestDigestItem (237) */2048 /** @name SpRuntimeDigestDigestItem (260) */1896 export interface SpRuntimeDigestDigestItem extends Enum {2049 export interface SpRuntimeDigestDigestItem extends Enum {1897 readonly isOther: boolean;2050 readonly isOther: boolean;1898 readonly asOther: Bytes;2051 readonly asOther: Bytes;1906 readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';2059 readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';1907 }2060 }190820611909 /** @name FrameSystemEventRecord (239) */2062 /** @name FrameSystemEventRecord (262) */1910 export interface FrameSystemEventRecord extends Struct {2063 export interface FrameSystemEventRecord extends Struct {1911 readonly phase: FrameSystemPhase;2064 readonly phase: FrameSystemPhase;1912 readonly event: Event;2065 readonly event: Event;1913 readonly topics: Vec<H256>;2066 readonly topics: Vec<H256>;1914 }2067 }191520681916 /** @name FrameSystemEvent (241) */2069 /** @name FrameSystemEvent (264) */1917 export interface FrameSystemEvent extends Enum {2070 export interface FrameSystemEvent extends Enum {1918 readonly isExtrinsicSuccess: boolean;2071 readonly isExtrinsicSuccess: boolean;1919 readonly asExtrinsicSuccess: {2072 readonly asExtrinsicSuccess: {1941 readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';2094 readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';1942 }2095 }194320961944 /** @name FrameSupportWeightsDispatchInfo (242) */2097 /** @name FrameSupportWeightsDispatchInfo (265) */1945 export interface FrameSupportWeightsDispatchInfo extends Struct {2098 export interface FrameSupportWeightsDispatchInfo extends Struct {1946 readonly weight: u64;2099 readonly weight: u64;1947 readonly class: FrameSupportWeightsDispatchClass;2100 readonly class: FrameSupportWeightsDispatchClass;1948 readonly paysFee: FrameSupportWeightsPays;2101 readonly paysFee: FrameSupportWeightsPays;1949 }2102 }195021031951 /** @name FrameSupportWeightsDispatchClass (243) */2104 /** @name FrameSupportWeightsDispatchClass (266) */1952 export interface FrameSupportWeightsDispatchClass extends Enum {2105 export interface FrameSupportWeightsDispatchClass extends Enum {1953 readonly isNormal: boolean;2106 readonly isNormal: boolean;1954 readonly isOperational: boolean;2107 readonly isOperational: boolean;1955 readonly isMandatory: boolean;2108 readonly isMandatory: boolean;1956 readonly type: 'Normal' | 'Operational' | 'Mandatory';2109 readonly type: 'Normal' | 'Operational' | 'Mandatory';1957 }2110 }195821111959 /** @name FrameSupportWeightsPays (244) */2112 /** @name FrameSupportWeightsPays (267) */1960 export interface FrameSupportWeightsPays extends Enum {2113 export interface FrameSupportWeightsPays extends Enum {1961 readonly isYes: boolean;2114 readonly isYes: boolean;1962 readonly isNo: boolean;2115 readonly isNo: boolean;1963 readonly type: 'Yes' | 'No';2116 readonly type: 'Yes' | 'No';1964 }2117 }196521181966 /** @name OrmlVestingModuleEvent (245) */2119 /** @name OrmlVestingModuleEvent (268) */1967 export interface OrmlVestingModuleEvent extends Enum {2120 export interface OrmlVestingModuleEvent extends Enum {1968 readonly isVestingScheduleAdded: boolean;2121 readonly isVestingScheduleAdded: boolean;1969 readonly asVestingScheduleAdded: {2122 readonly asVestingScheduleAdded: {1983 readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';2136 readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';1984 }2137 }198521381986 /** @name CumulusPalletXcmpQueueEvent (246) */2139 /** @name CumulusPalletXcmpQueueEvent (269) */1987 export interface CumulusPalletXcmpQueueEvent extends Enum {2140 export interface CumulusPalletXcmpQueueEvent extends Enum {1988 readonly isSuccess: boolean;2141 readonly isSuccess: boolean;1989 readonly asSuccess: Option<H256>;2142 readonly asSuccess: Option<H256>;2004 readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';2157 readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';2005 }2158 }200621592007 /** @name PalletXcmEvent (247) */2160 /** @name PalletXcmEvent (270) */2008 export interface PalletXcmEvent extends Enum {2161 export interface PalletXcmEvent extends Enum {2009 readonly isAttempted: boolean;2162 readonly isAttempted: boolean;2010 readonly asAttempted: XcmV2TraitsOutcome;2163 readonly asAttempted: XcmV2TraitsOutcome;2041 readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';2194 readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';2042 }2195 }204321962044 /** @name XcmV2TraitsOutcome (248) */2197 /** @name XcmV2TraitsOutcome (271) */2045 export interface XcmV2TraitsOutcome extends Enum {2198 export interface XcmV2TraitsOutcome extends Enum {2046 readonly isComplete: boolean;2199 readonly isComplete: boolean;2047 readonly asComplete: u64;2200 readonly asComplete: u64;2052 readonly type: 'Complete' | 'Incomplete' | 'Error';2205 readonly type: 'Complete' | 'Incomplete' | 'Error';2053 }2206 }205422072055 /** @name CumulusPalletXcmEvent (250) */2208 /** @name CumulusPalletXcmEvent (273) */2056 export interface CumulusPalletXcmEvent extends Enum {2209 export interface CumulusPalletXcmEvent extends Enum {2057 readonly isInvalidFormat: boolean;2210 readonly isInvalidFormat: boolean;2058 readonly asInvalidFormat: U8aFixed;2211 readonly asInvalidFormat: U8aFixed;2063 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';2216 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';2064 }2217 }206522182066 /** @name CumulusPalletDmpQueueEvent (251) */2219 /** @name CumulusPalletDmpQueueEvent (274) */2067 export interface CumulusPalletDmpQueueEvent extends Enum {2220 export interface CumulusPalletDmpQueueEvent extends Enum {2068 readonly isInvalidFormat: boolean;2221 readonly isInvalidFormat: boolean;2069 readonly asInvalidFormat: U8aFixed;2222 readonly asInvalidFormat: U8aFixed;2080 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';2233 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';2081 }2234 }208222352083 /** @name PalletUniqueRawEvent (252) */2236 /** @name PalletUniqueRawEvent (275) */2084 export interface PalletUniqueRawEvent extends Enum {2237 export interface PalletUniqueRawEvent extends Enum {2085 readonly isCollectionSponsorRemoved: boolean;2238 readonly isCollectionSponsorRemoved: boolean;2086 readonly asCollectionSponsorRemoved: u32;2239 readonly asCollectionSponsorRemoved: u32;2105 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';2258 readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';2106 }2259 }210722602108 /** @name PalletCommonEvent (253) */2261 /** @name PalletCommonEvent (276) */2109 export interface PalletCommonEvent extends Enum {2262 export interface PalletCommonEvent extends Enum {2110 readonly isCollectionCreated: boolean;2263 readonly isCollectionCreated: boolean;2111 readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;2264 readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;2132 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';2285 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';2133 }2286 }213422872135 /** @name PalletStructureEvent (254) */2288 /** @name PalletStructureEvent (277) */2136 export interface PalletStructureEvent extends Enum {2289 export interface PalletStructureEvent extends Enum {2137 readonly isExecuted: boolean;2290 readonly isExecuted: boolean;2138 readonly asExecuted: Result<Null, SpRuntimeDispatchError>;2291 readonly asExecuted: Result<Null, SpRuntimeDispatchError>;2139 readonly type: 'Executed';2292 readonly type: 'Executed';2140 }2293 }22942295 /** @name PalletRmrkCoreEvent (278) */2296 export interface PalletRmrkCoreEvent extends Enum {2297 readonly isCollectionCreated: boolean;2298 readonly asCollectionCreated: {2299 readonly issuer: AccountId32;2300 readonly collectionId: u32;2301 } & Struct;2302 readonly isCollectionDestroyed: boolean;2303 readonly asCollectionDestroyed: {2304 readonly issuer: AccountId32;2305 readonly collectionId: u32;2306 } & Struct;2307 readonly isIssuerChanged: boolean;2308 readonly asIssuerChanged: {2309 readonly oldIssuer: AccountId32;2310 readonly newIssuer: AccountId32;2311 readonly collectionId: u32;2312 } & Struct;2313 readonly isCollectionLocked: boolean;2314 readonly asCollectionLocked: {2315 readonly issuer: AccountId32;2316 readonly collectionId: u32;2317 } & Struct;2318 readonly isNftMinted: boolean;2319 readonly asNftMinted: {2320 readonly owner: AccountId32;2321 readonly collectionId: u32;2322 readonly nftId: u32;2323 } & Struct;2324 readonly isNftBurned: boolean;2325 readonly asNftBurned: {2326 readonly owner: AccountId32;2327 readonly nftId: u32;2328 } & Struct;2329 readonly isPropertySet: boolean;2330 readonly asPropertySet: {2331 readonly collectionId: u32;2332 readonly maybeNftId: Option<u32>;2333 readonly key: Bytes;2334 readonly value: Bytes;2335 } & Struct;2336 readonly isResourceAdded: boolean;2337 readonly asResourceAdded: {2338 readonly nftId: u32;2339 readonly resourceId: u32;2340 } & Struct;2341 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'PropertySet' | 'ResourceAdded';2342 }23432344 /** @name PalletRmrkEquipEvent (279) */2345 export interface PalletRmrkEquipEvent extends Enum {2346 readonly isBaseCreated: boolean;2347 readonly asBaseCreated: {2348 readonly issuer: AccountId32;2349 readonly baseId: u32;2350 } & Struct;2351 readonly type: 'BaseCreated';2352 }214123532142 /** @name PalletEvmEvent (255) */2354 /** @name PalletEvmEvent (280) */2143 export interface PalletEvmEvent extends Enum {2355 export interface PalletEvmEvent extends Enum {2144 readonly isLog: boolean;2356 readonly isLog: boolean;2145 readonly asLog: EthereumLog;2357 readonly asLog: EthereumLog;2158 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';2370 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';2159 }2371 }216023722161 /** @name EthereumLog (256) */2373 /** @name EthereumLog (281) */2162 export interface EthereumLog extends Struct {2374 export interface EthereumLog extends Struct {2163 readonly address: H160;2375 readonly address: H160;2164 readonly topics: Vec<H256>;2376 readonly topics: Vec<H256>;2165 readonly data: Bytes;2377 readonly data: Bytes;2166 }2378 }216723792168 /** @name PalletEthereumEvent (257) */2380 /** @name PalletEthereumEvent (282) */2169 export interface PalletEthereumEvent extends Enum {2381 export interface PalletEthereumEvent extends Enum {2170 readonly isExecuted: boolean;2382 readonly isExecuted: boolean;2171 readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;2383 readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;2172 readonly type: 'Executed';2384 readonly type: 'Executed';2173 }2385 }217423862175 /** @name EvmCoreErrorExitReason (258) */2387 /** @name EvmCoreErrorExitReason (283) */2176 export interface EvmCoreErrorExitReason extends Enum {2388 export interface EvmCoreErrorExitReason extends Enum {2177 readonly isSucceed: boolean;2389 readonly isSucceed: boolean;2178 readonly asSucceed: EvmCoreErrorExitSucceed;2390 readonly asSucceed: EvmCoreErrorExitSucceed;2185 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';2397 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';2186 }2398 }218723992188 /** @name EvmCoreErrorExitSucceed (259) */2400 /** @name EvmCoreErrorExitSucceed (284) */2189 export interface EvmCoreErrorExitSucceed extends Enum {2401 export interface EvmCoreErrorExitSucceed extends Enum {2190 readonly isStopped: boolean;2402 readonly isStopped: boolean;2191 readonly isReturned: boolean;2403 readonly isReturned: boolean;2192 readonly isSuicided: boolean;2404 readonly isSuicided: boolean;2193 readonly type: 'Stopped' | 'Returned' | 'Suicided';2405 readonly type: 'Stopped' | 'Returned' | 'Suicided';2194 }2406 }219524072196 /** @name EvmCoreErrorExitError (260) */2408 /** @name EvmCoreErrorExitError (285) */2197 export interface EvmCoreErrorExitError extends Enum {2409 export interface EvmCoreErrorExitError extends Enum {2198 readonly isStackUnderflow: boolean;2410 readonly isStackUnderflow: boolean;2199 readonly isStackOverflow: boolean;2411 readonly isStackOverflow: boolean;2214 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';2426 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';2215 }2427 }221624282217 /** @name EvmCoreErrorExitRevert (263) */2429 /** @name EvmCoreErrorExitRevert (288) */2218 export interface EvmCoreErrorExitRevert extends Enum {2430 export interface EvmCoreErrorExitRevert extends Enum {2219 readonly isReverted: boolean;2431 readonly isReverted: boolean;2220 readonly type: 'Reverted';2432 readonly type: 'Reverted';2221 }2433 }222224342223 /** @name EvmCoreErrorExitFatal (264) */2435 /** @name EvmCoreErrorExitFatal (289) */2224 export interface EvmCoreErrorExitFatal extends Enum {2436 export interface EvmCoreErrorExitFatal extends Enum {2225 readonly isNotSupported: boolean;2437 readonly isNotSupported: boolean;2226 readonly isUnhandledInterrupt: boolean;2438 readonly isUnhandledInterrupt: boolean;2231 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';2443 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';2232 }2444 }223324452234 /** @name FrameSystemPhase (265) */2446 /** @name FrameSystemPhase (290) */2235 export interface FrameSystemPhase extends Enum {2447 export interface FrameSystemPhase extends Enum {2236 readonly isApplyExtrinsic: boolean;2448 readonly isApplyExtrinsic: boolean;2237 readonly asApplyExtrinsic: u32;2449 readonly asApplyExtrinsic: u32;2240 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';2452 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';2241 }2453 }224224542243 /** @name FrameSystemLastRuntimeUpgradeInfo (267) */2455 /** @name FrameSystemLastRuntimeUpgradeInfo (292) */2244 export interface FrameSystemLastRuntimeUpgradeInfo extends Struct {2456 export interface FrameSystemLastRuntimeUpgradeInfo extends Struct {2245 readonly specVersion: Compact<u32>;2457 readonly specVersion: Compact<u32>;2246 readonly specName: Text;2458 readonly specName: Text;2247 }2459 }224824602249 /** @name FrameSystemLimitsBlockWeights (268) */2461 /** @name FrameSystemLimitsBlockWeights (293) */2250 export interface FrameSystemLimitsBlockWeights extends Struct {2462 export interface FrameSystemLimitsBlockWeights extends Struct {2251 readonly baseBlock: u64;2463 readonly baseBlock: u64;2252 readonly maxBlock: u64;2464 readonly maxBlock: u64;2253 readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;2465 readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;2254 }2466 }225524672256 /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (269) */2468 /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (294) */2257 export interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {2469 export interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {2258 readonly normal: FrameSystemLimitsWeightsPerClass;2470 readonly normal: FrameSystemLimitsWeightsPerClass;2259 readonly operational: FrameSystemLimitsWeightsPerClass;2471 readonly operational: FrameSystemLimitsWeightsPerClass;2260 readonly mandatory: FrameSystemLimitsWeightsPerClass;2472 readonly mandatory: FrameSystemLimitsWeightsPerClass;2261 }2473 }226224742263 /** @name FrameSystemLimitsWeightsPerClass (270) */2475 /** @name FrameSystemLimitsWeightsPerClass (295) */2264 export interface FrameSystemLimitsWeightsPerClass extends Struct {2476 export interface FrameSystemLimitsWeightsPerClass extends Struct {2265 readonly baseExtrinsic: u64;2477 readonly baseExtrinsic: u64;2266 readonly maxExtrinsic: Option<u64>;2478 readonly maxExtrinsic: Option<u64>;2267 readonly maxTotal: Option<u64>;2479 readonly maxTotal: Option<u64>;2268 readonly reserved: Option<u64>;2480 readonly reserved: Option<u64>;2269 }2481 }227024822271 /** @name FrameSystemLimitsBlockLength (272) */2483 /** @name FrameSystemLimitsBlockLength (297) */2272 export interface FrameSystemLimitsBlockLength extends Struct {2484 export interface FrameSystemLimitsBlockLength extends Struct {2273 readonly max: FrameSupportWeightsPerDispatchClassU32;2485 readonly max: FrameSupportWeightsPerDispatchClassU32;2274 }2486 }227524872276 /** @name FrameSupportWeightsPerDispatchClassU32 (273) */2488 /** @name FrameSupportWeightsPerDispatchClassU32 (298) */2277 export interface FrameSupportWeightsPerDispatchClassU32 extends Struct {2489 export interface FrameSupportWeightsPerDispatchClassU32 extends Struct {2278 readonly normal: u32;2490 readonly normal: u32;2279 readonly operational: u32;2491 readonly operational: u32;2280 readonly mandatory: u32;2492 readonly mandatory: u32;2281 }2493 }228224942283 /** @name FrameSupportWeightsRuntimeDbWeight (274) */2495 /** @name FrameSupportWeightsRuntimeDbWeight (299) */2284 export interface FrameSupportWeightsRuntimeDbWeight extends Struct {2496 export interface FrameSupportWeightsRuntimeDbWeight extends Struct {2285 readonly read: u64;2497 readonly read: u64;2286 readonly write: u64;2498 readonly write: u64;2287 }2499 }228825002289 /** @name SpVersionRuntimeVersion (275) */2501 /** @name SpVersionRuntimeVersion (300) */2290 export interface SpVersionRuntimeVersion extends Struct {2502 export interface SpVersionRuntimeVersion extends Struct {2291 readonly specName: Text;2503 readonly specName: Text;2292 readonly implName: Text;2504 readonly implName: Text;2298 readonly stateVersion: u8;2510 readonly stateVersion: u8;2299 }2511 }230025122301 /** @name FrameSystemError (279) */2513 /** @name FrameSystemError (304) */2302 export interface FrameSystemError extends Enum {2514 export interface FrameSystemError extends Enum {2303 readonly isInvalidSpecName: boolean;2515 readonly isInvalidSpecName: boolean;2304 readonly isSpecVersionNeedsToIncrease: boolean;2516 readonly isSpecVersionNeedsToIncrease: boolean;2309 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';2521 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';2310 }2522 }231125232312 /** @name OrmlVestingModuleError (281) */2524 /** @name OrmlVestingModuleError (306) */2313 export interface OrmlVestingModuleError extends Enum {2525 export interface OrmlVestingModuleError extends Enum {2314 readonly isZeroVestingPeriod: boolean;2526 readonly isZeroVestingPeriod: boolean;2315 readonly isZeroVestingPeriodCount: boolean;2527 readonly isZeroVestingPeriodCount: boolean;2320 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';2532 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';2321 }2533 }232225342323 /** @name CumulusPalletXcmpQueueInboundChannelDetails (283) */2535 /** @name CumulusPalletXcmpQueueInboundChannelDetails (308) */2324 export interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {2536 export interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {2325 readonly sender: u32;2537 readonly sender: u32;2326 readonly state: CumulusPalletXcmpQueueInboundState;2538 readonly state: CumulusPalletXcmpQueueInboundState;2327 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;2539 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;2328 }2540 }232925412330 /** @name CumulusPalletXcmpQueueInboundState (284) */2542 /** @name CumulusPalletXcmpQueueInboundState (309) */2331 export interface CumulusPalletXcmpQueueInboundState extends Enum {2543 export interface CumulusPalletXcmpQueueInboundState extends Enum {2332 readonly isOk: boolean;2544 readonly isOk: boolean;2333 readonly isSuspended: boolean;2545 readonly isSuspended: boolean;2334 readonly type: 'Ok' | 'Suspended';2546 readonly type: 'Ok' | 'Suspended';2335 }2547 }233625482337 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (287) */2549 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (312) */2338 export interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {2550 export interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {2339 readonly isConcatenatedVersionedXcm: boolean;2551 readonly isConcatenatedVersionedXcm: boolean;2340 readonly isConcatenatedEncodedBlob: boolean;2552 readonly isConcatenatedEncodedBlob: boolean;2341 readonly isSignals: boolean;2553 readonly isSignals: boolean;2342 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';2554 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';2343 }2555 }234425562345 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (290) */2557 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (315) */2346 export interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {2558 export interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {2347 readonly recipient: u32;2559 readonly recipient: u32;2348 readonly state: CumulusPalletXcmpQueueOutboundState;2560 readonly state: CumulusPalletXcmpQueueOutboundState;2351 readonly lastIndex: u16;2563 readonly lastIndex: u16;2352 }2564 }235325652354 /** @name CumulusPalletXcmpQueueOutboundState (291) */2566 /** @name CumulusPalletXcmpQueueOutboundState (316) */2355 export interface CumulusPalletXcmpQueueOutboundState extends Enum {2567 export interface CumulusPalletXcmpQueueOutboundState extends Enum {2356 readonly isOk: boolean;2568 readonly isOk: boolean;2357 readonly isSuspended: boolean;2569 readonly isSuspended: boolean;2358 readonly type: 'Ok' | 'Suspended';2570 readonly type: 'Ok' | 'Suspended';2359 }2571 }236025722361 /** @name CumulusPalletXcmpQueueQueueConfigData (293) */2573 /** @name CumulusPalletXcmpQueueQueueConfigData (318) */2362 export interface CumulusPalletXcmpQueueQueueConfigData extends Struct {2574 export interface CumulusPalletXcmpQueueQueueConfigData extends Struct {2363 readonly suspendThreshold: u32;2575 readonly suspendThreshold: u32;2364 readonly dropThreshold: u32;2576 readonly dropThreshold: u32;2368 readonly xcmpMaxIndividualWeight: u64;2580 readonly xcmpMaxIndividualWeight: u64;2369 }2581 }237025822371 /** @name CumulusPalletXcmpQueueError (295) */2583 /** @name CumulusPalletXcmpQueueError (320) */2372 export interface CumulusPalletXcmpQueueError extends Enum {2584 export interface CumulusPalletXcmpQueueError extends Enum {2373 readonly isFailedToSend: boolean;2585 readonly isFailedToSend: boolean;2374 readonly isBadXcmOrigin: boolean;2586 readonly isBadXcmOrigin: boolean;2378 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';2590 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';2379 }2591 }238025922381 /** @name PalletXcmError (296) */2593 /** @name PalletXcmError (321) */2382 export interface PalletXcmError extends Enum {2594 export interface PalletXcmError extends Enum {2383 readonly isUnreachable: boolean;2595 readonly isUnreachable: boolean;2384 readonly isSendFailure: boolean;2596 readonly isSendFailure: boolean;2396 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';2608 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';2397 }2609 }239826102399 /** @name CumulusPalletXcmError (297) */2611 /** @name CumulusPalletXcmError (322) */2400 export type CumulusPalletXcmError = Null;2612 export type CumulusPalletXcmError = Null;240126132402 /** @name CumulusPalletDmpQueueConfigData (298) */2614 /** @name CumulusPalletDmpQueueConfigData (323) */2403 export interface CumulusPalletDmpQueueConfigData extends Struct {2615 export interface CumulusPalletDmpQueueConfigData extends Struct {2404 readonly maxIndividual: u64;2616 readonly maxIndividual: u64;2405 }2617 }240626182407 /** @name CumulusPalletDmpQueuePageIndexData (299) */2619 /** @name CumulusPalletDmpQueuePageIndexData (324) */2408 export interface CumulusPalletDmpQueuePageIndexData extends Struct {2620 export interface CumulusPalletDmpQueuePageIndexData extends Struct {2409 readonly beginUsed: u32;2621 readonly beginUsed: u32;2410 readonly endUsed: u32;2622 readonly endUsed: u32;2411 readonly overweightCount: u64;2623 readonly overweightCount: u64;2412 }2624 }241326252414 /** @name CumulusPalletDmpQueueError (302) */2626 /** @name CumulusPalletDmpQueueError (327) */2415 export interface CumulusPalletDmpQueueError extends Enum {2627 export interface CumulusPalletDmpQueueError extends Enum {2416 readonly isUnknown: boolean;2628 readonly isUnknown: boolean;2417 readonly isOverLimit: boolean;2629 readonly isOverLimit: boolean;2418 readonly type: 'Unknown' | 'OverLimit';2630 readonly type: 'Unknown' | 'OverLimit';2419 }2631 }242026322421 /** @name PalletUniqueError (306) */2633 /** @name PalletUniqueError (331) */2422 export interface PalletUniqueError extends Enum {2634 export interface PalletUniqueError extends Enum {2423 readonly isCollectionDecimalPointLimitExceeded: boolean;2635 readonly isCollectionDecimalPointLimitExceeded: boolean;2424 readonly isConfirmUnsetSponsorFail: boolean;2636 readonly isConfirmUnsetSponsorFail: boolean;2425 readonly isEmptyArgument: boolean;2637 readonly isEmptyArgument: boolean;2426 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';2638 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';2427 }2639 }242826402429 /** @name UpDataStructsCollection (307) */2641 /** @name UpDataStructsCollection (332) */2430 export interface UpDataStructsCollection extends Struct {2642 export interface UpDataStructsCollection extends Struct {2431 readonly owner: AccountId32;2643 readonly owner: AccountId32;2432 readonly mode: UpDataStructsCollectionMode;2644 readonly mode: UpDataStructsCollectionMode;2438 readonly permissions: UpDataStructsCollectionPermissions;2650 readonly permissions: UpDataStructsCollectionPermissions;2439 }2651 }244026522441 /** @name UpDataStructsSponsorshipState (308) */2653 /** @name UpDataStructsSponsorshipState (333) */2442 export interface UpDataStructsSponsorshipState extends Enum {2654 export interface UpDataStructsSponsorshipState extends Enum {2443 readonly isDisabled: boolean;2655 readonly isDisabled: boolean;2444 readonly isUnconfirmed: boolean;2656 readonly isUnconfirmed: boolean;2448 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';2660 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';2449 }2661 }245026622451 /** @name UpDataStructsProperties (309) */2663 /** @name UpDataStructsProperties (334) */2452 export interface UpDataStructsProperties extends Struct {2664 export interface UpDataStructsProperties extends Struct {2453 readonly map: UpDataStructsPropertiesMapBoundedVec;2665 readonly map: UpDataStructsPropertiesMapBoundedVec;2454 readonly consumedSpace: u32;2666 readonly consumedSpace: u32;2455 readonly spaceLimit: u32;2667 readonly spaceLimit: u32;2456 }2668 }245726692458 /** @name UpDataStructsPropertiesMapBoundedVec (310) */2670 /** @name UpDataStructsPropertiesMapBoundedVec (335) */2459 export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}2671 export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}246026722461 /** @name UpDataStructsPropertiesMapPropertyPermission (315) */2673 /** @name UpDataStructsPropertiesMapPropertyPermission (340) */2462 export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}2674 export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}246326752464 /** @name UpDataStructsCollectionStats (322) */2676 /** @name UpDataStructsCollectionStats (347) */2465 export interface UpDataStructsCollectionStats extends Struct {2677 export interface UpDataStructsCollectionStats extends Struct {2466 readonly created: u32;2678 readonly created: u32;2467 readonly destroyed: u32;2679 readonly destroyed: u32;253227442533 /** @name UpDataStructsRmrkResourceInfo (336) */2745 /** @name UpDataStructsRmrkResourceInfo (336) */2534 export interface UpDataStructsRmrkResourceInfo extends Struct {2746 export interface UpDataStructsRmrkResourceInfo extends Struct {2535 readonly id: Bytes;2747 readonly id: u32;2536 readonly resource: UpDataStructsRmrkResourceTypes;2748 readonly resource: UpDataStructsRmrkResourceTypes;2537 readonly pending: bool;2749 readonly pending: bool;2538 readonly pendingRemoval: bool;2750 readonly pendingRemoval: bool;tests/src/interfaces/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/types.ts
+++ b/tests/src/interfaces/types.ts
@@ -2,4 +2,5 @@
/* eslint-disable */
export * from './unique/types';
+export * from './rmrk/types';
export * from './default/types';