difftreelog
feat eth all-in-one create_collection (#971)
in: master
* feat: setNesting api change * fix: change restricted collections to addresses instead of ids * feat: all in one create collection method * fix: code review requests * feat: use struct for create_collection flags * fix: update evm-coder dependency * fix: code review requests * fix: change pending_sponsor to optional cross address * feat: forbid user from using flags * refactor: deduplicate CollectionFlags struct * fix: eth CollectionMode should be NFT * style: fix clippy warning * fix: disable eth create_collection ---------
67 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2646,8 +2646,8 @@
[[package]]
name = "evm-coder"
-version = "0.3.1"
-source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.1#21e61c627f71337d6b8a03899fe8de14bfbf67aa"
+version = "0.3.6"
+source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.6#be59ae41a5d2ec9389bae22d54f81122b6ba55a4"
dependencies = [
"ethereum",
"evm-coder-procedural",
@@ -2658,8 +2658,8 @@
[[package]]
name = "evm-coder-procedural"
-version = "0.3.1"
-source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.1#21e61c627f71337d6b8a03899fe8de14bfbf67aa"
+version = "0.3.6"
+source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.6#be59ae41a5d2ec9389bae22d54f81122b6ba55a4"
dependencies = [
"Inflector",
"hex",
@@ -6489,6 +6489,7 @@
name = "pallet-common"
version = "0.1.14"
dependencies = [
+ "bondrewd",
"ethereum",
"evm-coder",
"frame-benchmarking",
@@ -7530,6 +7531,7 @@
"frame-benchmarking",
"frame-support",
"frame-system",
+ "log",
"pallet-balances-adapter",
"pallet-common",
"pallet-evm",
@@ -14097,6 +14099,7 @@
dependencies = [
"bondrewd",
"derivative",
+ "evm-coder",
"frame-support",
"pallet-evm",
"parity-scale-codec",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@
[workspace.dependencies]
# Unique
app-promotion-rpc = { path = "primitives/app_promotion_rpc", default-features = false }
-evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.1", default-features = false }
+evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.6", default-features = false, features = ['bondrewd'] }
pallet-app-promotion = { path = "pallets/app-promotion", default-features = false }
pallet-balances-adapter = { default-features = false, path = "pallets/balances-adapter" }
pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.43" }
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -10,6 +10,7 @@
scale-info = { workspace = true }
+bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
ethereum = { workspace = true }
evm-coder = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
pallets/common/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/common/src/benchmarking.rs
+++ b/pallets/common/src/benchmarking.rs
@@ -21,10 +21,9 @@
use pallet_evm::account::CrossAccountId;
use frame_benchmarking::{benchmarks, account};
use up_data_structs::{
- CollectionMode, CollectionFlags, CreateCollectionData, CollectionId, Property, PropertyKey,
- PropertyValue, CollectionPermissions, NestingPermissions, AccessMode,
- MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
- MAX_PROPERTIES_PER_ITEM,
+ CollectionMode, CreateCollectionData, CollectionId, Property, PropertyKey, PropertyValue,
+ CollectionPermissions, NestingPermissions, AccessMode, MAX_COLLECTION_NAME_LENGTH,
+ MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH, MAX_PROPERTIES_PER_ITEM,
};
use frame_support::{
traits::{Get, fungible::Balanced, Imbalance, tokens::Precision},
@@ -47,12 +46,7 @@
.unwrap()
}
pub fn create_var_data<const S: u32>(size: u32) -> BoundedVec<u8, ConstU32<S>> {
- assert!(
- size <= S,
- "size ({}) should be less within bound ({})",
- size,
- S
- );
+ assert!(size <= S, "size ({size}) should be less within bound ({S})",);
(0..size)
.map(|v| (v & 0xff) as u8)
.collect::<Vec<_>>()
@@ -81,7 +75,7 @@
mode: CollectionMode,
handler: impl FnOnce(
T::CrossAccountId,
- CreateCollectionData<T::AccountId>,
+ CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError>,
cast: impl FnOnce(CollectionHandle<T>) -> R,
) -> Result<R, DispatchError> {
@@ -124,9 +118,7 @@
create_collection_raw(
owner,
CollectionMode::NFT,
- |owner: T::CrossAccountId, data| {
- <Pallet<T>>::init_collection(owner.clone(), owner, data, CollectionFlags::default())
- },
+ |owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),
|h| h,
)
}
pallets/common/src/dispatch.rsdiffbeforeafterboth--- a/pallets/common/src/dispatch.rs
+++ b/pallets/common/src/dispatch.rs
@@ -9,7 +9,7 @@
traits::Get,
};
use sp_runtime::DispatchError;
-use up_data_structs::{CollectionId, CreateCollectionData, CollectionFlags};
+use up_data_structs::{CollectionId, CreateCollectionData};
use crate::{pallet::Config, CommonCollectionOperations};
@@ -76,8 +76,7 @@
fn create(
sender: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError>;
/// Delete the collection.
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -402,10 +402,44 @@
Ok(())
}
+ #[solidity(rename_selector = "setCollectionNesting")]
+ fn set_nesting(
+ &mut self,
+ caller: Caller,
+ collection_nesting_and_permissions: eth::CollectionNestingAndPermission,
+ ) -> Result<()> {
+ self.consume_store_reads_and_writes(1, 1)?;
+
+ let caller = T::CrossAccountId::from_eth(caller);
+
+ let mut permissions = self.collection.permissions.clone();
+ let mut nesting = permissions.nesting().clone();
+
+ let bv = if !collection_nesting_and_permissions.restricted.is_empty() {
+ let mut bv = OwnerRestrictedSet::new();
+ for address in collection_nesting_and_permissions.restricted.iter() {
+ bv.try_insert(crate::eth::map_eth_to_id(address).ok_or_else(|| {
+ Error::Revert("Can't convert address into collection id".into())
+ })?)
+ .map_err(|_| "too many collections")?;
+ }
+ Some(bv)
+ } else {
+ None
+ };
+
+ nesting.token_owner = collection_nesting_and_permissions.token_owner;
+ nesting.collection_admin = collection_nesting_and_permissions.collection_admin;
+ nesting.restricted = bv;
+ permissions.nesting = Some(nesting);
+
+ <Pallet<T>>::update_permissions(&caller, self, permissions).map_err(dispatch_to_evm::<T>)
+ }
+
/// Toggle accessibility of collection nesting.
///
/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- #[solidity(rename_selector = "setCollectionNesting")]
+ #[solidity(hide, rename_selector = "setCollectionNesting")]
fn set_nesting_bool(&mut self, caller: Caller, enable: bool) -> Result<()> {
self.consume_store_reads_and_writes(1, 1)?;
@@ -424,8 +458,8 @@
///
/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
/// @param collections Addresses of collections that will be available for nesting.
- #[solidity(rename_selector = "setCollectionNesting")]
- fn set_nesting(
+ #[solidity(hide, rename_selector = "setCollectionNesting")]
+ fn set_nesting_collection_ids(
&mut self,
caller: Caller,
enable: bool,
@@ -464,8 +498,28 @@
<Pallet<T>>::update_permissions(&caller, self, permissions).map_err(dispatch_to_evm::<T>)
}
+ #[solidity(rename_selector = "collectionNesting")]
+ fn collection_nesting(&self) -> Result<eth::CollectionNestingAndPermission> {
+ let nesting = self.collection.permissions.nesting();
+
+ Ok(eth::CollectionNestingAndPermission::new(
+ nesting.token_owner,
+ nesting.collection_admin,
+ nesting
+ .restricted
+ .clone()
+ .map(|b| {
+ b.0.into_inner()
+ .iter()
+ .map(|id| crate::eth::collection_id_to_address(id.0.into()))
+ .collect()
+ })
+ .unwrap_or_default(),
+ ))
+ }
+
/// Returns nesting for a collection
- #[solidity(rename_selector = "collectionNestingRestrictedCollectionIds")]
+ #[solidity(hide, rename_selector = "collectionNestingRestrictedCollectionIds")]
fn collection_nesting_restricted_ids(&self) -> Result<eth::CollectionNesting> {
let nesting = self.collection.permissions.nesting();
@@ -480,6 +534,7 @@
}
/// Returns permissions for a collection
+ #[solidity(hide)]
fn collection_nesting_permissions(&self) -> Result<Vec<eth::CollectionNestingPermission>> {
let nesting = self.collection.permissions.nesting();
Ok(vec![
pallets/common/src/eth.rsdiffbeforeafterboth--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -24,7 +24,8 @@
};
pub use pallet_evm::{Config, account::CrossAccountId};
use sp_core::{H160, U256};
-use up_data_structs::CollectionId;
+use up_data_structs::{CollectionId, CollectionFlags};
+use pallet_evm_coder_substrate::execution::Error;
// 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 1
// TODO: Unhardcode prefix
@@ -104,10 +105,26 @@
sub: Default::default(),
}
}
+
+ /// Converts [`CrossAddress`] to `Option<CrossAccountId>`.
+ pub fn into_option_sub_cross_account<T>(&self) -> Result<Option<T::CrossAccountId>, Error>
+ where
+ T: pallet_evm::Config,
+ T::AccountId: From<[u8; 32]>,
+ {
+ if self.eth == Default::default() && self.sub == Default::default() {
+ Ok(None)
+ } else if self.eth == Default::default() {
+ Ok(Some(convert_uint256_to_cross_account::<T>(self.sub)))
+ } else if self.sub == Default::default() {
+ Ok(Some(T::CrossAccountId::from_eth(self.eth)))
+ } else {
+ Err(format!("All fields of cross account is non zeroed {:?}", self).into())
+ }
+ }
+
/// Converts [`CrossAddress`] to `CrossAccountId`.
- pub fn into_sub_cross_account<T>(
- &self,
- ) -> pallet_evm_coder_substrate::execution::Result<T::CrossAccountId>
+ pub fn into_sub_cross_account<T>(&self) -> Result<T::CrossAccountId, Error>
where
T: pallet_evm::Config,
T::AccountId: From<[u8; 32]>,
@@ -124,6 +141,19 @@
}
}
+/// Type of tokens in collection
+#[derive(AbiCoder, Copy, Clone, Default, Debug, PartialEq)]
+#[repr(u8)]
+pub enum CollectionMode {
+ /// Nonfungible
+ #[default]
+ Nonfungible,
+ /// Fungible
+ Fungible,
+ /// Refungible
+ Refungible,
+}
+
/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue).
#[derive(Debug, Default, AbiCoder)]
pub struct Property {
@@ -144,7 +174,7 @@
}
impl TryFrom<up_data_structs::Property> for Property {
- type Error = pallet_evm_coder_substrate::execution::Error;
+ type Error = Error;
fn try_from(from: up_data_structs::Property) -> Result<Self, Self::Error> {
let key = evm_coder::types::String::from_utf8(from.key.into())
@@ -155,7 +185,7 @@
}
impl TryInto<up_data_structs::Property> for Property {
- type Error = pallet_evm_coder_substrate::execution::Error;
+ type Error = Error;
fn try_into(self) -> Result<up_data_structs::Property, Self::Error> {
let key = <Vec<u8>>::from(self.key)
@@ -220,17 +250,14 @@
pub fn has_value(&self) -> bool {
self.value.is_some()
}
-}
-impl TryInto<up_data_structs::CollectionLimits> for CollectionLimit {
- type Error = pallet_evm_coder_substrate::execution::Error;
-
- fn try_into(self) -> Result<up_data_structs::CollectionLimits, Self::Error> {
+ /// Set corresponding property in CollectionLimits struct
+ pub fn apply_limit(&self, limits: &mut up_data_structs::CollectionLimits) -> Result<(), Error> {
let value = self
.value
- .ok_or::<Self::Error>("can't convert `None` value to boolean".into())?;
+ .ok_or::<Error>("can't convert `None` value to boolean".into())?;
let value = Some(value.try_into().map_err(|error| {
- Self::Error::Revert(format!(
+ Error::Revert(format!(
"can't convert value to u32 \"{value}\" because: \"{error}\""
))
})?);
@@ -239,14 +266,13 @@
Some(value) => match value {
0 => Ok(Some(false)),
1 => Ok(Some(true)),
- _ => Err(Self::Error::Revert(format!(
+ _ => Err(Error::Revert(format!(
"can't convert value to boolean \"{value}\""
))),
},
None => Ok(None),
};
- let mut limits = up_data_structs::CollectionLimits::default();
match self.field {
CollectionLimitField::AccountTokenOwnership => {
limits.account_token_ownership_limit = value;
@@ -277,10 +303,99 @@
limits.transfers_enabled = convert_value_to_bool()?;
}
};
+ Ok(())
+ }
+}
+
+/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
+#[derive(Debug, Default, AbiCoder)]
+pub struct CollectionLimitValue {
+ field: CollectionLimitField,
+ value: U256,
+}
+
+impl CollectionLimitValue {
+ /// Create [`CollectionLimitValue`] from field and value.
+ pub fn new(field: CollectionLimitField, value: u32) -> Self {
+ Self {
+ field,
+ value: value.into(),
+ }
+ }
+
+ /// Set corresponding property in CollectionLimits struct
+ pub fn apply_limit(&self, limits: &mut up_data_structs::CollectionLimits) -> Result<(), Error> {
+ let value = self.value;
+ let value: u32 = value.try_into().map_err(|error| {
+ Error::Revert(format!(
+ "can't convert value to u32 \"{value}\" because: \"{error}\""
+ ))
+ })?;
+
+ let convert_value_to_bool = || match value {
+ 0 => Ok(Some(false)),
+ 1 => Ok(Some(true)),
+ _ => Err(Error::Revert(format!(
+ "can't convert value to boolean \"{value}\""
+ ))),
+ };
+
+ match self.field {
+ CollectionLimitField::AccountTokenOwnership => {
+ limits.account_token_ownership_limit = Some(value);
+ }
+ CollectionLimitField::SponsoredDataSize => {
+ limits.sponsored_data_size = Some(value);
+ }
+ CollectionLimitField::SponsoredDataRateLimit => {
+ limits.sponsored_data_rate_limit =
+ Some(up_data_structs::SponsoringRateLimit::Blocks(value));
+ }
+ CollectionLimitField::TokenLimit => {
+ limits.token_limit = Some(value);
+ }
+ CollectionLimitField::SponsorTransferTimeout => {
+ limits.sponsor_transfer_timeout = Some(value);
+ }
+ CollectionLimitField::SponsorApproveTimeout => {
+ limits.sponsor_approve_timeout = Some(value);
+ }
+ CollectionLimitField::OwnerCanTransfer => {
+ limits.owner_can_transfer = convert_value_to_bool()?;
+ }
+ CollectionLimitField::OwnerCanDestroy => {
+ limits.owner_can_destroy = convert_value_to_bool()?;
+ }
+ CollectionLimitField::TransferEnabled => {
+ limits.transfers_enabled = convert_value_to_bool()?;
+ }
+ };
+ Ok(())
+ }
+}
+
+impl TryInto<up_data_structs::CollectionLimits> for CollectionLimit {
+ type Error = Error;
+
+ fn try_into(self) -> Result<up_data_structs::CollectionLimits, Self::Error> {
+ let mut limits = up_data_structs::CollectionLimits::default();
+ self.apply_limit(&mut limits)?;
Ok(limits)
}
}
+impl FromIterator<CollectionLimitValue> for Result<up_data_structs::CollectionLimits, Error> {
+ fn from_iter<T: IntoIterator<Item = CollectionLimitValue>>(
+ iter: T,
+ ) -> Result<up_data_structs::CollectionLimits, Error> {
+ let mut limits = up_data_structs::CollectionLimits::default();
+ for value in iter.into_iter() {
+ value.apply_limit(&mut limits)?;
+ }
+ Ok(limits)
+ }
+}
+
/// Ethereum representation of `NestingPermissions` (see [`up_data_structs::NestingPermissions`]) fields as an enumeration.
#[derive(Default, Debug, Clone, Copy, AbiCoder)]
#[repr(u8)]
@@ -384,8 +499,7 @@
/// Convert vector of [`TokenPropertyPermission`] into vector of [`up_data_structs::PropertyKeyPermission`].
pub fn into_property_key_permissions(
permissions: Vec<TokenPropertyPermission>,
- ) -> pallet_evm_coder_substrate::execution::Result<Vec<up_data_structs::PropertyKeyPermission>>
- {
+ ) -> Result<Vec<up_data_structs::PropertyKeyPermission>, Error> {
let mut perms = Vec::new();
for TokenPropertyPermission { key, permissions } in permissions {
@@ -410,6 +524,57 @@
pub uri: String,
}
+/// Nested collections and permissions
+#[derive(Debug, Default, AbiCoder)]
+pub struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ pub token_owner: bool,
+ /// Admin of token collection can nest tokens under token.
+ pub collection_admin: bool,
+ /// If set - only tokens from specified collections can be nested.
+ pub restricted: Vec<Address>,
+}
+
+impl CollectionNestingAndPermission {
+ /// Create [`CollectionNesting`].
+ pub fn new(token_owner: bool, collection_admin: bool, restricted: Vec<Address>) -> Self {
+ Self {
+ token_owner,
+ collection_admin,
+ restricted,
+ }
+ }
+}
+
+/// Collection properties
+#[derive(Debug, Default, AbiCoder)]
+pub struct CreateCollectionData {
+ /// Collection sponsor
+ pub pending_sponsor: CrossAddress,
+ /// Collection name
+ pub name: String,
+ /// Collection description
+ pub description: String,
+ /// Token prefix
+ pub token_prefix: String,
+ /// Token type (NFT, FT or RFT)
+ pub mode: CollectionMode,
+ /// Fungible token precision
+ pub decimals: u8,
+ /// Custom Properties
+ pub properties: Vec<Property>,
+ /// Permissions for token properties
+ pub token_property_permissions: Vec<TokenPropertyPermission>,
+ /// Collection admins
+ pub admin_list: Vec<CrossAddress>,
+ /// Nesting settings
+ pub nesting_settings: CollectionNestingAndPermission,
+ /// Collection limits
+ pub limits: Vec<CollectionLimitValue>,
+ /// Extra collection flags
+ pub flags: CollectionFlags,
+}
+
/// Nested collections.
#[derive(Debug, Default, AbiCoder)]
pub struct CollectionNesting {
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -73,16 +73,15 @@
transactional, fail,
};
use up_data_structs::{
- AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionFlags,
- RpcCollectionFlags, CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH,
- COLLECTION_ADMINS_LIMIT, TokenId, TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP,
- CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
- REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,
- CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit, budget::Budget,
- PhantomType, Property, CollectionProperties as CollectionPropertiesT, TokenProperties,
- PropertiesPermissionMap, PropertyKey, PropertyValue, PropertyPermission, PropertiesError,
- TokenOwnerError, PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope,
- CollectionPermissions,
+ AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, RpcCollectionFlags,
+ CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId,
+ TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
+ FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT,
+ CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState, CreateItemExData,
+ SponsoringRateLimit, budget::Budget, PhantomType, Property,
+ CollectionProperties as CollectionPropertiesT, TokenProperties, PropertiesPermissionMap,
+ PropertyKey, PropertyValue, PropertyPermission, PropertiesError, TokenOwnerError,
+ PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope, CollectionPermissions,
};
use up_pov_estimate_rpc::PovInfo;
@@ -1094,9 +1093,28 @@
pub fn init_collection(
owner: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
+ ensure!(data.flags.is_allowed_for_user(), <Error<T>>::NoPermission);
+ Self::init_collection_internal(owner, payer, data)
+ }
+
+ /// Initializes the collection with ForeignCollection flag. Returns [CollectionId] on success, [DispatchError] otherwise.
+ pub fn init_foreign_collection(
+ owner: T::CrossAccountId,
+ payer: T::CrossAccountId,
+ mut data: CreateCollectionData<T::CrossAccountId>,
+ ) -> Result<CollectionId, DispatchError> {
+ data.flags.foreign = true;
+ let id = Self::init_collection_internal(owner, payer, data)?;
+ Ok(id)
+ }
+
+ fn init_collection_internal(
+ owner: T::CrossAccountId,
+ payer: T::CrossAccountId,
+ data: CreateCollectionData<T::CrossAccountId>,
+ ) -> Result<CollectionId, DispatchError> {
{
ensure!(
data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,
@@ -1127,7 +1145,7 @@
token_prefix: data.token_prefix,
sponsorship: data
.pending_sponsor
- .map(SponsorshipState::Unconfirmed)
+ .map(|sponsor| SponsorshipState::Unconfirmed(sponsor.as_sub().clone()))
.unwrap_or_default(),
limits: data
.limits
@@ -1139,7 +1157,7 @@
Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)
})
.unwrap_or_else(|| Ok(CollectionPermissions::default()))?,
- flags,
+ flags: data.flags,
};
let mut collection_properties = CollectionPropertiesT::new();
@@ -1156,6 +1174,21 @@
CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);
+ let mut admin_amount = 0u32;
+ for admin in data.admin_list.iter() {
+ if !<IsAdmin<T>>::get((id, admin)) {
+ <IsAdmin<T>>::insert((id, admin), true);
+ admin_amount = admin_amount
+ .checked_add(1)
+ .ok_or(<Error<T>>::CollectionAdminCountExceeded)?;
+ }
+ }
+ ensure!(
+ admin_amount <= Self::collection_admins_limit(),
+ <Error<T>>::CollectionAdminCountExceeded,
+ );
+ <AdminAmount<T>>::insert(id, admin_amount);
+
// Take a (non-refundable) deposit of collection creation
{
let mut imbalance = <Debt<T::AccountId, <T as Config>::Currency>>::zero();
pallets/foreign-assets/src/lib.rsdiffbeforeafterboth--- a/pallets/foreign-assets/src/lib.rs
+++ b/pallets/foreign-assets/src/lib.rs
@@ -42,9 +42,9 @@
RuntimeDebug,
};
use frame_system::pallet_prelude::*;
-use up_data_structs::{CollectionMode};
-use pallet_fungible::{Pallet as PalletFungible};
-use scale_info::{TypeInfo};
+use up_data_structs::CollectionMode;
+use pallet_fungible::Pallet as PalletFungible;
+use scale_info::TypeInfo;
use sp_runtime::{
traits::{One, Zero},
ArithmeticError,
@@ -304,7 +304,7 @@
.collect::<Vec<u16>>();
description.append(&mut name.clone());
- let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
+ let data: CreateCollectionData<T::CrossAccountId> = CreateCollectionData {
name: name.try_into().unwrap(),
description: description.try_into().unwrap(),
mode: CollectionMode::Fungible(md.decimals),
pallets/fungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -31,9 +31,7 @@
create_collection_raw(
owner,
CollectionMode::Fungible(0),
- |owner: T::CrossAccountId, data| {
- <Pallet<T>>::init_collection(owner.clone(), owner, data, Default::default())
- },
+ |owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),
FungibleHandle::cast,
)
}
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -87,8 +87,8 @@
};
use pallet_evm::account::CrossAccountId;
use up_data_structs::{
- AccessMode, CollectionId, CollectionFlags, TokenId, CreateCollectionData,
- mapping::TokenAddressMapping, budget::Budget, PropertyKey, Property,
+ AccessMode, CollectionId, TokenId, CreateCollectionData, mapping::TokenAddressMapping,
+ budget::Budget, PropertyKey, Property,
};
use pallet_common::{
Error as CommonError, Event as CommonEvent, Pallet as PalletCommon,
@@ -219,28 +219,18 @@
pub fn init_collection(
owner: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(owner, payer, data, flags)
+ <PalletCommon<T>>::init_collection(owner, payer, data)
}
/// Initializes the collection with ForeignCollection flag. Returns [CollectionId] on success, [DispatchError] otherwise.
pub fn init_foreign_collection(
owner: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
- let id = <PalletCommon<T>>::init_collection(
- owner,
- payer,
- data,
- CollectionFlags {
- foreign: true,
- ..Default::default()
- },
- )?;
- Ok(id)
+ <PalletCommon<T>>::init_foreign_collection(owner, payer, data)
}
/// Destroys a collection.
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -230,47 +230,63 @@
// dummy = 0;
// }
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) public {
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public {
require(false, stub_error);
- enable;
+ collectionNestingAndPermissions;
dummy = 0;
}
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) public {
- require(false, stub_error);
- enable;
- collections;
- dummy = 0;
- }
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) public {
+ // require(false, stub_error);
+ // enable;
+ // dummy = 0;
+ // }
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) public {
+ // require(false, stub_error);
+ // enable;
+ // collections;
+ // dummy = 0;
+ // }
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() public view returns (CollectionNestingAndPermission memory) {
require(false, stub_error);
dummy;
- return CollectionNesting(false, new uint256[](0));
+ return CollectionNestingAndPermission(false, false, new address[](0));
}
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
- require(false, stub_error);
- dummy;
- return new CollectionNestingPermission[](0);
- }
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return CollectionNesting(false,new uint256[](0));
+ // }
+
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return new CollectionNestingPermission[](0);
+ // }
/// Set the collection access method.
/// @param mode Access mode
@@ -469,6 +485,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -57,9 +57,7 @@
create_collection_raw(
owner,
CollectionMode::NFT,
- |owner: T::CrossAccountId, data| {
- <Pallet<T>>::init_collection(owner.clone(), owner, data, Default::default())
- },
+ |owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),
NonfungibleHandle::cast,
)
}
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -100,10 +100,10 @@
dispatch::{PostDispatchInfo, Pays},
};
use up_data_structs::{
- AccessMode, CollectionId, CollectionFlags, CustomDataLimit, TokenId, CreateCollectionData,
- CreateNftExData, mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey,
- PropertyValue, PropertyKeyPermission, PropertyScope, TrySetProperty, TokenChild,
- AuxPropertyValue, PropertiesPermissionMap, TokenProperties as TokenPropertiesT,
+ AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
+ mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey, PropertyValue,
+ PropertyKeyPermission, PropertyScope, TrySetProperty, TokenChild, AuxPropertyValue,
+ PropertiesPermissionMap, TokenProperties as TokenPropertiesT,
};
use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
use pallet_common::{
@@ -424,10 +424,9 @@
pub fn init_collection(
owner: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(owner, payer, data, flags)
+ <PalletCommon<T>>::init_collection(owner, payer, data)
}
/// Destroy NFT collection
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -165,7 +165,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -377,47 +377,63 @@
// dummy = 0;
// }
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) public {
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public {
require(false, stub_error);
- enable;
+ collectionNestingAndPermissions;
dummy = 0;
}
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) public {
- require(false, stub_error);
- enable;
- collections;
- dummy = 0;
- }
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) public {
+ // require(false, stub_error);
+ // enable;
+ // dummy = 0;
+ // }
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) public {
+ // require(false, stub_error);
+ // enable;
+ // collections;
+ // dummy = 0;
+ // }
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() public view returns (CollectionNestingAndPermission memory) {
require(false, stub_error);
dummy;
- return CollectionNesting(false, new uint256[](0));
+ return CollectionNestingAndPermission(false, false, new address[](0));
}
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
- require(false, stub_error);
- dummy;
- return new CollectionNestingPermission[](0);
- }
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return CollectionNesting(false,new uint256[](0));
+ // }
+
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return new CollectionNestingPermission[](0);
+ // }
/// Set the collection access method.
/// @param mode Access mode
@@ -616,6 +632,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -61,9 +61,7 @@
create_collection_raw(
owner,
CollectionMode::ReFungible,
- |owner: T::CrossAccountId, data| {
- <Pallet<T>>::init_collection(owner.clone(), owner, data, Default::default())
- },
+ |owner: T::CrossAccountId, data| <Pallet<T>>::init_collection(owner.clone(), owner, data),
RefungibleHandle::cast,
)
}
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -104,11 +104,10 @@
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, TransactionOutcome};
use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
use up_data_structs::{
- AccessMode, budget::Budget, CollectionId, CollectionFlags, CreateCollectionData,
- mapping::TokenAddressMapping, MAX_REFUNGIBLE_PIECES, Property, PropertyKey,
- PropertyKeyPermission, PropertyScope, PropertyValue, TokenId, TrySetProperty,
- PropertiesPermissionMap, CreateRefungibleExMultipleOwners, TokenOwnerError,
- TokenProperties as TokenPropertiesT,
+ AccessMode, budget::Budget, CollectionId, CreateCollectionData, mapping::TokenAddressMapping,
+ MAX_REFUNGIBLE_PIECES, Property, PropertyKey, PropertyKeyPermission, PropertyScope,
+ PropertyValue, TokenId, TrySetProperty, PropertiesPermissionMap,
+ CreateRefungibleExMultipleOwners, TokenOwnerError, TokenProperties as TokenPropertiesT,
};
pub use pallet::*;
@@ -334,10 +333,9 @@
pub fn init_collection(
owner: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(owner, payer, data, flags)
+ <PalletCommon<T>>::init_collection(owner, payer, data)
}
/// Destroy RFT collection
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -165,7 +165,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
contract Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -377,47 +377,63 @@
// dummy = 0;
// }
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) public {
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public {
require(false, stub_error);
- enable;
+ collectionNestingAndPermissions;
dummy = 0;
}
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) public {
- require(false, stub_error);
- enable;
- collections;
- dummy = 0;
- }
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) public {
+ // require(false, stub_error);
+ // enable;
+ // dummy = 0;
+ // }
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) public {
+ // require(false, stub_error);
+ // enable;
+ // collections;
+ // dummy = 0;
+ // }
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() public view returns (CollectionNestingAndPermission memory) {
require(false, stub_error);
dummy;
- return CollectionNesting(false, new uint256[](0));
+ return CollectionNestingAndPermission(false, false, new address[](0));
}
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
- require(false, stub_error);
- dummy;
- return new CollectionNestingPermission[](0);
- }
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return CollectionNesting(false,new uint256[](0));
+ // }
+
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) {
+ // require(false, stub_error);
+ // dummy;
+ // return new CollectionNestingPermission[](0);
+ // }
/// Set the collection access method.
/// @param mode Access mode
@@ -616,6 +632,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
pallets/structure/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/structure/src/benchmarking.rs
+++ b/pallets/structure/src/benchmarking.rs
@@ -40,7 +40,6 @@
mode: CollectionMode::NFT,
..Default::default()
},
- CollectionFlags::default(),
)?;
let dispatch = T::CollectionDispatch::dispatch(CollectionId(1))?;
let dispatch = dispatch.as_dyn();
pallets/unique/Cargo.tomldiffbeforeafterboth--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -47,6 +47,7 @@
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
+log = { workspace = true }
pallet-balances-adapter = { workspace = true }
pallet-common = { workspace = true }
pallet-evm = { workspace = true }
pallets/unique/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -15,18 +15,16 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
//! Implementation of CollectionHelpers contract.
-
+//!
use core::marker::PhantomData;
use ethereum as _;
use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*};
-use frame_support::traits::Get;
-use crate::Pallet;
-
+use frame_support::{BoundedVec, traits::Get};
use pallet_common::{
CollectionById,
dispatch::CollectionDispatch,
erc::{CollectionHelpersEvents, static_property::key},
- eth::{map_eth_to_id, collection_id_to_address},
+ eth::{self, map_eth_to_id, collection_id_to_address},
Pallet as PalletCommon, CollectionHandle,
};
use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
@@ -36,13 +34,13 @@
frontier_contract,
};
use up_data_structs::{
- CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,
- CreateCollectionData,
+ CollectionDescription, CollectionMode, CollectionName, CollectionPermissions,
+ CollectionTokenPrefix, CreateCollectionData, NestingPermissions,
};
-use crate::{weights::WeightInfo, Config, SelfWeightOf};
+use crate::{weights::WeightInfo, Config, Pallet, SelfWeightOf};
-use alloc::format;
+use alloc::{format, collections::BTreeSet};
use sp_std::vec::Vec;
frontier_contract! {
@@ -113,9 +111,8 @@
let collection_helpers_address =
T::CrossAccountId::from_eth(<T as pallet_common::Config>::ContractAddress::get());
- let collection_id =
- T::CollectionDispatch::create(caller, collection_helpers_address, data, Default::default())
- .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
+ let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data)
+ .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
let address = pallet_common::eth::collection_id_to_address(collection_id);
Ok(address)
}
@@ -140,7 +137,119 @@
impl<T> EvmCollectionHelpers<T>
where
T: Config + pallet_common::Config + pallet_nonfungible::Config + pallet_refungible::Config,
+ T::AccountId: From<[u8; 32]>,
{
+/*
+ /// Create a collection
+ /// @return address Address of the newly created collection
+ #[weight(<SelfWeightOf<T>>::create_collection())]
+ #[solidity(rename_selector = "createCollection")]
+ fn create_collection(
+ &mut self,
+ caller: Caller,
+ value: Value,
+ data: eth::CreateCollectionData,
+ ) -> Result<Address> {
+ let (caller, name, description, token_prefix) =
+ convert_data::<T>(caller, data.name, data.description, data.token_prefix)?;
+ if data.mode != eth::CollectionMode::Fungible && data.decimals != 0 {
+ return Err("decimals are only supported for NFT and RFT collections".into());
+ }
+ let mode = match data.mode {
+ eth::CollectionMode::Fungible => CollectionMode::Fungible(data.decimals),
+ eth::CollectionMode::Nonfungible => CollectionMode::NFT,
+ eth::CollectionMode::Refungible => CollectionMode::ReFungible,
+ };
+
+ let properties: BoundedVec<_, _> = data
+ .properties
+ .into_iter()
+ .map(eth::Property::try_into)
+ .collect::<Result<Vec<_>>>()?
+ .try_into()
+ .map_err(|_| "too many properties")?;
+
+ let token_property_permissions =
+ eth::TokenPropertyPermission::into_property_key_permissions(
+ data.token_property_permissions,
+ )?
+ .try_into()
+ .map_err(|_| "too many property permissions")?;
+
+ let limits = if !data.limits.is_empty() {
+ Some(
+ data.limits
+ .into_iter()
+ .collect::<Result<up_data_structs::CollectionLimits>>()?,
+ )
+ } else {
+ None
+ };
+
+ let pending_sponsor = data.pending_sponsor.into_option_sub_cross_account::<T>()?;
+
+ let restricted = if !data.nesting_settings.restricted.is_empty() {
+ Some(
+ data.nesting_settings
+ .restricted
+ .iter()
+ .map(map_eth_to_id)
+ .collect::<Option<BTreeSet<_>>>()
+ .ok_or("can't convert address into collection id")?
+ .try_into()
+ .map_err(|_| "too many collections")?,
+ )
+ } else {
+ None
+ };
+
+ let admin_list = data
+ .admin_list
+ .into_iter()
+ .map(|admin| admin.into_sub_cross_account::<T>())
+ .collect::<Result<Vec<_>>>()?;
+
+ let flags = data.flags;
+ if !flags.is_allowed_for_user() {
+ return Err("internal flags were used".into());
+ }
+
+ let data = CreateCollectionData {
+ name,
+ mode,
+ description,
+ token_prefix,
+ properties,
+ token_property_permissions,
+ limits,
+ pending_sponsor,
+ access: None,
+ permissions: Some(CollectionPermissions {
+ access: None,
+ mint_mode: None,
+ nesting: Some(NestingPermissions {
+ token_owner: data.nesting_settings.token_owner,
+ collection_admin: data.nesting_settings.collection_admin,
+ restricted,
+ #[cfg(feature = "runtime-benchmarks")]
+ permissive: true,
+ }),
+ }),
+ admin_list,
+ flags,
+ };
+ check_sent_amount_equals_collection_creation_price::<T>(value)?;
+ let collection_helpers_address =
+ T::CrossAccountId::from_eth(<T as pallet_common::Config>::ContractAddress::get());
+
+ let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data)
+ .map_err(dispatch_to_evm::<T>)?;
+
+ let address = pallet_common::eth::collection_id_to_address(collection_id);
+ Ok(address)
+ }
+*/
+
/// Create an NFT collection
/// @param name Name of the collection
/// @param description Informative description of the collection
@@ -168,13 +277,8 @@
check_sent_amount_equals_collection_creation_price::<T>(value)?;
let collection_helpers_address =
T::CrossAccountId::from_eth(<T as pallet_common::Config>::ContractAddress::get());
- let collection_id = T::CollectionDispatch::create(
- caller,
- collection_helpers_address,
- data,
- Default::default(),
- )
- .map_err(dispatch_to_evm::<T>)?;
+ let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data)
+ .map_err(dispatch_to_evm::<T>)?;
let address = pallet_common::eth::collection_id_to_address(collection_id);
Ok(address)
@@ -387,6 +491,8 @@
pub struct CollectionHelpersOnMethodCall<T: Config>(PhantomData<*const T>);
impl<T: Config + pallet_nonfungible::Config + pallet_refungible::Config> OnMethodCall<T>
for CollectionHelpersOnMethodCall<T>
+where
+ T::AccountId: From<[u8; 32]>,
{
fn is_reserved(contract: &sp_core::H160) -> bool {
contract == &T::ContractAddress::get()
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -25,8 +25,19 @@
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0xe65011aa
+/// @dev the ERC-165 identifier for this interface is 0x4135fff1
contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
+ /// Create a collection
+ /// @return address Address of the newly created collection
+ /// @dev EVM selector for this function is: 0xa765ee5b,
+ /// or in textual repr: createCollection(((address,uint256),string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],uint8))
+ function createCollection(CreateCollectionData memory data) public payable returns (address) {
+ require(false, stub_error);
+ data;
+ dummy = 0;
+ return 0x0000000000000000000000000000000000000000;
+ }
+
/// Create an NFT collection
/// @param name Name of the collection
/// @param description Informative description of the collection
@@ -156,3 +167,135 @@
return 0;
}
}
+
+/// Collection properties
+struct CreateCollectionData {
+ /// Collection sponsor
+ CrossAddress pending_sponsor;
+ /// Collection name
+ string name;
+ /// Collection description
+ string description;
+ /// Token prefix
+ string token_prefix;
+ /// Token type (NFT, FT or RFT)
+ CollectionMode mode;
+ /// Fungible token precision
+ uint8 decimals;
+ /// Custom Properties
+ Property[] properties;
+ /// Permissions for token properties
+ TokenPropertyPermission[] token_property_permissions;
+ /// Collection admins
+ CrossAddress[] admin_list;
+ /// Nesting settings
+ CollectionNestingAndPermission nesting_settings;
+ /// Collection limits
+ CollectionLimitValue[] limits;
+ /// Extra collection flags
+ CollectionFlags flags;
+}
+
+/// Cross account struct
+type CollectionFlags is uint8;
+
+library CollectionFlagsLib {
+ /// Tokens in foreign collections can be transferred, but not burnt
+ CollectionFlags constant foreignField = CollectionFlags.wrap(128);
+ /// Supports ERC721Metadata
+ CollectionFlags constant erc721metadataField = CollectionFlags.wrap(64);
+ /// External collections can't be managed using `unique` api
+ CollectionFlags constant externalField = CollectionFlags.wrap(1);
+
+ /// Reserved bits
+ function reservedField(uint8 value) public pure returns (CollectionFlags) {
+ require(value < 1 << 5, "out of bound value");
+ return CollectionFlags.wrap(value << 1);
+ }
+}
+
+/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
+struct CollectionLimitValue {
+ CollectionLimitField field;
+ uint256 value;
+}
+
+/// [`CollectionLimits`](up_data_structs::CollectionLimits) fields representation for EVM.
+enum CollectionLimitField {
+ /// How many tokens can a user have on one account.
+ AccountTokenOwnership,
+ /// How many bytes of data are available for sponsorship.
+ SponsoredDataSize,
+ /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]
+ SponsoredDataRateLimit,
+ /// How many tokens can be mined into this collection.
+ TokenLimit,
+ /// Timeouts for transfer sponsoring.
+ SponsorTransferTimeout,
+ /// Timeout for sponsoring an approval in passed blocks.
+ SponsorApproveTimeout,
+ /// Whether the collection owner of the collection can send tokens (which belong to other users).
+ OwnerCanTransfer,
+ /// Can the collection owner burn other people's tokens.
+ OwnerCanDestroy,
+ /// Is it possible to send tokens from this collection between users.
+ TransferEnabled
+}
+
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
+/// Cross account struct
+struct CrossAddress {
+ address eth;
+ uint256 sub;
+}
+
+/// Ethereum representation of Token Property Permissions.
+struct TokenPropertyPermission {
+ /// Token property key.
+ string key;
+ /// Token property permissions.
+ PropertyPermission[] permissions;
+}
+
+/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) as an key and value.
+struct PropertyPermission {
+ /// TokenPermission field.
+ TokenPermissionField code;
+ /// TokenPermission value.
+ bool value;
+}
+
+/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration.
+enum TokenPermissionField {
+ /// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`]
+ Mutable,
+ /// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`]
+ TokenOwner,
+ /// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`]
+ CollectionAdmin
+}
+
+/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue).
+struct Property {
+ string key;
+ bytes value;
+}
+
+/// Type of tokens in collection
+enum CollectionMode {
+ /// Fungible
+ Fungible,
+ /// Nonfungible
+ Nonfungible,
+ /// Refungible
+ Refungible
+}
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -365,7 +365,7 @@
token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
mode: CollectionMode,
) -> DispatchResult {
- let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
+ let data: CreateCollectionData<T::CrossAccountId> = CreateCollectionData {
name: collection_name,
description: collection_description,
token_prefix,
@@ -390,14 +390,13 @@
#[pallet::weight(<SelfWeightOf<T>>::create_collection())]
pub fn create_collection_ex(
origin: OriginFor<T>,
- data: CreateCollectionData<T::AccountId>,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> DispatchResult {
let sender = ensure_signed(origin)?;
// =========
let sender = T::CrossAccountId::from_sub(sender);
- let _id =
- T::CollectionDispatch::create(sender.clone(), sender, data, Default::default())?;
+ let _id = T::CollectionDispatch::create(sender.clone(), sender, data)?;
Ok(())
}
primitives/data-structs/Cargo.tomldiffbeforeafterboth--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -22,6 +22,7 @@
sp-std = { workspace = true }
bondrewd = { version = "0.1.14", features = ["derive"], default-features = false }
struct-versioning = { workspace = true }
+evm-coder = { workspace = true }
[features]
default = ["std"]
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -32,11 +32,13 @@
use sp_core::U256;
use sp_runtime::{ArithmeticError, sp_std::prelude::Vec};
+use sp_std::collections::btree_set::BTreeSet;
use codec::{Decode, Encode, EncodeLike, MaxEncodedLen};
-use bondrewd::Bitfields;
use frame_support::{BoundedVec, traits::ConstU32};
use derivative::Derivative;
use scale_info::TypeInfo;
+use evm_coder::AbiCoderFlags;
+use bondrewd::Bitfields;
mod bondrewd_codec;
mod bounded;
@@ -163,6 +165,14 @@
}
}
+impl Deref for CollectionId {
+ type Target = u32;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
/// Token id.
#[derive(
Encode,
@@ -350,7 +360,7 @@
pub type CollectionDescription = BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>;
pub type CollectionTokenPrefix = BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>;
-#[derive(Bitfields, Clone, Copy, PartialEq, Eq, Debug, Default)]
+#[derive(AbiCoderFlags, Bitfields, Clone, Copy, PartialEq, Eq, Debug, Default)]
#[bondrewd(enforce_bytes = 1)]
pub struct CollectionFlags {
/// Tokens in foreign collections can be transferred, but not burnt
@@ -362,12 +372,18 @@
/// External collections can't be managed using `unique` api
#[bondrewd(bits = "7..8")]
pub external: bool,
-
- #[bondrewd(reserve, bits = "2..7")]
+ /// Reserved flags
+ #[bondrewd(bits = "2..7")]
pub reserved: u8,
}
bondrewd_codec!(CollectionFlags);
+impl CollectionFlags {
+ pub fn is_allowed_for_user(self) -> bool {
+ !self.foreign && !self.external && self.reserved == 0
+ }
+}
+
/// Base structure for represent collection.
///
/// Used to provide basic functionality for all types of collections.
@@ -545,7 +561,7 @@
/// All fields are wrapped in [`Option`], where `None` means chain default.
#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, Derivative, MaxEncodedLen)]
#[derivative(Debug, Default(bound = ""))]
-pub struct CreateCollectionData<AccountId> {
+pub struct CreateCollectionData<CrossAccountId> {
/// Collection mode.
#[derivative(Default(value = "CollectionMode::NFT"))]
pub mode: CollectionMode,
@@ -562,9 +578,6 @@
/// Token prefix.
pub token_prefix: CollectionTokenPrefix,
- /// Pending collection sponsor.
- pub pending_sponsor: Option<AccountId>,
-
/// Collection limits.
pub limits: Option<CollectionLimits>,
@@ -576,6 +589,13 @@
/// Collection properties.
pub properties: CollectionPropertiesVec,
+
+ pub admin_list: Vec<CrossAccountId>,
+
+ /// Pending collection sponsor.
+ pub pending_sponsor: Option<CrossAccountId>,
+
+ pub flags: CollectionFlags,
}
/// Bounded vector of properties permissions. Max length is [`MAX_PROPERTIES_PER_ITEM`].
@@ -833,6 +853,14 @@
}
}
+impl TryFrom<BTreeSet<CollectionId>> for OwnerRestrictedSet {
+ type Error = ();
+
+ fn try_from(value: BTreeSet<CollectionId>) -> Result<Self, Self::Error> {
+ Ok(Self(value.try_into()?))
+ }
+}
+
/// Part of collection permissions, if set, defines who is able to nest tokens into other tokens.
#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
runtime/common/dispatch.rsdiffbeforeafterboth--- a/runtime/common/dispatch.rs
+++ b/runtime/common/dispatch.rs
@@ -25,14 +25,14 @@
};
pub use pallet_common::dispatch::CollectionDispatch;
use pallet_fungible::{Pallet as PalletFungible, FungibleHandle};
-use pallet_balances_adapter::{NativeFungibleHandle};
+use pallet_balances_adapter::NativeFungibleHandle;
use pallet_nonfungible::{Pallet as PalletNonfungible, NonfungibleHandle};
use pallet_refungible::{
Pallet as PalletRefungible, RefungibleHandle, erc_token::RefungibleTokenHandle,
};
use up_data_structs::{
CollectionMode, CreateCollectionData, MAX_DECIMAL_POINTS, mapping::TokenAddressMapping,
- CollectionId, CollectionFlags,
+ CollectionId,
};
#[cfg(not(feature = "refungible"))]
@@ -72,26 +72,21 @@
fn create(
sender: T::CrossAccountId,
payer: T::CrossAccountId,
- data: CreateCollectionData<T::AccountId>,
- flags: CollectionFlags,
+ data: CreateCollectionData<T::CrossAccountId>,
) -> Result<CollectionId, DispatchError> {
let id = match data.mode {
- CollectionMode::NFT => {
- <PalletNonfungible<T>>::init_collection(sender, payer, data, flags)?
- }
+ CollectionMode::NFT => <PalletNonfungible<T>>::init_collection(sender, payer, data)?,
CollectionMode::Fungible(decimal_points) => {
// check params
ensure!(
decimal_points <= MAX_DECIMAL_POINTS,
pallet_unique::Error::<T>::CollectionDecimalPointLimitExceeded
);
- <PalletFungible<T>>::init_collection(sender, payer, data, flags)?
+ <PalletFungible<T>>::init_collection(sender, payer, data)?
}
#[cfg(feature = "refungible")]
- CollectionMode::ReFungible => {
- <PalletRefungible<T>>::init_collection(sender, payer, data, flags)?
- }
+ CollectionMode::ReFungible => <PalletRefungible<T>>::init_collection(sender, payer, data)?,
#[cfg(not(feature = "refungible"))]
CollectionMode::ReFungible => return unsupported!(T),
runtime/common/ethereum/sponsoring.rsdiffbeforeafterboth--- a/runtime/common/ethereum/sponsoring.rs
+++ b/runtime/common/ethereum/sponsoring.rs
@@ -234,6 +234,7 @@
| CollectionOwner
| CollectionAdmins
| CollectionLimits
+ | CollectionNesting
| CollectionNestingRestrictedIds
| CollectionNestingPermissions
| UniqueCollectionType => None,
@@ -249,6 +250,7 @@
| RemoveCollectionAdmin { .. }
| SetNestingBool { .. }
| SetNesting { .. }
+ | SetNestingCollectionIds { .. }
| SetCollectionAccess { .. }
| SetCollectionMintMode { .. }
| SetOwner { .. }
tests/src/benchmarks/opsFee/index.tsdiffbeforeafterboth--- a/tests/src/benchmarks/opsFee/index.ts
+++ b/tests/src/benchmarks/opsFee/index.ts
@@ -1,6 +1,6 @@
import {EthUniqueHelper, usingEthPlaygrounds} from '../../eth/util';
import {readFile} from 'fs/promises';
-import {CollectionLimitField, TokenPermissionField} from '../../eth/util/playgrounds/types';
+import {CollectionLimitField, CreateCollectionData, TokenPermissionField} from '../../eth/util/playgrounds/types';
import {IKeyringPair} from '@polkadot/types/types';
import {UniqueFTCollection, UniqueNFTCollection} from '../../util/playgrounds/unique';
import {Contract} from 'web3-eth-contract';
@@ -399,7 +399,7 @@
() => collection.setLimits(donor, {accountTokenOwnershipLimit: 1000}),
)));
- const {collectionAddress} = await helper.eth.createCollection('nft', ethSigner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(ethSigner, new CreateCollectionData('A', 'B', 'C', 'nft')).send();
const collectionWithEthOwner = await helper.ethNativeContract.collection(collectionAddress, 'nft', ethSigner, true);
@@ -775,7 +775,7 @@
() => collection.setLimits(donor, {accountTokenOwnershipLimit: 1000}),
)));
- const {collectionAddress} = await helper.eth.createCollection('nft', ethSigner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(ethSigner, new CreateCollectionData('A', 'B', 'C', 'nft')).send();
const collectionWithEthOwner = await helper.ethNativeContract.collection(collectionAddress, 'nft', ethSigner, true);
tests/src/createCollection.test.tsdiffbeforeafterboth--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -16,7 +16,7 @@
import {IKeyringPair} from '@polkadot/types/types';
import {usingPlaygrounds, expect, itSub, Pallets} from './util';
-import {ICollectionCreationOptions, IProperty} from './util/playgrounds/types';
+import {CollectionFlag, ICollectionCreationOptions, IProperty} from './util/playgrounds/types';
import {UniqueHelper} from './util/playgrounds/unique';
async function mintCollectionHelper(helper: UniqueHelper, signer: IKeyringPair, options: ICollectionCreationOptions, type?: 'nft' | 'fungible' | 'refungible') {
@@ -36,6 +36,16 @@
if(options.properties) {
expect(data?.raw.properties).to.be.deep.equal(options.properties);
}
+ if(options.adminList) {
+ expect(data?.admins).to.be.deep.equal(options.adminList);
+ }
+
+ if(options.flags) {
+ if((options.flags[0] & 64) != 0)
+ expect(data?.raw.flags.erc721metadata).to.be.true;
+ if((options.flags[0] & 128) != 0)
+ expect(data?.raw.flags.foreign).to.be.false;
+ }
if(options.tokenPropertyPermissions) {
expect(data?.raw.tokenPropertyPermissions).to.be.deep.equal(options.tokenPropertyPermissions);
@@ -46,11 +56,12 @@
describe('integration test: ext. createCollection():', () => {
let alice: IKeyringPair;
+ let bob: IKeyringPair;
before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
const donor = await privateKey({url: import.meta.url});
- [alice] = await helper.arrange.createAccounts([100n], donor);
+ [alice, bob] = await helper.arrange.createAccounts([100n, 100n], donor);
});
});
itSub('Create new NFT collection', async ({helper}) => {
@@ -82,6 +93,30 @@
}, 'nft');
});
+ itSub('create new collection with admin', async ({helper}) => {
+ await mintCollectionHelper(helper, alice, {
+ name: 'name', description: 'descr', tokenPrefix: 'COL',
+ adminList: [{Substrate: bob.address}],
+ }, 'nft');
+ });
+
+ itSub('create new collection with flags', async ({helper}) => {
+ await mintCollectionHelper(helper, alice, {
+ name: 'name', description: 'descr', tokenPrefix: 'COL',
+ flags: [CollectionFlag.Erc721metadata],
+ }, 'nft');
+
+ await mintCollectionHelper(helper, alice, {
+ name: 'name', description: 'descr', tokenPrefix: 'COL',
+ flags: [CollectionFlag.Foreign],
+ }, 'nft');
+
+ await mintCollectionHelper(helper, alice, {
+ name: 'name', description: 'descr', tokenPrefix: 'COL',
+ flags: [CollectionFlag.Erc721metadata, CollectionFlag.Foreign],
+ }, 'nft');
+ });
+
itSub('Create new collection with extra fields', async ({helper}) => {
const collection = await mintCollectionHelper(helper, alice, {name: 'name', description: 'descr', tokenPrefix: 'COL'}, 'fungible');
await collection.setPermissions(alice, {access: 'AllowList'});
tests/src/eth/abi/collectionHelpers.jsondiffbeforeafterboth--- a/tests/src/eth/abi/collectionHelpers.json
+++ b/tests/src/eth/abi/collectionHelpers.json
@@ -75,6 +75,118 @@
},
{
"inputs": [
+ {
+ "components": [
+ {
+ "components": [
+ { "internalType": "address", "name": "eth", "type": "address" },
+ { "internalType": "uint256", "name": "sub", "type": "uint256" }
+ ],
+ "internalType": "struct CrossAddress",
+ "name": "pending_sponsor",
+ "type": "tuple"
+ },
+ { "internalType": "string", "name": "name", "type": "string" },
+ { "internalType": "string", "name": "description", "type": "string" },
+ {
+ "internalType": "string",
+ "name": "token_prefix",
+ "type": "string"
+ },
+ {
+ "internalType": "enum CollectionMode",
+ "name": "mode",
+ "type": "uint8"
+ },
+ { "internalType": "uint8", "name": "decimals", "type": "uint8" },
+ {
+ "components": [
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
+ ],
+ "internalType": "struct Property[]",
+ "name": "properties",
+ "type": "tuple[]"
+ },
+ {
+ "components": [
+ { "internalType": "string", "name": "key", "type": "string" },
+ {
+ "components": [
+ {
+ "internalType": "enum TokenPermissionField",
+ "name": "code",
+ "type": "uint8"
+ },
+ { "internalType": "bool", "name": "value", "type": "bool" }
+ ],
+ "internalType": "struct PropertyPermission[]",
+ "name": "permissions",
+ "type": "tuple[]"
+ }
+ ],
+ "internalType": "struct TokenPropertyPermission[]",
+ "name": "token_property_permissions",
+ "type": "tuple[]"
+ },
+ {
+ "components": [
+ { "internalType": "address", "name": "eth", "type": "address" },
+ { "internalType": "uint256", "name": "sub", "type": "uint256" }
+ ],
+ "internalType": "struct CrossAddress[]",
+ "name": "admin_list",
+ "type": "tuple[]"
+ },
+ {
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ {
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
+ },
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
+ ],
+ "internalType": "struct CollectionNestingAndPermission",
+ "name": "nesting_settings",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "enum CollectionLimitField",
+ "name": "field",
+ "type": "uint8"
+ },
+ { "internalType": "uint256", "name": "value", "type": "uint256" }
+ ],
+ "internalType": "struct CollectionLimitValue[]",
+ "name": "limits",
+ "type": "tuple[]"
+ },
+ {
+ "internalType": "CollectionFlags",
+ "name": "flags",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct CreateCollectionData",
+ "name": "data",
+ "type": "tuple"
+ }
+ ],
+ "name": "createCollection",
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "string", "name": "name", "type": "string" },
{ "internalType": "uint8", "name": "decimals", "type": "uint8" },
{ "internalType": "string", "name": "description", "type": "string" },
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -280,35 +280,23 @@
},
{
"inputs": [],
- "name": "collectionNestingPermissions",
+ "name": "collectionNesting",
"outputs": [
{
"components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
{
- "internalType": "enum CollectionPermissionField",
- "name": "field",
- "type": "uint8"
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
},
- { "internalType": "bool", "name": "value", "type": "bool" }
- ],
- "internalType": "struct CollectionNestingPermission[]",
- "name": "",
- "type": "tuple[]"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "collectionNestingRestrictedCollectionIds",
- "outputs": [
- {
- "components": [
- { "internalType": "bool", "name": "token_owner", "type": "bool" },
- { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
],
- "internalType": "struct CollectionNesting",
+ "internalType": "struct CollectionNestingAndPermission",
"name": "",
"type": "tuple"
}
@@ -576,19 +564,24 @@
"type": "function"
},
{
- "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
- "name": "setCollectionNesting",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
"inputs": [
- { "internalType": "bool", "name": "enable", "type": "bool" },
{
- "internalType": "address[]",
- "name": "collections",
- "type": "address[]"
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ {
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
+ },
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
+ ],
+ "internalType": "struct CollectionNestingAndPermission",
+ "name": "collectionNestingAndPermissions",
+ "type": "tuple"
}
],
"name": "setCollectionNesting",
tests/src/eth/abi/fungibleDeprecated.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungibleDeprecated.json
+++ b/tests/src/eth/abi/fungibleDeprecated.json
@@ -88,5 +88,64 @@
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingPermissions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "enum CollectionPermissionField",
+ "name": "field",
+ "type": "uint8"
+ },
+ { "internalType": "bool", "name": "value", "type": "bool" }
+ ],
+ "internalType": "struct CollectionNestingPermission[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingRestrictedCollectionIds",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ ],
+ "internalType": "struct CollectionNesting",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "bool", "name": "enable", "type": "bool" },
+ {
+ "internalType": "address[]",
+ "name": "collections",
+ "type": "address[]"
+ }
+ ],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
}
]
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -291,35 +291,23 @@
},
{
"inputs": [],
- "name": "collectionNestingPermissions",
+ "name": "collectionNesting",
"outputs": [
{
"components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
{
- "internalType": "enum CollectionPermissionField",
- "name": "field",
- "type": "uint8"
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
},
- { "internalType": "bool", "name": "value", "type": "bool" }
- ],
- "internalType": "struct CollectionNestingPermission[]",
- "name": "",
- "type": "tuple[]"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "collectionNestingRestrictedCollectionIds",
- "outputs": [
- {
- "components": [
- { "internalType": "bool", "name": "token_owner", "type": "bool" },
- { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
],
- "internalType": "struct CollectionNesting",
+ "internalType": "struct CollectionNestingAndPermission",
"name": "",
"type": "tuple"
}
@@ -705,19 +693,24 @@
"type": "function"
},
{
- "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
- "name": "setCollectionNesting",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
"inputs": [
- { "internalType": "bool", "name": "enable", "type": "bool" },
{
- "internalType": "address[]",
- "name": "collections",
- "type": "address[]"
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ {
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
+ },
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
+ ],
+ "internalType": "struct CollectionNestingAndPermission",
+ "name": "collectionNestingAndPermissions",
+ "type": "tuple"
}
],
"name": "setCollectionNesting",
tests/src/eth/abi/nonFungibleDeprecated.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungibleDeprecated.json
+++ b/tests/src/eth/abi/nonFungibleDeprecated.json
@@ -109,5 +109,64 @@
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingPermissions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "enum CollectionPermissionField",
+ "name": "field",
+ "type": "uint8"
+ },
+ { "internalType": "bool", "name": "value", "type": "bool" }
+ ],
+ "internalType": "struct CollectionNestingPermission[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingRestrictedCollectionIds",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ ],
+ "internalType": "struct CollectionNesting",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "bool", "name": "enable", "type": "bool" },
+ {
+ "internalType": "address[]",
+ "name": "collections",
+ "type": "address[]"
+ }
+ ],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
}
]
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -273,35 +273,23 @@
},
{
"inputs": [],
- "name": "collectionNestingPermissions",
+ "name": "collectionNesting",
"outputs": [
{
"components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
{
- "internalType": "enum CollectionPermissionField",
- "name": "field",
- "type": "uint8"
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
},
- { "internalType": "bool", "name": "value", "type": "bool" }
- ],
- "internalType": "struct CollectionNestingPermission[]",
- "name": "",
- "type": "tuple[]"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "collectionNestingRestrictedCollectionIds",
- "outputs": [
- {
- "components": [
- { "internalType": "bool", "name": "token_owner", "type": "bool" },
- { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
],
- "internalType": "struct CollectionNesting",
+ "internalType": "struct CollectionNestingAndPermission",
"name": "",
"type": "tuple"
}
@@ -687,19 +675,24 @@
"type": "function"
},
{
- "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
- "name": "setCollectionNesting",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
"inputs": [
- { "internalType": "bool", "name": "enable", "type": "bool" },
{
- "internalType": "address[]",
- "name": "collections",
- "type": "address[]"
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ {
+ "internalType": "bool",
+ "name": "collection_admin",
+ "type": "bool"
+ },
+ {
+ "internalType": "address[]",
+ "name": "restricted",
+ "type": "address[]"
+ }
+ ],
+ "internalType": "struct CollectionNestingAndPermission",
+ "name": "collectionNestingAndPermissions",
+ "type": "tuple"
}
],
"name": "setCollectionNesting",
tests/src/eth/abi/reFungibleDeprecated.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungibleDeprecated.json
+++ b/tests/src/eth/abi/reFungibleDeprecated.json
@@ -137,5 +137,64 @@
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "nonpayable",
"type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingPermissions",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "enum CollectionPermissionField",
+ "name": "field",
+ "type": "uint8"
+ },
+ { "internalType": "bool", "name": "value", "type": "bool" }
+ ],
+ "internalType": "struct CollectionNestingPermission[]",
+ "name": "",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "collectionNestingRestrictedCollectionIds",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "bool", "name": "token_owner", "type": "bool" },
+ { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }
+ ],
+ "internalType": "struct CollectionNesting",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "bool", "name": "enable", "type": "bool" },
+ {
+ "internalType": "address[]",
+ "name": "collections",
+ "type": "address[]"
+ }
+ ],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
}
]
tests/src/eth/allowlist.test.tsdiffbeforeafterboth--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -17,6 +17,7 @@
import {IKeyringPair} from '@polkadot/types/types';
import {Pallets} from '../util';
import {itEth, usingEthPlaygrounds, expect, SponsoringMode} from './util';
+import {CreateCollectionData} from './util/playgrounds/types';
describe('EVM contract allowlist', () => {
let donor: IKeyringPair;
@@ -104,7 +105,7 @@
const userEth = await helper.eth.createAccountWithBalance(donor);
const mintParams = testCase.mode === 'ft' ? [userEth, 100] : [userEth];
- const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
const userCrossSub = helper.ethCrossAccount.fromKeyringPair(userSub);
const userCrossEth = helper.ethCrossAccount.fromAddress(userEth);
@@ -178,7 +179,7 @@
const userEth = helper.eth.createAccount();
const userCrossEth = helper.ethCrossAccount.fromAddress(userEth);
- const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, !testCase.cross);
expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.false;
tests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -20,8 +20,14 @@
}
/// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0xe65011aa
+/// @dev the ERC-165 identifier for this interface is 0x4135fff1
interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
+ /// Create a collection
+ /// @return address Address of the newly created collection
+ /// @dev EVM selector for this function is: 0xa765ee5b,
+ /// or in textual repr: createCollection(((address,uint256),string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],uint8))
+ function createCollection(CreateCollectionData memory data) external payable returns (address);
+
/// Create an NFT collection
/// @param name Name of the collection
/// @param description Informative description of the collection
@@ -94,3 +100,135 @@
/// or in textual repr: collectionId(address)
function collectionId(address collectionAddress) external view returns (uint32);
}
+
+/// Collection properties
+struct CreateCollectionData {
+ /// Collection sponsor
+ CrossAddress pending_sponsor;
+ /// Collection name
+ string name;
+ /// Collection description
+ string description;
+ /// Token prefix
+ string token_prefix;
+ /// Token type (NFT, FT or RFT)
+ CollectionMode mode;
+ /// Fungible token precision
+ uint8 decimals;
+ /// Custom Properties
+ Property[] properties;
+ /// Permissions for token properties
+ TokenPropertyPermission[] token_property_permissions;
+ /// Collection admins
+ CrossAddress[] admin_list;
+ /// Nesting settings
+ CollectionNestingAndPermission nesting_settings;
+ /// Collection limits
+ CollectionLimitValue[] limits;
+ /// Extra collection flags
+ CollectionFlags flags;
+}
+
+/// Cross account struct
+type CollectionFlags is uint8;
+
+library CollectionFlagsLib {
+ /// Tokens in foreign collections can be transferred, but not burnt
+ CollectionFlags constant foreignField = CollectionFlags.wrap(128);
+ /// Supports ERC721Metadata
+ CollectionFlags constant erc721metadataField = CollectionFlags.wrap(64);
+ /// External collections can't be managed using `unique` api
+ CollectionFlags constant externalField = CollectionFlags.wrap(1);
+
+ /// Reserved bits
+ function reservedField(uint8 value) public pure returns (CollectionFlags) {
+ require(value < 1 << 5, "out of bound value");
+ return CollectionFlags.wrap(value << 1);
+ }
+}
+
+/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
+struct CollectionLimitValue {
+ CollectionLimitField field;
+ uint256 value;
+}
+
+/// [`CollectionLimits`](up_data_structs::CollectionLimits) fields representation for EVM.
+enum CollectionLimitField {
+ /// How many tokens can a user have on one account.
+ AccountTokenOwnership,
+ /// How many bytes of data are available for sponsorship.
+ SponsoredDataSize,
+ /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]
+ SponsoredDataRateLimit,
+ /// How many tokens can be mined into this collection.
+ TokenLimit,
+ /// Timeouts for transfer sponsoring.
+ SponsorTransferTimeout,
+ /// Timeout for sponsoring an approval in passed blocks.
+ SponsorApproveTimeout,
+ /// Whether the collection owner of the collection can send tokens (which belong to other users).
+ OwnerCanTransfer,
+ /// Can the collection owner burn other people's tokens.
+ OwnerCanDestroy,
+ /// Is it possible to send tokens from this collection between users.
+ TransferEnabled
+}
+
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
+/// Cross account struct
+struct CrossAddress {
+ address eth;
+ uint256 sub;
+}
+
+/// Ethereum representation of Token Property Permissions.
+struct TokenPropertyPermission {
+ /// Token property key.
+ string key;
+ /// Token property permissions.
+ PropertyPermission[] permissions;
+}
+
+/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) as an key and value.
+struct PropertyPermission {
+ /// TokenPermission field.
+ TokenPermissionField code;
+ /// TokenPermission value.
+ bool value;
+}
+
+/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration.
+enum TokenPermissionField {
+ /// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`]
+ Mutable,
+ /// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`]
+ TokenOwner,
+ /// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`]
+ CollectionAdmin
+}
+
+/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue).
+struct Property {
+ string key;
+ bytes value;
+}
+
+/// Type of tokens in collection
+enum CollectionMode {
+ /// Fungible
+ Fungible,
+ /// Nonfungible
+ Nonfungible,
+ /// Refungible
+ Refungible
+}
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -148,30 +148,38 @@
// /// or in textual repr: removeCollectionAdmin(address)
// function removeCollectionAdmin(address admin) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) external;
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) external;
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) external;
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) external;
+
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() external view returns (CollectionNestingAndPermission memory);
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -311,6 +319,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -118,7 +118,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -253,30 +253,38 @@
// /// or in textual repr: removeCollectionAdmin(address)
// function removeCollectionAdmin(address admin) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) external;
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) external;
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) external;
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) external;
+
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() external view returns (CollectionNestingAndPermission memory);
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -416,6 +424,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -118,7 +118,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1
+/// @dev the ERC-165 identifier for this interface is 0xb34d97e9
interface Collection is Dummy, ERC165 {
// /// Set collection property.
// ///
@@ -253,30 +253,38 @@
// /// or in textual repr: removeCollectionAdmin(address)
// function removeCollectionAdmin(address admin) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
- /// @dev EVM selector for this function is: 0x112d4586,
- /// or in textual repr: setCollectionNesting(bool)
- function setCollectionNesting(bool enable) external;
+ /// @dev EVM selector for this function is: 0x0b9f3890,
+ /// or in textual repr: setCollectionNesting((bool,bool,address[]))
+ function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) external;
- /// Toggle accessibility of collection nesting.
- ///
- /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
- /// @param collections Addresses of collections that will be available for nesting.
- /// @dev EVM selector for this function is: 0x64872396,
- /// or in textual repr: setCollectionNesting(bool,address[])
- function setCollectionNesting(bool enable, address[] memory collections) external;
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ // /// @dev EVM selector for this function is: 0x112d4586,
+ // /// or in textual repr: setCollectionNesting(bool)
+ // function setCollectionNesting(bool enable) external;
+
+ // /// Toggle accessibility of collection nesting.
+ // ///
+ // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // /// @param collections Addresses of collections that will be available for nesting.
+ // /// @dev EVM selector for this function is: 0x64872396,
+ // /// or in textual repr: setCollectionNesting(bool,address[])
+ // function setCollectionNesting(bool enable, address[] memory collections) external;
+
+ /// @dev EVM selector for this function is: 0x92c660a8,
+ /// or in textual repr: collectionNesting()
+ function collectionNesting() external view returns (CollectionNestingAndPermission memory);
- /// Returns nesting for a collection
- /// @dev EVM selector for this function is: 0x22d25bfe,
- /// or in textual repr: collectionNestingRestrictedCollectionIds()
- function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
+ // /// Returns nesting for a collection
+ // /// @dev EVM selector for this function is: 0x22d25bfe,
+ // /// or in textual repr: collectionNestingRestrictedCollectionIds()
+ // function collectionNestingRestrictedCollectionIds() external view returns (CollectionNesting memory);
- /// Returns permissions for a collection
- /// @dev EVM selector for this function is: 0x5b2eaf4b,
- /// or in textual repr: collectionNestingPermissions()
- function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
+ // /// Returns permissions for a collection
+ // /// @dev EVM selector for this function is: 0x5b2eaf4b,
+ // /// or in textual repr: collectionNestingPermissions()
+ // function collectionNestingPermissions() external view returns (CollectionNestingPermission[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -416,6 +424,16 @@
uint256[] ids;
}
+/// Nested collections and permissions
+struct CollectionNestingAndPermission {
+ /// Owner of token can nest tokens under it.
+ bool token_owner;
+ /// Admin of token collection can nest tokens under token.
+ bool collection_admin;
+ /// If set - only tokens from specified collections can be nested.
+ address[] restricted;
+}
+
/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM.
struct CollectionLimit {
CollectionLimitField field;
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionAdmin.test.ts
+++ b/tests/src/eth/collectionAdmin.test.ts
@@ -19,6 +19,7 @@
import {IEthCrossAccountId} from '../util/playgrounds/types';
import {usingEthPlaygrounds, itEth} from './util';
import {EthUniqueHelper} from './util/playgrounds/unique.dev';
+import {CreateCollectionData} from './util/playgrounds/types';
async function recordEthFee(helper: EthUniqueHelper, userAddress: string, call: () => Promise<any>) {
const before = await helper.balance.getSubstrate(helper.address.ethToSubstrate(userAddress));
@@ -55,7 +56,7 @@
const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
- const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, true);
// Check isOwnerOrAdminCross returns false:
tests/src/eth/collectionLimits.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionLimits.test.ts
+++ b/tests/src/eth/collectionLimits.test.ts
@@ -1,7 +1,7 @@
import {IKeyringPair} from '@polkadot/types/types';
import {Pallets} from '../util';
import {expect, itEth, usingEthPlaygrounds} from './util';
-import {CollectionLimitField} from './util/playgrounds/types';
+import {CollectionLimitField, CreateCollectionData} from './util/playgrounds/types';
describe('Can set collection limits', () => {
@@ -20,7 +20,7 @@
].map(testCase =>
itEth.ifWithPallets(`for ${testCase.case}`, testCase.requiredPallets || [], async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.case, owner, 'Limits', 'absolutely anything', 'FLO', 18);
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Limits', 'absolutely anything', 'FLO', testCase.case, 18)).send();
const limits = {
accountTokenOwnershipLimit: 1000,
sponsoredDataSize: 1024,
@@ -96,13 +96,13 @@
};
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, 'Limits', 'absolutely anything', 'ISNI', 18);
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Limits', 'absolutely anything', 'ISNI', testCase.case, 18)).send();
const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner);
// Cannot set non-existing limit
await expect(collectionEvm.methods
.setCollectionLimit({field: 9, value: {status: true, value: 1}})
- .call()).to.be.rejectedWith('Returned error: VM Exception while processing transaction: revert Value not convertible into enum "CollectionLimitField"');
+ .call()).to.be.rejectedWith('Returned error: VM Exception while processing transaction: revert value not convertible into enum "CollectionLimitField"');
// Cannot disable limits
await expect(collectionEvm.methods
@@ -129,7 +129,7 @@
itEth.ifWithPallets(`Non-owner and non-admin cannot set collection limits for ${testCase.case}`, testCase.requiredPallets || [], async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const nonOwner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, 'Limits', 'absolutely anything', 'FLO', 18);
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Limits', 'absolutely anything', 'FLO', testCase.case, 18)).send();
const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner);
await expect(collectionEvm.methods
tests/src/eth/createCollection.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/createCollection.test.ts
@@ -0,0 +1,1459 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+import {IKeyringPair} from '@polkadot/types/types';
+import {evmToAddress} from '@polkadot/util-crypto';
+import {Pallets, requirePalletsOrSkip} from '../util';
+import {expect, itEth, usingEthPlaygrounds} from './util';
+import {CREATE_COLLECTION_DATA_DEFAULTS, CollectionLimitField, CollectionMode, CreateCollectionData, TokenPermissionField, emptyAddress} from './util/playgrounds/types';
+import {CollectionFlag, IEthCrossAccountId, TCollectionMode} from '../util/playgrounds/types';
+
+const DECIMALS = 18;
+const CREATE_COLLECTION_DATA_DEFAULTS_ARRAY = [
+ [],
+ [],
+ [],
+ [false, false, []],
+ [],
+ [0],
+];
+
+type ElementOf<A> = A extends readonly (infer T)[] ? T : never;
+function* cartesian<T extends Array<Array<any>>, R extends Array<any>>(internalRest: [...R], ...args: [...T]): Generator<[...R, ...{[K in keyof T]: ElementOf<T[K]>}]> {
+ if(args.length === 0) {
+ yield internalRest as any;
+ return;
+ }
+ for(const value of args[0]) {
+ yield* cartesian([...internalRest, value], ...args.slice(1)) as any;
+ }
+}
+
+describe('Create collection from EVM', () => {
+ let donor: IKeyringPair;
+ let nominal: bigint;
+
+ before(async function() {
+ await usingEthPlaygrounds(async (helper, privateKey) => {
+ donor = await privateKey({url: import.meta.url});
+ nominal = helper.balance.getOneTokenNominal();
+ });
+ });
+
+ describe('Fungible collection', () => {
+ before(async function() {
+ await usingEthPlaygrounds((helper) => {
+ requirePalletsOrSkip(this, helper, [Pallets.Fungible]);
+ return Promise.resolve();
+ });
+ });
+
+ itEth('Collection address exist', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionAddressForNonexistentCollection = '0x17C4E6453CC49AAAAEACA894E6D9683E00112233';
+ const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner);
+
+ expect(await collectionHelpers
+ .methods.isCollectionExist(collectionAddressForNonexistentCollection).call())
+ .to.be.false;
+
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Exister', 'absolutely anything', 'WIWT', 'ft', DECIMALS)).send();
+ expect(await collectionHelpers
+ .methods.isCollectionExist(collectionAddress).call())
+ .to.be.true;
+
+ // check collectionOwner:
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
+ const collectionOwner = await collectionEvm.methods.collectionOwner().call();
+ expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner, true));
+ });
+
+ itEth('destroyCollection', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('Exister', 'absolutely anything', 'WIWT', 'ft', DECIMALS)).send();
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+
+ const result = await collectionHelper.methods
+ .destroyCollection(collectionAddress)
+ .send({from: owner});
+
+ const events = helper.eth.normalizeEvents(result.events);
+
+ expect(events).to.be.deep.equal([
+ {
+ address: collectionHelper.options.address,
+ event: 'CollectionDestroyed',
+ args: {
+ collectionId: collectionAddress,
+ },
+ },
+ ]);
+
+ expect(await collectionHelper.methods
+ .isCollectionExist(collectionAddress)
+ .call()).to.be.false;
+ expect(await helper.collection.getData(collectionId)).to.be.null;
+ });
+
+ itEth('(!negative test!) Create collection (bad lengths)', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+ {
+ const MAX_NAME_LENGTH = 64;
+ const collectionName = 'A'.repeat(MAX_NAME_LENGTH + 1);
+ const description = 'A';
+ const tokenPrefix = 'A';
+
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Fungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('name is too long. Max length is ' + MAX_NAME_LENGTH);
+ }
+ {
+ const MAX_DESCRIPTION_LENGTH = 256;
+ const collectionName = 'A';
+ const description = 'A'.repeat(MAX_DESCRIPTION_LENGTH + 1);
+ const tokenPrefix = 'A';
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Fungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('description is too long. Max length is ' + MAX_DESCRIPTION_LENGTH);
+ }
+ {
+ const MAX_TOKEN_PREFIX_LENGTH = 16;
+ const collectionName = 'A';
+ const description = 'A';
+ const tokenPrefix = 'A'.repeat(MAX_TOKEN_PREFIX_LENGTH + 1);
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Fungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('token_prefix is too long. Max length is ' + MAX_TOKEN_PREFIX_LENGTH);
+ }
+ });
+
+ itEth('(!negative test!) cannot create collection if value !== 2', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+ const expects = [0n, 1n, 30n].map(async value => {
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ 'Peasantry',
+ 'absolutely anything',
+ 'TWIW',
+ CollectionMode.Fungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(value * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
+ });
+ await Promise.all(expects);
+ });
+ });
+
+ describe('Nonfungible collection', () => {
+ before(async function() {
+ await usingEthPlaygrounds((helper) => {
+ requirePalletsOrSkip(this, helper, [Pallets.NFT]);
+ return Promise.resolve();
+ });
+ });
+
+ itEth('Create collection', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const name = 'CollectionEVM';
+ const description = 'Some description';
+ const prefix = 'token prefix';
+
+ // todo:playgrounds this might fail when in async environment.
+ const collectionCountBefore = +(await helper.callRpc('api.rpc.unique.collectionStats')).created;
+ const {collectionId, collectionAddress, events} = await helper.eth.createCollection(owner, new CreateCollectionData(name, description, prefix, 'nft')).send();
+
+ expect(events).to.be.deep.equal([
+ {
+ address: '0x6C4E9fE1AE37a41E93CEE429e8E1881aBdcbb54F',
+ event: 'CollectionCreated',
+ args: {
+ owner: owner,
+ collectionId: collectionAddress,
+ },
+ },
+ ]);
+
+ const collectionCountAfter = +(await helper.callRpc('api.rpc.unique.collectionStats')).created;
+
+ const collection = helper.nft.getCollectionObject(collectionId);
+ const data = (await collection.getData())!;
+
+ expect(collectionCountAfter - collectionCountBefore).to.be.eq(1);
+ expect(collectionId).to.be.eq(collectionCountAfter);
+ expect(data.name).to.be.eq(name);
+ expect(data.description).to.be.eq(description);
+ expect(data.raw.tokenPrefix).to.be.eq(prefix);
+ expect(data.raw.mode).to.be.eq('NFT');
+
+ const options = await collection.getOptions();
+
+ expect(options.tokenPropertyPermissions).to.be.empty;
+ });
+
+ // this test will occasionally fail when in async environment.
+ itEth('Check collection address exist', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const expectedCollectionId = +(await helper.callRpc('api.rpc.unique.collectionStats')).created + 1;
+ const expectedCollectionAddress = helper.ethAddress.fromCollectionId(expectedCollectionId);
+ const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner);
+
+ expect(await collectionHelpers.methods
+ .isCollectionExist(expectedCollectionAddress)
+ .call()).to.be.false;
+
+ await collectionHelpers.methods
+ .createCollection([
+ emptyAddress,
+ 'A',
+ 'A',
+ 'A',
+ CollectionMode.Nonfungible,
+ 0,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .send({value: Number(2n * helper.balance.getOneTokenNominal())});
+
+ expect(await collectionHelpers.methods
+ .isCollectionExist(expectedCollectionAddress)
+ .call()).to.be.true;
+ });
+ });
+
+ describe('Create RFT collection from EVM', () => {
+ before(async function() {
+ await usingEthPlaygrounds((helper) => {
+ requirePalletsOrSkip(this, helper, [Pallets.ReFungible]);
+ return Promise.resolve();
+ });
+ });
+
+ itEth('Create collection', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const name = 'CollectionEVM';
+ const description = 'Some description';
+ const prefix = 'token prefix';
+
+ const {collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData(name, description, prefix, 'rft')).send();
+ const data = (await helper.rft.getData(collectionId))!;
+ const collection = helper.rft.getCollectionObject(collectionId);
+
+ expect(data.name).to.be.eq(name);
+ expect(data.description).to.be.eq(description);
+ expect(data.raw.tokenPrefix).to.be.eq(prefix);
+ expect(data.raw.mode).to.be.eq('ReFungible');
+
+ const options = await collection.getOptions();
+
+ expect(options.tokenPropertyPermissions).to.be.empty;
+ });
+
+ itEth('Create collection with properties & get description', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const name = 'CollectionEVM';
+ const description = 'Some description';
+ const prefix = 'token prefix';
+ const baseUri = 'BaseURI';
+
+ const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, name, description, prefix, baseUri);
+ const contract = helper.ethNativeContract.collection(collectionAddress, 'nft');
+
+ const collection = helper.rft.getCollectionObject(collectionId);
+ const data = (await collection.getData())!;
+
+ expect(data.name).to.be.eq(name);
+ expect(data.description).to.be.eq(description);
+ expect(data.raw.tokenPrefix).to.be.eq(prefix);
+ expect(data.raw.mode).to.be.eq('ReFungible');
+
+ expect(await contract.methods.description().call()).to.deep.equal(description);
+
+ const options = await collection.getOptions();
+ expect(options.tokenPropertyPermissions).to.be.deep.equal([
+ {
+ key: 'URI',
+ permission: {mutable: true, collectionAdmin: true, tokenOwner: false},
+ },
+ {
+ key: 'URISuffix',
+ permission: {mutable: true, collectionAdmin: true, tokenOwner: false},
+ },
+ ]);
+ });
+
+ itEth('Set sponsorship', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsor = await helper.eth.createAccountWithBalance(donor);
+ const ss58Format = helper.chain.getChainProperties().ss58Format;
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Sponsor', 'absolutely anything', 'ENVY', 'rft')).send();
+
+ const collection = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+ const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor);
+ await collection.methods.setCollectionSponsorCross(sponsorCross).send();
+
+ let data = (await helper.rft.getData(collectionId))!;
+ expect(data.raw.sponsorship.Unconfirmed).to.be.equal(evmToAddress(sponsor, Number(ss58Format)));
+
+ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail');
+
+ const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor);
+ await sponsorCollection.methods.confirmCollectionSponsorship().send();
+
+ data = (await helper.rft.getData(collectionId))!;
+ expect(data.raw.sponsorship.Confirmed).to.be.equal(evmToAddress(sponsor, Number(ss58Format)));
+ });
+
+ itEth('Collection address exist', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionAddressForNonexistentCollection = '0x17C4E6453CC49AAAAEACA894E6D9683E00112233';
+ const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner);
+
+ expect(await collectionHelpers
+ .methods.isCollectionExist(collectionAddressForNonexistentCollection).call())
+ .to.be.false;
+
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('Exister', 'absolutely anything', 'WIWT', 'rft')).send();
+ expect(await collectionHelpers
+ .methods.isCollectionExist(collectionAddress).call())
+ .to.be.true;
+
+ // check collectionOwner:
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true);
+ const collectionOwner = await collectionEvm.methods.collectionOwner().call();
+ expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner, true));
+ });
+
+ itEth('destroyCollection', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('Limits', 'absolutely anything', 'OLF', 'rft')).send();
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+
+ await expect(collectionHelper.methods
+ .destroyCollection(collectionAddress)
+ .send({from: owner})).to.be.fulfilled;
+
+ expect(await collectionHelper.methods
+ .isCollectionExist(collectionAddress)
+ .call()).to.be.false;
+ expect(await helper.collection.getData(collectionId)).to.be.null;
+ });
+
+ itEth('(!negative test!) Create collection (bad lengths)', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+ {
+ const MAX_NAME_LENGTH = 64;
+ const collectionName = 'A'.repeat(MAX_NAME_LENGTH + 1);
+ const description = 'A';
+ const tokenPrefix = 'A';
+
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Refungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('name is too long. Max length is ' + MAX_NAME_LENGTH);
+ }
+ {
+ const MAX_DESCRIPTION_LENGTH = 256;
+ const collectionName = 'A';
+ const description = 'A'.repeat(MAX_DESCRIPTION_LENGTH + 1);
+ const tokenPrefix = 'A';
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Refungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('description is too long. Max length is ' + MAX_DESCRIPTION_LENGTH);
+ }
+ {
+ const MAX_TOKEN_PREFIX_LENGTH = 16;
+ const collectionName = 'A';
+ const description = 'A';
+ const tokenPrefix = 'A'.repeat(MAX_TOKEN_PREFIX_LENGTH + 1);
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ collectionName,
+ description,
+ tokenPrefix,
+ CollectionMode.Refungible,
+ DECIMALS,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(2n * nominal)})).to.be.rejectedWith('token_prefix is too long. Max length is ' + MAX_TOKEN_PREFIX_LENGTH);
+ }
+ });
+
+ itEth('(!negative test!) Create collection (no funds)', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
+ await expect(collectionHelper.methods
+ .createCollection([
+ emptyAddress,
+ 'Peasantry',
+ 'absolutely anything',
+ 'TWIW',
+ CollectionMode.Refungible,
+ 0,
+ ...CREATE_COLLECTION_DATA_DEFAULTS_ARRAY,
+ ])
+ .call({value: Number(1n * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
+ });
+ });
+
+ describe('Sponsoring', () => {
+ itEth('Сan remove collection sponsor', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsor = await helper.eth.createAccountWithBalance(donor);
+ const sponsorCross = helper.ethCrossAccount.fromAddr(sponsor);
+
+ const {collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Sponsor collection',
+ description: '1',
+ tokenPrefix: '1',
+ collectionMode: 'nft',
+ pendingSponsor: sponsorCross,
+ },
+ ).send();
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+
+ await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+ let sponsorStruct = await collectionEvm.methods.collectionSponsor().call({from: owner});
+ expect(helper.address.restoreCrossAccountFromBigInt(BigInt(sponsorStruct.sub))).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+ expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+
+ await collectionEvm.methods.removeCollectionSponsor().send({from: owner});
+
+ sponsorStruct = await collectionEvm.methods.collectionSponsor().call({from: owner});
+ expect(sponsorStruct.eth).to.be.eq('0x0000000000000000000000000000000000000000');
+ });
+
+ itEth('Can sponsor from evm address via access list', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsorEth = await helper.eth.createAccountWithBalance(donor);
+ const sponsorCross = helper.ethCrossAccount.fromAddr(sponsorEth);
+
+ const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Sponsor collection',
+ description: '1',
+ tokenPrefix: '1',
+ collectionMode: 'nft',
+ pendingSponsor: sponsorCross,
+ limits: [{field: CollectionLimitField.SponsoredDataRateLimit, value: 30n}],
+ tokenPropertyPermissions: [{key: 'key', permissions: [{code: TokenPermissionField.TokenOwner, value: true}]}],
+ },
+ '',
+ );
+
+ const collectionSub = helper.nft.getCollectionObject(collectionId);
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ let sponsorship = (await collectionSub.getData())!.raw.sponsorship;
+ expect(sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsorEth, true));
+ // Account cannot confirm sponsorship if it is not set as a sponsor
+ await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail');
+
+ // Sponsor can confirm sponsorship:
+ await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsorEth});
+ sponsorship = (await collectionSub.getData())!.raw.sponsorship;
+ expect(sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsorEth, true));
+
+ // Create user with no balance:
+ const user = helper.ethCrossAccount.createAccount();
+ const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+ expect(nextTokenId).to.be.equal('1');
+
+ // Set collection permissions:
+ const oldPermissions = (await collectionSub.getData())!.raw.permissions;
+ expect(oldPermissions.mintMode).to.be.false;
+ expect(oldPermissions.access).to.be.equal('Normal');
+
+ await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+ await collectionEvm.methods.addToCollectionAllowListCross(user).send({from: owner});
+ await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+
+ const newPermissions = (await collectionSub.getData())!.raw.permissions;
+ expect(newPermissions.mintMode).to.be.true;
+ expect(newPermissions.access).to.be.equal('AllowList');
+
+ const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsorEth));
+ const userBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user.eth));
+
+ // User can mint token without balance:
+ {
+ const result = await collectionEvm.methods.mintCross(user, [{key: 'key', value: Buffer.from('Value')}]).send({from: user.eth});
+ const event = helper.eth.normalizeEvents(result.events)
+ .find(event => event.event === 'Transfer');
+
+ expect(event).to.be.deep.equal({
+ address: collectionAddress,
+ event: 'Transfer',
+ args: {
+ from: '0x0000000000000000000000000000000000000000',
+ to: user.eth,
+ tokenId: '1',
+ },
+ });
+
+ // await collectionEvm.methods.setProperties(1, [{key: 'key', value: Buffer.from('Value1')}]).send({from: user.eth});
+
+ const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsorEth));
+ const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user.eth));
+
+ expect(await collectionEvm.methods.properties(nextTokenId, []).call())
+ .to.be.like([
+ [
+ 'key',
+ '0x' + Buffer.from('Value').toString('hex'),
+ ],
+ ]);
+ expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+ expect(userBalanceAfter).to.be.eq(userBalanceBefore);
+ expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+ }
+ });
+
+ itEth('Check that transaction via EVM spend money from sponsor address', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsor = await helper.eth.createAccountWithBalance(donor);
+ const sponsorCross = helper.ethCrossAccount.fromAddr(sponsor);
+ const user = helper.eth.createAccount();
+ const userCross = helper.ethCrossAccount.fromAddress(user);
+
+ const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Sponsor collection',
+ description: '1',
+ tokenPrefix: '1',
+ collectionMode: 'nft',
+ pendingSponsor: sponsorCross,
+ adminList: [userCross],
+ },
+ '',
+ );
+
+ const collectionSub = helper.nft.getCollectionObject(collectionId);
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ // Set collection sponsor:
+ let collectionData = (await collectionSub.getData())!;
+ expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+ await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail');
+
+ await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+ collectionData = (await collectionSub.getData())!;
+ expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
+
+ const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+
+ const mintingResult = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user});
+ const tokenId = mintingResult.events.Transfer.returnValues.tokenId;
+
+ const event = helper.eth.normalizeEvents(mintingResult.events)
+ .find(event => event.event === 'Transfer');
+ const address = helper.ethAddress.fromCollectionId(collectionId);
+
+ expect(event).to.be.deep.equal({
+ address,
+ event: 'Transfer',
+ args: {
+ from: '0x0000000000000000000000000000000000000000',
+ to: user,
+ tokenId: '1',
+ },
+ });
+ expect(await collectionEvm.methods.tokenURI(tokenId).call({from: user})).to.be.equal('Test URI');
+
+ const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+ const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+ expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+ });
+
+ itEth('Can reassign collection sponsor', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsorEth = await helper.eth.createAccountWithBalance(donor);
+ const sponsorCrossEth = helper.ethCrossAccount.fromAddr(sponsorEth);
+ const [sponsorSub] = await helper.arrange.createAccounts([100n], donor);
+ const sponsorCrossSub = helper.ethCrossAccount.fromKeyringPair(sponsorSub);
+
+ const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Sponsor collection',
+ description: '1',
+ tokenPrefix: '1',
+ collectionMode: 'nft',
+ pendingSponsor: sponsorCrossEth,
+ },
+ '',
+ );
+ const collectionSub = helper.nft.getCollectionObject(collectionId);
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ // Set and confirm sponsor:
+ await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsorEth});
+
+ // Can reassign sponsor:
+ await collectionEvm.methods.setCollectionSponsorCross(sponsorCrossSub).send({from: owner});
+ const collectionSponsor = (await collectionSub.getData())?.raw.sponsorship;
+ expect(collectionSponsor).to.deep.eq({Unconfirmed: sponsorSub.address});
+ });
+
+ [
+ 'transfer',
+ 'transferCross',
+ 'transferFrom',
+ 'transferFromCross',
+ ].map(testCase =>
+ itEth(`[${testCase}] Check that transfer via EVM spend money from sponsor address`, async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const sponsor = await helper.eth.createAccountWithBalance(donor);
+ const sponsorCross = helper.ethCrossAccount.fromAddr(sponsor);
+ const user = await helper.eth.createAccountWithBalance(donor);
+ const userCross = helper.ethCrossAccount.fromAddress(user);
+
+ const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Sponsor collection',
+ description: '1',
+ tokenPrefix: '1',
+ collectionMode: 'rft',
+ pendingSponsor: sponsorCross,
+ adminList: [userCross],
+ },
+ '',
+ );
+ const receiver = await helper.eth.createAccountWithBalance(donor);
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
+
+ await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
+
+ const result = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user});
+ const tokenId = result.events.Transfer.returnValues.tokenId;
+
+ const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+ const userBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+
+ switch (testCase) {
+ case 'transfer':
+ await collectionEvm.methods.transfer(receiver, tokenId).send({from: user});
+ break;
+ case 'transferCross':
+ await collectionEvm.methods.transferCross(helper.ethCrossAccount.fromAddress(receiver), tokenId).send({from: user});
+ break;
+ case 'transferFrom':
+ await collectionEvm.methods.transferFrom(user, receiver, tokenId).send({from: user});
+ break;
+ case 'transferFromCross':
+ await collectionEvm.methods.transferFromCross(helper.ethCrossAccount.fromAddress(user), helper.ethCrossAccount.fromAddress(receiver), tokenId).send({from: user});
+ break;
+ }
+
+ const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner));
+ expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore);
+ const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor));
+ expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true;
+ const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user));
+ expect(userBalanceAfter).to.be.eq(userBalanceBefore);
+ }));
+ });
+
+ describe('Collection admins', () => {
+ let donor: IKeyringPair;
+
+ before(async function() {
+ await usingEthPlaygrounds(async (_helper, privateKey) => {
+ donor = await privateKey({url: import.meta.url});
+ });
+ });
+
+ [
+ {mode: 'nft' as const, requiredPallets: []},
+ {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ {mode: 'ft' as const, requiredPallets: []},
+ ].map(testCase => {
+ itEth.ifWithPallets(`can add account admin by owner for ${testCase.mode}`, testCase.requiredPallets, async ({helper, privateKey}) => {
+ // arrange
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const adminSub = await privateKey('//admin2');
+ const adminEth = helper.eth.createAccount().toLowerCase();
+
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Mint collection',
+ description: 'a',
+ tokenPrefix: 'b',
+ collectionMode: testCase.mode,
+ adminList: [adminCrossSub, adminCrossEth],
+ },
+ ).send();
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, true);
+
+ // 1. Expect api.rpc.unique.adminlist returns admins:
+ const adminListRpc = await helper.collection.getAdmins(collectionId);
+ expect(adminListRpc).to.has.length(2);
+ expect(adminListRpc).to.be.deep.contain.members([{Substrate: adminSub.address}, {Ethereum: adminEth}]);
+
+ // 2. Expect methods.collectionAdmins == api.rpc.unique.adminlist
+ let adminListEth = await collectionEvm.methods.collectionAdmins().call();
+ adminListEth = adminListEth.map((element: IEthCrossAccountId) => helper.address.convertCrossAccountFromEthCrossAccount(element));
+ expect(adminListRpc).to.be.like(adminListEth);
+
+ // 3. check isOwnerOrAdminCross returns true:
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(adminCrossSub).call()).to.be.true;
+ expect(await collectionEvm.methods.isOwnerOrAdminCross(adminCrossEth).call()).to.be.true;
+ });
+ });
+
+ itEth('cross account admin can mint', async ({helper}) => {
+ // arrange: create collection and accounts
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const adminEth = (await helper.eth.createAccountWithBalance(donor)).toLowerCase();
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+ const [adminSub] = await helper.arrange.createAccounts([100n], donor);
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Mint collection',
+ description: 'a',
+ tokenPrefix: 'b',
+ collectionMode: 'nft',
+ adminList: [adminCrossSub, adminCrossEth],
+ },
+ 'uri',
+ );
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);
+
+ // admin (sub and eth) can mint token:
+ await collectionEvm.methods.mint(owner).send({from: adminEth});
+ await helper.nft.mintToken(adminSub, {collectionId, owner: {Ethereum: owner}});
+
+ expect(await helper.collection.getLastTokenId(collectionId)).to.eq(2);
+ });
+
+ itEth('cannot add invalid cross account admin', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const [admin] = await helper.arrange.createAccounts([100n, 100n], donor);
+
+ const adminCross = {
+ eth: helper.address.substrateToEth(admin.address),
+ sub: admin.addressRaw,
+ };
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft',
+ adminList: [adminCross],
+ },
+ ).call()).to.be.rejected;
+ });
+
+ itEth('Remove [cross] admin by owner', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const [adminSub] = await helper.arrange.createAccounts([10n], donor);
+ const adminEth = (await helper.eth.createAccountWithBalance(donor)).toLowerCase();
+ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub);
+ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth);
+
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft',
+ adminList: [adminCrossSub, adminCrossEth],
+ },
+ ).send();
+
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ {
+ const adminList = await helper.collection.getAdmins(collectionId);
+ expect(adminList).to.deep.include({Substrate: adminSub.address});
+ expect(adminList).to.deep.include({Ethereum: adminEth});
+ }
+
+ await collectionEvm.methods.removeCollectionAdminCross(adminCrossSub).send();
+ await collectionEvm.methods.removeCollectionAdminCross(adminCrossEth).send();
+ const adminList = await helper.collection.getAdmins(collectionId);
+ expect(adminList.length).to.be.eq(0);
+
+ // Non admin cannot mint:
+ await expect(helper.nft.mintToken(adminSub, {collectionId, owner: {Substrate: adminSub.address}})).to.be.rejectedWith(/common.PublicMintingNotAllowed/);
+ await expect(collectionEvm.methods.mint(adminEth).send({from: adminEth})).to.be.rejected;
+ });
+ });
+
+ describe('Collection limits', () => {
+ describe('Can set collection limits', () => {
+ [
+ {case: 'nft' as const},
+ {case: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ {case: 'ft' as const},
+ ].map(testCase =>
+ itEth.ifWithPallets(`for ${testCase.case}`, testCase.requiredPallets || [], async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const limits = {
+ accountTokenOwnershipLimit: 1000n,
+ sponsoredDataSize: 1024n,
+ sponsoredDataRateLimit: 30n,
+ tokenLimit: 1000000n,
+ sponsorTransferTimeout: 6n,
+ sponsorApproveTimeout: 6n,
+ ownerCanTransfer: 1n,
+ ownerCanDestroy: 0n,
+ transfersEnabled: 0n,
+ };
+
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Limits',
+ description: 'absolutely anything',
+ tokenPrefix: 'FLO',
+ collectionMode: testCase.case,
+ limits: [
+ {field: CollectionLimitField.AccountTokenOwnership, value: limits.accountTokenOwnershipLimit},
+ {field: CollectionLimitField.SponsoredDataSize, value: limits.sponsoredDataSize},
+ {field: CollectionLimitField.SponsoredDataRateLimit, value: limits.sponsoredDataRateLimit},
+ {field: CollectionLimitField.TokenLimit, value: limits.tokenLimit},
+ {field: CollectionLimitField.SponsorTransferTimeout, value: limits.sponsorTransferTimeout},
+ {field: CollectionLimitField.SponsorApproveTimeout, value: limits.sponsorApproveTimeout},
+ {field: CollectionLimitField.OwnerCanTransfer, value: limits.ownerCanTransfer},
+ {field: CollectionLimitField.OwnerCanDestroy, value: limits.ownerCanDestroy},
+ {field: CollectionLimitField.TransferEnabled, value: limits.transfersEnabled},
+ ],
+ },
+ ).send();
+
+ const expectedLimits = {
+ accountTokenOwnershipLimit: 1000,
+ sponsoredDataSize: 1024,
+ sponsoredDataRateLimit: {blocks: 30},
+ tokenLimit: 1000000,
+ sponsorTransferTimeout: 6,
+ sponsorApproveTimeout: 6,
+ ownerCanTransfer: true,
+ ownerCanDestroy: false,
+ transfersEnabled: false,
+ };
+
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner);
+
+ // Check limits from sub:
+ const data = (await helper.rft.getData(collectionId))!;
+ expect(data.raw.limits).to.deep.eq(expectedLimits);
+ expect(await helper.collection.getEffectiveLimits(collectionId)).to.deep.eq(expectedLimits);
+ // Check limits from eth:
+ const limitsEvm = await collectionEvm.methods.collectionLimits().call({from: owner});
+ expect(limitsEvm).to.have.length(9);
+ expect(limitsEvm[0]).to.deep.eq([CollectionLimitField.AccountTokenOwnership.toString(), [true, limits.accountTokenOwnershipLimit.toString()]]);
+ expect(limitsEvm[1]).to.deep.eq([CollectionLimitField.SponsoredDataSize.toString(), [true, limits.sponsoredDataSize.toString()]]);
+ expect(limitsEvm[2]).to.deep.eq([CollectionLimitField.SponsoredDataRateLimit.toString(), [true, limits.sponsoredDataRateLimit.toString()]]);
+ expect(limitsEvm[3]).to.deep.eq([CollectionLimitField.TokenLimit.toString(), [true, limits.tokenLimit.toString()]]);
+ expect(limitsEvm[4]).to.deep.eq([CollectionLimitField.SponsorTransferTimeout.toString(), [true, limits.sponsorTransferTimeout.toString()]]);
+ expect(limitsEvm[5]).to.deep.eq([CollectionLimitField.SponsorApproveTimeout.toString(), [true, limits.sponsorApproveTimeout.toString()]]);
+ expect(limitsEvm[6]).to.deep.eq([CollectionLimitField.OwnerCanTransfer.toString(), [true, limits.ownerCanTransfer.toString()]]);
+ expect(limitsEvm[7]).to.deep.eq([CollectionLimitField.OwnerCanDestroy.toString(), [true, limits.ownerCanDestroy.toString()]]);
+ expect(limitsEvm[8]).to.deep.eq([CollectionLimitField.TransferEnabled.toString(), [true, limits.transfersEnabled.toString()]]);
+ }));
+ });
+
+ describe('(!negative test!) Cannot set invalid collection limits', () => {
+ [
+ {case: 'nft' as const},
+ {case: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ {case: 'ft' as const},
+ ].map(testCase =>
+ itEth.ifWithPallets(`for ${testCase.case}`, testCase.requiredPallets || [], async ({helper}) => {
+ const invalidLimits = {
+ accountTokenOwnershipLimit: BigInt(Number.MAX_SAFE_INTEGER),
+ transfersEnabled: 3,
+ };
+
+ const createCollectionData = {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'Limits',
+ description: 'absolutely anything',
+ tokenPrefix: 'ISNI',
+ collectionMode: testCase.case,
+ };
+
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ limits: [{field: 9 as CollectionLimitField, value: 1n}],
+ },
+ ).call()).to.be.rejectedWith('value not convertible into enum "CollectionLimitField"');
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ limits: [{field: CollectionLimitField.AccountTokenOwnership, value: invalidLimits.accountTokenOwnershipLimit}],
+ },
+ ).call()).to.be.rejectedWith(`can't convert value to u32 "${invalidLimits.accountTokenOwnershipLimit}"`);
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ limits: [{field: CollectionLimitField.TransferEnabled, value: 3n}],
+ },
+ ).call()).to.be.rejectedWith(`can't convert value to boolean "${invalidLimits.transfersEnabled}"`);
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ limits: [{field: CollectionLimitField.SponsoredDataSize, value: -1n}],
+ },
+ ).call()).to.be.rejectedWith('value out-of-bounds');
+ }));
+ });
+ });
+
+ describe('Collection properties', () => {
+
+ [
+ {mode: 'nft' as const, methodParams: [{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]},
+ {mode: 'rft' as const, methodParams: [{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]},
+ {mode: 'ft' as const, methodParams: [{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]},
+ ].map(testCase =>
+ itEth.ifWithPallets(`Collection properties can be set for ${testCase.mode}`, testCase.mode === 'rft' ? [Pallets.ReFungible] : [], async({helper}) => {
+ const caller = await helper.eth.createAccountWithBalance(donor);
+ const callerCross = helper.ethCrossAccount.fromAddress(caller);
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'name',
+ description: 'test',
+ tokenPrefix: 'test',
+ collectionMode: testCase.mode,
+ adminList: [callerCross],
+ properties: testCase.methodParams,
+ },
+ ).send();
+
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, caller);
+
+ const raw = (await helper[testCase.mode].getData(collectionId))?.raw;
+ expect(raw.properties).to.deep.equal(testCase.expectedProps);
+
+ // collectionProperties returns properties:
+ expect(await collectionEvm.methods.collectionProperties([]).call()).to.be.like(testCase.expectedProps.map(prop => helper.ethProperty.property(prop.key, prop.value)));
+ }));
+
+ [
+ {mode: 'nft' as const},
+ {mode: 'rft' as const},
+ {mode: 'ft' as const},
+ ].map(testCase =>
+ itEth.ifWithPallets(`Collection properties can be deleted for ${testCase.mode}`, testCase.mode === 'rft' ? [Pallets.ReFungible] : [], async({helper}) => {
+ const caller = await helper.eth.createAccountWithBalance(donor);
+ const callerCross = helper.ethCrossAccount.fromAddress(caller);
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'name',
+ description: 'test',
+ tokenPrefix: 'test',
+ collectionMode: testCase.mode,
+ adminList: [callerCross],
+ properties:[
+ {key: 'testKey1', value: Buffer.from('testValue1')},
+ {key: 'testKey2', value: Buffer.from('testValue2')},
+ {key: 'testKey3', value: Buffer.from('testValue3')}],
+ },
+ ).send();
+
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, caller);
+
+ await collectionEvm.methods.deleteCollectionProperties(['testKey1', 'testKey2']).send({from: caller});
+
+ const raw = (await helper[testCase.mode].getData(collectionId))?.raw;
+
+ expect(raw.properties.length).to.equal(1);
+ expect(raw.properties).to.deep.equal([{key: 'testKey3', value: 'testValue3'}]);
+ }));
+
+ itEth('(!negative test!) Cannot set invalid properties', async({helper}) => {
+ const caller = await helper.eth.createAccountWithBalance(donor);
+ const callerCross = helper.ethCrossAccount.fromAddress(caller);
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const createCollectionData = {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'name',
+ description: 'test',
+ tokenPrefix: 'test',
+ collectionMode: 'nft' as TCollectionMode,
+ adminList: [callerCross],
+ };
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ properties: [{key: '', value: Buffer.from('val1')}],
+ },
+ ).call()).to.be.rejected;
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ properties: [{key: 'déjà vu', value: Buffer.from('hmm...')}],
+ },
+ ).call()).to.be.rejected;
+
+ await expect(helper.eth.createCollection(
+ owner,
+ {
+ ...createCollectionData,
+ properties: [{key: 'a'.repeat(257), value: Buffer.from('val3')}],
+ },
+ ).call()).to.be.rejected;
+ });
+
+ itEth('(!negative test!) cannot delete properties of non-owned collections', async ({helper}) => {
+ const caller = await helper.eth.createAccountWithBalance(donor);
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'name',
+ description: 'test',
+ tokenPrefix: 'test',
+ collectionMode: 'nft',
+ properties:[
+ {key: 'testKey1', value: Buffer.from('testValue1')},
+ {key: 'testKey2', value: Buffer.from('testValue2')}],
+ },
+ ).send();
+
+ const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller);
+
+ await expect(collectionEvm.methods.deleteCollectionProperties(['testKey2']).send({from: caller})).to.be.rejected;
+ });
+ });
+
+ describe('Token property permissions', () => {
+ [
+ {mode: 'nft' as const, requiredPallets: []},
+ {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ ].map(testCase =>
+ itEth.ifWithPallets(`[${testCase.mode}] Can set all possible token property permissions`, testCase.requiredPallets, async({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const caller = await helper.ethCrossAccount.createAccountWithBalance(donor);
+ for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: testCase.mode,
+ adminList: [caller],
+ tokenPropertyPermissions: [
+ {
+ key: 'testKey',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: mutable},
+ {code: TokenPermissionField.TokenOwner, value: tokenOwner},
+ {code: TokenPermissionField.CollectionAdmin, value: collectionAdmin},
+ ],
+ },
+ ],
+ },
+ ).send();
+ const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
+
+ expect(await helper[testCase.mode].getPropertyPermissions(collectionId)).to.be.deep.equal([{
+ key: 'testKey',
+ permission: {mutable, collectionAdmin, tokenOwner},
+ }]);
+
+ expect(await collection.methods.tokenPropertyPermissions().call({from: caller.eth})).to.be.like([
+ ['testKey', [
+ [TokenPermissionField.Mutable.toString(), mutable],
+ [TokenPermissionField.TokenOwner.toString(), tokenOwner],
+ [TokenPermissionField.CollectionAdmin.toString(), collectionAdmin]],
+ ],
+ ]);
+ }
+ }));
+
+ [
+ {mode: 'nft' as const, requiredPallets: []},
+ {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ ].map(testCase =>
+ itEth.ifWithPallets(`[${testCase.mode}] Can set multiple token property permissions`, testCase.requiredPallets, async({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: testCase.mode,
+ tokenPropertyPermissions: [
+ {
+ key: 'testKey_0',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: true},
+ {code: TokenPermissionField.TokenOwner, value: true},
+ {code: TokenPermissionField.CollectionAdmin, value: true}],
+ },
+ {
+ key: 'testKey_1',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: true},
+ {code: TokenPermissionField.TokenOwner, value: false},
+ {code: TokenPermissionField.CollectionAdmin, value: true}],
+ },
+ {
+ key: 'testKey_2',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: false},
+ {code: TokenPermissionField.TokenOwner, value: true},
+ {code: TokenPermissionField.CollectionAdmin, value: false}],
+ },
+ ],
+ },
+ ).send();
+ const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
+
+ expect(await helper[testCase.mode].getPropertyPermissions(collectionId)).to.be.deep.equal([
+ {
+ key: 'testKey_0',
+ permission: {mutable: true, tokenOwner: true, collectionAdmin: true},
+ },
+ {
+ key: 'testKey_1',
+ permission: {mutable: true, tokenOwner: false, collectionAdmin: true},
+ },
+ {
+ key: 'testKey_2',
+ permission: {mutable: false, tokenOwner: true, collectionAdmin: false},
+ },
+ ]);
+
+ expect(await collection.methods.tokenPropertyPermissions().call({from: owner})).to.be.like([
+ ['testKey_0', [
+ [TokenPermissionField.Mutable.toString(), true],
+ [TokenPermissionField.TokenOwner.toString(), true],
+ [TokenPermissionField.CollectionAdmin.toString(), true]],
+ ],
+ ['testKey_1', [
+ [TokenPermissionField.Mutable.toString(), true],
+ [TokenPermissionField.TokenOwner.toString(), false],
+ [TokenPermissionField.CollectionAdmin.toString(), true]],
+ ],
+ ['testKey_2', [
+ [TokenPermissionField.Mutable.toString(), false],
+ [TokenPermissionField.TokenOwner.toString(), true],
+ [TokenPermissionField.CollectionAdmin.toString(), false]],
+ ],
+ ]);
+ }));
+
+ [
+ {mode: 'nft' as const, requiredPallets: []},
+ {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]},
+ ].map(testCase =>
+ itEth.ifWithPallets(`Can be deleted for ${testCase.mode}`, testCase.requiredPallets, async({helper}) => {
+ const caller = await helper.eth.createAccountWithBalance(donor);
+ const receiver = await helper.ethCrossAccount.createAccountWithBalance(donor);
+ const {collectionAddress} = await helper.eth.createCollection(
+ caller,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: testCase.mode,
+ adminList: [receiver],
+ tokenPropertyPermissions: [
+ {
+ key: 'testKey',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: true},
+ {code: TokenPermissionField.CollectionAdmin, value: true}],
+ },
+ {
+ key: 'testKey_1',
+ permissions: [
+ {code: TokenPermissionField.Mutable, value: true},
+ {code: TokenPermissionField.CollectionAdmin, value: true}],
+ },
+ ],
+ },
+ ).send();
+
+ const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, caller);
+ const tokenId = (await collection.methods.mintCross(receiver, [{key: 'testKey', value: Buffer.from('testValue')}, {key: 'testKey_1', value: Buffer.from('testValue_1')}]).send()).events.Transfer.returnValues.tokenId;
+ expect(await collection.methods.properties(tokenId, ['testKey', 'testKey_1']).call()).to.has.length(2);
+
+ await collection.methods.deleteProperties(tokenId, ['testKey', 'testKey_1']).send({from: caller});
+ expect(await collection.methods.properties(tokenId, ['testKey', 'testKey_1']).call()).to.has.length(0);
+ }));
+ });
+
+ describe('Nesting', () => {
+ itEth('NFT: allows an Owner to nest/unnest their token', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft',
+ nestingSettings: {token_owner: true, collection_admin: false, restricted: []},
+ },
+ ).send();
+
+ const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ // Create a token to be nested to
+ const mintingTargetNFTTokenIdResult = await contract.methods.mint(owner).send({from: owner});
+ const targetNFTTokenId = mintingTargetNFTTokenIdResult.events.Transfer.returnValues.tokenId;
+ const targetNftTokenAddress = helper.ethAddress.fromTokenId(collectionId, targetNFTTokenId);
+
+ // Create a nested token
+ const mintingFirstTokenIdResult = await contract.methods.mint(targetNftTokenAddress).send({from: owner});
+ const firstTokenId = mintingFirstTokenIdResult.events.Transfer.returnValues.tokenId;
+ expect(await contract.methods.ownerOf(firstTokenId).call()).to.be.equal(targetNftTokenAddress);
+
+ // Create a token to be nested and nest
+ const mintingSecondTokenIdResult = await contract.methods.mint(owner).send({from: owner});
+ const secondTokenId = mintingSecondTokenIdResult.events.Transfer.returnValues.tokenId;
+
+ await contract.methods.transfer(targetNftTokenAddress, secondTokenId).send({from: owner});
+ expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(targetNftTokenAddress);
+
+ // Unnest token back
+ await contract.methods.transferFrom(targetNftTokenAddress, owner, secondTokenId).send({from: owner});
+ expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner);
+ });
+
+ itEth('NFT: collectionNesting()', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress: unnestedCollectionAddress} = await helper.eth.createCollection(
+ owner,
+ new CreateCollectionData('A', 'B', 'C', 'nft'),
+ ).send();
+
+ const unnestedContract = await helper.ethNativeContract.collection(unnestedCollectionAddress, 'nft', owner);
+ expect(await unnestedContract.methods.collectionNesting().call({from: owner})).to.be.like([false, false, []]);
+
+ const {collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft',
+ nestingSettings: {token_owner: true, collection_admin: false, restricted: [unnestedCollectionAddress.toString()]},
+ },
+ ).send();
+
+ const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([true, false, [unnestedCollectionAddress.toString()]]);
+ await contract.methods.setCollectionNesting([false, false, []]).send({from: owner});
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([false, false, []]);
+ });
+
+ itEth('NFT: disallows to nest token if nesting is disabled', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(
+ owner,
+ {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft',
+ nestingSettings: {token_owner: false, collection_admin: false, restricted: []},
+ },
+ ).send();
+
+ const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ // Create a token to nest into
+ const mintingTargetTokenIdResult = await contract.methods.mint(owner).send({from: owner});
+ const targetTokenId = mintingTargetTokenIdResult.events.Transfer.returnValues.tokenId;
+ const targetNftTokenAddress = helper.ethAddress.fromTokenId(collectionId, targetTokenId);
+
+ // Create a token to nest
+ const mintingNftTokenIdResult = await contract.methods.mint(owner).send({from: owner});
+ const nftTokenId = mintingNftTokenIdResult.events.Transfer.returnValues.tokenId;
+
+ // Try to nest
+ await expect(contract.methods
+ .transfer(targetNftTokenAddress, nftTokenId)
+ .call({from: owner})).to.be.rejectedWith('UserIsNotAllowedToNest');
+ });
+ });
+
+ describe('Flags', () => {
+ const createCollectionData = {
+ ...CREATE_COLLECTION_DATA_DEFAULTS,
+ name: 'A',
+ description: 'B',
+ tokenPrefix: 'C',
+ collectionMode: 'nft' as TCollectionMode,
+ };
+
+ itEth('NFT: use numbers for flags', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: 0}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: false});
+ }
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: 64}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: true});
+ }
+ });
+
+ itEth('NFT: foreign flag number is ignored', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: 128}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: false});
+ }
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: 192}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: true});
+ }
+ });
+
+ itEth('NFT: use enum for flags', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: [CollectionFlag.Erc721metadata]}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: true});
+ }
+ });
+
+ itEth('NFT: foreign flag enum is ignored', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: [CollectionFlag.Foreign]}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: false});
+ }
+
+ {
+ const {collectionId} = await helper.eth.createCollection(owner, {...createCollectionData, flags: [CollectionFlag.Erc721metadata | CollectionFlag.Foreign]}).send();
+ expect((await helper.nft.getData(collectionId))?.raw.flags).to.be.deep.equal({foreign: false, erc721metadata: true});
+ }
+ });
+ });
+});
tests/src/eth/destroyCollection.test.tsdiffbeforeafterboth--- a/tests/src/eth/destroyCollection.test.ts
+++ b/tests/src/eth/destroyCollection.test.ts
@@ -17,13 +17,15 @@
import {IKeyringPair} from '@polkadot/types/types';
import {Pallets} from '../util';
import {expect, itEth, usingEthPlaygrounds} from './util';
+import {TCollectionMode} from '../util/playgrounds/types';
+import {CreateCollectionData} from './util/playgrounds/types';
describe('Destroy Collection from EVM', function() {
let donor: IKeyringPair;
const testCases = [
- {case: 'rft' as const, params: ['Limits', 'absolutely anything', 'OLF'], requiredPallets: [Pallets.ReFungible]},
- {case: 'nft' as const, params: ['Limits', 'absolutely anything', 'OLF'], requiredPallets: [Pallets.NFT]},
- {case: 'ft' as const, params: ['Limits', 'absolutely anything', 'OLF', 18], requiredPallets: [Pallets.Fungible]},
+ {case: 'rft' as const, params: ['Limits', 'absolutely anything', 'OLF', 'rft'], requiredPallets: [Pallets.ReFungible]},
+ {case: 'nft' as const, params: ['Limits', 'absolutely anything', 'OLF', 'nft'], requiredPallets: [Pallets.NFT]},
+ {case: 'ft' as const, params: ['Limits', 'absolutely anything', 'OLF', 'ft', 18], requiredPallets: [Pallets.Fungible]},
];
before(async function() {
@@ -40,8 +42,7 @@
const unexistedCollection = helper.ethAddress.fromCollectionId(1000000);
const collectionHelpers = await helper.ethNativeContract.collectionHelpers(signer);
- const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, ...testCase.params as [string, string, string, number?]);
-
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData(...testCase.params as [string, string, string, TCollectionMode, number?])).send();
// cannot burn collec
await expect(collectionHelpers.methods
.destroyCollection(collectionAddress)
tests/src/eth/events.test.tsdiffbeforeafterboth--- a/tests/src/eth/events.test.ts
+++ b/tests/src/eth/events.test.ts
@@ -19,7 +19,7 @@
import {EthUniqueHelper, itEth, usingEthPlaygrounds} from './util';
import {IEvent, TCollectionMode} from '../util/playgrounds/types';
import {Pallets, requirePalletsOrSkip} from '../util';
-import {CollectionLimitField, TokenPermissionField, NormalizedEvent} from './util/playgrounds/types';
+import {CollectionLimitField, TokenPermissionField, NormalizedEvent, CreateCollectionData} from './util/playgrounds/types';
let donor: IKeyringPair;
@@ -39,7 +39,8 @@
async function testCollectionCreatedAndDestroy(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
const {unsubscribe, collectedEvents: subEvents} = await helper.subscribeEvents([{section: 'common', names: ['CollectionCreated', 'CollectionDestroyed']}]);
- const {collectionAddress, events: ethEvents} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress, events: ethEvents} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
+
await helper.wait.newBlocks(1);
{
expect(ethEvents).to.containSubset([
@@ -72,7 +73,7 @@
async function testCollectionPropertySetAndDeleted(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
@@ -113,7 +114,7 @@
async function testPropertyPermissionSet(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -144,7 +145,7 @@
async function testAllowListAddressAddedAndRemoved(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
const user = helper.ethCrossAccount.createAccount();
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any[] = [];
@@ -186,7 +187,7 @@
async function testCollectionAdminAddedAndRemoved(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
const user = helper.ethCrossAccount.createAccount();
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -226,7 +227,7 @@
async function testCollectionLimitSet(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -253,7 +254,7 @@
async function testCollectionOwnerChanged(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
const newOwner = helper.ethCrossAccount.createAccount();
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -279,7 +280,7 @@
async function testCollectionPermissionSet(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -320,7 +321,7 @@
async function testCollectionSponsorSetAndConfirmedAndThenRemoved(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
const sponsor = await helper.ethCrossAccount.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner);
const ethEvents: any = [];
@@ -374,7 +375,7 @@
async function testTokenPropertySetAndDeleted(helper: EthUniqueHelper, mode: TCollectionMode) {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', mode, 18)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner);
const result = await collection.methods.mint(owner).send({from: owner});
const tokenId = result.events.Transfer.returnValues.tokenId;
tests/src/eth/marketplace-v2/Market.soldiffbeforeafterboth--- a/tests/src/eth/marketplace-v2/Market.sol
+++ b/tests/src/eth/marketplace-v2/Market.sol
@@ -7,7 +7,7 @@
import "@openzeppelin/contracts/access/Ownable.sol";
import { UniqueNFT, CrossAddress } from "@unique-nft/solidity-interfaces/contracts/UniqueNFT.sol";
import { UniqueFungible, CrossAddress as CrossAddressF } from "@unique-nft/solidity-interfaces/contracts/UniqueFungible.sol";
-import "@unique-nft/solidity-interfaces/contracts/CollectionHelpers.sol";
+import { CollectionHelpers } from "@unique-nft/solidity-interfaces/contracts/CollectionHelpers.sol";
import "./royalty/UniqueRoyaltyHelper.sol";
contract Market is Ownable, ReentrancyGuard {
tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth--- a/tests/src/eth/marketplace/marketplace.test.ts
+++ b/tests/src/eth/marketplace/marketplace.test.ts
@@ -60,7 +60,7 @@
await helpers.methods.setSponsor(matcher.options.address, sponsor).send({from: matcherOwner});
await helpers.methods.confirmSponsorship(matcher.options.address).send({from: sponsor});
- const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: alice.address});
+ const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: {Substrate: alice.address}});
await collection.confirmSponsorship(alice);
await collection.addToAllowList(alice, {Substrate: aliceDoubleMirror});
const evmCollection = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft');
@@ -114,7 +114,7 @@
await helpers.methods.setSponsor(matcher.options.address, sponsor).send({from: matcherOwner});
await helpers.methods.confirmSponsorship(matcher.options.address).send({from: sponsor});
- const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: alice.address});
+ const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: {Substrate: alice.address}});
await collection.confirmSponsorship(alice);
await collection.addToAllowList(alice, {Substrate: aliceDoubleMirror});
const evmCollection = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft');
tests/src/eth/nesting/nest.test.tsdiffbeforeafterboth--- a/tests/src/eth/nesting/nest.test.ts
+++ b/tests/src/eth/nesting/nest.test.ts
@@ -6,11 +6,12 @@
const createNestingCollection = async (
helper: EthUniqueHelper,
owner: string,
+ mergeDeprecated = false,
): Promise<{ collectionId: number, collectionAddress: string, contract: Contract }> => {
const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- await contract.methods.setCollectionNesting(true).send({from: owner});
+ const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, mergeDeprecated);
+ await contract.methods.setCollectionNesting([true, false, []]).send({from: owner});
return {collectionId, collectionAddress, contract};
};
@@ -52,27 +53,44 @@
expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner);
});
+ itEth('NFT: collectionNesting()', async ({helper}) => {
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const {collectionAddress: unnestedCollectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
+ const unnestedContract = await helper.ethNativeContract.collection(unnestedCollectionAddress, 'nft', owner);
+ expect(await unnestedContract.methods.collectionNesting().call({from: owner})).to.be.like([false, false, []]);
+
+ const {contract} = await createNestingCollection(helper, owner);
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([true, false, []]);
+ await contract.methods.setCollectionNesting([true, false, [unnestedCollectionAddress]]).send({from: owner});
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([true, false, [unnestedCollectionAddress]]);
+ await contract.methods.setCollectionNesting([false, true, [unnestedCollectionAddress]]).send({from: owner});
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([false, true, [unnestedCollectionAddress]]);
+ await contract.methods.setCollectionNesting([false, false, []]).send({from: owner});
+ expect(await contract.methods.collectionNesting().call({from: owner})).to.be.like([false, false, []]);
+ });
+
+ // Sof-deprecated
itEth('NFT: collectionNestingRestrictedCollectionIds() & collectionNestingPermissions', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionId: unnestedCollsectionId, collectionAddress: unnsetedCollectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
- const unnestedContract = await helper.ethNativeContract.collection(unnsetedCollectionAddress, 'nft', owner);
+ const unnestedContract = await helper.ethNativeContract.collection(unnsetedCollectionAddress, 'nft', owner, true);
expect(await unnestedContract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([false, []]);
- const {contract} = await createNestingCollection(helper, owner);
+ const {contract} = await createNestingCollection(helper, owner, true);
expect(await contract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([true, []]);
- await contract.methods.setCollectionNesting(true, [unnsetedCollectionAddress]).send({from: owner});
+ await contract.methods['setCollectionNesting(bool,address[])'](true, [unnsetedCollectionAddress]).send({from: owner});
expect(await contract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([true, [unnestedCollsectionId.toString()]]);
expect(await contract.methods.collectionNestingPermissions().call({from: owner})).to.be.like([['1', false], ['0', true]]);
- await contract.methods.setCollectionNesting(false).send({from: owner});
+ await contract.methods['setCollectionNesting(bool)'](false).send({from: owner});
expect(await contract.methods.collectionNestingPermissions().call({from: owner})).to.be.like([['1', false], ['0', false]]);
});
itEth('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
- const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(helper, owner);
- await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});
+ const {collectionId: collectionIdA, contract: contractA} = await createNestingCollection(helper, owner);
+ const {contract: contractB} = await createNestingCollection(helper, owner);
+ await contractA.methods.setCollectionNesting([true, false, [contractA.options.address, contractB.options.address]]).send({from: owner});
// Create a token to nest into
const mintingtargetNftTokenIdResult = await contractA.methods.mint(owner).send({from: owner});
@@ -101,7 +119,7 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionId, contract} = await createNestingCollection(helper, owner);
- await contract.methods.setCollectionNesting(false).send({from: owner});
+ await contract.methods.setCollectionNesting([false, false, []]).send({from: owner});
// Create a token to nest into
const mintingTargetTokenIdResult = await contract.methods.mint(owner).send({from: owner});
@@ -143,10 +161,10 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const malignant = await helper.eth.createAccountWithBalance(donor);
- const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
- const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(helper, owner);
+ const {collectionId: collectionIdA, contract: contractA} = await createNestingCollection(helper, owner);
+ const {collectionId: collectionIdB, contract: contractB} = await createNestingCollection(helper, owner);
- await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});
+ await contractA.methods.setCollectionNesting([true, false, [contractA.options.address, contractB.options.address]]).send({from: owner});
// Create a token in one collection
const mintingTokenIdAResult = await contractA.methods.mint(owner).send({from: owner});
@@ -166,10 +184,10 @@
itEth('NFT: disallows to nest token in an unlisted collection', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
+ const {collectionId: collectionIdA, contract: contractA} = await createNestingCollection(helper, owner);
const {contract: contractB} = await createNestingCollection(helper, owner);
- await contractA.methods.setCollectionNesting(true, [collectionAddressA]).send({from: owner});
+ await contractA.methods.setCollectionNesting([true, false, [contractA.options.address]]).send({from: owner});
// Create a token in one collection
const mintingTokenIdAResult = await contractA.methods.mint(owner).send({from: owner});
@@ -251,7 +269,7 @@
itEth(`Disallow nest into collection without nesting permission [${testCase.mode}] (except for native fungible collection)`, async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
const {collectionId: targetCollectionId, contract: targetContract} = await createNestingCollection(helper, owner);
- await targetContract.methods.setCollectionNesting(false).send({from: owner});
+ await targetContract.methods.setCollectionNesting([false, false, []]).send({from: owner});
const {contract: ftContract} = await createFungibleCollection(helper, owner, testCase.mode);
tests/src/eth/tokenProperties.test.tsdiffbeforeafterboth--- a/tests/src/eth/tokenProperties.test.ts
+++ b/tests/src/eth/tokenProperties.test.ts
@@ -20,7 +20,7 @@
import {ITokenPropertyPermission} from '../util/playgrounds/types';
import {Pallets} from '../util';
import {UniqueNFTCollection, UniqueNFToken, UniqueRFTCollection} from '../util/playgrounds/unique';
-import {TokenPermissionField} from './util/playgrounds/types';
+import {CreateCollectionData, TokenPermissionField} from './util/playgrounds/types';
describe('EVM token properties', () => {
let donor: IKeyringPair;
@@ -41,7 +41,7 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const caller = await helper.ethCrossAccount.createAccountWithBalance(donor);
for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {
- const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
await collection.methods.addCollectionAdminCross(caller).send({from: owner});
@@ -75,7 +75,7 @@
itEth.ifWithPallets(`[${testCase.mode}] Can set multiple token property permissions as owner`, testCase.requiredPallets, async({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
await collection.methods.setTokenPropertyPermissions([
@@ -138,7 +138,7 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const caller = await helper.ethCrossAccount.createAccountWithBalance(donor);
- const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionId, collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
await collection.methods.addCollectionAdminCross(caller).send({from: owner});
@@ -455,7 +455,7 @@
const owner = await helper.eth.createAccountWithBalance(donor);
const caller = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
await expect(collection.methods.setTokenPropertyPermissions([
@@ -474,7 +474,7 @@
itEth.ifWithPallets(`[${testCase.mode}] Cannot set token property permissions with invalid character`, testCase.requiredPallets, async({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
await expect(collection.methods.setTokenPropertyPermissions([
@@ -494,7 +494,7 @@
itEth.ifWithPallets(`[${testCase.mode}] Can reconfigure token property permissions to stricter ones`, testCase.requiredPallets, async({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
// 1. Owner sets strict property-permissions:
@@ -530,7 +530,7 @@
itEth.ifWithPallets(`[${testCase.mode}] Cannot reconfigure token property permissions to less strict ones`, testCase.requiredPallets, async({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
- const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C');
+ const {collectionAddress} = await helper.eth.createCollection(owner, new CreateCollectionData('A', 'B', 'C', testCase.mode)).send();
const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner);
// 1. Owner sets strict property-permissions:
tests/src/eth/tokens/callMethodsERC20.test.tsdiffbeforeafterboth--- a/tests/src/eth/tokens/callMethodsERC20.test.ts
+++ b/tests/src/eth/tokens/callMethodsERC20.test.ts
@@ -17,6 +17,7 @@
import {Pallets, requirePalletsOrSkip} from '../../util';
import {expect, itEth, usingEthPlaygrounds} from '../util';
import {IKeyringPair} from '@polkadot/types/types';
+import {CreateCollectionData} from '../util/playgrounds/types';
[
{mode: 'ft' as const, requiredPallets: []},
@@ -36,7 +37,7 @@
const caller = await helper.eth.createAccountWithBalance(donor);
const mintingParams = testCase.mode === 'ft' ? [caller, 200n] : [caller];
- const {collection, collectionId} = await helper.eth.createCollection(testCase.mode, caller, 'TotalSupply', '6', '6');
+ const {collection, collectionId} = await helper.eth.createCollection(caller, new CreateCollectionData('TotalSupply', '6', '6', testCase.mode)).send();
if(testCase.mode === 'rft') await collection.methods.mint(caller).send({from: caller});
// Use collection contract for FT or token contract for RFT:
@@ -57,7 +58,7 @@
const caller = await helper.eth.createAccountWithBalance(donor);
const mintingParams = testCase.mode === 'ft' ? [caller, 200n] : [caller];
- const {collection, collectionId} = await helper.eth.createCollection(testCase.mode, caller, 'BalanceOf', 'Descroption', 'Prefix');
+ const {collection, collectionId} = await helper.eth.createCollection(caller, new CreateCollectionData('BalanceOf', 'Descroption', 'Prefix', testCase.mode)).send();
if(testCase.mode === 'rft') await collection.methods.mint(caller).send({from: caller});
// Use collection contract for FT or token contract for RFT:
@@ -76,7 +77,7 @@
itEth('decimals', async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
- const {collection, collectionId} = await helper.eth.createCollection(testCase.mode, caller, 'BalanceOf', 'Descroption', 'Prefix');
+ const {collection, collectionId} = await helper.eth.createCollection(caller, new CreateCollectionData('BalanceOf', 'Descroption', 'Prefix', testCase.mode)).send();
if(testCase.mode === 'rft') await collection.methods.mint(caller).send({from: caller});
// Use collection contract for FT or token contract for RFT:
tests/src/eth/tokens/callMethodsERC721.test.tsdiffbeforeafterboth--- a/tests/src/eth/tokens/callMethodsERC721.test.ts
+++ b/tests/src/eth/tokens/callMethodsERC721.test.ts
@@ -17,6 +17,7 @@
import {Pallets} from '../../util';
import {expect, itEth, usingEthPlaygrounds} from '../util';
import {IKeyringPair} from '@polkadot/types/types';
+import {CreateCollectionData} from '../util/playgrounds/types';
describe('ERC-721 call methods', () => {
@@ -37,7 +38,7 @@
const [callerSub] = await helper.arrange.createAccounts([100n], donor);
const [name, description, tokenPrefix] = ['Name', 'Description', 'Symbol'];
- const {collection: collectionEth} = await helper.eth.createCollection(testCase.mode, callerEth, name, description, tokenPrefix);
+ const {collection: collectionEth} = await helper.eth.createCollection(callerEth, new CreateCollectionData(name, description, tokenPrefix, testCase.mode)).send();
await collectionEth.methods.mint(callerEth).send({from: callerEth});
const {collectionId} = await helper[testCase.mode].mintCollection(callerSub, {name, description, tokenPrefix});
const collectionSub = await helper.ethNativeContract.collectionById(collectionId, testCase.mode, callerEth);
@@ -60,7 +61,7 @@
itEth.ifWithPallets(`${testCase.mode.toUpperCase()}: totalSupply`, testCase.requiredPallets, async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
- const {collection} = await helper.eth.createCollection(testCase.mode, caller, 'TotalSupply', '6', '6');
+ const {collection} = await helper.eth.createCollection(caller, new CreateCollectionData('TotalSupply', '6', '6', testCase.mode)).send();
await collection.methods.mint(caller).send({from: caller});
const totalSupply = await collection.methods.totalSupply().call();
@@ -75,7 +76,7 @@
itEth.ifWithPallets(`${testCase.mode.toUpperCase()}: balanceOf`, testCase.requiredPallets, async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
- const {collection} = await helper.eth.createCollection(testCase.mode, caller, 'BalanceOf', 'Descroption', 'Prefix');
+ const {collection} = await helper.eth.createCollection(caller, new CreateCollectionData('BalanceOf', 'Descroption', 'Prefix', testCase.mode)).send();
await collection.methods.mint(caller).send({from: caller});
await collection.methods.mint(caller).send({from: caller});
await collection.methods.mint(caller).send({from: caller});
@@ -91,7 +92,7 @@
].map(testCase => {
itEth.ifWithPallets(`${testCase.mode.toUpperCase()}: ownerOf`, testCase.requiredPallets, async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
- const {collection} = await helper.eth.createCollection(testCase.mode, caller, 'OwnerOf', '6', '6');
+ const {collection} = await helper.eth.createCollection(caller, new CreateCollectionData('OwnerOf', '6', '6', testCase.mode)).send();
const result = await collection.methods.mint(caller).send();
const tokenId = result.events.Transfer.returnValues.tokenId;
@@ -108,7 +109,7 @@
itEth.ifWithPallets(`${testCase.mode.toUpperCase()}: ownerOf after burn`, testCase.requiredPallets, async ({helper}) => {
const caller = await helper.eth.createAccountWithBalance(donor);
const receiver = helper.eth.createAccount();
- const {collection, collectionId} = await helper.eth.createCollection(testCase.mode, caller, 'OwnerOf-AfterBurn', '6', '6');
+ const {collection, collectionId} = await helper.eth.createCollection(caller, new CreateCollectionData('OwnerOf-AfterBurn', '6', '6', testCase.mode)).send();
const result = await collection.methods.mint(caller).send();
const tokenId = result.events.Transfer.returnValues.tokenId;
tests/src/eth/tokens/minting.test.tsdiffbeforeafterboth--- a/tests/src/eth/tokens/minting.test.ts
+++ b/tests/src/eth/tokens/minting.test.ts
@@ -17,6 +17,7 @@
import {IKeyringPair} from '@polkadot/types/types';
import {Pallets} from '../../util';
import {expect, itEth, usingEthPlaygrounds} from '../util';
+import {CreateCollectionData} from '../util/playgrounds/types';
describe('Minting tokens', () => {
@@ -78,7 +79,7 @@
const receiver = helper.eth.createAccount();
const mintingParams = testCase.mode === 'ft' ? [receiver, 100] : [receiver];
- const {collection, collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'Name', 'Desc', 'Prefix');
+ const {collection, collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('Name', 'Desc', 'Prefix', testCase.mode)).send();
const result = await collection.methods.mint(...mintingParams).send({from: owner});
@@ -112,7 +113,7 @@
const receiver = helper.eth.createAccount();
const mintingParams = testCase.mode === 'ft' ? [receiver, 100] : [receiver];
- const {collection, collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'Name', 'Desc', 'Prefix');
+ const {collection, collectionAddress, collectionId} = await helper.eth.createCollection(owner, new CreateCollectionData('Name', 'Desc', 'Prefix', testCase.mode)).send();
const result = await collection.methods.mint(...mintingParams).send({from: owner});
tests/src/eth/util/playgrounds/types.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/types.ts
+++ b/tests/src/eth/util/playgrounds/types.ts
@@ -1,3 +1,5 @@
+import {CollectionFlag, TCollectionMode} from '../../../util/playgrounds/types';
+
export interface ContractImports {
solPath: string;
fsPath: string;
@@ -19,8 +21,10 @@
value: bigint,
}
+export type EthAddress = string;
+
export interface CrossAddress {
- readonly eth: string,
+ readonly eth: EthAddress,
readonly sub: string | Uint8Array,
}
@@ -48,3 +52,81 @@
field: CollectionLimitField,
value: OptionUint,
}
+
+export interface CollectionLimitValue {
+ field: CollectionLimitField,
+ value: bigint,
+}
+
+export enum CollectionMode {
+ Fungible,
+ Nonfungible,
+ Refungible,
+}
+
+export interface PropertyPermission {
+ code: TokenPermissionField,
+ value: boolean,
+}
+export interface TokenPropertyPermission {
+ key: string,
+ permissions: PropertyPermission[],
+}
+export interface CollectionNestingAndPermission {
+ token_owner: boolean,
+ collection_admin: boolean,
+ restricted: string[],
+}
+
+export const emptyAddress: [string, string] = [
+ '0x0000000000000000000000000000000000000000',
+ '0',
+];
+
+export const CREATE_COLLECTION_DATA_DEFAULTS = {
+ decimals: 0,
+ properties: [],
+ tokenPropertyPermissions: [],
+ adminList: [],
+ nestingSettings: {token_owner: false, collection_admin: false, restricted: []},
+ limits: [],
+ pendingSponsor: emptyAddress,
+ flags: 0,
+};
+
+export interface Property {
+ key: string;
+ value: Buffer;
+}
+
+export class CreateCollectionData {
+ name: string;
+ description: string;
+ tokenPrefix: string;
+ collectionMode: TCollectionMode;
+ decimals? = 0;
+ properties?: Property[] = [];
+ tokenPropertyPermissions?: TokenPropertyPermission[] = [];
+ adminList?: CrossAddress[] = [];
+ nestingSettings?: CollectionNestingAndPermission = {token_owner: false, collection_admin: false, restricted: []};
+ limits?: CollectionLimitValue[] = [];
+ pendingSponsor?: [string, string] = emptyAddress;
+ flags?: number | CollectionFlag[] = [0];
+
+ constructor(
+ name: string,
+ description: string,
+ tokenPrefix: string,
+ collectionMode: TCollectionMode,
+ decimals = 18,
+ ) {
+ this.name = name;
+ this.description = description;
+ this.tokenPrefix = tokenPrefix;
+ this.collectionMode = collectionMode;
+ if(collectionMode == 'ft')
+ this.decimals = decimals;
+ else
+ this.decimals = 0;
+ }
+}
\ No newline at end of file
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -18,7 +18,7 @@
import {ArrangeGroup, DevUniqueHelper} from '../../../util/playgrounds/unique.dev';
-import {ContractImports, CompiledContract, CrossAddress, NormalizedEvent, EthProperty} from './types';
+import {ContractImports, CompiledContract, CrossAddress, NormalizedEvent, EthProperty, CollectionMode, CreateCollectionData} from './types';
// Native contracts ABI
import collectionHelpersAbi from '../../abi/collectionHelpers.json' assert {type: 'json'};
@@ -50,7 +50,6 @@
}
}
-
class ContractGroup extends EthGroupBase {
async findImports(imports?: ContractImports[]) {
if(!imports) return function(path: string) {
@@ -181,7 +180,84 @@
}
}
+class CreateCollectionTransaction {
+ signer: string;
+ data: CreateCollectionData;
+ mergeDeprecated: boolean;
+ helper: EthUniqueHelper;
+
+ constructor(helper: EthUniqueHelper, signer: string, data: CreateCollectionData, mergeDeprecated = false) {
+ this.helper = helper;
+ this.signer = signer;
+
+ let flags = 0;
+ // convert CollectionFlags to number and join them in one number
+ if(!data.flags || typeof data.flags == 'number') {
+ flags = data.flags ?? 0;
+ } else {
+ for(let i = 0; i < data.flags.length; i++){
+ const flag = data.flags[i];
+ flags = flags | flag;
+ }
+ }
+ data.flags = flags;
+
+ this.data = data;
+ this.mergeDeprecated = mergeDeprecated;
+ }
+
+ private async createTransaction() {
+ const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(this.signer);
+ let collectionMode;
+ switch (this.data.collectionMode) {
+ case 'nft': collectionMode = CollectionMode.Nonfungible; break;
+ case 'rft': collectionMode = CollectionMode.Refungible; break;
+ case 'ft': collectionMode = CollectionMode.Fungible; break;
+ }
+
+ const tx = collectionHelper.methods.createCollection([
+ this.data.pendingSponsor,
+ this.data.name,
+ this.data.description,
+ this.data.tokenPrefix,
+ collectionMode,
+ this.data.decimals,
+ this.data.properties,
+ this.data.tokenPropertyPermissions,
+ this.data.adminList,
+ this.data.nestingSettings,
+ this.data.limits,
+ this.data.flags,
+ ]);
+ return tx;
+ }
+
+ async send(options?: any): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[], collection: Contract }> {
+ const collectionCreationPrice = {
+ value: Number(this.helper.balance.getCollectionCreationPrice()),
+ };
+ const tx = await this.createTransaction();
+ const result = await tx.send({...options, ...collectionCreationPrice});
+ const collectionAddress = this.helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
+ const collectionId = this.helper.ethAddress.extractCollectionId(collectionAddress);
+ const events = this.helper.eth.normalizeEvents(result.events);
+ const collection = await this.helper.ethNativeContract.collectionById(collectionId, this.data.collectionMode, this.signer, this.mergeDeprecated);
+
+ return {collectionId, collectionAddress, events, collection};
+ }
+
+ async call(options?: any) {
+ const collectionCreationPrice = {
+ value: Number(this.helper.balance.getCollectionCreationPrice()),
+ };
+ const tx = await this.createTransaction();
+
+ return await tx.call({...options, ...collectionCreationPrice});
+ }
+}
+
+
class EthGroup extends EthGroupBase {
DEFAULT_GAS = 2_500_000;
@@ -236,30 +312,28 @@
}
}
- async createCollection(mode: TCollectionMode, signer: string, name: string, description: string, tokenPrefix: string, decimals = 18, mergeDeprecated = false): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[], collection: Contract }> {
- const collectionCreationPrice = this.helper.balance.getCollectionCreationPrice();
+ createCollection(signer: string, data: CreateCollectionData, mergeDeprecated = false): CreateCollectionTransaction {
+ return new CreateCollectionTransaction(this.helper, signer, data, mergeDeprecated);
+ }
+
+ createNFTCollection(signer: string, name: string, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
+ return this.createCollection(signer, new CreateCollectionData(name, description, tokenPrefix, 'nft')).send();
+ }
+
+ async createERC721MetadataCompatibleCollection(signer: string, data: CreateCollectionData, baseUri: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer);
- const functionName: string = this.createCollectionMethodName(mode);
-
- const functionParams = mode === 'ft' ? [name, decimals, description, tokenPrefix] : [name, description, tokenPrefix];
- const result = await collectionHelper.methods[functionName](...functionParams).send({value: Number(collectionCreationPrice)});
- const collectionAddress = this.helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId);
- const collectionId = this.helper.ethAddress.extractCollectionId(collectionAddress);
- const events = this.helper.eth.normalizeEvents(result.events);
- const collection = await this.helper.ethNativeContract.collectionById(collectionId, mode, signer, mergeDeprecated);
+ const {collectionId, collectionAddress, events} = await this.createCollection(signer, data).send();
- return {collectionId, collectionAddress, events, collection};
- }
+ await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();
- createNFTCollection(signer: string, name: string, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
- return this.createCollection('nft', signer, name, description, tokenPrefix);
+ return {collectionId, collectionAddress, events};
}
async createERC721MetadataCompatibleNFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer);
- const {collectionId, collectionAddress, events} = await this.createCollection('nft', signer, name, description, tokenPrefix);
+ const {collectionId, collectionAddress, events} = await this.createCollection(signer, new CreateCollectionData(name, description, tokenPrefix, 'nft')).send();
await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();
@@ -267,17 +341,17 @@
}
createRFTCollection(signer: string, name: string, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
- return this.createCollection('rft', signer, name, description, tokenPrefix);
+ return this.createCollection(signer, new CreateCollectionData(name, description, tokenPrefix, 'rft')).send();
}
createFungibleCollection(signer: string, name: string, decimals: number, description: string, tokenPrefix: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
- return this.createCollection('ft', signer, name, description, tokenPrefix, decimals);
+ return this.createCollection(signer, new CreateCollectionData(name, description, tokenPrefix, 'ft')).send();
}
async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> {
const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer);
- const {collectionId, collectionAddress, events} = await this.createCollection('rft', signer, name, description, tokenPrefix);
+ const {collectionId, collectionAddress, events} = await this.createCollection(signer, new CreateCollectionData(name, description, tokenPrefix, 'rft')).send();
await collectionHelper.methods.makeCollectionERC721MetadataCompatible(collectionAddress, baseUri).send();
@@ -432,6 +506,13 @@
};
}
+ fromAddr(address: TEthereumAccount): [string, string] {
+ return [
+ address,
+ '0',
+ ];
+ }
+
fromKeyringPair(keyring: IKeyringPair): CrossAddress {
return {
eth: '0x0000000000000000000000000000000000000000',
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -1499,7 +1499,7 @@
*
* * `data`: Explicit data of a collection used for its creation.
**/
- createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; pendingSponsor?: any; limits?: any; permissions?: any; tokenPropertyPermissions?: any; properties?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
+ createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; limits?: any; permissions?: any; tokenPropertyPermissions?: any; properties?: any; adminList?: any; pendingSponsor?: any; flags?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
/**
* Mint an item within a collection.
*
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -25,7 +25,7 @@
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractExecResultU64, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractInstantiateResultU64, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
-import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractConstructorSpecV4, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEnvironmentV4, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMessageSpecV3, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
+import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
@@ -254,7 +254,6 @@
ContractConstructorSpecV1: ContractConstructorSpecV1;
ContractConstructorSpecV2: ContractConstructorSpecV2;
ContractConstructorSpecV3: ContractConstructorSpecV3;
- ContractConstructorSpecV4: ContractConstructorSpecV4;
ContractContractSpecV0: ContractContractSpecV0;
ContractContractSpecV1: ContractContractSpecV1;
ContractContractSpecV2: ContractContractSpecV2;
@@ -263,7 +262,6 @@
ContractCryptoHasher: ContractCryptoHasher;
ContractDiscriminant: ContractDiscriminant;
ContractDisplayName: ContractDisplayName;
- ContractEnvironmentV4: ContractEnvironmentV4;
ContractEventParamSpecLatest: ContractEventParamSpecLatest;
ContractEventParamSpecV0: ContractEventParamSpecV0;
ContractEventParamSpecV2: ContractEventParamSpecV2;
@@ -300,7 +298,6 @@
ContractMessageSpecV0: ContractMessageSpecV0;
ContractMessageSpecV1: ContractMessageSpecV1;
ContractMessageSpecV2: ContractMessageSpecV2;
- ContractMessageSpecV3: ContractMessageSpecV3;
ContractMetadata: ContractMetadata;
ContractMetadataLatest: ContractMetadataLatest;
ContractMetadataV0: ContractMetadataV0;
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -3221,11 +3221,13 @@
readonly name: Vec<u16>;
readonly description: Vec<u16>;
readonly tokenPrefix: Bytes;
- readonly pendingSponsor: Option<AccountId32>;
readonly limits: Option<UpDataStructsCollectionLimits>;
readonly permissions: Option<UpDataStructsCollectionPermissions>;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
+ readonly adminList: Vec<PalletEvmAccountBasicCrossAccountIdRepr>;
+ readonly pendingSponsor: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
+ readonly flags: U8aFixed;
}
/** @name UpDataStructsCreateFungibleData */
tests/src/interfaces/lookup.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34/* eslint-disable sort-keys */56export default {7 /**8 * Lookup3: frame_system::AccountInfo<Index, pallet_balances::types::AccountData<Balance>>9 **/10 FrameSystemAccountInfo: {11 nonce: 'u32',12 consumers: 'u32',13 providers: 'u32',14 sufficients: 'u32',15 data: 'PalletBalancesAccountData'16 },17 /**18 * Lookup5: pallet_balances::types::AccountData<Balance>19 **/20 PalletBalancesAccountData: {21 free: 'u128',22 reserved: 'u128',23 frozen: 'u128',24 flags: 'u128'25 },26 /**27 * Lookup8: frame_support::dispatch::PerDispatchClass<sp_weights::weight_v2::Weight>28 **/29 FrameSupportDispatchPerDispatchClassWeight: {30 normal: 'SpWeightsWeightV2Weight',31 operational: 'SpWeightsWeightV2Weight',32 mandatory: 'SpWeightsWeightV2Weight'33 },34 /**35 * Lookup9: sp_weights::weight_v2::Weight36 **/37 SpWeightsWeightV2Weight: {38 refTime: 'Compact<u64>',39 proofSize: 'Compact<u64>'40 },41 /**42 * Lookup14: sp_runtime::generic::digest::Digest43 **/44 SpRuntimeDigest: {45 logs: 'Vec<SpRuntimeDigestDigestItem>'46 },47 /**48 * Lookup16: sp_runtime::generic::digest::DigestItem49 **/50 SpRuntimeDigestDigestItem: {51 _enum: {52 Other: 'Bytes',53 __Unused1: 'Null',54 __Unused2: 'Null',55 __Unused3: 'Null',56 Consensus: '([u8;4],Bytes)',57 Seal: '([u8;4],Bytes)',58 PreRuntime: '([u8;4],Bytes)',59 __Unused7: 'Null',60 RuntimeEnvironmentUpdated: 'Null'61 }62 },63 /**64 * Lookup19: frame_system::EventRecord<opal_runtime::RuntimeEvent, primitive_types::H256>65 **/66 FrameSystemEventRecord: {67 phase: 'FrameSystemPhase',68 event: 'Event',69 topics: 'Vec<H256>'70 },71 /**72 * Lookup21: frame_system::pallet::Event<T>73 **/74 FrameSystemEvent: {75 _enum: {76 ExtrinsicSuccess: {77 dispatchInfo: 'FrameSupportDispatchDispatchInfo',78 },79 ExtrinsicFailed: {80 dispatchError: 'SpRuntimeDispatchError',81 dispatchInfo: 'FrameSupportDispatchDispatchInfo',82 },83 CodeUpdated: 'Null',84 NewAccount: {85 account: 'AccountId32',86 },87 KilledAccount: {88 account: 'AccountId32',89 },90 Remarked: {91 _alias: {92 hash_: 'hash',93 },94 sender: 'AccountId32',95 hash_: 'H256'96 }97 }98 },99 /**100 * Lookup22: frame_support::dispatch::DispatchInfo101 **/102 FrameSupportDispatchDispatchInfo: {103 weight: 'SpWeightsWeightV2Weight',104 class: 'FrameSupportDispatchDispatchClass',105 paysFee: 'FrameSupportDispatchPays'106 },107 /**108 * Lookup23: frame_support::dispatch::DispatchClass109 **/110 FrameSupportDispatchDispatchClass: {111 _enum: ['Normal', 'Operational', 'Mandatory']112 },113 /**114 * Lookup24: frame_support::dispatch::Pays115 **/116 FrameSupportDispatchPays: {117 _enum: ['Yes', 'No']118 },119 /**120 * Lookup25: sp_runtime::DispatchError121 **/122 SpRuntimeDispatchError: {123 _enum: {124 Other: 'Null',125 CannotLookup: 'Null',126 BadOrigin: 'Null',127 Module: 'SpRuntimeModuleError',128 ConsumerRemaining: 'Null',129 NoProviders: 'Null',130 TooManyConsumers: 'Null',131 Token: 'SpRuntimeTokenError',132 Arithmetic: 'SpArithmeticArithmeticError',133 Transactional: 'SpRuntimeTransactionalError',134 Exhausted: 'Null',135 Corruption: 'Null',136 Unavailable: 'Null',137 RootNotAllowed: 'Null'138 }139 },140 /**141 * Lookup26: sp_runtime::ModuleError142 **/143 SpRuntimeModuleError: {144 index: 'u8',145 error: '[u8;4]'146 },147 /**148 * Lookup27: sp_runtime::TokenError149 **/150 SpRuntimeTokenError: {151 _enum: ['FundsUnavailable', 'OnlyProvider', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported', 'CannotCreateHold', 'NotExpendable', 'Blocked']152 },153 /**154 * Lookup28: sp_arithmetic::ArithmeticError155 **/156 SpArithmeticArithmeticError: {157 _enum: ['Underflow', 'Overflow', 'DivisionByZero']158 },159 /**160 * Lookup29: sp_runtime::TransactionalError161 **/162 SpRuntimeTransactionalError: {163 _enum: ['LimitReached', 'NoLayer']164 },165 /**166 * Lookup30: pallet_state_trie_migration::pallet::Event<T>167 **/168 PalletStateTrieMigrationEvent: {169 _enum: {170 Migrated: {171 top: 'u32',172 child: 'u32',173 compute: 'PalletStateTrieMigrationMigrationCompute',174 },175 Slashed: {176 who: 'AccountId32',177 amount: 'u128',178 },179 AutoMigrationFinished: 'Null',180 Halted: {181 error: 'PalletStateTrieMigrationError'182 }183 }184 },185 /**186 * Lookup31: pallet_state_trie_migration::pallet::MigrationCompute187 **/188 PalletStateTrieMigrationMigrationCompute: {189 _enum: ['Signed', 'Auto']190 },191 /**192 * Lookup32: pallet_state_trie_migration::pallet::Error<T>193 **/194 PalletStateTrieMigrationError: {195 _enum: ['MaxSignedLimits', 'KeyTooLong', 'NotEnoughFunds', 'BadWitness', 'SignedMigrationNotAllowed', 'BadChildRoot']196 },197 /**198 * Lookup33: cumulus_pallet_parachain_system::pallet::Event<T>199 **/200 CumulusPalletParachainSystemEvent: {201 _enum: {202 ValidationFunctionStored: 'Null',203 ValidationFunctionApplied: {204 relayChainBlockNum: 'u32',205 },206 ValidationFunctionDiscarded: 'Null',207 UpgradeAuthorized: {208 codeHash: 'H256',209 },210 DownwardMessagesReceived: {211 count: 'u32',212 },213 DownwardMessagesProcessed: {214 weightUsed: 'SpWeightsWeightV2Weight',215 dmqHead: 'H256',216 },217 UpwardMessageSent: {218 messageHash: 'Option<[u8;32]>'219 }220 }221 },222 /**223 * Lookup35: pallet_collator_selection::pallet::Event<T>224 **/225 PalletCollatorSelectionEvent: {226 _enum: {227 InvulnerableAdded: {228 invulnerable: 'AccountId32',229 },230 InvulnerableRemoved: {231 invulnerable: 'AccountId32',232 },233 LicenseObtained: {234 accountId: 'AccountId32',235 deposit: 'u128',236 },237 LicenseReleased: {238 accountId: 'AccountId32',239 depositReturned: 'u128',240 },241 CandidateAdded: {242 accountId: 'AccountId32',243 },244 CandidateRemoved: {245 accountId: 'AccountId32'246 }247 }248 },249 /**250 * Lookup36: pallet_session::pallet::Event251 **/252 PalletSessionEvent: {253 _enum: {254 NewSession: {255 sessionIndex: 'u32'256 }257 }258 },259 /**260 * Lookup37: pallet_balances::pallet::Event<T, I>261 **/262 PalletBalancesEvent: {263 _enum: {264 Endowed: {265 account: 'AccountId32',266 freeBalance: 'u128',267 },268 DustLost: {269 account: 'AccountId32',270 amount: 'u128',271 },272 Transfer: {273 from: 'AccountId32',274 to: 'AccountId32',275 amount: 'u128',276 },277 BalanceSet: {278 who: 'AccountId32',279 free: 'u128',280 },281 Reserved: {282 who: 'AccountId32',283 amount: 'u128',284 },285 Unreserved: {286 who: 'AccountId32',287 amount: 'u128',288 },289 ReserveRepatriated: {290 from: 'AccountId32',291 to: 'AccountId32',292 amount: 'u128',293 destinationStatus: 'FrameSupportTokensMiscBalanceStatus',294 },295 Deposit: {296 who: 'AccountId32',297 amount: 'u128',298 },299 Withdraw: {300 who: 'AccountId32',301 amount: 'u128',302 },303 Slashed: {304 who: 'AccountId32',305 amount: 'u128',306 },307 Minted: {308 who: 'AccountId32',309 amount: 'u128',310 },311 Burned: {312 who: 'AccountId32',313 amount: 'u128',314 },315 Suspended: {316 who: 'AccountId32',317 amount: 'u128',318 },319 Restored: {320 who: 'AccountId32',321 amount: 'u128',322 },323 Upgraded: {324 who: 'AccountId32',325 },326 Issued: {327 amount: 'u128',328 },329 Rescinded: {330 amount: 'u128',331 },332 Locked: {333 who: 'AccountId32',334 amount: 'u128',335 },336 Unlocked: {337 who: 'AccountId32',338 amount: 'u128',339 },340 Frozen: {341 who: 'AccountId32',342 amount: 'u128',343 },344 Thawed: {345 who: 'AccountId32',346 amount: 'u128'347 }348 }349 },350 /**351 * Lookup38: frame_support::traits::tokens::misc::BalanceStatus352 **/353 FrameSupportTokensMiscBalanceStatus: {354 _enum: ['Free', 'Reserved']355 },356 /**357 * Lookup39: pallet_transaction_payment::pallet::Event<T>358 **/359 PalletTransactionPaymentEvent: {360 _enum: {361 TransactionFeePaid: {362 who: 'AccountId32',363 actualFee: 'u128',364 tip: 'u128'365 }366 }367 },368 /**369 * Lookup40: pallet_treasury::pallet::Event<T, I>370 **/371 PalletTreasuryEvent: {372 _enum: {373 Proposed: {374 proposalIndex: 'u32',375 },376 Spending: {377 budgetRemaining: 'u128',378 },379 Awarded: {380 proposalIndex: 'u32',381 award: 'u128',382 account: 'AccountId32',383 },384 Rejected: {385 proposalIndex: 'u32',386 slashed: 'u128',387 },388 Burnt: {389 burntFunds: 'u128',390 },391 Rollover: {392 rolloverBalance: 'u128',393 },394 Deposit: {395 value: 'u128',396 },397 SpendApproved: {398 proposalIndex: 'u32',399 amount: 'u128',400 beneficiary: 'AccountId32',401 },402 UpdatedInactive: {403 reactivated: 'u128',404 deactivated: 'u128'405 }406 }407 },408 /**409 * Lookup41: pallet_sudo::pallet::Event<T>410 **/411 PalletSudoEvent: {412 _enum: {413 Sudid: {414 sudoResult: 'Result<Null, SpRuntimeDispatchError>',415 },416 KeyChanged: {417 oldSudoer: 'Option<AccountId32>',418 },419 SudoAsDone: {420 sudoResult: 'Result<Null, SpRuntimeDispatchError>'421 }422 }423 },424 /**425 * Lookup45: orml_vesting::module::Event<T>426 **/427 OrmlVestingModuleEvent: {428 _enum: {429 VestingScheduleAdded: {430 from: 'AccountId32',431 to: 'AccountId32',432 vestingSchedule: 'OrmlVestingVestingSchedule',433 },434 Claimed: {435 who: 'AccountId32',436 amount: 'u128',437 },438 VestingSchedulesUpdated: {439 who: 'AccountId32'440 }441 }442 },443 /**444 * Lookup46: orml_vesting::VestingSchedule<BlockNumber, Balance>445 **/446 OrmlVestingVestingSchedule: {447 start: 'u32',448 period: 'u32',449 periodCount: 'u32',450 perPeriod: 'Compact<u128>'451 },452 /**453 * Lookup48: orml_xtokens::module::Event<T>454 **/455 OrmlXtokensModuleEvent: {456 _enum: {457 TransferredMultiAssets: {458 sender: 'AccountId32',459 assets: 'XcmV3MultiassetMultiAssets',460 fee: 'XcmV3MultiAsset',461 dest: 'XcmV3MultiLocation'462 }463 }464 },465 /**466 * Lookup49: xcm::v3::multiasset::MultiAssets467 **/468 XcmV3MultiassetMultiAssets: 'Vec<XcmV3MultiAsset>',469 /**470 * Lookup51: xcm::v3::multiasset::MultiAsset471 **/472 XcmV3MultiAsset: {473 id: 'XcmV3MultiassetAssetId',474 fun: 'XcmV3MultiassetFungibility'475 },476 /**477 * Lookup52: xcm::v3::multiasset::AssetId478 **/479 XcmV3MultiassetAssetId: {480 _enum: {481 Concrete: 'XcmV3MultiLocation',482 Abstract: '[u8;32]'483 }484 },485 /**486 * Lookup53: xcm::v3::multilocation::MultiLocation487 **/488 XcmV3MultiLocation: {489 parents: 'u8',490 interior: 'XcmV3Junctions'491 },492 /**493 * Lookup54: xcm::v3::junctions::Junctions494 **/495 XcmV3Junctions: {496 _enum: {497 Here: 'Null',498 X1: 'XcmV3Junction',499 X2: '(XcmV3Junction,XcmV3Junction)',500 X3: '(XcmV3Junction,XcmV3Junction,XcmV3Junction)',501 X4: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',502 X5: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',503 X6: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',504 X7: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',505 X8: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)'506 }507 },508 /**509 * Lookup55: xcm::v3::junction::Junction510 **/511 XcmV3Junction: {512 _enum: {513 Parachain: 'Compact<u32>',514 AccountId32: {515 network: 'Option<XcmV3JunctionNetworkId>',516 id: '[u8;32]',517 },518 AccountIndex64: {519 network: 'Option<XcmV3JunctionNetworkId>',520 index: 'Compact<u64>',521 },522 AccountKey20: {523 network: 'Option<XcmV3JunctionNetworkId>',524 key: '[u8;20]',525 },526 PalletInstance: 'u8',527 GeneralIndex: 'Compact<u128>',528 GeneralKey: {529 length: 'u8',530 data: '[u8;32]',531 },532 OnlyChild: 'Null',533 Plurality: {534 id: 'XcmV3JunctionBodyId',535 part: 'XcmV3JunctionBodyPart',536 },537 GlobalConsensus: 'XcmV3JunctionNetworkId'538 }539 },540 /**541 * Lookup58: xcm::v3::junction::NetworkId542 **/543 XcmV3JunctionNetworkId: {544 _enum: {545 ByGenesis: '[u8;32]',546 ByFork: {547 blockNumber: 'u64',548 blockHash: '[u8;32]',549 },550 Polkadot: 'Null',551 Kusama: 'Null',552 Westend: 'Null',553 Rococo: 'Null',554 Wococo: 'Null',555 Ethereum: {556 chainId: 'Compact<u64>',557 },558 BitcoinCore: 'Null',559 BitcoinCash: 'Null'560 }561 },562 /**563 * Lookup60: xcm::v3::junction::BodyId564 **/565 XcmV3JunctionBodyId: {566 _enum: {567 Unit: 'Null',568 Moniker: '[u8;4]',569 Index: 'Compact<u32>',570 Executive: 'Null',571 Technical: 'Null',572 Legislative: 'Null',573 Judicial: 'Null',574 Defense: 'Null',575 Administration: 'Null',576 Treasury: 'Null'577 }578 },579 /**580 * Lookup61: xcm::v3::junction::BodyPart581 **/582 XcmV3JunctionBodyPart: {583 _enum: {584 Voice: 'Null',585 Members: {586 count: 'Compact<u32>',587 },588 Fraction: {589 nom: 'Compact<u32>',590 denom: 'Compact<u32>',591 },592 AtLeastProportion: {593 nom: 'Compact<u32>',594 denom: 'Compact<u32>',595 },596 MoreThanProportion: {597 nom: 'Compact<u32>',598 denom: 'Compact<u32>'599 }600 }601 },602 /**603 * Lookup62: xcm::v3::multiasset::Fungibility604 **/605 XcmV3MultiassetFungibility: {606 _enum: {607 Fungible: 'Compact<u128>',608 NonFungible: 'XcmV3MultiassetAssetInstance'609 }610 },611 /**612 * Lookup63: xcm::v3::multiasset::AssetInstance613 **/614 XcmV3MultiassetAssetInstance: {615 _enum: {616 Undefined: 'Null',617 Index: 'Compact<u128>',618 Array4: '[u8;4]',619 Array8: '[u8;8]',620 Array16: '[u8;16]',621 Array32: '[u8;32]'622 }623 },624 /**625 * Lookup66: orml_tokens::module::Event<T>626 **/627 OrmlTokensModuleEvent: {628 _enum: {629 Endowed: {630 currencyId: 'PalletForeignAssetsAssetIds',631 who: 'AccountId32',632 amount: 'u128',633 },634 DustLost: {635 currencyId: 'PalletForeignAssetsAssetIds',636 who: 'AccountId32',637 amount: 'u128',638 },639 Transfer: {640 currencyId: 'PalletForeignAssetsAssetIds',641 from: 'AccountId32',642 to: 'AccountId32',643 amount: 'u128',644 },645 Reserved: {646 currencyId: 'PalletForeignAssetsAssetIds',647 who: 'AccountId32',648 amount: 'u128',649 },650 Unreserved: {651 currencyId: 'PalletForeignAssetsAssetIds',652 who: 'AccountId32',653 amount: 'u128',654 },655 ReserveRepatriated: {656 currencyId: 'PalletForeignAssetsAssetIds',657 from: 'AccountId32',658 to: 'AccountId32',659 amount: 'u128',660 status: 'FrameSupportTokensMiscBalanceStatus',661 },662 BalanceSet: {663 currencyId: 'PalletForeignAssetsAssetIds',664 who: 'AccountId32',665 free: 'u128',666 reserved: 'u128',667 },668 TotalIssuanceSet: {669 currencyId: 'PalletForeignAssetsAssetIds',670 amount: 'u128',671 },672 Withdrawn: {673 currencyId: 'PalletForeignAssetsAssetIds',674 who: 'AccountId32',675 amount: 'u128',676 },677 Slashed: {678 currencyId: 'PalletForeignAssetsAssetIds',679 who: 'AccountId32',680 freeAmount: 'u128',681 reservedAmount: 'u128',682 },683 Deposited: {684 currencyId: 'PalletForeignAssetsAssetIds',685 who: 'AccountId32',686 amount: 'u128',687 },688 LockSet: {689 lockId: '[u8;8]',690 currencyId: 'PalletForeignAssetsAssetIds',691 who: 'AccountId32',692 amount: 'u128',693 },694 LockRemoved: {695 lockId: '[u8;8]',696 currencyId: 'PalletForeignAssetsAssetIds',697 who: 'AccountId32',698 },699 Locked: {700 currencyId: 'PalletForeignAssetsAssetIds',701 who: 'AccountId32',702 amount: 'u128',703 },704 Unlocked: {705 currencyId: 'PalletForeignAssetsAssetIds',706 who: 'AccountId32',707 amount: 'u128'708 }709 }710 },711 /**712 * Lookup67: pallet_foreign_assets::AssetIds713 **/714 PalletForeignAssetsAssetIds: {715 _enum: {716 ForeignAssetId: 'u32',717 NativeAssetId: 'PalletForeignAssetsNativeCurrency'718 }719 },720 /**721 * Lookup68: pallet_foreign_assets::NativeCurrency722 **/723 PalletForeignAssetsNativeCurrency: {724 _enum: ['Here', 'Parent']725 },726 /**727 * Lookup69: pallet_identity::pallet::Event<T>728 **/729 PalletIdentityEvent: {730 _enum: {731 IdentitySet: {732 who: 'AccountId32',733 },734 IdentityCleared: {735 who: 'AccountId32',736 deposit: 'u128',737 },738 IdentityKilled: {739 who: 'AccountId32',740 deposit: 'u128',741 },742 IdentitiesInserted: {743 amount: 'u32',744 },745 IdentitiesRemoved: {746 amount: 'u32',747 },748 JudgementRequested: {749 who: 'AccountId32',750 registrarIndex: 'u32',751 },752 JudgementUnrequested: {753 who: 'AccountId32',754 registrarIndex: 'u32',755 },756 JudgementGiven: {757 target: 'AccountId32',758 registrarIndex: 'u32',759 },760 RegistrarAdded: {761 registrarIndex: 'u32',762 },763 SubIdentityAdded: {764 sub: 'AccountId32',765 main: 'AccountId32',766 deposit: 'u128',767 },768 SubIdentityRemoved: {769 sub: 'AccountId32',770 main: 'AccountId32',771 deposit: 'u128',772 },773 SubIdentityRevoked: {774 sub: 'AccountId32',775 main: 'AccountId32',776 deposit: 'u128',777 },778 SubIdentitiesInserted: {779 amount: 'u32'780 }781 }782 },783 /**784 * Lookup70: pallet_preimage::pallet::Event<T>785 **/786 PalletPreimageEvent: {787 _enum: {788 Noted: {789 _alias: {790 hash_: 'hash',791 },792 hash_: 'H256',793 },794 Requested: {795 _alias: {796 hash_: 'hash',797 },798 hash_: 'H256',799 },800 Cleared: {801 _alias: {802 hash_: 'hash',803 },804 hash_: 'H256'805 }806 }807 },808 /**809 * Lookup71: cumulus_pallet_xcmp_queue::pallet::Event<T>810 **/811 CumulusPalletXcmpQueueEvent: {812 _enum: {813 Success: {814 messageHash: 'Option<[u8;32]>',815 weight: 'SpWeightsWeightV2Weight',816 },817 Fail: {818 messageHash: 'Option<[u8;32]>',819 error: 'XcmV3TraitsError',820 weight: 'SpWeightsWeightV2Weight',821 },822 BadVersion: {823 messageHash: 'Option<[u8;32]>',824 },825 BadFormat: {826 messageHash: 'Option<[u8;32]>',827 },828 XcmpMessageSent: {829 messageHash: 'Option<[u8;32]>',830 },831 OverweightEnqueued: {832 sender: 'u32',833 sentAt: 'u32',834 index: 'u64',835 required: 'SpWeightsWeightV2Weight',836 },837 OverweightServiced: {838 index: 'u64',839 used: 'SpWeightsWeightV2Weight'840 }841 }842 },843 /**844 * Lookup72: xcm::v3::traits::Error845 **/846 XcmV3TraitsError: {847 _enum: {848 Overflow: 'Null',849 Unimplemented: 'Null',850 UntrustedReserveLocation: 'Null',851 UntrustedTeleportLocation: 'Null',852 LocationFull: 'Null',853 LocationNotInvertible: 'Null',854 BadOrigin: 'Null',855 InvalidLocation: 'Null',856 AssetNotFound: 'Null',857 FailedToTransactAsset: 'Null',858 NotWithdrawable: 'Null',859 LocationCannotHold: 'Null',860 ExceedsMaxMessageSize: 'Null',861 DestinationUnsupported: 'Null',862 Transport: 'Null',863 Unroutable: 'Null',864 UnknownClaim: 'Null',865 FailedToDecode: 'Null',866 MaxWeightInvalid: 'Null',867 NotHoldingFees: 'Null',868 TooExpensive: 'Null',869 Trap: 'u64',870 ExpectationFalse: 'Null',871 PalletNotFound: 'Null',872 NameMismatch: 'Null',873 VersionIncompatible: 'Null',874 HoldingWouldOverflow: 'Null',875 ExportError: 'Null',876 ReanchorFailed: 'Null',877 NoDeal: 'Null',878 FeesNotMet: 'Null',879 LockError: 'Null',880 NoPermission: 'Null',881 Unanchored: 'Null',882 NotDepositable: 'Null',883 UnhandledXcmVersion: 'Null',884 WeightLimitReached: 'SpWeightsWeightV2Weight',885 Barrier: 'Null',886 WeightNotComputable: 'Null',887 ExceedsStackLimit: 'Null'888 }889 },890 /**891 * Lookup74: pallet_xcm::pallet::Event<T>892 **/893 PalletXcmEvent: {894 _enum: {895 Attempted: 'XcmV3TraitsOutcome',896 Sent: '(XcmV3MultiLocation,XcmV3MultiLocation,XcmV3Xcm)',897 UnexpectedResponse: '(XcmV3MultiLocation,u64)',898 ResponseReady: '(u64,XcmV3Response)',899 Notified: '(u64,u8,u8)',900 NotifyOverweight: '(u64,u8,u8,SpWeightsWeightV2Weight,SpWeightsWeightV2Weight)',901 NotifyDispatchError: '(u64,u8,u8)',902 NotifyDecodeFailed: '(u64,u8,u8)',903 InvalidResponder: '(XcmV3MultiLocation,u64,Option<XcmV3MultiLocation>)',904 InvalidResponderVersion: '(XcmV3MultiLocation,u64)',905 ResponseTaken: 'u64',906 AssetsTrapped: '(H256,XcmV3MultiLocation,XcmVersionedMultiAssets)',907 VersionChangeNotified: '(XcmV3MultiLocation,u32,XcmV3MultiassetMultiAssets)',908 SupportedVersionChanged: '(XcmV3MultiLocation,u32)',909 NotifyTargetSendFail: '(XcmV3MultiLocation,u64,XcmV3TraitsError)',910 NotifyTargetMigrationFail: '(XcmVersionedMultiLocation,u64)',911 InvalidQuerierVersion: '(XcmV3MultiLocation,u64)',912 InvalidQuerier: '(XcmV3MultiLocation,u64,XcmV3MultiLocation,Option<XcmV3MultiLocation>)',913 VersionNotifyStarted: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',914 VersionNotifyRequested: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',915 VersionNotifyUnrequested: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',916 FeesPaid: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',917 AssetsClaimed: '(H256,XcmV3MultiLocation,XcmVersionedMultiAssets)'918 }919 },920 /**921 * Lookup75: xcm::v3::traits::Outcome922 **/923 XcmV3TraitsOutcome: {924 _enum: {925 Complete: 'SpWeightsWeightV2Weight',926 Incomplete: '(SpWeightsWeightV2Weight,XcmV3TraitsError)',927 Error: 'XcmV3TraitsError'928 }929 },930 /**931 * Lookup76: xcm::v3::Xcm<Call>932 **/933 XcmV3Xcm: 'Vec<XcmV3Instruction>',934 /**935 * Lookup78: xcm::v3::Instruction<Call>936 **/937 XcmV3Instruction: {938 _enum: {939 WithdrawAsset: 'XcmV3MultiassetMultiAssets',940 ReserveAssetDeposited: 'XcmV3MultiassetMultiAssets',941 ReceiveTeleportedAsset: 'XcmV3MultiassetMultiAssets',942 QueryResponse: {943 queryId: 'Compact<u64>',944 response: 'XcmV3Response',945 maxWeight: 'SpWeightsWeightV2Weight',946 querier: 'Option<XcmV3MultiLocation>',947 },948 TransferAsset: {949 assets: 'XcmV3MultiassetMultiAssets',950 beneficiary: 'XcmV3MultiLocation',951 },952 TransferReserveAsset: {953 assets: 'XcmV3MultiassetMultiAssets',954 dest: 'XcmV3MultiLocation',955 xcm: 'XcmV3Xcm',956 },957 Transact: {958 originKind: 'XcmV2OriginKind',959 requireWeightAtMost: 'SpWeightsWeightV2Weight',960 call: 'XcmDoubleEncoded',961 },962 HrmpNewChannelOpenRequest: {963 sender: 'Compact<u32>',964 maxMessageSize: 'Compact<u32>',965 maxCapacity: 'Compact<u32>',966 },967 HrmpChannelAccepted: {968 recipient: 'Compact<u32>',969 },970 HrmpChannelClosing: {971 initiator: 'Compact<u32>',972 sender: 'Compact<u32>',973 recipient: 'Compact<u32>',974 },975 ClearOrigin: 'Null',976 DescendOrigin: 'XcmV3Junctions',977 ReportError: 'XcmV3QueryResponseInfo',978 DepositAsset: {979 assets: 'XcmV3MultiassetMultiAssetFilter',980 beneficiary: 'XcmV3MultiLocation',981 },982 DepositReserveAsset: {983 assets: 'XcmV3MultiassetMultiAssetFilter',984 dest: 'XcmV3MultiLocation',985 xcm: 'XcmV3Xcm',986 },987 ExchangeAsset: {988 give: 'XcmV3MultiassetMultiAssetFilter',989 want: 'XcmV3MultiassetMultiAssets',990 maximal: 'bool',991 },992 InitiateReserveWithdraw: {993 assets: 'XcmV3MultiassetMultiAssetFilter',994 reserve: 'XcmV3MultiLocation',995 xcm: 'XcmV3Xcm',996 },997 InitiateTeleport: {998 assets: 'XcmV3MultiassetMultiAssetFilter',999 dest: 'XcmV3MultiLocation',1000 xcm: 'XcmV3Xcm',1001 },1002 ReportHolding: {1003 responseInfo: 'XcmV3QueryResponseInfo',1004 assets: 'XcmV3MultiassetMultiAssetFilter',1005 },1006 BuyExecution: {1007 fees: 'XcmV3MultiAsset',1008 weightLimit: 'XcmV3WeightLimit',1009 },1010 RefundSurplus: 'Null',1011 SetErrorHandler: 'XcmV3Xcm',1012 SetAppendix: 'XcmV3Xcm',1013 ClearError: 'Null',1014 ClaimAsset: {1015 assets: 'XcmV3MultiassetMultiAssets',1016 ticket: 'XcmV3MultiLocation',1017 },1018 Trap: 'Compact<u64>',1019 SubscribeVersion: {1020 queryId: 'Compact<u64>',1021 maxResponseWeight: 'SpWeightsWeightV2Weight',1022 },1023 UnsubscribeVersion: 'Null',1024 BurnAsset: 'XcmV3MultiassetMultiAssets',1025 ExpectAsset: 'XcmV3MultiassetMultiAssets',1026 ExpectOrigin: 'Option<XcmV3MultiLocation>',1027 ExpectError: 'Option<(u32,XcmV3TraitsError)>',1028 ExpectTransactStatus: 'XcmV3MaybeErrorCode',1029 QueryPallet: {1030 moduleName: 'Bytes',1031 responseInfo: 'XcmV3QueryResponseInfo',1032 },1033 ExpectPallet: {1034 index: 'Compact<u32>',1035 name: 'Bytes',1036 moduleName: 'Bytes',1037 crateMajor: 'Compact<u32>',1038 minCrateMinor: 'Compact<u32>',1039 },1040 ReportTransactStatus: 'XcmV3QueryResponseInfo',1041 ClearTransactStatus: 'Null',1042 UniversalOrigin: 'XcmV3Junction',1043 ExportMessage: {1044 network: 'XcmV3JunctionNetworkId',1045 destination: 'XcmV3Junctions',1046 xcm: 'XcmV3Xcm',1047 },1048 LockAsset: {1049 asset: 'XcmV3MultiAsset',1050 unlocker: 'XcmV3MultiLocation',1051 },1052 UnlockAsset: {1053 asset: 'XcmV3MultiAsset',1054 target: 'XcmV3MultiLocation',1055 },1056 NoteUnlockable: {1057 asset: 'XcmV3MultiAsset',1058 owner: 'XcmV3MultiLocation',1059 },1060 RequestUnlock: {1061 asset: 'XcmV3MultiAsset',1062 locker: 'XcmV3MultiLocation',1063 },1064 SetFeesMode: {1065 jitWithdraw: 'bool',1066 },1067 SetTopic: '[u8;32]',1068 ClearTopic: 'Null',1069 AliasOrigin: 'XcmV3MultiLocation',1070 UnpaidExecution: {1071 weightLimit: 'XcmV3WeightLimit',1072 checkOrigin: 'Option<XcmV3MultiLocation>'1073 }1074 }1075 },1076 /**1077 * Lookup79: xcm::v3::Response1078 **/1079 XcmV3Response: {1080 _enum: {1081 Null: 'Null',1082 Assets: 'XcmV3MultiassetMultiAssets',1083 ExecutionResult: 'Option<(u32,XcmV3TraitsError)>',1084 Version: 'u32',1085 PalletsInfo: 'Vec<XcmV3PalletInfo>',1086 DispatchResult: 'XcmV3MaybeErrorCode'1087 }1088 },1089 /**1090 * Lookup83: xcm::v3::PalletInfo1091 **/1092 XcmV3PalletInfo: {1093 index: 'Compact<u32>',1094 name: 'Bytes',1095 moduleName: 'Bytes',1096 major: 'Compact<u32>',1097 minor: 'Compact<u32>',1098 patch: 'Compact<u32>'1099 },1100 /**1101 * Lookup86: xcm::v3::MaybeErrorCode1102 **/1103 XcmV3MaybeErrorCode: {1104 _enum: {1105 Success: 'Null',1106 Error: 'Bytes',1107 TruncatedError: 'Bytes'1108 }1109 },1110 /**1111 * Lookup89: xcm::v2::OriginKind1112 **/1113 XcmV2OriginKind: {1114 _enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']1115 },1116 /**1117 * Lookup90: xcm::double_encoded::DoubleEncoded<T>1118 **/1119 XcmDoubleEncoded: {1120 encoded: 'Bytes'1121 },1122 /**1123 * Lookup91: xcm::v3::QueryResponseInfo1124 **/1125 XcmV3QueryResponseInfo: {1126 destination: 'XcmV3MultiLocation',1127 queryId: 'Compact<u64>',1128 maxWeight: 'SpWeightsWeightV2Weight'1129 },1130 /**1131 * Lookup92: xcm::v3::multiasset::MultiAssetFilter1132 **/1133 XcmV3MultiassetMultiAssetFilter: {1134 _enum: {1135 Definite: 'XcmV3MultiassetMultiAssets',1136 Wild: 'XcmV3MultiassetWildMultiAsset'1137 }1138 },1139 /**1140 * Lookup93: xcm::v3::multiasset::WildMultiAsset1141 **/1142 XcmV3MultiassetWildMultiAsset: {1143 _enum: {1144 All: 'Null',1145 AllOf: {1146 id: 'XcmV3MultiassetAssetId',1147 fun: 'XcmV3MultiassetWildFungibility',1148 },1149 AllCounted: 'Compact<u32>',1150 AllOfCounted: {1151 id: 'XcmV3MultiassetAssetId',1152 fun: 'XcmV3MultiassetWildFungibility',1153 count: 'Compact<u32>'1154 }1155 }1156 },1157 /**1158 * Lookup94: xcm::v3::multiasset::WildFungibility1159 **/1160 XcmV3MultiassetWildFungibility: {1161 _enum: ['Fungible', 'NonFungible']1162 },1163 /**1164 * Lookup96: xcm::v3::WeightLimit1165 **/1166 XcmV3WeightLimit: {1167 _enum: {1168 Unlimited: 'Null',1169 Limited: 'SpWeightsWeightV2Weight'1170 }1171 },1172 /**1173 * Lookup97: xcm::VersionedMultiAssets1174 **/1175 XcmVersionedMultiAssets: {1176 _enum: {1177 __Unused0: 'Null',1178 V2: 'XcmV2MultiassetMultiAssets',1179 __Unused2: 'Null',1180 V3: 'XcmV3MultiassetMultiAssets'1181 }1182 },1183 /**1184 * Lookup98: xcm::v2::multiasset::MultiAssets1185 **/1186 XcmV2MultiassetMultiAssets: 'Vec<XcmV2MultiAsset>',1187 /**1188 * Lookup100: xcm::v2::multiasset::MultiAsset1189 **/1190 XcmV2MultiAsset: {1191 id: 'XcmV2MultiassetAssetId',1192 fun: 'XcmV2MultiassetFungibility'1193 },1194 /**1195 * Lookup101: xcm::v2::multiasset::AssetId1196 **/1197 XcmV2MultiassetAssetId: {1198 _enum: {1199 Concrete: 'XcmV2MultiLocation',1200 Abstract: 'Bytes'1201 }1202 },1203 /**1204 * Lookup102: xcm::v2::multilocation::MultiLocation1205 **/1206 XcmV2MultiLocation: {1207 parents: 'u8',1208 interior: 'XcmV2MultilocationJunctions'1209 },1210 /**1211 * Lookup103: xcm::v2::multilocation::Junctions1212 **/1213 XcmV2MultilocationJunctions: {1214 _enum: {1215 Here: 'Null',1216 X1: 'XcmV2Junction',1217 X2: '(XcmV2Junction,XcmV2Junction)',1218 X3: '(XcmV2Junction,XcmV2Junction,XcmV2Junction)',1219 X4: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1220 X5: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1221 X6: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1222 X7: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1223 X8: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)'1224 }1225 },1226 /**1227 * Lookup104: xcm::v2::junction::Junction1228 **/1229 XcmV2Junction: {1230 _enum: {1231 Parachain: 'Compact<u32>',1232 AccountId32: {1233 network: 'XcmV2NetworkId',1234 id: '[u8;32]',1235 },1236 AccountIndex64: {1237 network: 'XcmV2NetworkId',1238 index: 'Compact<u64>',1239 },1240 AccountKey20: {1241 network: 'XcmV2NetworkId',1242 key: '[u8;20]',1243 },1244 PalletInstance: 'u8',1245 GeneralIndex: 'Compact<u128>',1246 GeneralKey: 'Bytes',1247 OnlyChild: 'Null',1248 Plurality: {1249 id: 'XcmV2BodyId',1250 part: 'XcmV2BodyPart'1251 }1252 }1253 },1254 /**1255 * Lookup105: xcm::v2::NetworkId1256 **/1257 XcmV2NetworkId: {1258 _enum: {1259 Any: 'Null',1260 Named: 'Bytes',1261 Polkadot: 'Null',1262 Kusama: 'Null'1263 }1264 },1265 /**1266 * Lookup107: xcm::v2::BodyId1267 **/1268 XcmV2BodyId: {1269 _enum: {1270 Unit: 'Null',1271 Named: 'Bytes',1272 Index: 'Compact<u32>',1273 Executive: 'Null',1274 Technical: 'Null',1275 Legislative: 'Null',1276 Judicial: 'Null',1277 Defense: 'Null',1278 Administration: 'Null',1279 Treasury: 'Null'1280 }1281 },1282 /**1283 * Lookup108: xcm::v2::BodyPart1284 **/1285 XcmV2BodyPart: {1286 _enum: {1287 Voice: 'Null',1288 Members: {1289 count: 'Compact<u32>',1290 },1291 Fraction: {1292 nom: 'Compact<u32>',1293 denom: 'Compact<u32>',1294 },1295 AtLeastProportion: {1296 nom: 'Compact<u32>',1297 denom: 'Compact<u32>',1298 },1299 MoreThanProportion: {1300 nom: 'Compact<u32>',1301 denom: 'Compact<u32>'1302 }1303 }1304 },1305 /**1306 * Lookup109: xcm::v2::multiasset::Fungibility1307 **/1308 XcmV2MultiassetFungibility: {1309 _enum: {1310 Fungible: 'Compact<u128>',1311 NonFungible: 'XcmV2MultiassetAssetInstance'1312 }1313 },1314 /**1315 * Lookup110: xcm::v2::multiasset::AssetInstance1316 **/1317 XcmV2MultiassetAssetInstance: {1318 _enum: {1319 Undefined: 'Null',1320 Index: 'Compact<u128>',1321 Array4: '[u8;4]',1322 Array8: '[u8;8]',1323 Array16: '[u8;16]',1324 Array32: '[u8;32]',1325 Blob: 'Bytes'1326 }1327 },1328 /**1329 * Lookup111: xcm::VersionedMultiLocation1330 **/1331 XcmVersionedMultiLocation: {1332 _enum: {1333 __Unused0: 'Null',1334 V2: 'XcmV2MultiLocation',1335 __Unused2: 'Null',1336 V3: 'XcmV3MultiLocation'1337 }1338 },1339 /**1340 * Lookup112: cumulus_pallet_xcm::pallet::Event<T>1341 **/1342 CumulusPalletXcmEvent: {1343 _enum: {1344 InvalidFormat: '[u8;32]',1345 UnsupportedVersion: '[u8;32]',1346 ExecutedDownward: '([u8;32],XcmV3TraitsOutcome)'1347 }1348 },1349 /**1350 * Lookup113: cumulus_pallet_dmp_queue::pallet::Event<T>1351 **/1352 CumulusPalletDmpQueueEvent: {1353 _enum: {1354 InvalidFormat: {1355 messageId: '[u8;32]',1356 },1357 UnsupportedVersion: {1358 messageId: '[u8;32]',1359 },1360 ExecutedDownward: {1361 messageId: '[u8;32]',1362 outcome: 'XcmV3TraitsOutcome',1363 },1364 WeightExhausted: {1365 messageId: '[u8;32]',1366 remainingWeight: 'SpWeightsWeightV2Weight',1367 requiredWeight: 'SpWeightsWeightV2Weight',1368 },1369 OverweightEnqueued: {1370 messageId: '[u8;32]',1371 overweightIndex: 'u64',1372 requiredWeight: 'SpWeightsWeightV2Weight',1373 },1374 OverweightServiced: {1375 overweightIndex: 'u64',1376 weightUsed: 'SpWeightsWeightV2Weight',1377 },1378 MaxMessagesExhausted: {1379 messageId: '[u8;32]'1380 }1381 }1382 },1383 /**1384 * Lookup114: pallet_configuration::pallet::Event<T>1385 **/1386 PalletConfigurationEvent: {1387 _enum: {1388 NewDesiredCollators: {1389 desiredCollators: 'Option<u32>',1390 },1391 NewCollatorLicenseBond: {1392 bondCost: 'Option<u128>',1393 },1394 NewCollatorKickThreshold: {1395 lengthInBlocks: 'Option<u32>'1396 }1397 }1398 },1399 /**1400 * Lookup117: pallet_common::pallet::Event<T>1401 **/1402 PalletCommonEvent: {1403 _enum: {1404 CollectionCreated: '(u32,u8,AccountId32)',1405 CollectionDestroyed: 'u32',1406 ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1407 ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1408 Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1409 Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1410 ApprovedForAll: '(u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,bool)',1411 CollectionPropertySet: '(u32,Bytes)',1412 CollectionPropertyDeleted: '(u32,Bytes)',1413 TokenPropertySet: '(u32,u32,Bytes)',1414 TokenPropertyDeleted: '(u32,u32,Bytes)',1415 PropertyPermissionSet: '(u32,Bytes)',1416 AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1417 AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1418 CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1419 CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1420 CollectionLimitSet: 'u32',1421 CollectionOwnerChanged: '(u32,AccountId32)',1422 CollectionPermissionSet: 'u32',1423 CollectionSponsorSet: '(u32,AccountId32)',1424 SponsorshipConfirmed: '(u32,AccountId32)',1425 CollectionSponsorRemoved: 'u32'1426 }1427 },1428 /**1429 * Lookup120: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1430 **/1431 PalletEvmAccountBasicCrossAccountIdRepr: {1432 _enum: {1433 Substrate: 'AccountId32',1434 Ethereum: 'H160'1435 }1436 },1437 /**1438 * Lookup123: pallet_structure::pallet::Event<T>1439 **/1440 PalletStructureEvent: {1441 _enum: {1442 Executed: 'Result<Null, SpRuntimeDispatchError>'1443 }1444 },1445 /**1446 * Lookup124: pallet_app_promotion::pallet::Event<T>1447 **/1448 PalletAppPromotionEvent: {1449 _enum: {1450 StakingRecalculation: '(AccountId32,u128,u128)',1451 Stake: '(AccountId32,u128)',1452 Unstake: '(AccountId32,u128)',1453 SetAdmin: 'AccountId32'1454 }1455 },1456 /**1457 * Lookup125: pallet_foreign_assets::module::Event<T>1458 **/1459 PalletForeignAssetsModuleEvent: {1460 _enum: {1461 ForeignAssetRegistered: {1462 assetId: 'u32',1463 assetAddress: 'XcmV3MultiLocation',1464 metadata: 'PalletForeignAssetsModuleAssetMetadata',1465 },1466 ForeignAssetUpdated: {1467 assetId: 'u32',1468 assetAddress: 'XcmV3MultiLocation',1469 metadata: 'PalletForeignAssetsModuleAssetMetadata',1470 },1471 AssetRegistered: {1472 assetId: 'PalletForeignAssetsAssetIds',1473 metadata: 'PalletForeignAssetsModuleAssetMetadata',1474 },1475 AssetUpdated: {1476 assetId: 'PalletForeignAssetsAssetIds',1477 metadata: 'PalletForeignAssetsModuleAssetMetadata'1478 }1479 }1480 },1481 /**1482 * Lookup126: pallet_foreign_assets::module::AssetMetadata<Balance>1483 **/1484 PalletForeignAssetsModuleAssetMetadata: {1485 name: 'Bytes',1486 symbol: 'Bytes',1487 decimals: 'u8',1488 minimalBalance: 'u128'1489 },1490 /**1491 * Lookup129: pallet_evm::pallet::Event<T>1492 **/1493 PalletEvmEvent: {1494 _enum: {1495 Log: {1496 log: 'EthereumLog',1497 },1498 Created: {1499 address: 'H160',1500 },1501 CreatedFailed: {1502 address: 'H160',1503 },1504 Executed: {1505 address: 'H160',1506 },1507 ExecutedFailed: {1508 address: 'H160'1509 }1510 }1511 },1512 /**1513 * Lookup130: ethereum::log::Log1514 **/1515 EthereumLog: {1516 address: 'H160',1517 topics: 'Vec<H256>',1518 data: 'Bytes'1519 },1520 /**1521 * Lookup132: pallet_ethereum::pallet::Event1522 **/1523 PalletEthereumEvent: {1524 _enum: {1525 Executed: {1526 from: 'H160',1527 to: 'H160',1528 transactionHash: 'H256',1529 exitReason: 'EvmCoreErrorExitReason',1530 extraData: 'Bytes'1531 }1532 }1533 },1534 /**1535 * Lookup133: evm_core::error::ExitReason1536 **/1537 EvmCoreErrorExitReason: {1538 _enum: {1539 Succeed: 'EvmCoreErrorExitSucceed',1540 Error: 'EvmCoreErrorExitError',1541 Revert: 'EvmCoreErrorExitRevert',1542 Fatal: 'EvmCoreErrorExitFatal'1543 }1544 },1545 /**1546 * Lookup134: evm_core::error::ExitSucceed1547 **/1548 EvmCoreErrorExitSucceed: {1549 _enum: ['Stopped', 'Returned', 'Suicided']1550 },1551 /**1552 * Lookup135: evm_core::error::ExitError1553 **/1554 EvmCoreErrorExitError: {1555 _enum: {1556 StackUnderflow: 'Null',1557 StackOverflow: 'Null',1558 InvalidJump: 'Null',1559 InvalidRange: 'Null',1560 DesignatedInvalid: 'Null',1561 CallTooDeep: 'Null',1562 CreateCollision: 'Null',1563 CreateContractLimit: 'Null',1564 OutOfOffset: 'Null',1565 OutOfGas: 'Null',1566 OutOfFund: 'Null',1567 PCUnderflow: 'Null',1568 CreateEmpty: 'Null',1569 Other: 'Text',1570 MaxNonce: 'Null',1571 InvalidCode: 'u8'1572 }1573 },1574 /**1575 * Lookup139: evm_core::error::ExitRevert1576 **/1577 EvmCoreErrorExitRevert: {1578 _enum: ['Reverted']1579 },1580 /**1581 * Lookup140: evm_core::error::ExitFatal1582 **/1583 EvmCoreErrorExitFatal: {1584 _enum: {1585 NotSupported: 'Null',1586 UnhandledInterrupt: 'Null',1587 CallErrorAsFatal: 'EvmCoreErrorExitError',1588 Other: 'Text'1589 }1590 },1591 /**1592 * Lookup141: pallet_evm_contract_helpers::pallet::Event<T>1593 **/1594 PalletEvmContractHelpersEvent: {1595 _enum: {1596 ContractSponsorSet: '(H160,AccountId32)',1597 ContractSponsorshipConfirmed: '(H160,AccountId32)',1598 ContractSponsorRemoved: 'H160'1599 }1600 },1601 /**1602 * Lookup142: pallet_evm_migration::pallet::Event<T>1603 **/1604 PalletEvmMigrationEvent: {1605 _enum: ['TestEvent']1606 },1607 /**1608 * Lookup143: pallet_maintenance::pallet::Event<T>1609 **/1610 PalletMaintenanceEvent: {1611 _enum: ['MaintenanceEnabled', 'MaintenanceDisabled']1612 },1613 /**1614 * Lookup144: pallet_test_utils::pallet::Event<T>1615 **/1616 PalletTestUtilsEvent: {1617 _enum: ['ValueIsSet', 'ShouldRollback', 'BatchCompleted']1618 },1619 /**1620 * Lookup145: frame_system::Phase1621 **/1622 FrameSystemPhase: {1623 _enum: {1624 ApplyExtrinsic: 'u32',1625 Finalization: 'Null',1626 Initialization: 'Null'1627 }1628 },1629 /**1630 * Lookup148: frame_system::LastRuntimeUpgradeInfo1631 **/1632 FrameSystemLastRuntimeUpgradeInfo: {1633 specVersion: 'Compact<u32>',1634 specName: 'Text'1635 },1636 /**1637 * Lookup149: frame_system::pallet::Call<T>1638 **/1639 FrameSystemCall: {1640 _enum: {1641 remark: {1642 remark: 'Bytes',1643 },1644 set_heap_pages: {1645 pages: 'u64',1646 },1647 set_code: {1648 code: 'Bytes',1649 },1650 set_code_without_checks: {1651 code: 'Bytes',1652 },1653 set_storage: {1654 items: 'Vec<(Bytes,Bytes)>',1655 },1656 kill_storage: {1657 _alias: {1658 keys_: 'keys',1659 },1660 keys_: 'Vec<Bytes>',1661 },1662 kill_prefix: {1663 prefix: 'Bytes',1664 subkeys: 'u32',1665 },1666 remark_with_event: {1667 remark: 'Bytes'1668 }1669 }1670 },1671 /**1672 * Lookup153: frame_system::limits::BlockWeights1673 **/1674 FrameSystemLimitsBlockWeights: {1675 baseBlock: 'SpWeightsWeightV2Weight',1676 maxBlock: 'SpWeightsWeightV2Weight',1677 perClass: 'FrameSupportDispatchPerDispatchClassWeightsPerClass'1678 },1679 /**1680 * Lookup154: frame_support::dispatch::PerDispatchClass<frame_system::limits::WeightsPerClass>1681 **/1682 FrameSupportDispatchPerDispatchClassWeightsPerClass: {1683 normal: 'FrameSystemLimitsWeightsPerClass',1684 operational: 'FrameSystemLimitsWeightsPerClass',1685 mandatory: 'FrameSystemLimitsWeightsPerClass'1686 },1687 /**1688 * Lookup155: frame_system::limits::WeightsPerClass1689 **/1690 FrameSystemLimitsWeightsPerClass: {1691 baseExtrinsic: 'SpWeightsWeightV2Weight',1692 maxExtrinsic: 'Option<SpWeightsWeightV2Weight>',1693 maxTotal: 'Option<SpWeightsWeightV2Weight>',1694 reserved: 'Option<SpWeightsWeightV2Weight>'1695 },1696 /**1697 * Lookup157: frame_system::limits::BlockLength1698 **/1699 FrameSystemLimitsBlockLength: {1700 max: 'FrameSupportDispatchPerDispatchClassU32'1701 },1702 /**1703 * Lookup158: frame_support::dispatch::PerDispatchClass<T>1704 **/1705 FrameSupportDispatchPerDispatchClassU32: {1706 normal: 'u32',1707 operational: 'u32',1708 mandatory: 'u32'1709 },1710 /**1711 * Lookup159: sp_weights::RuntimeDbWeight1712 **/1713 SpWeightsRuntimeDbWeight: {1714 read: 'u64',1715 write: 'u64'1716 },1717 /**1718 * Lookup160: sp_version::RuntimeVersion1719 **/1720 SpVersionRuntimeVersion: {1721 specName: 'Text',1722 implName: 'Text',1723 authoringVersion: 'u32',1724 specVersion: 'u32',1725 implVersion: 'u32',1726 apis: 'Vec<([u8;8],u32)>',1727 transactionVersion: 'u32',1728 stateVersion: 'u8'1729 },1730 /**1731 * Lookup165: frame_system::pallet::Error<T>1732 **/1733 FrameSystemError: {1734 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']1735 },1736 /**1737 * Lookup166: pallet_state_trie_migration::pallet::MigrationTask<T>1738 **/1739 PalletStateTrieMigrationMigrationTask: {1740 _alias: {1741 size_: 'size'1742 },1743 progressTop: 'PalletStateTrieMigrationProgress',1744 progressChild: 'PalletStateTrieMigrationProgress',1745 size_: 'u32',1746 topItems: 'u32',1747 childItems: 'u32'1748 },1749 /**1750 * Lookup167: pallet_state_trie_migration::pallet::Progress<MaxKeyLen>1751 **/1752 PalletStateTrieMigrationProgress: {1753 _enum: {1754 ToStart: 'Null',1755 LastKey: 'Bytes',1756 Complete: 'Null'1757 }1758 },1759 /**1760 * Lookup170: pallet_state_trie_migration::pallet::MigrationLimits1761 **/1762 PalletStateTrieMigrationMigrationLimits: {1763 _alias: {1764 size_: 'size'1765 },1766 size_: 'u32',1767 item: 'u32'1768 },1769 /**1770 * Lookup171: pallet_state_trie_migration::pallet::Call<T>1771 **/1772 PalletStateTrieMigrationCall: {1773 _enum: {1774 control_auto_migration: {1775 maybeConfig: 'Option<PalletStateTrieMigrationMigrationLimits>',1776 },1777 continue_migrate: {1778 limits: 'PalletStateTrieMigrationMigrationLimits',1779 realSizeUpper: 'u32',1780 witnessTask: 'PalletStateTrieMigrationMigrationTask',1781 },1782 migrate_custom_top: {1783 _alias: {1784 keys_: 'keys',1785 },1786 keys_: 'Vec<Bytes>',1787 witnessSize: 'u32',1788 },1789 migrate_custom_child: {1790 root: 'Bytes',1791 childKeys: 'Vec<Bytes>',1792 totalSize: 'u32',1793 },1794 set_signed_max_limits: {1795 limits: 'PalletStateTrieMigrationMigrationLimits',1796 },1797 force_set_progress: {1798 progressTop: 'PalletStateTrieMigrationProgress',1799 progressChild: 'PalletStateTrieMigrationProgress'1800 }1801 }1802 },1803 /**1804 * Lookup172: polkadot_primitives::v4::PersistedValidationData<primitive_types::H256, N>1805 **/1806 PolkadotPrimitivesV4PersistedValidationData: {1807 parentHead: 'Bytes',1808 relayParentNumber: 'u32',1809 relayParentStorageRoot: 'H256',1810 maxPovSize: 'u32'1811 },1812 /**1813 * Lookup175: polkadot_primitives::v4::UpgradeRestriction1814 **/1815 PolkadotPrimitivesV4UpgradeRestriction: {1816 _enum: ['Present']1817 },1818 /**1819 * Lookup176: sp_trie::storage_proof::StorageProof1820 **/1821 SpTrieStorageProof: {1822 trieNodes: 'BTreeSet<Bytes>'1823 },1824 /**1825 * Lookup178: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot1826 **/1827 CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {1828 dmqMqcHead: 'H256',1829 relayDispatchQueueSize: 'CumulusPalletParachainSystemRelayStateSnapshotRelayDispachQueueSize',1830 ingressChannels: 'Vec<(u32,PolkadotPrimitivesV4AbridgedHrmpChannel)>',1831 egressChannels: 'Vec<(u32,PolkadotPrimitivesV4AbridgedHrmpChannel)>'1832 },1833 /**1834 * Lookup179: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispachQueueSize1835 **/1836 CumulusPalletParachainSystemRelayStateSnapshotRelayDispachQueueSize: {1837 remainingCount: 'u32',1838 remainingSize: 'u32'1839 },1840 /**1841 * Lookup182: polkadot_primitives::v4::AbridgedHrmpChannel1842 **/1843 PolkadotPrimitivesV4AbridgedHrmpChannel: {1844 maxCapacity: 'u32',1845 maxTotalSize: 'u32',1846 maxMessageSize: 'u32',1847 msgCount: 'u32',1848 totalSize: 'u32',1849 mqcHead: 'Option<H256>'1850 },1851 /**1852 * Lookup184: polkadot_primitives::v4::AbridgedHostConfiguration1853 **/1854 PolkadotPrimitivesV4AbridgedHostConfiguration: {1855 maxCodeSize: 'u32',1856 maxHeadDataSize: 'u32',1857 maxUpwardQueueCount: 'u32',1858 maxUpwardQueueSize: 'u32',1859 maxUpwardMessageSize: 'u32',1860 maxUpwardMessageNumPerCandidate: 'u32',1861 hrmpMaxMessageNumPerCandidate: 'u32',1862 validationUpgradeCooldown: 'u32',1863 validationUpgradeDelay: 'u32'1864 },1865 /**1866 * Lookup190: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>1867 **/1868 PolkadotCorePrimitivesOutboundHrmpMessage: {1869 recipient: 'u32',1870 data: 'Bytes'1871 },1872 /**1873 * Lookup191: cumulus_pallet_parachain_system::CodeUpgradeAuthorization<T>1874 **/1875 CumulusPalletParachainSystemCodeUpgradeAuthorization: {1876 codeHash: 'H256',1877 checkVersion: 'bool'1878 },1879 /**1880 * Lookup192: cumulus_pallet_parachain_system::pallet::Call<T>1881 **/1882 CumulusPalletParachainSystemCall: {1883 _enum: {1884 set_validation_data: {1885 data: 'CumulusPrimitivesParachainInherentParachainInherentData',1886 },1887 sudo_send_upward_message: {1888 message: 'Bytes',1889 },1890 authorize_upgrade: {1891 codeHash: 'H256',1892 checkVersion: 'bool',1893 },1894 enact_authorized_upgrade: {1895 code: 'Bytes'1896 }1897 }1898 },1899 /**1900 * Lookup193: cumulus_primitives_parachain_inherent::ParachainInherentData1901 **/1902 CumulusPrimitivesParachainInherentParachainInherentData: {1903 validationData: 'PolkadotPrimitivesV4PersistedValidationData',1904 relayChainState: 'SpTrieStorageProof',1905 downwardMessages: 'Vec<PolkadotCorePrimitivesInboundDownwardMessage>',1906 horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'1907 },1908 /**1909 * Lookup195: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>1910 **/1911 PolkadotCorePrimitivesInboundDownwardMessage: {1912 sentAt: 'u32',1913 msg: 'Bytes'1914 },1915 /**1916 * Lookup198: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>1917 **/1918 PolkadotCorePrimitivesInboundHrmpMessage: {1919 sentAt: 'u32',1920 data: 'Bytes'1921 },1922 /**1923 * Lookup201: cumulus_pallet_parachain_system::pallet::Error<T>1924 **/1925 CumulusPalletParachainSystemError: {1926 _enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']1927 },1928 /**1929 * Lookup202: parachain_info::pallet::Call<T>1930 **/1931 ParachainInfoCall: 'Null',1932 /**1933 * Lookup205: pallet_collator_selection::pallet::Call<T>1934 **/1935 PalletCollatorSelectionCall: {1936 _enum: {1937 add_invulnerable: {1938 _alias: {1939 new_: 'new',1940 },1941 new_: 'AccountId32',1942 },1943 remove_invulnerable: {1944 who: 'AccountId32',1945 },1946 get_license: 'Null',1947 onboard: 'Null',1948 offboard: 'Null',1949 release_license: 'Null',1950 force_release_license: {1951 who: 'AccountId32'1952 }1953 }1954 },1955 /**1956 * Lookup206: pallet_collator_selection::pallet::Error<T>1957 **/1958 PalletCollatorSelectionError: {1959 _enum: ['TooManyCandidates', 'Unknown', 'Permission', 'AlreadyHoldingLicense', 'NoLicense', 'AlreadyCandidate', 'NotCandidate', 'TooManyInvulnerables', 'TooFewInvulnerables', 'AlreadyInvulnerable', 'NotInvulnerable', 'NoAssociatedValidatorId', 'ValidatorNotRegistered']1960 },1961 /**1962 * Lookup209: opal_runtime::runtime_common::SessionKeys1963 **/1964 OpalRuntimeRuntimeCommonSessionKeys: {1965 aura: 'SpConsensusAuraSr25519AppSr25519Public'1966 },1967 /**1968 * Lookup210: sp_consensus_aura::sr25519::app_sr25519::Public1969 **/1970 SpConsensusAuraSr25519AppSr25519Public: 'SpCoreSr25519Public',1971 /**1972 * Lookup211: sp_core::sr25519::Public1973 **/1974 SpCoreSr25519Public: '[u8;32]',1975 /**1976 * Lookup214: sp_core::crypto::KeyTypeId1977 **/1978 SpCoreCryptoKeyTypeId: '[u8;4]',1979 /**1980 * Lookup215: pallet_session::pallet::Call<T>1981 **/1982 PalletSessionCall: {1983 _enum: {1984 set_keys: {1985 _alias: {1986 keys_: 'keys',1987 },1988 keys_: 'OpalRuntimeRuntimeCommonSessionKeys',1989 proof: 'Bytes',1990 },1991 purge_keys: 'Null'1992 }1993 },1994 /**1995 * Lookup216: pallet_session::pallet::Error<T>1996 **/1997 PalletSessionError: {1998 _enum: ['InvalidProof', 'NoAssociatedValidatorId', 'DuplicatedKey', 'NoKeys', 'NoAccount']1999 },2000 /**2001 * Lookup221: pallet_balances::types::BalanceLock<Balance>2002 **/2003 PalletBalancesBalanceLock: {2004 id: '[u8;8]',2005 amount: 'u128',2006 reasons: 'PalletBalancesReasons'2007 },2008 /**2009 * Lookup222: pallet_balances::types::Reasons2010 **/2011 PalletBalancesReasons: {2012 _enum: ['Fee', 'Misc', 'All']2013 },2014 /**2015 * Lookup225: pallet_balances::types::ReserveData<ReserveIdentifier, Balance>2016 **/2017 PalletBalancesReserveData: {2018 id: '[u8;16]',2019 amount: 'u128'2020 },2021 /**2022 * Lookup228: pallet_balances::types::IdAmount<Id, Balance>2023 **/2024 PalletBalancesIdAmount: {2025 id: '[u8;16]',2026 amount: 'u128'2027 },2028 /**2029 * Lookup231: pallet_balances::pallet::Call<T, I>2030 **/2031 PalletBalancesCall: {2032 _enum: {2033 transfer_allow_death: {2034 dest: 'MultiAddress',2035 value: 'Compact<u128>',2036 },2037 set_balance_deprecated: {2038 who: 'MultiAddress',2039 newFree: 'Compact<u128>',2040 oldReserved: 'Compact<u128>',2041 },2042 force_transfer: {2043 source: 'MultiAddress',2044 dest: 'MultiAddress',2045 value: 'Compact<u128>',2046 },2047 transfer_keep_alive: {2048 dest: 'MultiAddress',2049 value: 'Compact<u128>',2050 },2051 transfer_all: {2052 dest: 'MultiAddress',2053 keepAlive: 'bool',2054 },2055 force_unreserve: {2056 who: 'MultiAddress',2057 amount: 'u128',2058 },2059 upgrade_accounts: {2060 who: 'Vec<AccountId32>',2061 },2062 transfer: {2063 dest: 'MultiAddress',2064 value: 'Compact<u128>',2065 },2066 force_set_balance: {2067 who: 'MultiAddress',2068 newFree: 'Compact<u128>'2069 }2070 }2071 },2072 /**2073 * Lookup234: pallet_balances::pallet::Error<T, I>2074 **/2075 PalletBalancesError: {2076 _enum: ['VestingBalance', 'LiquidityRestrictions', 'InsufficientBalance', 'ExistentialDeposit', 'Expendability', 'ExistingVestingSchedule', 'DeadAccount', 'TooManyReserves', 'TooManyHolds', 'TooManyFreezes']2077 },2078 /**2079 * Lookup235: pallet_timestamp::pallet::Call<T>2080 **/2081 PalletTimestampCall: {2082 _enum: {2083 set: {2084 now: 'Compact<u64>'2085 }2086 }2087 },2088 /**2089 * Lookup237: pallet_transaction_payment::Releases2090 **/2091 PalletTransactionPaymentReleases: {2092 _enum: ['V1Ancient', 'V2']2093 },2094 /**2095 * Lookup238: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>2096 **/2097 PalletTreasuryProposal: {2098 proposer: 'AccountId32',2099 value: 'u128',2100 beneficiary: 'AccountId32',2101 bond: 'u128'2102 },2103 /**2104 * Lookup240: pallet_treasury::pallet::Call<T, I>2105 **/2106 PalletTreasuryCall: {2107 _enum: {2108 propose_spend: {2109 value: 'Compact<u128>',2110 beneficiary: 'MultiAddress',2111 },2112 reject_proposal: {2113 proposalId: 'Compact<u32>',2114 },2115 approve_proposal: {2116 proposalId: 'Compact<u32>',2117 },2118 spend: {2119 amount: 'Compact<u128>',2120 beneficiary: 'MultiAddress',2121 },2122 remove_approval: {2123 proposalId: 'Compact<u32>'2124 }2125 }2126 },2127 /**2128 * Lookup242: frame_support::PalletId2129 **/2130 FrameSupportPalletId: '[u8;8]',2131 /**2132 * Lookup243: pallet_treasury::pallet::Error<T, I>2133 **/2134 PalletTreasuryError: {2135 _enum: ['InsufficientProposersBalance', 'InvalidIndex', 'TooManyApprovals', 'InsufficientPermission', 'ProposalNotApproved']2136 },2137 /**2138 * Lookup244: pallet_sudo::pallet::Call<T>2139 **/2140 PalletSudoCall: {2141 _enum: {2142 sudo: {2143 call: 'Call',2144 },2145 sudo_unchecked_weight: {2146 call: 'Call',2147 weight: 'SpWeightsWeightV2Weight',2148 },2149 set_key: {2150 _alias: {2151 new_: 'new',2152 },2153 new_: 'MultiAddress',2154 },2155 sudo_as: {2156 who: 'MultiAddress',2157 call: 'Call'2158 }2159 }2160 },2161 /**2162 * Lookup246: orml_vesting::module::Call<T>2163 **/2164 OrmlVestingModuleCall: {2165 _enum: {2166 claim: 'Null',2167 vested_transfer: {2168 dest: 'MultiAddress',2169 schedule: 'OrmlVestingVestingSchedule',2170 },2171 update_vesting_schedules: {2172 who: 'MultiAddress',2173 vestingSchedules: 'Vec<OrmlVestingVestingSchedule>',2174 },2175 claim_for: {2176 dest: 'MultiAddress'2177 }2178 }2179 },2180 /**2181 * Lookup248: orml_xtokens::module::Call<T>2182 **/2183 OrmlXtokensModuleCall: {2184 _enum: {2185 transfer: {2186 currencyId: 'PalletForeignAssetsAssetIds',2187 amount: 'u128',2188 dest: 'XcmVersionedMultiLocation',2189 destWeightLimit: 'XcmV3WeightLimit',2190 },2191 transfer_multiasset: {2192 asset: 'XcmVersionedMultiAsset',2193 dest: 'XcmVersionedMultiLocation',2194 destWeightLimit: 'XcmV3WeightLimit',2195 },2196 transfer_with_fee: {2197 currencyId: 'PalletForeignAssetsAssetIds',2198 amount: 'u128',2199 fee: 'u128',2200 dest: 'XcmVersionedMultiLocation',2201 destWeightLimit: 'XcmV3WeightLimit',2202 },2203 transfer_multiasset_with_fee: {2204 asset: 'XcmVersionedMultiAsset',2205 fee: 'XcmVersionedMultiAsset',2206 dest: 'XcmVersionedMultiLocation',2207 destWeightLimit: 'XcmV3WeightLimit',2208 },2209 transfer_multicurrencies: {2210 currencies: 'Vec<(PalletForeignAssetsAssetIds,u128)>',2211 feeItem: 'u32',2212 dest: 'XcmVersionedMultiLocation',2213 destWeightLimit: 'XcmV3WeightLimit',2214 },2215 transfer_multiassets: {2216 assets: 'XcmVersionedMultiAssets',2217 feeItem: 'u32',2218 dest: 'XcmVersionedMultiLocation',2219 destWeightLimit: 'XcmV3WeightLimit'2220 }2221 }2222 },2223 /**2224 * Lookup249: xcm::VersionedMultiAsset2225 **/2226 XcmVersionedMultiAsset: {2227 _enum: {2228 __Unused0: 'Null',2229 V2: 'XcmV2MultiAsset',2230 __Unused2: 'Null',2231 V3: 'XcmV3MultiAsset'2232 }2233 },2234 /**2235 * Lookup252: orml_tokens::module::Call<T>2236 **/2237 OrmlTokensModuleCall: {2238 _enum: {2239 transfer: {2240 dest: 'MultiAddress',2241 currencyId: 'PalletForeignAssetsAssetIds',2242 amount: 'Compact<u128>',2243 },2244 transfer_all: {2245 dest: 'MultiAddress',2246 currencyId: 'PalletForeignAssetsAssetIds',2247 keepAlive: 'bool',2248 },2249 transfer_keep_alive: {2250 dest: 'MultiAddress',2251 currencyId: 'PalletForeignAssetsAssetIds',2252 amount: 'Compact<u128>',2253 },2254 force_transfer: {2255 source: 'MultiAddress',2256 dest: 'MultiAddress',2257 currencyId: 'PalletForeignAssetsAssetIds',2258 amount: 'Compact<u128>',2259 },2260 set_balance: {2261 who: 'MultiAddress',2262 currencyId: 'PalletForeignAssetsAssetIds',2263 newFree: 'Compact<u128>',2264 newReserved: 'Compact<u128>'2265 }2266 }2267 },2268 /**2269 * Lookup253: pallet_identity::pallet::Call<T>2270 **/2271 PalletIdentityCall: {2272 _enum: {2273 add_registrar: {2274 account: 'MultiAddress',2275 },2276 set_identity: {2277 info: 'PalletIdentityIdentityInfo',2278 },2279 set_subs: {2280 subs: 'Vec<(AccountId32,Data)>',2281 },2282 clear_identity: 'Null',2283 request_judgement: {2284 regIndex: 'Compact<u32>',2285 maxFee: 'Compact<u128>',2286 },2287 cancel_request: {2288 regIndex: 'u32',2289 },2290 set_fee: {2291 index: 'Compact<u32>',2292 fee: 'Compact<u128>',2293 },2294 set_account_id: {2295 _alias: {2296 new_: 'new',2297 },2298 index: 'Compact<u32>',2299 new_: 'MultiAddress',2300 },2301 set_fields: {2302 index: 'Compact<u32>',2303 fields: 'PalletIdentityBitFlags',2304 },2305 provide_judgement: {2306 regIndex: 'Compact<u32>',2307 target: 'MultiAddress',2308 judgement: 'PalletIdentityJudgement',2309 identity: 'H256',2310 },2311 kill_identity: {2312 target: 'MultiAddress',2313 },2314 add_sub: {2315 sub: 'MultiAddress',2316 data: 'Data',2317 },2318 rename_sub: {2319 sub: 'MultiAddress',2320 data: 'Data',2321 },2322 remove_sub: {2323 sub: 'MultiAddress',2324 },2325 quit_sub: 'Null',2326 force_insert_identities: {2327 identities: 'Vec<(AccountId32,PalletIdentityRegistration)>',2328 },2329 force_remove_identities: {2330 identities: 'Vec<AccountId32>',2331 },2332 force_set_subs: {2333 subs: 'Vec<(AccountId32,(u128,Vec<(AccountId32,Data)>))>'2334 }2335 }2336 },2337 /**2338 * Lookup254: pallet_identity::types::IdentityInfo<FieldLimit>2339 **/2340 PalletIdentityIdentityInfo: {2341 additional: 'Vec<(Data,Data)>',2342 display: 'Data',2343 legal: 'Data',2344 web: 'Data',2345 riot: 'Data',2346 email: 'Data',2347 pgpFingerprint: 'Option<[u8;20]>',2348 image: 'Data',2349 twitter: 'Data'2350 },2351 /**2352 * Lookup290: pallet_identity::types::BitFlags<pallet_identity::types::IdentityField>2353 **/2354 PalletIdentityBitFlags: {2355 _bitLength: 64,2356 Display: 1,2357 Legal: 2,2358 Web: 4,2359 Riot: 8,2360 Email: 16,2361 PgpFingerprint: 32,2362 Image: 64,2363 Twitter: 1282364 },2365 /**2366 * Lookup291: pallet_identity::types::IdentityField2367 **/2368 PalletIdentityIdentityField: {2369 _enum: ['__Unused0', 'Display', 'Legal', '__Unused3', 'Web', '__Unused5', '__Unused6', '__Unused7', 'Riot', '__Unused9', '__Unused10', '__Unused11', '__Unused12', '__Unused13', '__Unused14', '__Unused15', 'Email', '__Unused17', '__Unused18', '__Unused19', '__Unused20', '__Unused21', '__Unused22', '__Unused23', '__Unused24', '__Unused25', '__Unused26', '__Unused27', '__Unused28', '__Unused29', '__Unused30', '__Unused31', 'PgpFingerprint', '__Unused33', '__Unused34', '__Unused35', '__Unused36', '__Unused37', '__Unused38', '__Unused39', '__Unused40', '__Unused41', '__Unused42', '__Unused43', '__Unused44', '__Unused45', '__Unused46', '__Unused47', '__Unused48', '__Unused49', '__Unused50', '__Unused51', '__Unused52', '__Unused53', '__Unused54', '__Unused55', '__Unused56', '__Unused57', '__Unused58', '__Unused59', '__Unused60', '__Unused61', '__Unused62', '__Unused63', 'Image', '__Unused65', '__Unused66', '__Unused67', '__Unused68', '__Unused69', '__Unused70', '__Unused71', '__Unused72', '__Unused73', '__Unused74', '__Unused75', '__Unused76', '__Unused77', '__Unused78', '__Unused79', '__Unused80', '__Unused81', '__Unused82', '__Unused83', '__Unused84', '__Unused85', '__Unused86', '__Unused87', '__Unused88', '__Unused89', '__Unused90', '__Unused91', '__Unused92', '__Unused93', '__Unused94', '__Unused95', '__Unused96', '__Unused97', '__Unused98', '__Unused99', '__Unused100', '__Unused101', '__Unused102', '__Unused103', '__Unused104', '__Unused105', '__Unused106', '__Unused107', '__Unused108', '__Unused109', '__Unused110', '__Unused111', '__Unused112', '__Unused113', '__Unused114', '__Unused115', '__Unused116', '__Unused117', '__Unused118', '__Unused119', '__Unused120', '__Unused121', '__Unused122', '__Unused123', '__Unused124', '__Unused125', '__Unused126', '__Unused127', 'Twitter']2370 },2371 /**2372 * Lookup292: pallet_identity::types::Judgement<Balance>2373 **/2374 PalletIdentityJudgement: {2375 _enum: {2376 Unknown: 'Null',2377 FeePaid: 'u128',2378 Reasonable: 'Null',2379 KnownGood: 'Null',2380 OutOfDate: 'Null',2381 LowQuality: 'Null',2382 Erroneous: 'Null'2383 }2384 },2385 /**2386 * Lookup295: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>2387 **/2388 PalletIdentityRegistration: {2389 judgements: 'Vec<(u32,PalletIdentityJudgement)>',2390 deposit: 'u128',2391 info: 'PalletIdentityIdentityInfo'2392 },2393 /**2394 * Lookup303: pallet_preimage::pallet::Call<T>2395 **/2396 PalletPreimageCall: {2397 _enum: {2398 note_preimage: {2399 bytes: 'Bytes',2400 },2401 unnote_preimage: {2402 _alias: {2403 hash_: 'hash',2404 },2405 hash_: 'H256',2406 },2407 request_preimage: {2408 _alias: {2409 hash_: 'hash',2410 },2411 hash_: 'H256',2412 },2413 unrequest_preimage: {2414 _alias: {2415 hash_: 'hash',2416 },2417 hash_: 'H256'2418 }2419 }2420 },2421 /**2422 * Lookup304: cumulus_pallet_xcmp_queue::pallet::Call<T>2423 **/2424 CumulusPalletXcmpQueueCall: {2425 _enum: {2426 service_overweight: {2427 index: 'u64',2428 weightLimit: 'SpWeightsWeightV2Weight',2429 },2430 suspend_xcm_execution: 'Null',2431 resume_xcm_execution: 'Null',2432 update_suspend_threshold: {2433 _alias: {2434 new_: 'new',2435 },2436 new_: 'u32',2437 },2438 update_drop_threshold: {2439 _alias: {2440 new_: 'new',2441 },2442 new_: 'u32',2443 },2444 update_resume_threshold: {2445 _alias: {2446 new_: 'new',2447 },2448 new_: 'u32',2449 },2450 update_threshold_weight: {2451 _alias: {2452 new_: 'new',2453 },2454 new_: 'SpWeightsWeightV2Weight',2455 },2456 update_weight_restrict_decay: {2457 _alias: {2458 new_: 'new',2459 },2460 new_: 'SpWeightsWeightV2Weight',2461 },2462 update_xcmp_max_individual_weight: {2463 _alias: {2464 new_: 'new',2465 },2466 new_: 'SpWeightsWeightV2Weight'2467 }2468 }2469 },2470 /**2471 * Lookup305: pallet_xcm::pallet::Call<T>2472 **/2473 PalletXcmCall: {2474 _enum: {2475 send: {2476 dest: 'XcmVersionedMultiLocation',2477 message: 'XcmVersionedXcm',2478 },2479 teleport_assets: {2480 dest: 'XcmVersionedMultiLocation',2481 beneficiary: 'XcmVersionedMultiLocation',2482 assets: 'XcmVersionedMultiAssets',2483 feeAssetItem: 'u32',2484 },2485 reserve_transfer_assets: {2486 dest: 'XcmVersionedMultiLocation',2487 beneficiary: 'XcmVersionedMultiLocation',2488 assets: 'XcmVersionedMultiAssets',2489 feeAssetItem: 'u32',2490 },2491 execute: {2492 message: 'XcmVersionedXcm',2493 maxWeight: 'SpWeightsWeightV2Weight',2494 },2495 force_xcm_version: {2496 location: 'XcmV3MultiLocation',2497 xcmVersion: 'u32',2498 },2499 force_default_xcm_version: {2500 maybeXcmVersion: 'Option<u32>',2501 },2502 force_subscribe_version_notify: {2503 location: 'XcmVersionedMultiLocation',2504 },2505 force_unsubscribe_version_notify: {2506 location: 'XcmVersionedMultiLocation',2507 },2508 limited_reserve_transfer_assets: {2509 dest: 'XcmVersionedMultiLocation',2510 beneficiary: 'XcmVersionedMultiLocation',2511 assets: 'XcmVersionedMultiAssets',2512 feeAssetItem: 'u32',2513 weightLimit: 'XcmV3WeightLimit',2514 },2515 limited_teleport_assets: {2516 dest: 'XcmVersionedMultiLocation',2517 beneficiary: 'XcmVersionedMultiLocation',2518 assets: 'XcmVersionedMultiAssets',2519 feeAssetItem: 'u32',2520 weightLimit: 'XcmV3WeightLimit',2521 },2522 force_suspension: {2523 suspended: 'bool'2524 }2525 }2526 },2527 /**2528 * Lookup306: xcm::VersionedXcm<RuntimeCall>2529 **/2530 XcmVersionedXcm: {2531 _enum: {2532 __Unused0: 'Null',2533 __Unused1: 'Null',2534 V2: 'XcmV2Xcm',2535 V3: 'XcmV3Xcm'2536 }2537 },2538 /**2539 * Lookup307: xcm::v2::Xcm<RuntimeCall>2540 **/2541 XcmV2Xcm: 'Vec<XcmV2Instruction>',2542 /**2543 * Lookup309: xcm::v2::Instruction<RuntimeCall>2544 **/2545 XcmV2Instruction: {2546 _enum: {2547 WithdrawAsset: 'XcmV2MultiassetMultiAssets',2548 ReserveAssetDeposited: 'XcmV2MultiassetMultiAssets',2549 ReceiveTeleportedAsset: 'XcmV2MultiassetMultiAssets',2550 QueryResponse: {2551 queryId: 'Compact<u64>',2552 response: 'XcmV2Response',2553 maxWeight: 'Compact<u64>',2554 },2555 TransferAsset: {2556 assets: 'XcmV2MultiassetMultiAssets',2557 beneficiary: 'XcmV2MultiLocation',2558 },2559 TransferReserveAsset: {2560 assets: 'XcmV2MultiassetMultiAssets',2561 dest: 'XcmV2MultiLocation',2562 xcm: 'XcmV2Xcm',2563 },2564 Transact: {2565 originType: 'XcmV2OriginKind',2566 requireWeightAtMost: 'Compact<u64>',2567 call: 'XcmDoubleEncoded',2568 },2569 HrmpNewChannelOpenRequest: {2570 sender: 'Compact<u32>',2571 maxMessageSize: 'Compact<u32>',2572 maxCapacity: 'Compact<u32>',2573 },2574 HrmpChannelAccepted: {2575 recipient: 'Compact<u32>',2576 },2577 HrmpChannelClosing: {2578 initiator: 'Compact<u32>',2579 sender: 'Compact<u32>',2580 recipient: 'Compact<u32>',2581 },2582 ClearOrigin: 'Null',2583 DescendOrigin: 'XcmV2MultilocationJunctions',2584 ReportError: {2585 queryId: 'Compact<u64>',2586 dest: 'XcmV2MultiLocation',2587 maxResponseWeight: 'Compact<u64>',2588 },2589 DepositAsset: {2590 assets: 'XcmV2MultiassetMultiAssetFilter',2591 maxAssets: 'Compact<u32>',2592 beneficiary: 'XcmV2MultiLocation',2593 },2594 DepositReserveAsset: {2595 assets: 'XcmV2MultiassetMultiAssetFilter',2596 maxAssets: 'Compact<u32>',2597 dest: 'XcmV2MultiLocation',2598 xcm: 'XcmV2Xcm',2599 },2600 ExchangeAsset: {2601 give: 'XcmV2MultiassetMultiAssetFilter',2602 receive: 'XcmV2MultiassetMultiAssets',2603 },2604 InitiateReserveWithdraw: {2605 assets: 'XcmV2MultiassetMultiAssetFilter',2606 reserve: 'XcmV2MultiLocation',2607 xcm: 'XcmV2Xcm',2608 },2609 InitiateTeleport: {2610 assets: 'XcmV2MultiassetMultiAssetFilter',2611 dest: 'XcmV2MultiLocation',2612 xcm: 'XcmV2Xcm',2613 },2614 QueryHolding: {2615 queryId: 'Compact<u64>',2616 dest: 'XcmV2MultiLocation',2617 assets: 'XcmV2MultiassetMultiAssetFilter',2618 maxResponseWeight: 'Compact<u64>',2619 },2620 BuyExecution: {2621 fees: 'XcmV2MultiAsset',2622 weightLimit: 'XcmV2WeightLimit',2623 },2624 RefundSurplus: 'Null',2625 SetErrorHandler: 'XcmV2Xcm',2626 SetAppendix: 'XcmV2Xcm',2627 ClearError: 'Null',2628 ClaimAsset: {2629 assets: 'XcmV2MultiassetMultiAssets',2630 ticket: 'XcmV2MultiLocation',2631 },2632 Trap: 'Compact<u64>',2633 SubscribeVersion: {2634 queryId: 'Compact<u64>',2635 maxResponseWeight: 'Compact<u64>',2636 },2637 UnsubscribeVersion: 'Null'2638 }2639 },2640 /**2641 * Lookup310: xcm::v2::Response2642 **/2643 XcmV2Response: {2644 _enum: {2645 Null: 'Null',2646 Assets: 'XcmV2MultiassetMultiAssets',2647 ExecutionResult: 'Option<(u32,XcmV2TraitsError)>',2648 Version: 'u32'2649 }2650 },2651 /**2652 * Lookup313: xcm::v2::traits::Error2653 **/2654 XcmV2TraitsError: {2655 _enum: {2656 Overflow: 'Null',2657 Unimplemented: 'Null',2658 UntrustedReserveLocation: 'Null',2659 UntrustedTeleportLocation: 'Null',2660 MultiLocationFull: 'Null',2661 MultiLocationNotInvertible: 'Null',2662 BadOrigin: 'Null',2663 InvalidLocation: 'Null',2664 AssetNotFound: 'Null',2665 FailedToTransactAsset: 'Null',2666 NotWithdrawable: 'Null',2667 LocationCannotHold: 'Null',2668 ExceedsMaxMessageSize: 'Null',2669 DestinationUnsupported: 'Null',2670 Transport: 'Null',2671 Unroutable: 'Null',2672 UnknownClaim: 'Null',2673 FailedToDecode: 'Null',2674 MaxWeightInvalid: 'Null',2675 NotHoldingFees: 'Null',2676 TooExpensive: 'Null',2677 Trap: 'u64',2678 UnhandledXcmVersion: 'Null',2679 WeightLimitReached: 'u64',2680 Barrier: 'Null',2681 WeightNotComputable: 'Null'2682 }2683 },2684 /**2685 * Lookup314: xcm::v2::multiasset::MultiAssetFilter2686 **/2687 XcmV2MultiassetMultiAssetFilter: {2688 _enum: {2689 Definite: 'XcmV2MultiassetMultiAssets',2690 Wild: 'XcmV2MultiassetWildMultiAsset'2691 }2692 },2693 /**2694 * Lookup315: xcm::v2::multiasset::WildMultiAsset2695 **/2696 XcmV2MultiassetWildMultiAsset: {2697 _enum: {2698 All: 'Null',2699 AllOf: {2700 id: 'XcmV2MultiassetAssetId',2701 fun: 'XcmV2MultiassetWildFungibility'2702 }2703 }2704 },2705 /**2706 * Lookup316: xcm::v2::multiasset::WildFungibility2707 **/2708 XcmV2MultiassetWildFungibility: {2709 _enum: ['Fungible', 'NonFungible']2710 },2711 /**2712 * Lookup317: xcm::v2::WeightLimit2713 **/2714 XcmV2WeightLimit: {2715 _enum: {2716 Unlimited: 'Null',2717 Limited: 'Compact<u64>'2718 }2719 },2720 /**2721 * Lookup326: cumulus_pallet_xcm::pallet::Call<T>2722 **/2723 CumulusPalletXcmCall: 'Null',2724 /**2725 * Lookup327: cumulus_pallet_dmp_queue::pallet::Call<T>2726 **/2727 CumulusPalletDmpQueueCall: {2728 _enum: {2729 service_overweight: {2730 index: 'u64',2731 weightLimit: 'SpWeightsWeightV2Weight'2732 }2733 }2734 },2735 /**2736 * Lookup328: pallet_inflation::pallet::Call<T>2737 **/2738 PalletInflationCall: {2739 _enum: {2740 start_inflation: {2741 inflationStartRelayBlock: 'u32'2742 }2743 }2744 },2745 /**2746 * Lookup329: pallet_unique::pallet::Call<T>2747 **/2748 PalletUniqueCall: {2749 _enum: {2750 create_collection: {2751 collectionName: 'Vec<u16>',2752 collectionDescription: 'Vec<u16>',2753 tokenPrefix: 'Bytes',2754 mode: 'UpDataStructsCollectionMode',2755 },2756 create_collection_ex: {2757 data: 'UpDataStructsCreateCollectionData',2758 },2759 destroy_collection: {2760 collectionId: 'u32',2761 },2762 add_to_allow_list: {2763 collectionId: 'u32',2764 address: 'PalletEvmAccountBasicCrossAccountIdRepr',2765 },2766 remove_from_allow_list: {2767 collectionId: 'u32',2768 address: 'PalletEvmAccountBasicCrossAccountIdRepr',2769 },2770 change_collection_owner: {2771 collectionId: 'u32',2772 newOwner: 'AccountId32',2773 },2774 add_collection_admin: {2775 collectionId: 'u32',2776 newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr',2777 },2778 remove_collection_admin: {2779 collectionId: 'u32',2780 accountId: 'PalletEvmAccountBasicCrossAccountIdRepr',2781 },2782 set_collection_sponsor: {2783 collectionId: 'u32',2784 newSponsor: 'AccountId32',2785 },2786 confirm_sponsorship: {2787 collectionId: 'u32',2788 },2789 remove_collection_sponsor: {2790 collectionId: 'u32',2791 },2792 create_item: {2793 collectionId: 'u32',2794 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',2795 data: 'UpDataStructsCreateItemData',2796 },2797 create_multiple_items: {2798 collectionId: 'u32',2799 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',2800 itemsData: 'Vec<UpDataStructsCreateItemData>',2801 },2802 set_collection_properties: {2803 collectionId: 'u32',2804 properties: 'Vec<UpDataStructsProperty>',2805 },2806 delete_collection_properties: {2807 collectionId: 'u32',2808 propertyKeys: 'Vec<Bytes>',2809 },2810 set_token_properties: {2811 collectionId: 'u32',2812 tokenId: 'u32',2813 properties: 'Vec<UpDataStructsProperty>',2814 },2815 delete_token_properties: {2816 collectionId: 'u32',2817 tokenId: 'u32',2818 propertyKeys: 'Vec<Bytes>',2819 },2820 set_token_property_permissions: {2821 collectionId: 'u32',2822 propertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2823 },2824 create_multiple_items_ex: {2825 collectionId: 'u32',2826 data: 'UpDataStructsCreateItemExData',2827 },2828 set_transfers_enabled_flag: {2829 collectionId: 'u32',2830 value: 'bool',2831 },2832 burn_item: {2833 collectionId: 'u32',2834 itemId: 'u32',2835 value: 'u128',2836 },2837 burn_from: {2838 collectionId: 'u32',2839 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2840 itemId: 'u32',2841 value: 'u128',2842 },2843 transfer: {2844 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',2845 collectionId: 'u32',2846 itemId: 'u32',2847 value: 'u128',2848 },2849 approve: {2850 spender: 'PalletEvmAccountBasicCrossAccountIdRepr',2851 collectionId: 'u32',2852 itemId: 'u32',2853 amount: 'u128',2854 },2855 approve_from: {2856 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2857 to: 'PalletEvmAccountBasicCrossAccountIdRepr',2858 collectionId: 'u32',2859 itemId: 'u32',2860 amount: 'u128',2861 },2862 transfer_from: {2863 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2864 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',2865 collectionId: 'u32',2866 itemId: 'u32',2867 value: 'u128',2868 },2869 set_collection_limits: {2870 collectionId: 'u32',2871 newLimit: 'UpDataStructsCollectionLimits',2872 },2873 set_collection_permissions: {2874 collectionId: 'u32',2875 newPermission: 'UpDataStructsCollectionPermissions',2876 },2877 repartition: {2878 collectionId: 'u32',2879 tokenId: 'u32',2880 amount: 'u128',2881 },2882 set_allowance_for_all: {2883 collectionId: 'u32',2884 operator: 'PalletEvmAccountBasicCrossAccountIdRepr',2885 approve: 'bool',2886 },2887 force_repair_collection: {2888 collectionId: 'u32',2889 },2890 force_repair_item: {2891 collectionId: 'u32',2892 itemId: 'u32'2893 }2894 }2895 },2896 /**2897 * Lookup334: up_data_structs::CollectionMode2898 **/2899 UpDataStructsCollectionMode: {2900 _enum: {2901 NFT: 'Null',2902 Fungible: 'u8',2903 ReFungible: 'Null'2904 }2905 },2906 /**2907 * Lookup335: up_data_structs::CreateCollectionData<sp_core::crypto::AccountId32>2908 **/2909 UpDataStructsCreateCollectionData: {2910 mode: 'UpDataStructsCollectionMode',2911 access: 'Option<UpDataStructsAccessMode>',2912 name: 'Vec<u16>',2913 description: 'Vec<u16>',2914 tokenPrefix: 'Bytes',2915 pendingSponsor: 'Option<AccountId32>',2916 limits: 'Option<UpDataStructsCollectionLimits>',2917 permissions: 'Option<UpDataStructsCollectionPermissions>',2918 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2919 properties: 'Vec<UpDataStructsProperty>'2920 },2921 /**2922 * Lookup337: up_data_structs::AccessMode2923 **/2924 UpDataStructsAccessMode: {2925 _enum: ['Normal', 'AllowList']2926 },2927 /**2928 * Lookup339: up_data_structs::CollectionLimits2929 **/2930 UpDataStructsCollectionLimits: {2931 accountTokenOwnershipLimit: 'Option<u32>',2932 sponsoredDataSize: 'Option<u32>',2933 sponsoredDataRateLimit: 'Option<UpDataStructsSponsoringRateLimit>',2934 tokenLimit: 'Option<u32>',2935 sponsorTransferTimeout: 'Option<u32>',2936 sponsorApproveTimeout: 'Option<u32>',2937 ownerCanTransfer: 'Option<bool>',2938 ownerCanDestroy: 'Option<bool>',2939 transfersEnabled: 'Option<bool>'2940 },2941 /**2942 * Lookup341: up_data_structs::SponsoringRateLimit2943 **/2944 UpDataStructsSponsoringRateLimit: {2945 _enum: {2946 SponsoringDisabled: 'Null',2947 Blocks: 'u32'2948 }2949 },2950 /**2951 * Lookup344: up_data_structs::CollectionPermissions2952 **/2953 UpDataStructsCollectionPermissions: {2954 access: 'Option<UpDataStructsAccessMode>',2955 mintMode: 'Option<bool>',2956 nesting: 'Option<UpDataStructsNestingPermissions>'2957 },2958 /**2959 * Lookup346: up_data_structs::NestingPermissions2960 **/2961 UpDataStructsNestingPermissions: {2962 tokenOwner: 'bool',2963 collectionAdmin: 'bool',2964 restricted: 'Option<UpDataStructsOwnerRestrictedSet>'2965 },2966 /**2967 * Lookup348: up_data_structs::OwnerRestrictedSet2968 **/2969 UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',2970 /**2971 * Lookup353: up_data_structs::PropertyKeyPermission2972 **/2973 UpDataStructsPropertyKeyPermission: {2974 key: 'Bytes',2975 permission: 'UpDataStructsPropertyPermission'2976 },2977 /**2978 * Lookup354: up_data_structs::PropertyPermission2979 **/2980 UpDataStructsPropertyPermission: {2981 mutable: 'bool',2982 collectionAdmin: 'bool',2983 tokenOwner: 'bool'2984 },2985 /**2986 * Lookup357: up_data_structs::Property2987 **/2988 UpDataStructsProperty: {2989 key: 'Bytes',2990 value: 'Bytes'2991 },2992 /**2993 * Lookup360: up_data_structs::CreateItemData2994 **/2995 UpDataStructsCreateItemData: {2996 _enum: {2997 NFT: 'UpDataStructsCreateNftData',2998 Fungible: 'UpDataStructsCreateFungibleData',2999 ReFungible: 'UpDataStructsCreateReFungibleData'3000 }3001 },3002 /**3003 * Lookup361: up_data_structs::CreateNftData3004 **/3005 UpDataStructsCreateNftData: {3006 properties: 'Vec<UpDataStructsProperty>'3007 },3008 /**3009 * Lookup362: up_data_structs::CreateFungibleData3010 **/3011 UpDataStructsCreateFungibleData: {3012 value: 'u128'3013 },3014 /**3015 * Lookup363: up_data_structs::CreateReFungibleData3016 **/3017 UpDataStructsCreateReFungibleData: {3018 pieces: 'u128',3019 properties: 'Vec<UpDataStructsProperty>'3020 },3021 /**3022 * Lookup366: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3023 **/3024 UpDataStructsCreateItemExData: {3025 _enum: {3026 NFT: 'Vec<UpDataStructsCreateNftExData>',3027 Fungible: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',3028 RefungibleMultipleItems: 'Vec<UpDataStructsCreateRefungibleExSingleOwner>',3029 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExMultipleOwners'3030 }3031 },3032 /**3033 * Lookup368: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3034 **/3035 UpDataStructsCreateNftExData: {3036 properties: 'Vec<UpDataStructsProperty>',3037 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'3038 },3039 /**3040 * Lookup375: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3041 **/3042 UpDataStructsCreateRefungibleExSingleOwner: {3043 user: 'PalletEvmAccountBasicCrossAccountIdRepr',3044 pieces: 'u128',3045 properties: 'Vec<UpDataStructsProperty>'3046 },3047 /**3048 * Lookup377: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3049 **/3050 UpDataStructsCreateRefungibleExMultipleOwners: {3051 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',3052 properties: 'Vec<UpDataStructsProperty>'3053 },3054 /**3055 * Lookup378: pallet_configuration::pallet::Call<T>3056 **/3057 PalletConfigurationCall: {3058 _enum: {3059 set_weight_to_fee_coefficient_override: {3060 coeff: 'Option<u64>',3061 },3062 set_min_gas_price_override: {3063 coeff: 'Option<u64>',3064 },3065 __Unused2: 'Null',3066 set_app_promotion_configuration_override: {3067 configuration: 'PalletConfigurationAppPromotionConfiguration',3068 },3069 set_collator_selection_desired_collators: {3070 max: 'Option<u32>',3071 },3072 set_collator_selection_license_bond: {3073 amount: 'Option<u128>',3074 },3075 set_collator_selection_kick_threshold: {3076 threshold: 'Option<u32>'3077 }3078 }3079 },3080 /**3081 * Lookup380: pallet_configuration::AppPromotionConfiguration<BlockNumber>3082 **/3083 PalletConfigurationAppPromotionConfiguration: {3084 recalculationInterval: 'Option<u32>',3085 pendingInterval: 'Option<u32>',3086 intervalIncome: 'Option<Perbill>',3087 maxStakersPerCalculation: 'Option<u8>'3088 },3089 /**3090 * Lookup384: pallet_structure::pallet::Call<T>3091 **/3092 PalletStructureCall: 'Null',3093 /**3094 * Lookup385: pallet_app_promotion::pallet::Call<T>3095 **/3096 PalletAppPromotionCall: {3097 _enum: {3098 set_admin_address: {3099 admin: 'PalletEvmAccountBasicCrossAccountIdRepr',3100 },3101 stake: {3102 amount: 'u128',3103 },3104 unstake_all: 'Null',3105 sponsor_collection: {3106 collectionId: 'u32',3107 },3108 stop_sponsoring_collection: {3109 collectionId: 'u32',3110 },3111 sponsor_contract: {3112 contractId: 'H160',3113 },3114 stop_sponsoring_contract: {3115 contractId: 'H160',3116 },3117 payout_stakers: {3118 stakersNumber: 'Option<u8>',3119 },3120 unstake_partial: {3121 amount: 'u128',3122 },3123 force_unstake: {3124 pendingBlocks: 'Vec<u32>'3125 }3126 }3127 },3128 /**3129 * Lookup386: pallet_foreign_assets::module::Call<T>3130 **/3131 PalletForeignAssetsModuleCall: {3132 _enum: {3133 register_foreign_asset: {3134 owner: 'AccountId32',3135 location: 'XcmVersionedMultiLocation',3136 metadata: 'PalletForeignAssetsModuleAssetMetadata',3137 },3138 update_foreign_asset: {3139 foreignAssetId: 'u32',3140 location: 'XcmVersionedMultiLocation',3141 metadata: 'PalletForeignAssetsModuleAssetMetadata'3142 }3143 }3144 },3145 /**3146 * Lookup387: pallet_evm::pallet::Call<T>3147 **/3148 PalletEvmCall: {3149 _enum: {3150 withdraw: {3151 address: 'H160',3152 value: 'u128',3153 },3154 call: {3155 source: 'H160',3156 target: 'H160',3157 input: 'Bytes',3158 value: 'U256',3159 gasLimit: 'u64',3160 maxFeePerGas: 'U256',3161 maxPriorityFeePerGas: 'Option<U256>',3162 nonce: 'Option<U256>',3163 accessList: 'Vec<(H160,Vec<H256>)>',3164 },3165 create: {3166 source: 'H160',3167 init: 'Bytes',3168 value: 'U256',3169 gasLimit: 'u64',3170 maxFeePerGas: 'U256',3171 maxPriorityFeePerGas: 'Option<U256>',3172 nonce: 'Option<U256>',3173 accessList: 'Vec<(H160,Vec<H256>)>',3174 },3175 create2: {3176 source: 'H160',3177 init: 'Bytes',3178 salt: 'H256',3179 value: 'U256',3180 gasLimit: 'u64',3181 maxFeePerGas: 'U256',3182 maxPriorityFeePerGas: 'Option<U256>',3183 nonce: 'Option<U256>',3184 accessList: 'Vec<(H160,Vec<H256>)>'3185 }3186 }3187 },3188 /**3189 * Lookup393: pallet_ethereum::pallet::Call<T>3190 **/3191 PalletEthereumCall: {3192 _enum: {3193 transact: {3194 transaction: 'EthereumTransactionTransactionV2'3195 }3196 }3197 },3198 /**3199 * Lookup394: ethereum::transaction::TransactionV23200 **/3201 EthereumTransactionTransactionV2: {3202 _enum: {3203 Legacy: 'EthereumTransactionLegacyTransaction',3204 EIP2930: 'EthereumTransactionEip2930Transaction',3205 EIP1559: 'EthereumTransactionEip1559Transaction'3206 }3207 },3208 /**3209 * Lookup395: ethereum::transaction::LegacyTransaction3210 **/3211 EthereumTransactionLegacyTransaction: {3212 nonce: 'U256',3213 gasPrice: 'U256',3214 gasLimit: 'U256',3215 action: 'EthereumTransactionTransactionAction',3216 value: 'U256',3217 input: 'Bytes',3218 signature: 'EthereumTransactionTransactionSignature'3219 },3220 /**3221 * Lookup396: ethereum::transaction::TransactionAction3222 **/3223 EthereumTransactionTransactionAction: {3224 _enum: {3225 Call: 'H160',3226 Create: 'Null'3227 }3228 },3229 /**3230 * Lookup397: ethereum::transaction::TransactionSignature3231 **/3232 EthereumTransactionTransactionSignature: {3233 v: 'u64',3234 r: 'H256',3235 s: 'H256'3236 },3237 /**3238 * Lookup399: ethereum::transaction::EIP2930Transaction3239 **/3240 EthereumTransactionEip2930Transaction: {3241 chainId: 'u64',3242 nonce: 'U256',3243 gasPrice: 'U256',3244 gasLimit: 'U256',3245 action: 'EthereumTransactionTransactionAction',3246 value: 'U256',3247 input: 'Bytes',3248 accessList: 'Vec<EthereumTransactionAccessListItem>',3249 oddYParity: 'bool',3250 r: 'H256',3251 s: 'H256'3252 },3253 /**3254 * Lookup401: ethereum::transaction::AccessListItem3255 **/3256 EthereumTransactionAccessListItem: {3257 address: 'H160',3258 storageKeys: 'Vec<H256>'3259 },3260 /**3261 * Lookup402: ethereum::transaction::EIP1559Transaction3262 **/3263 EthereumTransactionEip1559Transaction: {3264 chainId: 'u64',3265 nonce: 'U256',3266 maxPriorityFeePerGas: 'U256',3267 maxFeePerGas: 'U256',3268 gasLimit: 'U256',3269 action: 'EthereumTransactionTransactionAction',3270 value: 'U256',3271 input: 'Bytes',3272 accessList: 'Vec<EthereumTransactionAccessListItem>',3273 oddYParity: 'bool',3274 r: 'H256',3275 s: 'H256'3276 },3277 /**3278 * Lookup403: pallet_evm_contract_helpers::pallet::Call<T>3279 **/3280 PalletEvmContractHelpersCall: {3281 _enum: {3282 migrate_from_self_sponsoring: {3283 addresses: 'Vec<H160>'3284 }3285 }3286 },3287 /**3288 * Lookup405: pallet_evm_migration::pallet::Call<T>3289 **/3290 PalletEvmMigrationCall: {3291 _enum: {3292 begin: {3293 address: 'H160',3294 },3295 set_data: {3296 address: 'H160',3297 data: 'Vec<(H256,H256)>',3298 },3299 finish: {3300 address: 'H160',3301 code: 'Bytes',3302 },3303 insert_eth_logs: {3304 logs: 'Vec<EthereumLog>',3305 },3306 insert_events: {3307 events: 'Vec<Bytes>',3308 },3309 remove_rmrk_data: 'Null'3310 }3311 },3312 /**3313 * Lookup409: pallet_maintenance::pallet::Call<T>3314 **/3315 PalletMaintenanceCall: {3316 _enum: {3317 enable: 'Null',3318 disable: 'Null',3319 execute_preimage: {3320 _alias: {3321 hash_: 'hash',3322 },3323 hash_: 'H256',3324 weightBound: 'SpWeightsWeightV2Weight'3325 }3326 }3327 },3328 /**3329 * Lookup410: pallet_test_utils::pallet::Call<T>3330 **/3331 PalletTestUtilsCall: {3332 _enum: {3333 enable: 'Null',3334 set_test_value: {3335 value: 'u32',3336 },3337 set_test_value_and_rollback: {3338 value: 'u32',3339 },3340 inc_test_value: 'Null',3341 just_take_fee: 'Null',3342 batch_all: {3343 calls: 'Vec<Call>'3344 }3345 }3346 },3347 /**3348 * Lookup412: pallet_sudo::pallet::Error<T>3349 **/3350 PalletSudoError: {3351 _enum: ['RequireSudo']3352 },3353 /**3354 * Lookup414: orml_vesting::module::Error<T>3355 **/3356 OrmlVestingModuleError: {3357 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']3358 },3359 /**3360 * Lookup415: orml_xtokens::module::Error<T>3361 **/3362 OrmlXtokensModuleError: {3363 _enum: ['AssetHasNoReserve', 'NotCrossChainTransfer', 'InvalidDest', 'NotCrossChainTransferableCurrency', 'UnweighableMessage', 'XcmExecutionFailed', 'CannotReanchor', 'InvalidAncestry', 'InvalidAsset', 'DestinationNotInvertible', 'BadVersion', 'DistinctReserveForAssetAndFee', 'ZeroFee', 'ZeroAmount', 'TooManyAssetsBeingSent', 'AssetIndexNonExistent', 'FeeNotEnough', 'NotSupportedMultiLocation', 'MinXcmFeeNotDefined']3364 },3365 /**3366 * Lookup418: orml_tokens::BalanceLock<Balance>3367 **/3368 OrmlTokensBalanceLock: {3369 id: '[u8;8]',3370 amount: 'u128'3371 },3372 /**3373 * Lookup420: orml_tokens::AccountData<Balance>3374 **/3375 OrmlTokensAccountData: {3376 free: 'u128',3377 reserved: 'u128',3378 frozen: 'u128'3379 },3380 /**3381 * Lookup422: orml_tokens::ReserveData<ReserveIdentifier, Balance>3382 **/3383 OrmlTokensReserveData: {3384 id: 'Null',3385 amount: 'u128'3386 },3387 /**3388 * Lookup424: orml_tokens::module::Error<T>3389 **/3390 OrmlTokensModuleError: {3391 _enum: ['BalanceTooLow', 'AmountIntoBalanceFailed', 'LiquidityRestrictions', 'MaxLocksExceeded', 'KeepAlive', 'ExistentialDeposit', 'DeadAccount', 'TooManyReserves']3392 },3393 /**3394 * Lookup429: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>3395 **/3396 PalletIdentityRegistrarInfo: {3397 account: 'AccountId32',3398 fee: 'u128',3399 fields: 'PalletIdentityBitFlags'3400 },3401 /**3402 * Lookup431: pallet_identity::pallet::Error<T>3403 **/3404 PalletIdentityError: {3405 _enum: ['TooManySubAccounts', 'NotFound', 'NotNamed', 'EmptyIndex', 'FeeChanged', 'NoIdentity', 'StickyJudgement', 'JudgementGiven', 'InvalidJudgement', 'InvalidIndex', 'InvalidTarget', 'TooManyFields', 'TooManyRegistrars', 'AlreadyClaimed', 'NotSub', 'NotOwned', 'JudgementForDifferentIdentity', 'JudgementPaymentFailed']3406 },3407 /**3408 * Lookup432: pallet_preimage::RequestStatus<sp_core::crypto::AccountId32, Balance>3409 **/3410 PalletPreimageRequestStatus: {3411 _enum: {3412 Unrequested: {3413 deposit: '(AccountId32,u128)',3414 len: 'u32',3415 },3416 Requested: {3417 deposit: 'Option<(AccountId32,u128)>',3418 count: 'u32',3419 len: 'Option<u32>'3420 }3421 }3422 },3423 /**3424 * Lookup437: pallet_preimage::pallet::Error<T>3425 **/3426 PalletPreimageError: {3427 _enum: ['TooBig', 'AlreadyNoted', 'NotAuthorized', 'NotNoted', 'Requested', 'NotRequested']3428 },3429 /**3430 * Lookup439: cumulus_pallet_xcmp_queue::InboundChannelDetails3431 **/3432 CumulusPalletXcmpQueueInboundChannelDetails: {3433 sender: 'u32',3434 state: 'CumulusPalletXcmpQueueInboundState',3435 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'3436 },3437 /**3438 * Lookup440: cumulus_pallet_xcmp_queue::InboundState3439 **/3440 CumulusPalletXcmpQueueInboundState: {3441 _enum: ['Ok', 'Suspended']3442 },3443 /**3444 * Lookup443: polkadot_parachain::primitives::XcmpMessageFormat3445 **/3446 PolkadotParachainPrimitivesXcmpMessageFormat: {3447 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']3448 },3449 /**3450 * Lookup446: cumulus_pallet_xcmp_queue::OutboundChannelDetails3451 **/3452 CumulusPalletXcmpQueueOutboundChannelDetails: {3453 recipient: 'u32',3454 state: 'CumulusPalletXcmpQueueOutboundState',3455 signalsExist: 'bool',3456 firstIndex: 'u16',3457 lastIndex: 'u16'3458 },3459 /**3460 * Lookup447: cumulus_pallet_xcmp_queue::OutboundState3461 **/3462 CumulusPalletXcmpQueueOutboundState: {3463 _enum: ['Ok', 'Suspended']3464 },3465 /**3466 * Lookup449: cumulus_pallet_xcmp_queue::QueueConfigData3467 **/3468 CumulusPalletXcmpQueueQueueConfigData: {3469 suspendThreshold: 'u32',3470 dropThreshold: 'u32',3471 resumeThreshold: 'u32',3472 thresholdWeight: 'SpWeightsWeightV2Weight',3473 weightRestrictDecay: 'SpWeightsWeightV2Weight',3474 xcmpMaxIndividualWeight: 'SpWeightsWeightV2Weight'3475 },3476 /**3477 * Lookup451: cumulus_pallet_xcmp_queue::pallet::Error<T>3478 **/3479 CumulusPalletXcmpQueueError: {3480 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']3481 },3482 /**3483 * Lookup452: pallet_xcm::pallet::QueryStatus<BlockNumber>3484 **/3485 PalletXcmQueryStatus: {3486 _enum: {3487 Pending: {3488 responder: 'XcmVersionedMultiLocation',3489 maybeMatchQuerier: 'Option<XcmVersionedMultiLocation>',3490 maybeNotify: 'Option<(u8,u8)>',3491 timeout: 'u32',3492 },3493 VersionNotifier: {3494 origin: 'XcmVersionedMultiLocation',3495 isActive: 'bool',3496 },3497 Ready: {3498 response: 'XcmVersionedResponse',3499 at: 'u32'3500 }3501 }3502 },3503 /**3504 * Lookup456: xcm::VersionedResponse3505 **/3506 XcmVersionedResponse: {3507 _enum: {3508 __Unused0: 'Null',3509 __Unused1: 'Null',3510 V2: 'XcmV2Response',3511 V3: 'XcmV3Response'3512 }3513 },3514 /**3515 * Lookup462: pallet_xcm::pallet::VersionMigrationStage3516 **/3517 PalletXcmVersionMigrationStage: {3518 _enum: {3519 MigrateSupportedVersion: 'Null',3520 MigrateVersionNotifiers: 'Null',3521 NotifyCurrentTargets: 'Option<Bytes>',3522 MigrateAndNotifyOldTargets: 'Null'3523 }3524 },3525 /**3526 * Lookup465: xcm::VersionedAssetId3527 **/3528 XcmVersionedAssetId: {3529 _enum: {3530 __Unused0: 'Null',3531 __Unused1: 'Null',3532 __Unused2: 'Null',3533 V3: 'XcmV3MultiassetAssetId'3534 }3535 },3536 /**3537 * Lookup466: pallet_xcm::pallet::RemoteLockedFungibleRecord<ConsumerIdentifier, MaxConsumers>3538 **/3539 PalletXcmRemoteLockedFungibleRecord: {3540 amount: 'u128',3541 owner: 'XcmVersionedMultiLocation',3542 locker: 'XcmVersionedMultiLocation',3543 consumers: 'Vec<(Null,u128)>'3544 },3545 /**3546 * Lookup473: pallet_xcm::pallet::Error<T>3547 **/3548 PalletXcmError: {3549 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed', 'InvalidAsset', 'LowBalance', 'TooManyLocks', 'AccountNotSovereign', 'FeesNotMet', 'LockNotFound', 'InUse']3550 },3551 /**3552 * Lookup474: cumulus_pallet_xcm::pallet::Error<T>3553 **/3554 CumulusPalletXcmError: 'Null',3555 /**3556 * Lookup475: cumulus_pallet_dmp_queue::ConfigData3557 **/3558 CumulusPalletDmpQueueConfigData: {3559 maxIndividual: 'SpWeightsWeightV2Weight'3560 },3561 /**3562 * Lookup476: cumulus_pallet_dmp_queue::PageIndexData3563 **/3564 CumulusPalletDmpQueuePageIndexData: {3565 beginUsed: 'u32',3566 endUsed: 'u32',3567 overweightCount: 'u64'3568 },3569 /**3570 * Lookup479: cumulus_pallet_dmp_queue::pallet::Error<T>3571 **/3572 CumulusPalletDmpQueueError: {3573 _enum: ['Unknown', 'OverLimit']3574 },3575 /**3576 * Lookup483: pallet_unique::pallet::Error<T>3577 **/3578 PalletUniqueError: {3579 _enum: ['CollectionDecimalPointLimitExceeded', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']3580 },3581 /**3582 * Lookup484: pallet_configuration::pallet::Error<T>3583 **/3584 PalletConfigurationError: {3585 _enum: ['InconsistentConfiguration']3586 },3587 /**3588 * Lookup485: up_data_structs::Collection<sp_core::crypto::AccountId32>3589 **/3590 UpDataStructsCollection: {3591 owner: 'AccountId32',3592 mode: 'UpDataStructsCollectionMode',3593 name: 'Vec<u16>',3594 description: 'Vec<u16>',3595 tokenPrefix: 'Bytes',3596 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',3597 limits: 'UpDataStructsCollectionLimits',3598 permissions: 'UpDataStructsCollectionPermissions',3599 flags: '[u8;1]'3600 },3601 /**3602 * Lookup486: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>3603 **/3604 UpDataStructsSponsorshipStateAccountId32: {3605 _enum: {3606 Disabled: 'Null',3607 Unconfirmed: 'AccountId32',3608 Confirmed: 'AccountId32'3609 }3610 },3611 /**3612 * Lookup487: up_data_structs::Properties3613 **/3614 UpDataStructsProperties: {3615 map: 'UpDataStructsPropertiesMapBoundedVec',3616 consumedSpace: 'u32',3617 reserved: 'u32'3618 },3619 /**3620 * Lookup488: up_data_structs::PropertiesMap<bounded_collections::bounded_vec::BoundedVec<T, S>>3621 **/3622 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',3623 /**3624 * Lookup493: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>3625 **/3626 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',3627 /**3628 * Lookup500: up_data_structs::CollectionStats3629 **/3630 UpDataStructsCollectionStats: {3631 created: 'u32',3632 destroyed: 'u32',3633 alive: 'u32'3634 },3635 /**3636 * Lookup501: up_data_structs::TokenChild3637 **/3638 UpDataStructsTokenChild: {3639 token: 'u32',3640 collection: 'u32'3641 },3642 /**3643 * Lookup502: PhantomType::up_data_structs<T>3644 **/3645 PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,UpPovEstimateRpcPovInfo);0]',3646 /**3647 * Lookup504: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3648 **/3649 UpDataStructsTokenData: {3650 properties: 'Vec<UpDataStructsProperty>',3651 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>',3652 pieces: 'u128'3653 },3654 /**3655 * Lookup506: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>3656 **/3657 UpDataStructsRpcCollection: {3658 owner: 'AccountId32',3659 mode: 'UpDataStructsCollectionMode',3660 name: 'Vec<u16>',3661 description: 'Vec<u16>',3662 tokenPrefix: 'Bytes',3663 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',3664 limits: 'UpDataStructsCollectionLimits',3665 permissions: 'UpDataStructsCollectionPermissions',3666 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',3667 properties: 'Vec<UpDataStructsProperty>',3668 readOnly: 'bool',3669 flags: 'UpDataStructsRpcCollectionFlags'3670 },3671 /**3672 * Lookup507: up_data_structs::RpcCollectionFlags3673 **/3674 UpDataStructsRpcCollectionFlags: {3675 foreign: 'bool',3676 erc721metadata: 'bool'3677 },3678 /**3679 * Lookup508: up_pov_estimate_rpc::PovInfo3680 **/3681 UpPovEstimateRpcPovInfo: {3682 proofSize: 'u64',3683 compactProofSize: 'u64',3684 compressedProofSize: 'u64',3685 results: 'Vec<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>',3686 keyValues: 'Vec<UpPovEstimateRpcTrieKeyValue>'3687 },3688 /**3689 * Lookup511: sp_runtime::transaction_validity::TransactionValidityError3690 **/3691 SpRuntimeTransactionValidityTransactionValidityError: {3692 _enum: {3693 Invalid: 'SpRuntimeTransactionValidityInvalidTransaction',3694 Unknown: 'SpRuntimeTransactionValidityUnknownTransaction'3695 }3696 },3697 /**3698 * Lookup512: sp_runtime::transaction_validity::InvalidTransaction3699 **/3700 SpRuntimeTransactionValidityInvalidTransaction: {3701 _enum: {3702 Call: 'Null',3703 Payment: 'Null',3704 Future: 'Null',3705 Stale: 'Null',3706 BadProof: 'Null',3707 AncientBirthBlock: 'Null',3708 ExhaustsResources: 'Null',3709 Custom: 'u8',3710 BadMandatory: 'Null',3711 MandatoryValidation: 'Null',3712 BadSigner: 'Null'3713 }3714 },3715 /**3716 * Lookup513: sp_runtime::transaction_validity::UnknownTransaction3717 **/3718 SpRuntimeTransactionValidityUnknownTransaction: {3719 _enum: {3720 CannotLookup: 'Null',3721 NoUnsignedValidator: 'Null',3722 Custom: 'u8'3723 }3724 },3725 /**3726 * Lookup515: up_pov_estimate_rpc::TrieKeyValue3727 **/3728 UpPovEstimateRpcTrieKeyValue: {3729 key: 'Bytes',3730 value: 'Bytes'3731 },3732 /**3733 * Lookup517: pallet_common::pallet::Error<T>3734 **/3735 PalletCommonError: {3736 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsNotEthMirror', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal', 'ConfirmSponsorshipFail', 'UserIsNotCollectionAdmin']3737 },3738 /**3739 * Lookup519: pallet_fungible::pallet::Error<T>3740 **/3741 PalletFungibleError: {3742 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed', 'SettingAllowanceForAllNotAllowed', 'FungibleTokensAreAlwaysValid']3743 },3744 /**3745 * Lookup524: pallet_refungible::pallet::Error<T>3746 **/3747 PalletRefungibleError: {3748 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']3749 },3750 /**3751 * Lookup525: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3752 **/3753 PalletNonfungibleItemData: {3754 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'3755 },3756 /**3757 * Lookup527: up_data_structs::PropertyScope3758 **/3759 UpDataStructsPropertyScope: {3760 _enum: ['None', 'Rmrk']3761 },3762 /**3763 * Lookup530: pallet_nonfungible::pallet::Error<T>3764 **/3765 PalletNonfungibleError: {3766 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']3767 },3768 /**3769 * Lookup531: pallet_structure::pallet::Error<T>3770 **/3771 PalletStructureError: {3772 _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound', 'CantNestTokenUnderCollection']3773 },3774 /**3775 * Lookup536: pallet_app_promotion::pallet::Error<T>3776 **/3777 PalletAppPromotionError: {3778 _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFunds', 'PendingForBlockOverflow', 'SponsorNotSet', 'InsufficientStakedBalance', 'InconsistencyState']3779 },3780 /**3781 * Lookup537: pallet_foreign_assets::module::Error<T>3782 **/3783 PalletForeignAssetsModuleError: {3784 _enum: ['BadLocation', 'MultiLocationExisted', 'AssetIdNotExists', 'AssetIdExisted']3785 },3786 /**3787 * Lookup538: pallet_evm::CodeMetadata3788 **/3789 PalletEvmCodeMetadata: {3790 _alias: {3791 size_: 'size',3792 hash_: 'hash'3793 },3794 size_: 'u64',3795 hash_: 'H256'3796 },3797 /**3798 * Lookup540: pallet_evm::pallet::Error<T>3799 **/3800 PalletEvmError: {3801 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce', 'GasLimitTooLow', 'GasLimitTooHigh', 'Undefined', 'Reentrancy', 'TransactionMustComeFromEOA']3802 },3803 /**3804 * Lookup543: fp_rpc::TransactionStatus3805 **/3806 FpRpcTransactionStatus: {3807 transactionHash: 'H256',3808 transactionIndex: 'u32',3809 from: 'H160',3810 to: 'Option<H160>',3811 contractAddress: 'Option<H160>',3812 logs: 'Vec<EthereumLog>',3813 logsBloom: 'EthbloomBloom'3814 },3815 /**3816 * Lookup545: ethbloom::Bloom3817 **/3818 EthbloomBloom: '[u8;256]',3819 /**3820 * Lookup547: ethereum::receipt::ReceiptV33821 **/3822 EthereumReceiptReceiptV3: {3823 _enum: {3824 Legacy: 'EthereumReceiptEip658ReceiptData',3825 EIP2930: 'EthereumReceiptEip658ReceiptData',3826 EIP1559: 'EthereumReceiptEip658ReceiptData'3827 }3828 },3829 /**3830 * Lookup548: ethereum::receipt::EIP658ReceiptData3831 **/3832 EthereumReceiptEip658ReceiptData: {3833 statusCode: 'u8',3834 usedGas: 'U256',3835 logsBloom: 'EthbloomBloom',3836 logs: 'Vec<EthereumLog>'3837 },3838 /**3839 * Lookup549: ethereum::block::Block<ethereum::transaction::TransactionV2>3840 **/3841 EthereumBlock: {3842 header: 'EthereumHeader',3843 transactions: 'Vec<EthereumTransactionTransactionV2>',3844 ommers: 'Vec<EthereumHeader>'3845 },3846 /**3847 * Lookup550: ethereum::header::Header3848 **/3849 EthereumHeader: {3850 parentHash: 'H256',3851 ommersHash: 'H256',3852 beneficiary: 'H160',3853 stateRoot: 'H256',3854 transactionsRoot: 'H256',3855 receiptsRoot: 'H256',3856 logsBloom: 'EthbloomBloom',3857 difficulty: 'U256',3858 number: 'U256',3859 gasLimit: 'U256',3860 gasUsed: 'U256',3861 timestamp: 'u64',3862 extraData: 'Bytes',3863 mixHash: 'H256',3864 nonce: 'EthereumTypesHashH64'3865 },3866 /**3867 * Lookup551: ethereum_types::hash::H643868 **/3869 EthereumTypesHashH64: '[u8;8]',3870 /**3871 * Lookup556: pallet_ethereum::pallet::Error<T>3872 **/3873 PalletEthereumError: {3874 _enum: ['InvalidSignature', 'PreLogExists']3875 },3876 /**3877 * Lookup557: pallet_evm_coder_substrate::pallet::Error<T>3878 **/3879 PalletEvmCoderSubstrateError: {3880 _enum: ['OutOfGas', 'OutOfFund']3881 },3882 /**3883 * Lookup558: up_data_structs::SponsorshipState<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3884 **/3885 UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: {3886 _enum: {3887 Disabled: 'Null',3888 Unconfirmed: 'PalletEvmAccountBasicCrossAccountIdRepr',3889 Confirmed: 'PalletEvmAccountBasicCrossAccountIdRepr'3890 }3891 },3892 /**3893 * Lookup559: pallet_evm_contract_helpers::SponsoringModeT3894 **/3895 PalletEvmContractHelpersSponsoringModeT: {3896 _enum: ['Disabled', 'Allowlisted', 'Generous']3897 },3898 /**3899 * Lookup565: pallet_evm_contract_helpers::pallet::Error<T>3900 **/3901 PalletEvmContractHelpersError: {3902 _enum: ['NoPermission', 'NoPendingSponsor', 'TooManyMethodsHaveSponsoredLimit']3903 },3904 /**3905 * Lookup566: pallet_evm_migration::pallet::Error<T>3906 **/3907 PalletEvmMigrationError: {3908 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating', 'BadEvent']3909 },3910 /**3911 * Lookup567: pallet_maintenance::pallet::Error<T>3912 **/3913 PalletMaintenanceError: 'Null',3914 /**3915 * Lookup568: pallet_test_utils::pallet::Error<T>3916 **/3917 PalletTestUtilsError: {3918 _enum: ['TestPalletDisabled', 'TriggerRollback']3919 },3920 /**3921 * Lookup570: sp_runtime::MultiSignature3922 **/3923 SpRuntimeMultiSignature: {3924 _enum: {3925 Ed25519: 'SpCoreEd25519Signature',3926 Sr25519: 'SpCoreSr25519Signature',3927 Ecdsa: 'SpCoreEcdsaSignature'3928 }3929 },3930 /**3931 * Lookup571: sp_core::ed25519::Signature3932 **/3933 SpCoreEd25519Signature: '[u8;64]',3934 /**3935 * Lookup573: sp_core::sr25519::Signature3936 **/3937 SpCoreSr25519Signature: '[u8;64]',3938 /**3939 * Lookup574: sp_core::ecdsa::Signature3940 **/3941 SpCoreEcdsaSignature: '[u8;65]',3942 /**3943 * Lookup577: frame_system::extensions::check_spec_version::CheckSpecVersion<T>3944 **/3945 FrameSystemExtensionsCheckSpecVersion: 'Null',3946 /**3947 * Lookup578: frame_system::extensions::check_tx_version::CheckTxVersion<T>3948 **/3949 FrameSystemExtensionsCheckTxVersion: 'Null',3950 /**3951 * Lookup579: frame_system::extensions::check_genesis::CheckGenesis<T>3952 **/3953 FrameSystemExtensionsCheckGenesis: 'Null',3954 /**3955 * Lookup582: frame_system::extensions::check_nonce::CheckNonce<T>3956 **/3957 FrameSystemExtensionsCheckNonce: 'Compact<u32>',3958 /**3959 * Lookup583: frame_system::extensions::check_weight::CheckWeight<T>3960 **/3961 FrameSystemExtensionsCheckWeight: 'Null',3962 /**3963 * Lookup584: opal_runtime::runtime_common::maintenance::CheckMaintenance3964 **/3965 OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance: 'Null',3966 /**3967 * Lookup585: opal_runtime::runtime_common::identity::DisableIdentityCalls3968 **/3969 OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls: 'Null',3970 /**3971 * Lookup586: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>3972 **/3973 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',3974 /**3975 * Lookup587: opal_runtime::Runtime3976 **/3977 OpalRuntimeRuntime: 'Null',3978 /**3979 * Lookup588: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>3980 **/3981 PalletEthereumFakeTransactionFinalizer: 'Null'3982};1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34/* eslint-disable sort-keys */56export default {7 /**8 * Lookup3: frame_system::AccountInfo<Index, pallet_balances::types::AccountData<Balance>>9 **/10 FrameSystemAccountInfo: {11 nonce: 'u32',12 consumers: 'u32',13 providers: 'u32',14 sufficients: 'u32',15 data: 'PalletBalancesAccountData'16 },17 /**18 * Lookup5: pallet_balances::types::AccountData<Balance>19 **/20 PalletBalancesAccountData: {21 free: 'u128',22 reserved: 'u128',23 frozen: 'u128',24 flags: 'u128'25 },26 /**27 * Lookup8: frame_support::dispatch::PerDispatchClass<sp_weights::weight_v2::Weight>28 **/29 FrameSupportDispatchPerDispatchClassWeight: {30 normal: 'SpWeightsWeightV2Weight',31 operational: 'SpWeightsWeightV2Weight',32 mandatory: 'SpWeightsWeightV2Weight'33 },34 /**35 * Lookup9: sp_weights::weight_v2::Weight36 **/37 SpWeightsWeightV2Weight: {38 refTime: 'Compact<u64>',39 proofSize: 'Compact<u64>'40 },41 /**42 * Lookup14: sp_runtime::generic::digest::Digest43 **/44 SpRuntimeDigest: {45 logs: 'Vec<SpRuntimeDigestDigestItem>'46 },47 /**48 * Lookup16: sp_runtime::generic::digest::DigestItem49 **/50 SpRuntimeDigestDigestItem: {51 _enum: {52 Other: 'Bytes',53 __Unused1: 'Null',54 __Unused2: 'Null',55 __Unused3: 'Null',56 Consensus: '([u8;4],Bytes)',57 Seal: '([u8;4],Bytes)',58 PreRuntime: '([u8;4],Bytes)',59 __Unused7: 'Null',60 RuntimeEnvironmentUpdated: 'Null'61 }62 },63 /**64 * Lookup19: frame_system::EventRecord<opal_runtime::RuntimeEvent, primitive_types::H256>65 **/66 FrameSystemEventRecord: {67 phase: 'FrameSystemPhase',68 event: 'Event',69 topics: 'Vec<H256>'70 },71 /**72 * Lookup21: frame_system::pallet::Event<T>73 **/74 FrameSystemEvent: {75 _enum: {76 ExtrinsicSuccess: {77 dispatchInfo: 'FrameSupportDispatchDispatchInfo',78 },79 ExtrinsicFailed: {80 dispatchError: 'SpRuntimeDispatchError',81 dispatchInfo: 'FrameSupportDispatchDispatchInfo',82 },83 CodeUpdated: 'Null',84 NewAccount: {85 account: 'AccountId32',86 },87 KilledAccount: {88 account: 'AccountId32',89 },90 Remarked: {91 _alias: {92 hash_: 'hash',93 },94 sender: 'AccountId32',95 hash_: 'H256'96 }97 }98 },99 /**100 * Lookup22: frame_support::dispatch::DispatchInfo101 **/102 FrameSupportDispatchDispatchInfo: {103 weight: 'SpWeightsWeightV2Weight',104 class: 'FrameSupportDispatchDispatchClass',105 paysFee: 'FrameSupportDispatchPays'106 },107 /**108 * Lookup23: frame_support::dispatch::DispatchClass109 **/110 FrameSupportDispatchDispatchClass: {111 _enum: ['Normal', 'Operational', 'Mandatory']112 },113 /**114 * Lookup24: frame_support::dispatch::Pays115 **/116 FrameSupportDispatchPays: {117 _enum: ['Yes', 'No']118 },119 /**120 * Lookup25: sp_runtime::DispatchError121 **/122 SpRuntimeDispatchError: {123 _enum: {124 Other: 'Null',125 CannotLookup: 'Null',126 BadOrigin: 'Null',127 Module: 'SpRuntimeModuleError',128 ConsumerRemaining: 'Null',129 NoProviders: 'Null',130 TooManyConsumers: 'Null',131 Token: 'SpRuntimeTokenError',132 Arithmetic: 'SpArithmeticArithmeticError',133 Transactional: 'SpRuntimeTransactionalError',134 Exhausted: 'Null',135 Corruption: 'Null',136 Unavailable: 'Null',137 RootNotAllowed: 'Null'138 }139 },140 /**141 * Lookup26: sp_runtime::ModuleError142 **/143 SpRuntimeModuleError: {144 index: 'u8',145 error: '[u8;4]'146 },147 /**148 * Lookup27: sp_runtime::TokenError149 **/150 SpRuntimeTokenError: {151 _enum: ['FundsUnavailable', 'OnlyProvider', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported', 'CannotCreateHold', 'NotExpendable', 'Blocked']152 },153 /**154 * Lookup28: sp_arithmetic::ArithmeticError155 **/156 SpArithmeticArithmeticError: {157 _enum: ['Underflow', 'Overflow', 'DivisionByZero']158 },159 /**160 * Lookup29: sp_runtime::TransactionalError161 **/162 SpRuntimeTransactionalError: {163 _enum: ['LimitReached', 'NoLayer']164 },165 /**166 * Lookup30: pallet_state_trie_migration::pallet::Event<T>167 **/168 PalletStateTrieMigrationEvent: {169 _enum: {170 Migrated: {171 top: 'u32',172 child: 'u32',173 compute: 'PalletStateTrieMigrationMigrationCompute',174 },175 Slashed: {176 who: 'AccountId32',177 amount: 'u128',178 },179 AutoMigrationFinished: 'Null',180 Halted: {181 error: 'PalletStateTrieMigrationError'182 }183 }184 },185 /**186 * Lookup31: pallet_state_trie_migration::pallet::MigrationCompute187 **/188 PalletStateTrieMigrationMigrationCompute: {189 _enum: ['Signed', 'Auto']190 },191 /**192 * Lookup32: pallet_state_trie_migration::pallet::Error<T>193 **/194 PalletStateTrieMigrationError: {195 _enum: ['MaxSignedLimits', 'KeyTooLong', 'NotEnoughFunds', 'BadWitness', 'SignedMigrationNotAllowed', 'BadChildRoot']196 },197 /**198 * Lookup33: cumulus_pallet_parachain_system::pallet::Event<T>199 **/200 CumulusPalletParachainSystemEvent: {201 _enum: {202 ValidationFunctionStored: 'Null',203 ValidationFunctionApplied: {204 relayChainBlockNum: 'u32',205 },206 ValidationFunctionDiscarded: 'Null',207 UpgradeAuthorized: {208 codeHash: 'H256',209 },210 DownwardMessagesReceived: {211 count: 'u32',212 },213 DownwardMessagesProcessed: {214 weightUsed: 'SpWeightsWeightV2Weight',215 dmqHead: 'H256',216 },217 UpwardMessageSent: {218 messageHash: 'Option<[u8;32]>'219 }220 }221 },222 /**223 * Lookup35: pallet_collator_selection::pallet::Event<T>224 **/225 PalletCollatorSelectionEvent: {226 _enum: {227 InvulnerableAdded: {228 invulnerable: 'AccountId32',229 },230 InvulnerableRemoved: {231 invulnerable: 'AccountId32',232 },233 LicenseObtained: {234 accountId: 'AccountId32',235 deposit: 'u128',236 },237 LicenseReleased: {238 accountId: 'AccountId32',239 depositReturned: 'u128',240 },241 CandidateAdded: {242 accountId: 'AccountId32',243 },244 CandidateRemoved: {245 accountId: 'AccountId32'246 }247 }248 },249 /**250 * Lookup36: pallet_session::pallet::Event251 **/252 PalletSessionEvent: {253 _enum: {254 NewSession: {255 sessionIndex: 'u32'256 }257 }258 },259 /**260 * Lookup37: pallet_balances::pallet::Event<T, I>261 **/262 PalletBalancesEvent: {263 _enum: {264 Endowed: {265 account: 'AccountId32',266 freeBalance: 'u128',267 },268 DustLost: {269 account: 'AccountId32',270 amount: 'u128',271 },272 Transfer: {273 from: 'AccountId32',274 to: 'AccountId32',275 amount: 'u128',276 },277 BalanceSet: {278 who: 'AccountId32',279 free: 'u128',280 },281 Reserved: {282 who: 'AccountId32',283 amount: 'u128',284 },285 Unreserved: {286 who: 'AccountId32',287 amount: 'u128',288 },289 ReserveRepatriated: {290 from: 'AccountId32',291 to: 'AccountId32',292 amount: 'u128',293 destinationStatus: 'FrameSupportTokensMiscBalanceStatus',294 },295 Deposit: {296 who: 'AccountId32',297 amount: 'u128',298 },299 Withdraw: {300 who: 'AccountId32',301 amount: 'u128',302 },303 Slashed: {304 who: 'AccountId32',305 amount: 'u128',306 },307 Minted: {308 who: 'AccountId32',309 amount: 'u128',310 },311 Burned: {312 who: 'AccountId32',313 amount: 'u128',314 },315 Suspended: {316 who: 'AccountId32',317 amount: 'u128',318 },319 Restored: {320 who: 'AccountId32',321 amount: 'u128',322 },323 Upgraded: {324 who: 'AccountId32',325 },326 Issued: {327 amount: 'u128',328 },329 Rescinded: {330 amount: 'u128',331 },332 Locked: {333 who: 'AccountId32',334 amount: 'u128',335 },336 Unlocked: {337 who: 'AccountId32',338 amount: 'u128',339 },340 Frozen: {341 who: 'AccountId32',342 amount: 'u128',343 },344 Thawed: {345 who: 'AccountId32',346 amount: 'u128'347 }348 }349 },350 /**351 * Lookup38: frame_support::traits::tokens::misc::BalanceStatus352 **/353 FrameSupportTokensMiscBalanceStatus: {354 _enum: ['Free', 'Reserved']355 },356 /**357 * Lookup39: pallet_transaction_payment::pallet::Event<T>358 **/359 PalletTransactionPaymentEvent: {360 _enum: {361 TransactionFeePaid: {362 who: 'AccountId32',363 actualFee: 'u128',364 tip: 'u128'365 }366 }367 },368 /**369 * Lookup40: pallet_treasury::pallet::Event<T, I>370 **/371 PalletTreasuryEvent: {372 _enum: {373 Proposed: {374 proposalIndex: 'u32',375 },376 Spending: {377 budgetRemaining: 'u128',378 },379 Awarded: {380 proposalIndex: 'u32',381 award: 'u128',382 account: 'AccountId32',383 },384 Rejected: {385 proposalIndex: 'u32',386 slashed: 'u128',387 },388 Burnt: {389 burntFunds: 'u128',390 },391 Rollover: {392 rolloverBalance: 'u128',393 },394 Deposit: {395 value: 'u128',396 },397 SpendApproved: {398 proposalIndex: 'u32',399 amount: 'u128',400 beneficiary: 'AccountId32',401 },402 UpdatedInactive: {403 reactivated: 'u128',404 deactivated: 'u128'405 }406 }407 },408 /**409 * Lookup41: pallet_sudo::pallet::Event<T>410 **/411 PalletSudoEvent: {412 _enum: {413 Sudid: {414 sudoResult: 'Result<Null, SpRuntimeDispatchError>',415 },416 KeyChanged: {417 oldSudoer: 'Option<AccountId32>',418 },419 SudoAsDone: {420 sudoResult: 'Result<Null, SpRuntimeDispatchError>'421 }422 }423 },424 /**425 * Lookup45: orml_vesting::module::Event<T>426 **/427 OrmlVestingModuleEvent: {428 _enum: {429 VestingScheduleAdded: {430 from: 'AccountId32',431 to: 'AccountId32',432 vestingSchedule: 'OrmlVestingVestingSchedule',433 },434 Claimed: {435 who: 'AccountId32',436 amount: 'u128',437 },438 VestingSchedulesUpdated: {439 who: 'AccountId32'440 }441 }442 },443 /**444 * Lookup46: orml_vesting::VestingSchedule<BlockNumber, Balance>445 **/446 OrmlVestingVestingSchedule: {447 start: 'u32',448 period: 'u32',449 periodCount: 'u32',450 perPeriod: 'Compact<u128>'451 },452 /**453 * Lookup48: orml_xtokens::module::Event<T>454 **/455 OrmlXtokensModuleEvent: {456 _enum: {457 TransferredMultiAssets: {458 sender: 'AccountId32',459 assets: 'XcmV3MultiassetMultiAssets',460 fee: 'XcmV3MultiAsset',461 dest: 'XcmV3MultiLocation'462 }463 }464 },465 /**466 * Lookup49: xcm::v3::multiasset::MultiAssets467 **/468 XcmV3MultiassetMultiAssets: 'Vec<XcmV3MultiAsset>',469 /**470 * Lookup51: xcm::v3::multiasset::MultiAsset471 **/472 XcmV3MultiAsset: {473 id: 'XcmV3MultiassetAssetId',474 fun: 'XcmV3MultiassetFungibility'475 },476 /**477 * Lookup52: xcm::v3::multiasset::AssetId478 **/479 XcmV3MultiassetAssetId: {480 _enum: {481 Concrete: 'XcmV3MultiLocation',482 Abstract: '[u8;32]'483 }484 },485 /**486 * Lookup53: xcm::v3::multilocation::MultiLocation487 **/488 XcmV3MultiLocation: {489 parents: 'u8',490 interior: 'XcmV3Junctions'491 },492 /**493 * Lookup54: xcm::v3::junctions::Junctions494 **/495 XcmV3Junctions: {496 _enum: {497 Here: 'Null',498 X1: 'XcmV3Junction',499 X2: '(XcmV3Junction,XcmV3Junction)',500 X3: '(XcmV3Junction,XcmV3Junction,XcmV3Junction)',501 X4: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',502 X5: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',503 X6: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',504 X7: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)',505 X8: '(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)'506 }507 },508 /**509 * Lookup55: xcm::v3::junction::Junction510 **/511 XcmV3Junction: {512 _enum: {513 Parachain: 'Compact<u32>',514 AccountId32: {515 network: 'Option<XcmV3JunctionNetworkId>',516 id: '[u8;32]',517 },518 AccountIndex64: {519 network: 'Option<XcmV3JunctionNetworkId>',520 index: 'Compact<u64>',521 },522 AccountKey20: {523 network: 'Option<XcmV3JunctionNetworkId>',524 key: '[u8;20]',525 },526 PalletInstance: 'u8',527 GeneralIndex: 'Compact<u128>',528 GeneralKey: {529 length: 'u8',530 data: '[u8;32]',531 },532 OnlyChild: 'Null',533 Plurality: {534 id: 'XcmV3JunctionBodyId',535 part: 'XcmV3JunctionBodyPart',536 },537 GlobalConsensus: 'XcmV3JunctionNetworkId'538 }539 },540 /**541 * Lookup58: xcm::v3::junction::NetworkId542 **/543 XcmV3JunctionNetworkId: {544 _enum: {545 ByGenesis: '[u8;32]',546 ByFork: {547 blockNumber: 'u64',548 blockHash: '[u8;32]',549 },550 Polkadot: 'Null',551 Kusama: 'Null',552 Westend: 'Null',553 Rococo: 'Null',554 Wococo: 'Null',555 Ethereum: {556 chainId: 'Compact<u64>',557 },558 BitcoinCore: 'Null',559 BitcoinCash: 'Null'560 }561 },562 /**563 * Lookup60: xcm::v3::junction::BodyId564 **/565 XcmV3JunctionBodyId: {566 _enum: {567 Unit: 'Null',568 Moniker: '[u8;4]',569 Index: 'Compact<u32>',570 Executive: 'Null',571 Technical: 'Null',572 Legislative: 'Null',573 Judicial: 'Null',574 Defense: 'Null',575 Administration: 'Null',576 Treasury: 'Null'577 }578 },579 /**580 * Lookup61: xcm::v3::junction::BodyPart581 **/582 XcmV3JunctionBodyPart: {583 _enum: {584 Voice: 'Null',585 Members: {586 count: 'Compact<u32>',587 },588 Fraction: {589 nom: 'Compact<u32>',590 denom: 'Compact<u32>',591 },592 AtLeastProportion: {593 nom: 'Compact<u32>',594 denom: 'Compact<u32>',595 },596 MoreThanProportion: {597 nom: 'Compact<u32>',598 denom: 'Compact<u32>'599 }600 }601 },602 /**603 * Lookup62: xcm::v3::multiasset::Fungibility604 **/605 XcmV3MultiassetFungibility: {606 _enum: {607 Fungible: 'Compact<u128>',608 NonFungible: 'XcmV3MultiassetAssetInstance'609 }610 },611 /**612 * Lookup63: xcm::v3::multiasset::AssetInstance613 **/614 XcmV3MultiassetAssetInstance: {615 _enum: {616 Undefined: 'Null',617 Index: 'Compact<u128>',618 Array4: '[u8;4]',619 Array8: '[u8;8]',620 Array16: '[u8;16]',621 Array32: '[u8;32]'622 }623 },624 /**625 * Lookup66: orml_tokens::module::Event<T>626 **/627 OrmlTokensModuleEvent: {628 _enum: {629 Endowed: {630 currencyId: 'PalletForeignAssetsAssetIds',631 who: 'AccountId32',632 amount: 'u128',633 },634 DustLost: {635 currencyId: 'PalletForeignAssetsAssetIds',636 who: 'AccountId32',637 amount: 'u128',638 },639 Transfer: {640 currencyId: 'PalletForeignAssetsAssetIds',641 from: 'AccountId32',642 to: 'AccountId32',643 amount: 'u128',644 },645 Reserved: {646 currencyId: 'PalletForeignAssetsAssetIds',647 who: 'AccountId32',648 amount: 'u128',649 },650 Unreserved: {651 currencyId: 'PalletForeignAssetsAssetIds',652 who: 'AccountId32',653 amount: 'u128',654 },655 ReserveRepatriated: {656 currencyId: 'PalletForeignAssetsAssetIds',657 from: 'AccountId32',658 to: 'AccountId32',659 amount: 'u128',660 status: 'FrameSupportTokensMiscBalanceStatus',661 },662 BalanceSet: {663 currencyId: 'PalletForeignAssetsAssetIds',664 who: 'AccountId32',665 free: 'u128',666 reserved: 'u128',667 },668 TotalIssuanceSet: {669 currencyId: 'PalletForeignAssetsAssetIds',670 amount: 'u128',671 },672 Withdrawn: {673 currencyId: 'PalletForeignAssetsAssetIds',674 who: 'AccountId32',675 amount: 'u128',676 },677 Slashed: {678 currencyId: 'PalletForeignAssetsAssetIds',679 who: 'AccountId32',680 freeAmount: 'u128',681 reservedAmount: 'u128',682 },683 Deposited: {684 currencyId: 'PalletForeignAssetsAssetIds',685 who: 'AccountId32',686 amount: 'u128',687 },688 LockSet: {689 lockId: '[u8;8]',690 currencyId: 'PalletForeignAssetsAssetIds',691 who: 'AccountId32',692 amount: 'u128',693 },694 LockRemoved: {695 lockId: '[u8;8]',696 currencyId: 'PalletForeignAssetsAssetIds',697 who: 'AccountId32',698 },699 Locked: {700 currencyId: 'PalletForeignAssetsAssetIds',701 who: 'AccountId32',702 amount: 'u128',703 },704 Unlocked: {705 currencyId: 'PalletForeignAssetsAssetIds',706 who: 'AccountId32',707 amount: 'u128'708 }709 }710 },711 /**712 * Lookup67: pallet_foreign_assets::AssetIds713 **/714 PalletForeignAssetsAssetIds: {715 _enum: {716 ForeignAssetId: 'u32',717 NativeAssetId: 'PalletForeignAssetsNativeCurrency'718 }719 },720 /**721 * Lookup68: pallet_foreign_assets::NativeCurrency722 **/723 PalletForeignAssetsNativeCurrency: {724 _enum: ['Here', 'Parent']725 },726 /**727 * Lookup69: pallet_identity::pallet::Event<T>728 **/729 PalletIdentityEvent: {730 _enum: {731 IdentitySet: {732 who: 'AccountId32',733 },734 IdentityCleared: {735 who: 'AccountId32',736 deposit: 'u128',737 },738 IdentityKilled: {739 who: 'AccountId32',740 deposit: 'u128',741 },742 IdentitiesInserted: {743 amount: 'u32',744 },745 IdentitiesRemoved: {746 amount: 'u32',747 },748 JudgementRequested: {749 who: 'AccountId32',750 registrarIndex: 'u32',751 },752 JudgementUnrequested: {753 who: 'AccountId32',754 registrarIndex: 'u32',755 },756 JudgementGiven: {757 target: 'AccountId32',758 registrarIndex: 'u32',759 },760 RegistrarAdded: {761 registrarIndex: 'u32',762 },763 SubIdentityAdded: {764 sub: 'AccountId32',765 main: 'AccountId32',766 deposit: 'u128',767 },768 SubIdentityRemoved: {769 sub: 'AccountId32',770 main: 'AccountId32',771 deposit: 'u128',772 },773 SubIdentityRevoked: {774 sub: 'AccountId32',775 main: 'AccountId32',776 deposit: 'u128',777 },778 SubIdentitiesInserted: {779 amount: 'u32'780 }781 }782 },783 /**784 * Lookup70: pallet_preimage::pallet::Event<T>785 **/786 PalletPreimageEvent: {787 _enum: {788 Noted: {789 _alias: {790 hash_: 'hash',791 },792 hash_: 'H256',793 },794 Requested: {795 _alias: {796 hash_: 'hash',797 },798 hash_: 'H256',799 },800 Cleared: {801 _alias: {802 hash_: 'hash',803 },804 hash_: 'H256'805 }806 }807 },808 /**809 * Lookup71: cumulus_pallet_xcmp_queue::pallet::Event<T>810 **/811 CumulusPalletXcmpQueueEvent: {812 _enum: {813 Success: {814 messageHash: 'Option<[u8;32]>',815 weight: 'SpWeightsWeightV2Weight',816 },817 Fail: {818 messageHash: 'Option<[u8;32]>',819 error: 'XcmV3TraitsError',820 weight: 'SpWeightsWeightV2Weight',821 },822 BadVersion: {823 messageHash: 'Option<[u8;32]>',824 },825 BadFormat: {826 messageHash: 'Option<[u8;32]>',827 },828 XcmpMessageSent: {829 messageHash: 'Option<[u8;32]>',830 },831 OverweightEnqueued: {832 sender: 'u32',833 sentAt: 'u32',834 index: 'u64',835 required: 'SpWeightsWeightV2Weight',836 },837 OverweightServiced: {838 index: 'u64',839 used: 'SpWeightsWeightV2Weight'840 }841 }842 },843 /**844 * Lookup72: xcm::v3::traits::Error845 **/846 XcmV3TraitsError: {847 _enum: {848 Overflow: 'Null',849 Unimplemented: 'Null',850 UntrustedReserveLocation: 'Null',851 UntrustedTeleportLocation: 'Null',852 LocationFull: 'Null',853 LocationNotInvertible: 'Null',854 BadOrigin: 'Null',855 InvalidLocation: 'Null',856 AssetNotFound: 'Null',857 FailedToTransactAsset: 'Null',858 NotWithdrawable: 'Null',859 LocationCannotHold: 'Null',860 ExceedsMaxMessageSize: 'Null',861 DestinationUnsupported: 'Null',862 Transport: 'Null',863 Unroutable: 'Null',864 UnknownClaim: 'Null',865 FailedToDecode: 'Null',866 MaxWeightInvalid: 'Null',867 NotHoldingFees: 'Null',868 TooExpensive: 'Null',869 Trap: 'u64',870 ExpectationFalse: 'Null',871 PalletNotFound: 'Null',872 NameMismatch: 'Null',873 VersionIncompatible: 'Null',874 HoldingWouldOverflow: 'Null',875 ExportError: 'Null',876 ReanchorFailed: 'Null',877 NoDeal: 'Null',878 FeesNotMet: 'Null',879 LockError: 'Null',880 NoPermission: 'Null',881 Unanchored: 'Null',882 NotDepositable: 'Null',883 UnhandledXcmVersion: 'Null',884 WeightLimitReached: 'SpWeightsWeightV2Weight',885 Barrier: 'Null',886 WeightNotComputable: 'Null',887 ExceedsStackLimit: 'Null'888 }889 },890 /**891 * Lookup74: pallet_xcm::pallet::Event<T>892 **/893 PalletXcmEvent: {894 _enum: {895 Attempted: 'XcmV3TraitsOutcome',896 Sent: '(XcmV3MultiLocation,XcmV3MultiLocation,XcmV3Xcm)',897 UnexpectedResponse: '(XcmV3MultiLocation,u64)',898 ResponseReady: '(u64,XcmV3Response)',899 Notified: '(u64,u8,u8)',900 NotifyOverweight: '(u64,u8,u8,SpWeightsWeightV2Weight,SpWeightsWeightV2Weight)',901 NotifyDispatchError: '(u64,u8,u8)',902 NotifyDecodeFailed: '(u64,u8,u8)',903 InvalidResponder: '(XcmV3MultiLocation,u64,Option<XcmV3MultiLocation>)',904 InvalidResponderVersion: '(XcmV3MultiLocation,u64)',905 ResponseTaken: 'u64',906 AssetsTrapped: '(H256,XcmV3MultiLocation,XcmVersionedMultiAssets)',907 VersionChangeNotified: '(XcmV3MultiLocation,u32,XcmV3MultiassetMultiAssets)',908 SupportedVersionChanged: '(XcmV3MultiLocation,u32)',909 NotifyTargetSendFail: '(XcmV3MultiLocation,u64,XcmV3TraitsError)',910 NotifyTargetMigrationFail: '(XcmVersionedMultiLocation,u64)',911 InvalidQuerierVersion: '(XcmV3MultiLocation,u64)',912 InvalidQuerier: '(XcmV3MultiLocation,u64,XcmV3MultiLocation,Option<XcmV3MultiLocation>)',913 VersionNotifyStarted: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',914 VersionNotifyRequested: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',915 VersionNotifyUnrequested: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',916 FeesPaid: '(XcmV3MultiLocation,XcmV3MultiassetMultiAssets)',917 AssetsClaimed: '(H256,XcmV3MultiLocation,XcmVersionedMultiAssets)'918 }919 },920 /**921 * Lookup75: xcm::v3::traits::Outcome922 **/923 XcmV3TraitsOutcome: {924 _enum: {925 Complete: 'SpWeightsWeightV2Weight',926 Incomplete: '(SpWeightsWeightV2Weight,XcmV3TraitsError)',927 Error: 'XcmV3TraitsError'928 }929 },930 /**931 * Lookup76: xcm::v3::Xcm<Call>932 **/933 XcmV3Xcm: 'Vec<XcmV3Instruction>',934 /**935 * Lookup78: xcm::v3::Instruction<Call>936 **/937 XcmV3Instruction: {938 _enum: {939 WithdrawAsset: 'XcmV3MultiassetMultiAssets',940 ReserveAssetDeposited: 'XcmV3MultiassetMultiAssets',941 ReceiveTeleportedAsset: 'XcmV3MultiassetMultiAssets',942 QueryResponse: {943 queryId: 'Compact<u64>',944 response: 'XcmV3Response',945 maxWeight: 'SpWeightsWeightV2Weight',946 querier: 'Option<XcmV3MultiLocation>',947 },948 TransferAsset: {949 assets: 'XcmV3MultiassetMultiAssets',950 beneficiary: 'XcmV3MultiLocation',951 },952 TransferReserveAsset: {953 assets: 'XcmV3MultiassetMultiAssets',954 dest: 'XcmV3MultiLocation',955 xcm: 'XcmV3Xcm',956 },957 Transact: {958 originKind: 'XcmV2OriginKind',959 requireWeightAtMost: 'SpWeightsWeightV2Weight',960 call: 'XcmDoubleEncoded',961 },962 HrmpNewChannelOpenRequest: {963 sender: 'Compact<u32>',964 maxMessageSize: 'Compact<u32>',965 maxCapacity: 'Compact<u32>',966 },967 HrmpChannelAccepted: {968 recipient: 'Compact<u32>',969 },970 HrmpChannelClosing: {971 initiator: 'Compact<u32>',972 sender: 'Compact<u32>',973 recipient: 'Compact<u32>',974 },975 ClearOrigin: 'Null',976 DescendOrigin: 'XcmV3Junctions',977 ReportError: 'XcmV3QueryResponseInfo',978 DepositAsset: {979 assets: 'XcmV3MultiassetMultiAssetFilter',980 beneficiary: 'XcmV3MultiLocation',981 },982 DepositReserveAsset: {983 assets: 'XcmV3MultiassetMultiAssetFilter',984 dest: 'XcmV3MultiLocation',985 xcm: 'XcmV3Xcm',986 },987 ExchangeAsset: {988 give: 'XcmV3MultiassetMultiAssetFilter',989 want: 'XcmV3MultiassetMultiAssets',990 maximal: 'bool',991 },992 InitiateReserveWithdraw: {993 assets: 'XcmV3MultiassetMultiAssetFilter',994 reserve: 'XcmV3MultiLocation',995 xcm: 'XcmV3Xcm',996 },997 InitiateTeleport: {998 assets: 'XcmV3MultiassetMultiAssetFilter',999 dest: 'XcmV3MultiLocation',1000 xcm: 'XcmV3Xcm',1001 },1002 ReportHolding: {1003 responseInfo: 'XcmV3QueryResponseInfo',1004 assets: 'XcmV3MultiassetMultiAssetFilter',1005 },1006 BuyExecution: {1007 fees: 'XcmV3MultiAsset',1008 weightLimit: 'XcmV3WeightLimit',1009 },1010 RefundSurplus: 'Null',1011 SetErrorHandler: 'XcmV3Xcm',1012 SetAppendix: 'XcmV3Xcm',1013 ClearError: 'Null',1014 ClaimAsset: {1015 assets: 'XcmV3MultiassetMultiAssets',1016 ticket: 'XcmV3MultiLocation',1017 },1018 Trap: 'Compact<u64>',1019 SubscribeVersion: {1020 queryId: 'Compact<u64>',1021 maxResponseWeight: 'SpWeightsWeightV2Weight',1022 },1023 UnsubscribeVersion: 'Null',1024 BurnAsset: 'XcmV3MultiassetMultiAssets',1025 ExpectAsset: 'XcmV3MultiassetMultiAssets',1026 ExpectOrigin: 'Option<XcmV3MultiLocation>',1027 ExpectError: 'Option<(u32,XcmV3TraitsError)>',1028 ExpectTransactStatus: 'XcmV3MaybeErrorCode',1029 QueryPallet: {1030 moduleName: 'Bytes',1031 responseInfo: 'XcmV3QueryResponseInfo',1032 },1033 ExpectPallet: {1034 index: 'Compact<u32>',1035 name: 'Bytes',1036 moduleName: 'Bytes',1037 crateMajor: 'Compact<u32>',1038 minCrateMinor: 'Compact<u32>',1039 },1040 ReportTransactStatus: 'XcmV3QueryResponseInfo',1041 ClearTransactStatus: 'Null',1042 UniversalOrigin: 'XcmV3Junction',1043 ExportMessage: {1044 network: 'XcmV3JunctionNetworkId',1045 destination: 'XcmV3Junctions',1046 xcm: 'XcmV3Xcm',1047 },1048 LockAsset: {1049 asset: 'XcmV3MultiAsset',1050 unlocker: 'XcmV3MultiLocation',1051 },1052 UnlockAsset: {1053 asset: 'XcmV3MultiAsset',1054 target: 'XcmV3MultiLocation',1055 },1056 NoteUnlockable: {1057 asset: 'XcmV3MultiAsset',1058 owner: 'XcmV3MultiLocation',1059 },1060 RequestUnlock: {1061 asset: 'XcmV3MultiAsset',1062 locker: 'XcmV3MultiLocation',1063 },1064 SetFeesMode: {1065 jitWithdraw: 'bool',1066 },1067 SetTopic: '[u8;32]',1068 ClearTopic: 'Null',1069 AliasOrigin: 'XcmV3MultiLocation',1070 UnpaidExecution: {1071 weightLimit: 'XcmV3WeightLimit',1072 checkOrigin: 'Option<XcmV3MultiLocation>'1073 }1074 }1075 },1076 /**1077 * Lookup79: xcm::v3::Response1078 **/1079 XcmV3Response: {1080 _enum: {1081 Null: 'Null',1082 Assets: 'XcmV3MultiassetMultiAssets',1083 ExecutionResult: 'Option<(u32,XcmV3TraitsError)>',1084 Version: 'u32',1085 PalletsInfo: 'Vec<XcmV3PalletInfo>',1086 DispatchResult: 'XcmV3MaybeErrorCode'1087 }1088 },1089 /**1090 * Lookup83: xcm::v3::PalletInfo1091 **/1092 XcmV3PalletInfo: {1093 index: 'Compact<u32>',1094 name: 'Bytes',1095 moduleName: 'Bytes',1096 major: 'Compact<u32>',1097 minor: 'Compact<u32>',1098 patch: 'Compact<u32>'1099 },1100 /**1101 * Lookup86: xcm::v3::MaybeErrorCode1102 **/1103 XcmV3MaybeErrorCode: {1104 _enum: {1105 Success: 'Null',1106 Error: 'Bytes',1107 TruncatedError: 'Bytes'1108 }1109 },1110 /**1111 * Lookup89: xcm::v2::OriginKind1112 **/1113 XcmV2OriginKind: {1114 _enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']1115 },1116 /**1117 * Lookup90: xcm::double_encoded::DoubleEncoded<T>1118 **/1119 XcmDoubleEncoded: {1120 encoded: 'Bytes'1121 },1122 /**1123 * Lookup91: xcm::v3::QueryResponseInfo1124 **/1125 XcmV3QueryResponseInfo: {1126 destination: 'XcmV3MultiLocation',1127 queryId: 'Compact<u64>',1128 maxWeight: 'SpWeightsWeightV2Weight'1129 },1130 /**1131 * Lookup92: xcm::v3::multiasset::MultiAssetFilter1132 **/1133 XcmV3MultiassetMultiAssetFilter: {1134 _enum: {1135 Definite: 'XcmV3MultiassetMultiAssets',1136 Wild: 'XcmV3MultiassetWildMultiAsset'1137 }1138 },1139 /**1140 * Lookup93: xcm::v3::multiasset::WildMultiAsset1141 **/1142 XcmV3MultiassetWildMultiAsset: {1143 _enum: {1144 All: 'Null',1145 AllOf: {1146 id: 'XcmV3MultiassetAssetId',1147 fun: 'XcmV3MultiassetWildFungibility',1148 },1149 AllCounted: 'Compact<u32>',1150 AllOfCounted: {1151 id: 'XcmV3MultiassetAssetId',1152 fun: 'XcmV3MultiassetWildFungibility',1153 count: 'Compact<u32>'1154 }1155 }1156 },1157 /**1158 * Lookup94: xcm::v3::multiasset::WildFungibility1159 **/1160 XcmV3MultiassetWildFungibility: {1161 _enum: ['Fungible', 'NonFungible']1162 },1163 /**1164 * Lookup96: xcm::v3::WeightLimit1165 **/1166 XcmV3WeightLimit: {1167 _enum: {1168 Unlimited: 'Null',1169 Limited: 'SpWeightsWeightV2Weight'1170 }1171 },1172 /**1173 * Lookup97: xcm::VersionedMultiAssets1174 **/1175 XcmVersionedMultiAssets: {1176 _enum: {1177 __Unused0: 'Null',1178 V2: 'XcmV2MultiassetMultiAssets',1179 __Unused2: 'Null',1180 V3: 'XcmV3MultiassetMultiAssets'1181 }1182 },1183 /**1184 * Lookup98: xcm::v2::multiasset::MultiAssets1185 **/1186 XcmV2MultiassetMultiAssets: 'Vec<XcmV2MultiAsset>',1187 /**1188 * Lookup100: xcm::v2::multiasset::MultiAsset1189 **/1190 XcmV2MultiAsset: {1191 id: 'XcmV2MultiassetAssetId',1192 fun: 'XcmV2MultiassetFungibility'1193 },1194 /**1195 * Lookup101: xcm::v2::multiasset::AssetId1196 **/1197 XcmV2MultiassetAssetId: {1198 _enum: {1199 Concrete: 'XcmV2MultiLocation',1200 Abstract: 'Bytes'1201 }1202 },1203 /**1204 * Lookup102: xcm::v2::multilocation::MultiLocation1205 **/1206 XcmV2MultiLocation: {1207 parents: 'u8',1208 interior: 'XcmV2MultilocationJunctions'1209 },1210 /**1211 * Lookup103: xcm::v2::multilocation::Junctions1212 **/1213 XcmV2MultilocationJunctions: {1214 _enum: {1215 Here: 'Null',1216 X1: 'XcmV2Junction',1217 X2: '(XcmV2Junction,XcmV2Junction)',1218 X3: '(XcmV2Junction,XcmV2Junction,XcmV2Junction)',1219 X4: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1220 X5: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1221 X6: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1222 X7: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)',1223 X8: '(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)'1224 }1225 },1226 /**1227 * Lookup104: xcm::v2::junction::Junction1228 **/1229 XcmV2Junction: {1230 _enum: {1231 Parachain: 'Compact<u32>',1232 AccountId32: {1233 network: 'XcmV2NetworkId',1234 id: '[u8;32]',1235 },1236 AccountIndex64: {1237 network: 'XcmV2NetworkId',1238 index: 'Compact<u64>',1239 },1240 AccountKey20: {1241 network: 'XcmV2NetworkId',1242 key: '[u8;20]',1243 },1244 PalletInstance: 'u8',1245 GeneralIndex: 'Compact<u128>',1246 GeneralKey: 'Bytes',1247 OnlyChild: 'Null',1248 Plurality: {1249 id: 'XcmV2BodyId',1250 part: 'XcmV2BodyPart'1251 }1252 }1253 },1254 /**1255 * Lookup105: xcm::v2::NetworkId1256 **/1257 XcmV2NetworkId: {1258 _enum: {1259 Any: 'Null',1260 Named: 'Bytes',1261 Polkadot: 'Null',1262 Kusama: 'Null'1263 }1264 },1265 /**1266 * Lookup107: xcm::v2::BodyId1267 **/1268 XcmV2BodyId: {1269 _enum: {1270 Unit: 'Null',1271 Named: 'Bytes',1272 Index: 'Compact<u32>',1273 Executive: 'Null',1274 Technical: 'Null',1275 Legislative: 'Null',1276 Judicial: 'Null',1277 Defense: 'Null',1278 Administration: 'Null',1279 Treasury: 'Null'1280 }1281 },1282 /**1283 * Lookup108: xcm::v2::BodyPart1284 **/1285 XcmV2BodyPart: {1286 _enum: {1287 Voice: 'Null',1288 Members: {1289 count: 'Compact<u32>',1290 },1291 Fraction: {1292 nom: 'Compact<u32>',1293 denom: 'Compact<u32>',1294 },1295 AtLeastProportion: {1296 nom: 'Compact<u32>',1297 denom: 'Compact<u32>',1298 },1299 MoreThanProportion: {1300 nom: 'Compact<u32>',1301 denom: 'Compact<u32>'1302 }1303 }1304 },1305 /**1306 * Lookup109: xcm::v2::multiasset::Fungibility1307 **/1308 XcmV2MultiassetFungibility: {1309 _enum: {1310 Fungible: 'Compact<u128>',1311 NonFungible: 'XcmV2MultiassetAssetInstance'1312 }1313 },1314 /**1315 * Lookup110: xcm::v2::multiasset::AssetInstance1316 **/1317 XcmV2MultiassetAssetInstance: {1318 _enum: {1319 Undefined: 'Null',1320 Index: 'Compact<u128>',1321 Array4: '[u8;4]',1322 Array8: '[u8;8]',1323 Array16: '[u8;16]',1324 Array32: '[u8;32]',1325 Blob: 'Bytes'1326 }1327 },1328 /**1329 * Lookup111: xcm::VersionedMultiLocation1330 **/1331 XcmVersionedMultiLocation: {1332 _enum: {1333 __Unused0: 'Null',1334 V2: 'XcmV2MultiLocation',1335 __Unused2: 'Null',1336 V3: 'XcmV3MultiLocation'1337 }1338 },1339 /**1340 * Lookup112: cumulus_pallet_xcm::pallet::Event<T>1341 **/1342 CumulusPalletXcmEvent: {1343 _enum: {1344 InvalidFormat: '[u8;32]',1345 UnsupportedVersion: '[u8;32]',1346 ExecutedDownward: '([u8;32],XcmV3TraitsOutcome)'1347 }1348 },1349 /**1350 * Lookup113: cumulus_pallet_dmp_queue::pallet::Event<T>1351 **/1352 CumulusPalletDmpQueueEvent: {1353 _enum: {1354 InvalidFormat: {1355 messageId: '[u8;32]',1356 },1357 UnsupportedVersion: {1358 messageId: '[u8;32]',1359 },1360 ExecutedDownward: {1361 messageId: '[u8;32]',1362 outcome: 'XcmV3TraitsOutcome',1363 },1364 WeightExhausted: {1365 messageId: '[u8;32]',1366 remainingWeight: 'SpWeightsWeightV2Weight',1367 requiredWeight: 'SpWeightsWeightV2Weight',1368 },1369 OverweightEnqueued: {1370 messageId: '[u8;32]',1371 overweightIndex: 'u64',1372 requiredWeight: 'SpWeightsWeightV2Weight',1373 },1374 OverweightServiced: {1375 overweightIndex: 'u64',1376 weightUsed: 'SpWeightsWeightV2Weight',1377 },1378 MaxMessagesExhausted: {1379 messageId: '[u8;32]'1380 }1381 }1382 },1383 /**1384 * Lookup114: pallet_configuration::pallet::Event<T>1385 **/1386 PalletConfigurationEvent: {1387 _enum: {1388 NewDesiredCollators: {1389 desiredCollators: 'Option<u32>',1390 },1391 NewCollatorLicenseBond: {1392 bondCost: 'Option<u128>',1393 },1394 NewCollatorKickThreshold: {1395 lengthInBlocks: 'Option<u32>'1396 }1397 }1398 },1399 /**1400 * Lookup117: pallet_common::pallet::Event<T>1401 **/1402 PalletCommonEvent: {1403 _enum: {1404 CollectionCreated: '(u32,u8,AccountId32)',1405 CollectionDestroyed: 'u32',1406 ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1407 ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1408 Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1409 Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',1410 ApprovedForAll: '(u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,bool)',1411 CollectionPropertySet: '(u32,Bytes)',1412 CollectionPropertyDeleted: '(u32,Bytes)',1413 TokenPropertySet: '(u32,u32,Bytes)',1414 TokenPropertyDeleted: '(u32,u32,Bytes)',1415 PropertyPermissionSet: '(u32,Bytes)',1416 AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1417 AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1418 CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1419 CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',1420 CollectionLimitSet: 'u32',1421 CollectionOwnerChanged: '(u32,AccountId32)',1422 CollectionPermissionSet: 'u32',1423 CollectionSponsorSet: '(u32,AccountId32)',1424 SponsorshipConfirmed: '(u32,AccountId32)',1425 CollectionSponsorRemoved: 'u32'1426 }1427 },1428 /**1429 * Lookup120: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1430 **/1431 PalletEvmAccountBasicCrossAccountIdRepr: {1432 _enum: {1433 Substrate: 'AccountId32',1434 Ethereum: 'H160'1435 }1436 },1437 /**1438 * Lookup123: pallet_structure::pallet::Event<T>1439 **/1440 PalletStructureEvent: {1441 _enum: {1442 Executed: 'Result<Null, SpRuntimeDispatchError>'1443 }1444 },1445 /**1446 * Lookup124: pallet_app_promotion::pallet::Event<T>1447 **/1448 PalletAppPromotionEvent: {1449 _enum: {1450 StakingRecalculation: '(AccountId32,u128,u128)',1451 Stake: '(AccountId32,u128)',1452 Unstake: '(AccountId32,u128)',1453 SetAdmin: 'AccountId32'1454 }1455 },1456 /**1457 * Lookup125: pallet_foreign_assets::module::Event<T>1458 **/1459 PalletForeignAssetsModuleEvent: {1460 _enum: {1461 ForeignAssetRegistered: {1462 assetId: 'u32',1463 assetAddress: 'XcmV3MultiLocation',1464 metadata: 'PalletForeignAssetsModuleAssetMetadata',1465 },1466 ForeignAssetUpdated: {1467 assetId: 'u32',1468 assetAddress: 'XcmV3MultiLocation',1469 metadata: 'PalletForeignAssetsModuleAssetMetadata',1470 },1471 AssetRegistered: {1472 assetId: 'PalletForeignAssetsAssetIds',1473 metadata: 'PalletForeignAssetsModuleAssetMetadata',1474 },1475 AssetUpdated: {1476 assetId: 'PalletForeignAssetsAssetIds',1477 metadata: 'PalletForeignAssetsModuleAssetMetadata'1478 }1479 }1480 },1481 /**1482 * Lookup126: pallet_foreign_assets::module::AssetMetadata<Balance>1483 **/1484 PalletForeignAssetsModuleAssetMetadata: {1485 name: 'Bytes',1486 symbol: 'Bytes',1487 decimals: 'u8',1488 minimalBalance: 'u128'1489 },1490 /**1491 * Lookup129: pallet_evm::pallet::Event<T>1492 **/1493 PalletEvmEvent: {1494 _enum: {1495 Log: {1496 log: 'EthereumLog',1497 },1498 Created: {1499 address: 'H160',1500 },1501 CreatedFailed: {1502 address: 'H160',1503 },1504 Executed: {1505 address: 'H160',1506 },1507 ExecutedFailed: {1508 address: 'H160'1509 }1510 }1511 },1512 /**1513 * Lookup130: ethereum::log::Log1514 **/1515 EthereumLog: {1516 address: 'H160',1517 topics: 'Vec<H256>',1518 data: 'Bytes'1519 },1520 /**1521 * Lookup132: pallet_ethereum::pallet::Event1522 **/1523 PalletEthereumEvent: {1524 _enum: {1525 Executed: {1526 from: 'H160',1527 to: 'H160',1528 transactionHash: 'H256',1529 exitReason: 'EvmCoreErrorExitReason',1530 extraData: 'Bytes'1531 }1532 }1533 },1534 /**1535 * Lookup133: evm_core::error::ExitReason1536 **/1537 EvmCoreErrorExitReason: {1538 _enum: {1539 Succeed: 'EvmCoreErrorExitSucceed',1540 Error: 'EvmCoreErrorExitError',1541 Revert: 'EvmCoreErrorExitRevert',1542 Fatal: 'EvmCoreErrorExitFatal'1543 }1544 },1545 /**1546 * Lookup134: evm_core::error::ExitSucceed1547 **/1548 EvmCoreErrorExitSucceed: {1549 _enum: ['Stopped', 'Returned', 'Suicided']1550 },1551 /**1552 * Lookup135: evm_core::error::ExitError1553 **/1554 EvmCoreErrorExitError: {1555 _enum: {1556 StackUnderflow: 'Null',1557 StackOverflow: 'Null',1558 InvalidJump: 'Null',1559 InvalidRange: 'Null',1560 DesignatedInvalid: 'Null',1561 CallTooDeep: 'Null',1562 CreateCollision: 'Null',1563 CreateContractLimit: 'Null',1564 OutOfOffset: 'Null',1565 OutOfGas: 'Null',1566 OutOfFund: 'Null',1567 PCUnderflow: 'Null',1568 CreateEmpty: 'Null',1569 Other: 'Text',1570 MaxNonce: 'Null',1571 InvalidCode: 'u8'1572 }1573 },1574 /**1575 * Lookup139: evm_core::error::ExitRevert1576 **/1577 EvmCoreErrorExitRevert: {1578 _enum: ['Reverted']1579 },1580 /**1581 * Lookup140: evm_core::error::ExitFatal1582 **/1583 EvmCoreErrorExitFatal: {1584 _enum: {1585 NotSupported: 'Null',1586 UnhandledInterrupt: 'Null',1587 CallErrorAsFatal: 'EvmCoreErrorExitError',1588 Other: 'Text'1589 }1590 },1591 /**1592 * Lookup141: pallet_evm_contract_helpers::pallet::Event<T>1593 **/1594 PalletEvmContractHelpersEvent: {1595 _enum: {1596 ContractSponsorSet: '(H160,AccountId32)',1597 ContractSponsorshipConfirmed: '(H160,AccountId32)',1598 ContractSponsorRemoved: 'H160'1599 }1600 },1601 /**1602 * Lookup142: pallet_evm_migration::pallet::Event<T>1603 **/1604 PalletEvmMigrationEvent: {1605 _enum: ['TestEvent']1606 },1607 /**1608 * Lookup143: pallet_maintenance::pallet::Event<T>1609 **/1610 PalletMaintenanceEvent: {1611 _enum: ['MaintenanceEnabled', 'MaintenanceDisabled']1612 },1613 /**1614 * Lookup144: pallet_test_utils::pallet::Event<T>1615 **/1616 PalletTestUtilsEvent: {1617 _enum: ['ValueIsSet', 'ShouldRollback', 'BatchCompleted']1618 },1619 /**1620 * Lookup145: frame_system::Phase1621 **/1622 FrameSystemPhase: {1623 _enum: {1624 ApplyExtrinsic: 'u32',1625 Finalization: 'Null',1626 Initialization: 'Null'1627 }1628 },1629 /**1630 * Lookup148: frame_system::LastRuntimeUpgradeInfo1631 **/1632 FrameSystemLastRuntimeUpgradeInfo: {1633 specVersion: 'Compact<u32>',1634 specName: 'Text'1635 },1636 /**1637 * Lookup149: frame_system::pallet::Call<T>1638 **/1639 FrameSystemCall: {1640 _enum: {1641 remark: {1642 remark: 'Bytes',1643 },1644 set_heap_pages: {1645 pages: 'u64',1646 },1647 set_code: {1648 code: 'Bytes',1649 },1650 set_code_without_checks: {1651 code: 'Bytes',1652 },1653 set_storage: {1654 items: 'Vec<(Bytes,Bytes)>',1655 },1656 kill_storage: {1657 _alias: {1658 keys_: 'keys',1659 },1660 keys_: 'Vec<Bytes>',1661 },1662 kill_prefix: {1663 prefix: 'Bytes',1664 subkeys: 'u32',1665 },1666 remark_with_event: {1667 remark: 'Bytes'1668 }1669 }1670 },1671 /**1672 * Lookup153: frame_system::limits::BlockWeights1673 **/1674 FrameSystemLimitsBlockWeights: {1675 baseBlock: 'SpWeightsWeightV2Weight',1676 maxBlock: 'SpWeightsWeightV2Weight',1677 perClass: 'FrameSupportDispatchPerDispatchClassWeightsPerClass'1678 },1679 /**1680 * Lookup154: frame_support::dispatch::PerDispatchClass<frame_system::limits::WeightsPerClass>1681 **/1682 FrameSupportDispatchPerDispatchClassWeightsPerClass: {1683 normal: 'FrameSystemLimitsWeightsPerClass',1684 operational: 'FrameSystemLimitsWeightsPerClass',1685 mandatory: 'FrameSystemLimitsWeightsPerClass'1686 },1687 /**1688 * Lookup155: frame_system::limits::WeightsPerClass1689 **/1690 FrameSystemLimitsWeightsPerClass: {1691 baseExtrinsic: 'SpWeightsWeightV2Weight',1692 maxExtrinsic: 'Option<SpWeightsWeightV2Weight>',1693 maxTotal: 'Option<SpWeightsWeightV2Weight>',1694 reserved: 'Option<SpWeightsWeightV2Weight>'1695 },1696 /**1697 * Lookup157: frame_system::limits::BlockLength1698 **/1699 FrameSystemLimitsBlockLength: {1700 max: 'FrameSupportDispatchPerDispatchClassU32'1701 },1702 /**1703 * Lookup158: frame_support::dispatch::PerDispatchClass<T>1704 **/1705 FrameSupportDispatchPerDispatchClassU32: {1706 normal: 'u32',1707 operational: 'u32',1708 mandatory: 'u32'1709 },1710 /**1711 * Lookup159: sp_weights::RuntimeDbWeight1712 **/1713 SpWeightsRuntimeDbWeight: {1714 read: 'u64',1715 write: 'u64'1716 },1717 /**1718 * Lookup160: sp_version::RuntimeVersion1719 **/1720 SpVersionRuntimeVersion: {1721 specName: 'Text',1722 implName: 'Text',1723 authoringVersion: 'u32',1724 specVersion: 'u32',1725 implVersion: 'u32',1726 apis: 'Vec<([u8;8],u32)>',1727 transactionVersion: 'u32',1728 stateVersion: 'u8'1729 },1730 /**1731 * Lookup165: frame_system::pallet::Error<T>1732 **/1733 FrameSystemError: {1734 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']1735 },1736 /**1737 * Lookup166: pallet_state_trie_migration::pallet::MigrationTask<T>1738 **/1739 PalletStateTrieMigrationMigrationTask: {1740 _alias: {1741 size_: 'size'1742 },1743 progressTop: 'PalletStateTrieMigrationProgress',1744 progressChild: 'PalletStateTrieMigrationProgress',1745 size_: 'u32',1746 topItems: 'u32',1747 childItems: 'u32'1748 },1749 /**1750 * Lookup167: pallet_state_trie_migration::pallet::Progress<MaxKeyLen>1751 **/1752 PalletStateTrieMigrationProgress: {1753 _enum: {1754 ToStart: 'Null',1755 LastKey: 'Bytes',1756 Complete: 'Null'1757 }1758 },1759 /**1760 * Lookup170: pallet_state_trie_migration::pallet::MigrationLimits1761 **/1762 PalletStateTrieMigrationMigrationLimits: {1763 _alias: {1764 size_: 'size'1765 },1766 size_: 'u32',1767 item: 'u32'1768 },1769 /**1770 * Lookup171: pallet_state_trie_migration::pallet::Call<T>1771 **/1772 PalletStateTrieMigrationCall: {1773 _enum: {1774 control_auto_migration: {1775 maybeConfig: 'Option<PalletStateTrieMigrationMigrationLimits>',1776 },1777 continue_migrate: {1778 limits: 'PalletStateTrieMigrationMigrationLimits',1779 realSizeUpper: 'u32',1780 witnessTask: 'PalletStateTrieMigrationMigrationTask',1781 },1782 migrate_custom_top: {1783 _alias: {1784 keys_: 'keys',1785 },1786 keys_: 'Vec<Bytes>',1787 witnessSize: 'u32',1788 },1789 migrate_custom_child: {1790 root: 'Bytes',1791 childKeys: 'Vec<Bytes>',1792 totalSize: 'u32',1793 },1794 set_signed_max_limits: {1795 limits: 'PalletStateTrieMigrationMigrationLimits',1796 },1797 force_set_progress: {1798 progressTop: 'PalletStateTrieMigrationProgress',1799 progressChild: 'PalletStateTrieMigrationProgress'1800 }1801 }1802 },1803 /**1804 * Lookup172: polkadot_primitives::v4::PersistedValidationData<primitive_types::H256, N>1805 **/1806 PolkadotPrimitivesV4PersistedValidationData: {1807 parentHead: 'Bytes',1808 relayParentNumber: 'u32',1809 relayParentStorageRoot: 'H256',1810 maxPovSize: 'u32'1811 },1812 /**1813 * Lookup175: polkadot_primitives::v4::UpgradeRestriction1814 **/1815 PolkadotPrimitivesV4UpgradeRestriction: {1816 _enum: ['Present']1817 },1818 /**1819 * Lookup176: sp_trie::storage_proof::StorageProof1820 **/1821 SpTrieStorageProof: {1822 trieNodes: 'BTreeSet<Bytes>'1823 },1824 /**1825 * Lookup178: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot1826 **/1827 CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {1828 dmqMqcHead: 'H256',1829 relayDispatchQueueSize: 'CumulusPalletParachainSystemRelayStateSnapshotRelayDispachQueueSize',1830 ingressChannels: 'Vec<(u32,PolkadotPrimitivesV4AbridgedHrmpChannel)>',1831 egressChannels: 'Vec<(u32,PolkadotPrimitivesV4AbridgedHrmpChannel)>'1832 },1833 /**1834 * Lookup179: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispachQueueSize1835 **/1836 CumulusPalletParachainSystemRelayStateSnapshotRelayDispachQueueSize: {1837 remainingCount: 'u32',1838 remainingSize: 'u32'1839 },1840 /**1841 * Lookup182: polkadot_primitives::v4::AbridgedHrmpChannel1842 **/1843 PolkadotPrimitivesV4AbridgedHrmpChannel: {1844 maxCapacity: 'u32',1845 maxTotalSize: 'u32',1846 maxMessageSize: 'u32',1847 msgCount: 'u32',1848 totalSize: 'u32',1849 mqcHead: 'Option<H256>'1850 },1851 /**1852 * Lookup184: polkadot_primitives::v4::AbridgedHostConfiguration1853 **/1854 PolkadotPrimitivesV4AbridgedHostConfiguration: {1855 maxCodeSize: 'u32',1856 maxHeadDataSize: 'u32',1857 maxUpwardQueueCount: 'u32',1858 maxUpwardQueueSize: 'u32',1859 maxUpwardMessageSize: 'u32',1860 maxUpwardMessageNumPerCandidate: 'u32',1861 hrmpMaxMessageNumPerCandidate: 'u32',1862 validationUpgradeCooldown: 'u32',1863 validationUpgradeDelay: 'u32'1864 },1865 /**1866 * Lookup190: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>1867 **/1868 PolkadotCorePrimitivesOutboundHrmpMessage: {1869 recipient: 'u32',1870 data: 'Bytes'1871 },1872 /**1873 * Lookup191: cumulus_pallet_parachain_system::CodeUpgradeAuthorization<T>1874 **/1875 CumulusPalletParachainSystemCodeUpgradeAuthorization: {1876 codeHash: 'H256',1877 checkVersion: 'bool'1878 },1879 /**1880 * Lookup192: cumulus_pallet_parachain_system::pallet::Call<T>1881 **/1882 CumulusPalletParachainSystemCall: {1883 _enum: {1884 set_validation_data: {1885 data: 'CumulusPrimitivesParachainInherentParachainInherentData',1886 },1887 sudo_send_upward_message: {1888 message: 'Bytes',1889 },1890 authorize_upgrade: {1891 codeHash: 'H256',1892 checkVersion: 'bool',1893 },1894 enact_authorized_upgrade: {1895 code: 'Bytes'1896 }1897 }1898 },1899 /**1900 * Lookup193: cumulus_primitives_parachain_inherent::ParachainInherentData1901 **/1902 CumulusPrimitivesParachainInherentParachainInherentData: {1903 validationData: 'PolkadotPrimitivesV4PersistedValidationData',1904 relayChainState: 'SpTrieStorageProof',1905 downwardMessages: 'Vec<PolkadotCorePrimitivesInboundDownwardMessage>',1906 horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'1907 },1908 /**1909 * Lookup195: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>1910 **/1911 PolkadotCorePrimitivesInboundDownwardMessage: {1912 sentAt: 'u32',1913 msg: 'Bytes'1914 },1915 /**1916 * Lookup198: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>1917 **/1918 PolkadotCorePrimitivesInboundHrmpMessage: {1919 sentAt: 'u32',1920 data: 'Bytes'1921 },1922 /**1923 * Lookup201: cumulus_pallet_parachain_system::pallet::Error<T>1924 **/1925 CumulusPalletParachainSystemError: {1926 _enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']1927 },1928 /**1929 * Lookup202: parachain_info::pallet::Call<T>1930 **/1931 ParachainInfoCall: 'Null',1932 /**1933 * Lookup205: pallet_collator_selection::pallet::Call<T>1934 **/1935 PalletCollatorSelectionCall: {1936 _enum: {1937 add_invulnerable: {1938 _alias: {1939 new_: 'new',1940 },1941 new_: 'AccountId32',1942 },1943 remove_invulnerable: {1944 who: 'AccountId32',1945 },1946 get_license: 'Null',1947 onboard: 'Null',1948 offboard: 'Null',1949 release_license: 'Null',1950 force_release_license: {1951 who: 'AccountId32'1952 }1953 }1954 },1955 /**1956 * Lookup206: pallet_collator_selection::pallet::Error<T>1957 **/1958 PalletCollatorSelectionError: {1959 _enum: ['TooManyCandidates', 'Unknown', 'Permission', 'AlreadyHoldingLicense', 'NoLicense', 'AlreadyCandidate', 'NotCandidate', 'TooManyInvulnerables', 'TooFewInvulnerables', 'AlreadyInvulnerable', 'NotInvulnerable', 'NoAssociatedValidatorId', 'ValidatorNotRegistered']1960 },1961 /**1962 * Lookup209: opal_runtime::runtime_common::SessionKeys1963 **/1964 OpalRuntimeRuntimeCommonSessionKeys: {1965 aura: 'SpConsensusAuraSr25519AppSr25519Public'1966 },1967 /**1968 * Lookup210: sp_consensus_aura::sr25519::app_sr25519::Public1969 **/1970 SpConsensusAuraSr25519AppSr25519Public: 'SpCoreSr25519Public',1971 /**1972 * Lookup211: sp_core::sr25519::Public1973 **/1974 SpCoreSr25519Public: '[u8;32]',1975 /**1976 * Lookup214: sp_core::crypto::KeyTypeId1977 **/1978 SpCoreCryptoKeyTypeId: '[u8;4]',1979 /**1980 * Lookup215: pallet_session::pallet::Call<T>1981 **/1982 PalletSessionCall: {1983 _enum: {1984 set_keys: {1985 _alias: {1986 keys_: 'keys',1987 },1988 keys_: 'OpalRuntimeRuntimeCommonSessionKeys',1989 proof: 'Bytes',1990 },1991 purge_keys: 'Null'1992 }1993 },1994 /**1995 * Lookup216: pallet_session::pallet::Error<T>1996 **/1997 PalletSessionError: {1998 _enum: ['InvalidProof', 'NoAssociatedValidatorId', 'DuplicatedKey', 'NoKeys', 'NoAccount']1999 },2000 /**2001 * Lookup221: pallet_balances::types::BalanceLock<Balance>2002 **/2003 PalletBalancesBalanceLock: {2004 id: '[u8;8]',2005 amount: 'u128',2006 reasons: 'PalletBalancesReasons'2007 },2008 /**2009 * Lookup222: pallet_balances::types::Reasons2010 **/2011 PalletBalancesReasons: {2012 _enum: ['Fee', 'Misc', 'All']2013 },2014 /**2015 * Lookup225: pallet_balances::types::ReserveData<ReserveIdentifier, Balance>2016 **/2017 PalletBalancesReserveData: {2018 id: '[u8;16]',2019 amount: 'u128'2020 },2021 /**2022 * Lookup228: pallet_balances::types::IdAmount<Id, Balance>2023 **/2024 PalletBalancesIdAmount: {2025 id: '[u8;16]',2026 amount: 'u128'2027 },2028 /**2029 * Lookup231: pallet_balances::pallet::Call<T, I>2030 **/2031 PalletBalancesCall: {2032 _enum: {2033 transfer_allow_death: {2034 dest: 'MultiAddress',2035 value: 'Compact<u128>',2036 },2037 set_balance_deprecated: {2038 who: 'MultiAddress',2039 newFree: 'Compact<u128>',2040 oldReserved: 'Compact<u128>',2041 },2042 force_transfer: {2043 source: 'MultiAddress',2044 dest: 'MultiAddress',2045 value: 'Compact<u128>',2046 },2047 transfer_keep_alive: {2048 dest: 'MultiAddress',2049 value: 'Compact<u128>',2050 },2051 transfer_all: {2052 dest: 'MultiAddress',2053 keepAlive: 'bool',2054 },2055 force_unreserve: {2056 who: 'MultiAddress',2057 amount: 'u128',2058 },2059 upgrade_accounts: {2060 who: 'Vec<AccountId32>',2061 },2062 transfer: {2063 dest: 'MultiAddress',2064 value: 'Compact<u128>',2065 },2066 force_set_balance: {2067 who: 'MultiAddress',2068 newFree: 'Compact<u128>'2069 }2070 }2071 },2072 /**2073 * Lookup234: pallet_balances::pallet::Error<T, I>2074 **/2075 PalletBalancesError: {2076 _enum: ['VestingBalance', 'LiquidityRestrictions', 'InsufficientBalance', 'ExistentialDeposit', 'Expendability', 'ExistingVestingSchedule', 'DeadAccount', 'TooManyReserves', 'TooManyHolds', 'TooManyFreezes']2077 },2078 /**2079 * Lookup235: pallet_timestamp::pallet::Call<T>2080 **/2081 PalletTimestampCall: {2082 _enum: {2083 set: {2084 now: 'Compact<u64>'2085 }2086 }2087 },2088 /**2089 * Lookup237: pallet_transaction_payment::Releases2090 **/2091 PalletTransactionPaymentReleases: {2092 _enum: ['V1Ancient', 'V2']2093 },2094 /**2095 * Lookup238: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>2096 **/2097 PalletTreasuryProposal: {2098 proposer: 'AccountId32',2099 value: 'u128',2100 beneficiary: 'AccountId32',2101 bond: 'u128'2102 },2103 /**2104 * Lookup240: pallet_treasury::pallet::Call<T, I>2105 **/2106 PalletTreasuryCall: {2107 _enum: {2108 propose_spend: {2109 value: 'Compact<u128>',2110 beneficiary: 'MultiAddress',2111 },2112 reject_proposal: {2113 proposalId: 'Compact<u32>',2114 },2115 approve_proposal: {2116 proposalId: 'Compact<u32>',2117 },2118 spend: {2119 amount: 'Compact<u128>',2120 beneficiary: 'MultiAddress',2121 },2122 remove_approval: {2123 proposalId: 'Compact<u32>'2124 }2125 }2126 },2127 /**2128 * Lookup242: frame_support::PalletId2129 **/2130 FrameSupportPalletId: '[u8;8]',2131 /**2132 * Lookup243: pallet_treasury::pallet::Error<T, I>2133 **/2134 PalletTreasuryError: {2135 _enum: ['InsufficientProposersBalance', 'InvalidIndex', 'TooManyApprovals', 'InsufficientPermission', 'ProposalNotApproved']2136 },2137 /**2138 * Lookup244: pallet_sudo::pallet::Call<T>2139 **/2140 PalletSudoCall: {2141 _enum: {2142 sudo: {2143 call: 'Call',2144 },2145 sudo_unchecked_weight: {2146 call: 'Call',2147 weight: 'SpWeightsWeightV2Weight',2148 },2149 set_key: {2150 _alias: {2151 new_: 'new',2152 },2153 new_: 'MultiAddress',2154 },2155 sudo_as: {2156 who: 'MultiAddress',2157 call: 'Call'2158 }2159 }2160 },2161 /**2162 * Lookup246: orml_vesting::module::Call<T>2163 **/2164 OrmlVestingModuleCall: {2165 _enum: {2166 claim: 'Null',2167 vested_transfer: {2168 dest: 'MultiAddress',2169 schedule: 'OrmlVestingVestingSchedule',2170 },2171 update_vesting_schedules: {2172 who: 'MultiAddress',2173 vestingSchedules: 'Vec<OrmlVestingVestingSchedule>',2174 },2175 claim_for: {2176 dest: 'MultiAddress'2177 }2178 }2179 },2180 /**2181 * Lookup248: orml_xtokens::module::Call<T>2182 **/2183 OrmlXtokensModuleCall: {2184 _enum: {2185 transfer: {2186 currencyId: 'PalletForeignAssetsAssetIds',2187 amount: 'u128',2188 dest: 'XcmVersionedMultiLocation',2189 destWeightLimit: 'XcmV3WeightLimit',2190 },2191 transfer_multiasset: {2192 asset: 'XcmVersionedMultiAsset',2193 dest: 'XcmVersionedMultiLocation',2194 destWeightLimit: 'XcmV3WeightLimit',2195 },2196 transfer_with_fee: {2197 currencyId: 'PalletForeignAssetsAssetIds',2198 amount: 'u128',2199 fee: 'u128',2200 dest: 'XcmVersionedMultiLocation',2201 destWeightLimit: 'XcmV3WeightLimit',2202 },2203 transfer_multiasset_with_fee: {2204 asset: 'XcmVersionedMultiAsset',2205 fee: 'XcmVersionedMultiAsset',2206 dest: 'XcmVersionedMultiLocation',2207 destWeightLimit: 'XcmV3WeightLimit',2208 },2209 transfer_multicurrencies: {2210 currencies: 'Vec<(PalletForeignAssetsAssetIds,u128)>',2211 feeItem: 'u32',2212 dest: 'XcmVersionedMultiLocation',2213 destWeightLimit: 'XcmV3WeightLimit',2214 },2215 transfer_multiassets: {2216 assets: 'XcmVersionedMultiAssets',2217 feeItem: 'u32',2218 dest: 'XcmVersionedMultiLocation',2219 destWeightLimit: 'XcmV3WeightLimit'2220 }2221 }2222 },2223 /**2224 * Lookup249: xcm::VersionedMultiAsset2225 **/2226 XcmVersionedMultiAsset: {2227 _enum: {2228 __Unused0: 'Null',2229 V2: 'XcmV2MultiAsset',2230 __Unused2: 'Null',2231 V3: 'XcmV3MultiAsset'2232 }2233 },2234 /**2235 * Lookup252: orml_tokens::module::Call<T>2236 **/2237 OrmlTokensModuleCall: {2238 _enum: {2239 transfer: {2240 dest: 'MultiAddress',2241 currencyId: 'PalletForeignAssetsAssetIds',2242 amount: 'Compact<u128>',2243 },2244 transfer_all: {2245 dest: 'MultiAddress',2246 currencyId: 'PalletForeignAssetsAssetIds',2247 keepAlive: 'bool',2248 },2249 transfer_keep_alive: {2250 dest: 'MultiAddress',2251 currencyId: 'PalletForeignAssetsAssetIds',2252 amount: 'Compact<u128>',2253 },2254 force_transfer: {2255 source: 'MultiAddress',2256 dest: 'MultiAddress',2257 currencyId: 'PalletForeignAssetsAssetIds',2258 amount: 'Compact<u128>',2259 },2260 set_balance: {2261 who: 'MultiAddress',2262 currencyId: 'PalletForeignAssetsAssetIds',2263 newFree: 'Compact<u128>',2264 newReserved: 'Compact<u128>'2265 }2266 }2267 },2268 /**2269 * Lookup253: pallet_identity::pallet::Call<T>2270 **/2271 PalletIdentityCall: {2272 _enum: {2273 add_registrar: {2274 account: 'MultiAddress',2275 },2276 set_identity: {2277 info: 'PalletIdentityIdentityInfo',2278 },2279 set_subs: {2280 subs: 'Vec<(AccountId32,Data)>',2281 },2282 clear_identity: 'Null',2283 request_judgement: {2284 regIndex: 'Compact<u32>',2285 maxFee: 'Compact<u128>',2286 },2287 cancel_request: {2288 regIndex: 'u32',2289 },2290 set_fee: {2291 index: 'Compact<u32>',2292 fee: 'Compact<u128>',2293 },2294 set_account_id: {2295 _alias: {2296 new_: 'new',2297 },2298 index: 'Compact<u32>',2299 new_: 'MultiAddress',2300 },2301 set_fields: {2302 index: 'Compact<u32>',2303 fields: 'PalletIdentityBitFlags',2304 },2305 provide_judgement: {2306 regIndex: 'Compact<u32>',2307 target: 'MultiAddress',2308 judgement: 'PalletIdentityJudgement',2309 identity: 'H256',2310 },2311 kill_identity: {2312 target: 'MultiAddress',2313 },2314 add_sub: {2315 sub: 'MultiAddress',2316 data: 'Data',2317 },2318 rename_sub: {2319 sub: 'MultiAddress',2320 data: 'Data',2321 },2322 remove_sub: {2323 sub: 'MultiAddress',2324 },2325 quit_sub: 'Null',2326 force_insert_identities: {2327 identities: 'Vec<(AccountId32,PalletIdentityRegistration)>',2328 },2329 force_remove_identities: {2330 identities: 'Vec<AccountId32>',2331 },2332 force_set_subs: {2333 subs: 'Vec<(AccountId32,(u128,Vec<(AccountId32,Data)>))>'2334 }2335 }2336 },2337 /**2338 * Lookup254: pallet_identity::types::IdentityInfo<FieldLimit>2339 **/2340 PalletIdentityIdentityInfo: {2341 additional: 'Vec<(Data,Data)>',2342 display: 'Data',2343 legal: 'Data',2344 web: 'Data',2345 riot: 'Data',2346 email: 'Data',2347 pgpFingerprint: 'Option<[u8;20]>',2348 image: 'Data',2349 twitter: 'Data'2350 },2351 /**2352 * Lookup290: pallet_identity::types::BitFlags<pallet_identity::types::IdentityField>2353 **/2354 PalletIdentityBitFlags: {2355 _bitLength: 64,2356 Display: 1,2357 Legal: 2,2358 Web: 4,2359 Riot: 8,2360 Email: 16,2361 PgpFingerprint: 32,2362 Image: 64,2363 Twitter: 1282364 },2365 /**2366 * Lookup291: pallet_identity::types::IdentityField2367 **/2368 PalletIdentityIdentityField: {2369 _enum: ['__Unused0', 'Display', 'Legal', '__Unused3', 'Web', '__Unused5', '__Unused6', '__Unused7', 'Riot', '__Unused9', '__Unused10', '__Unused11', '__Unused12', '__Unused13', '__Unused14', '__Unused15', 'Email', '__Unused17', '__Unused18', '__Unused19', '__Unused20', '__Unused21', '__Unused22', '__Unused23', '__Unused24', '__Unused25', '__Unused26', '__Unused27', '__Unused28', '__Unused29', '__Unused30', '__Unused31', 'PgpFingerprint', '__Unused33', '__Unused34', '__Unused35', '__Unused36', '__Unused37', '__Unused38', '__Unused39', '__Unused40', '__Unused41', '__Unused42', '__Unused43', '__Unused44', '__Unused45', '__Unused46', '__Unused47', '__Unused48', '__Unused49', '__Unused50', '__Unused51', '__Unused52', '__Unused53', '__Unused54', '__Unused55', '__Unused56', '__Unused57', '__Unused58', '__Unused59', '__Unused60', '__Unused61', '__Unused62', '__Unused63', 'Image', '__Unused65', '__Unused66', '__Unused67', '__Unused68', '__Unused69', '__Unused70', '__Unused71', '__Unused72', '__Unused73', '__Unused74', '__Unused75', '__Unused76', '__Unused77', '__Unused78', '__Unused79', '__Unused80', '__Unused81', '__Unused82', '__Unused83', '__Unused84', '__Unused85', '__Unused86', '__Unused87', '__Unused88', '__Unused89', '__Unused90', '__Unused91', '__Unused92', '__Unused93', '__Unused94', '__Unused95', '__Unused96', '__Unused97', '__Unused98', '__Unused99', '__Unused100', '__Unused101', '__Unused102', '__Unused103', '__Unused104', '__Unused105', '__Unused106', '__Unused107', '__Unused108', '__Unused109', '__Unused110', '__Unused111', '__Unused112', '__Unused113', '__Unused114', '__Unused115', '__Unused116', '__Unused117', '__Unused118', '__Unused119', '__Unused120', '__Unused121', '__Unused122', '__Unused123', '__Unused124', '__Unused125', '__Unused126', '__Unused127', 'Twitter']2370 },2371 /**2372 * Lookup292: pallet_identity::types::Judgement<Balance>2373 **/2374 PalletIdentityJudgement: {2375 _enum: {2376 Unknown: 'Null',2377 FeePaid: 'u128',2378 Reasonable: 'Null',2379 KnownGood: 'Null',2380 OutOfDate: 'Null',2381 LowQuality: 'Null',2382 Erroneous: 'Null'2383 }2384 },2385 /**2386 * Lookup295: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>2387 **/2388 PalletIdentityRegistration: {2389 judgements: 'Vec<(u32,PalletIdentityJudgement)>',2390 deposit: 'u128',2391 info: 'PalletIdentityIdentityInfo'2392 },2393 /**2394 * Lookup303: pallet_preimage::pallet::Call<T>2395 **/2396 PalletPreimageCall: {2397 _enum: {2398 note_preimage: {2399 bytes: 'Bytes',2400 },2401 unnote_preimage: {2402 _alias: {2403 hash_: 'hash',2404 },2405 hash_: 'H256',2406 },2407 request_preimage: {2408 _alias: {2409 hash_: 'hash',2410 },2411 hash_: 'H256',2412 },2413 unrequest_preimage: {2414 _alias: {2415 hash_: 'hash',2416 },2417 hash_: 'H256'2418 }2419 }2420 },2421 /**2422 * Lookup304: cumulus_pallet_xcmp_queue::pallet::Call<T>2423 **/2424 CumulusPalletXcmpQueueCall: {2425 _enum: {2426 service_overweight: {2427 index: 'u64',2428 weightLimit: 'SpWeightsWeightV2Weight',2429 },2430 suspend_xcm_execution: 'Null',2431 resume_xcm_execution: 'Null',2432 update_suspend_threshold: {2433 _alias: {2434 new_: 'new',2435 },2436 new_: 'u32',2437 },2438 update_drop_threshold: {2439 _alias: {2440 new_: 'new',2441 },2442 new_: 'u32',2443 },2444 update_resume_threshold: {2445 _alias: {2446 new_: 'new',2447 },2448 new_: 'u32',2449 },2450 update_threshold_weight: {2451 _alias: {2452 new_: 'new',2453 },2454 new_: 'SpWeightsWeightV2Weight',2455 },2456 update_weight_restrict_decay: {2457 _alias: {2458 new_: 'new',2459 },2460 new_: 'SpWeightsWeightV2Weight',2461 },2462 update_xcmp_max_individual_weight: {2463 _alias: {2464 new_: 'new',2465 },2466 new_: 'SpWeightsWeightV2Weight'2467 }2468 }2469 },2470 /**2471 * Lookup305: pallet_xcm::pallet::Call<T>2472 **/2473 PalletXcmCall: {2474 _enum: {2475 send: {2476 dest: 'XcmVersionedMultiLocation',2477 message: 'XcmVersionedXcm',2478 },2479 teleport_assets: {2480 dest: 'XcmVersionedMultiLocation',2481 beneficiary: 'XcmVersionedMultiLocation',2482 assets: 'XcmVersionedMultiAssets',2483 feeAssetItem: 'u32',2484 },2485 reserve_transfer_assets: {2486 dest: 'XcmVersionedMultiLocation',2487 beneficiary: 'XcmVersionedMultiLocation',2488 assets: 'XcmVersionedMultiAssets',2489 feeAssetItem: 'u32',2490 },2491 execute: {2492 message: 'XcmVersionedXcm',2493 maxWeight: 'SpWeightsWeightV2Weight',2494 },2495 force_xcm_version: {2496 location: 'XcmV3MultiLocation',2497 xcmVersion: 'u32',2498 },2499 force_default_xcm_version: {2500 maybeXcmVersion: 'Option<u32>',2501 },2502 force_subscribe_version_notify: {2503 location: 'XcmVersionedMultiLocation',2504 },2505 force_unsubscribe_version_notify: {2506 location: 'XcmVersionedMultiLocation',2507 },2508 limited_reserve_transfer_assets: {2509 dest: 'XcmVersionedMultiLocation',2510 beneficiary: 'XcmVersionedMultiLocation',2511 assets: 'XcmVersionedMultiAssets',2512 feeAssetItem: 'u32',2513 weightLimit: 'XcmV3WeightLimit',2514 },2515 limited_teleport_assets: {2516 dest: 'XcmVersionedMultiLocation',2517 beneficiary: 'XcmVersionedMultiLocation',2518 assets: 'XcmVersionedMultiAssets',2519 feeAssetItem: 'u32',2520 weightLimit: 'XcmV3WeightLimit',2521 },2522 force_suspension: {2523 suspended: 'bool'2524 }2525 }2526 },2527 /**2528 * Lookup306: xcm::VersionedXcm<RuntimeCall>2529 **/2530 XcmVersionedXcm: {2531 _enum: {2532 __Unused0: 'Null',2533 __Unused1: 'Null',2534 V2: 'XcmV2Xcm',2535 V3: 'XcmV3Xcm'2536 }2537 },2538 /**2539 * Lookup307: xcm::v2::Xcm<RuntimeCall>2540 **/2541 XcmV2Xcm: 'Vec<XcmV2Instruction>',2542 /**2543 * Lookup309: xcm::v2::Instruction<RuntimeCall>2544 **/2545 XcmV2Instruction: {2546 _enum: {2547 WithdrawAsset: 'XcmV2MultiassetMultiAssets',2548 ReserveAssetDeposited: 'XcmV2MultiassetMultiAssets',2549 ReceiveTeleportedAsset: 'XcmV2MultiassetMultiAssets',2550 QueryResponse: {2551 queryId: 'Compact<u64>',2552 response: 'XcmV2Response',2553 maxWeight: 'Compact<u64>',2554 },2555 TransferAsset: {2556 assets: 'XcmV2MultiassetMultiAssets',2557 beneficiary: 'XcmV2MultiLocation',2558 },2559 TransferReserveAsset: {2560 assets: 'XcmV2MultiassetMultiAssets',2561 dest: 'XcmV2MultiLocation',2562 xcm: 'XcmV2Xcm',2563 },2564 Transact: {2565 originType: 'XcmV2OriginKind',2566 requireWeightAtMost: 'Compact<u64>',2567 call: 'XcmDoubleEncoded',2568 },2569 HrmpNewChannelOpenRequest: {2570 sender: 'Compact<u32>',2571 maxMessageSize: 'Compact<u32>',2572 maxCapacity: 'Compact<u32>',2573 },2574 HrmpChannelAccepted: {2575 recipient: 'Compact<u32>',2576 },2577 HrmpChannelClosing: {2578 initiator: 'Compact<u32>',2579 sender: 'Compact<u32>',2580 recipient: 'Compact<u32>',2581 },2582 ClearOrigin: 'Null',2583 DescendOrigin: 'XcmV2MultilocationJunctions',2584 ReportError: {2585 queryId: 'Compact<u64>',2586 dest: 'XcmV2MultiLocation',2587 maxResponseWeight: 'Compact<u64>',2588 },2589 DepositAsset: {2590 assets: 'XcmV2MultiassetMultiAssetFilter',2591 maxAssets: 'Compact<u32>',2592 beneficiary: 'XcmV2MultiLocation',2593 },2594 DepositReserveAsset: {2595 assets: 'XcmV2MultiassetMultiAssetFilter',2596 maxAssets: 'Compact<u32>',2597 dest: 'XcmV2MultiLocation',2598 xcm: 'XcmV2Xcm',2599 },2600 ExchangeAsset: {2601 give: 'XcmV2MultiassetMultiAssetFilter',2602 receive: 'XcmV2MultiassetMultiAssets',2603 },2604 InitiateReserveWithdraw: {2605 assets: 'XcmV2MultiassetMultiAssetFilter',2606 reserve: 'XcmV2MultiLocation',2607 xcm: 'XcmV2Xcm',2608 },2609 InitiateTeleport: {2610 assets: 'XcmV2MultiassetMultiAssetFilter',2611 dest: 'XcmV2MultiLocation',2612 xcm: 'XcmV2Xcm',2613 },2614 QueryHolding: {2615 queryId: 'Compact<u64>',2616 dest: 'XcmV2MultiLocation',2617 assets: 'XcmV2MultiassetMultiAssetFilter',2618 maxResponseWeight: 'Compact<u64>',2619 },2620 BuyExecution: {2621 fees: 'XcmV2MultiAsset',2622 weightLimit: 'XcmV2WeightLimit',2623 },2624 RefundSurplus: 'Null',2625 SetErrorHandler: 'XcmV2Xcm',2626 SetAppendix: 'XcmV2Xcm',2627 ClearError: 'Null',2628 ClaimAsset: {2629 assets: 'XcmV2MultiassetMultiAssets',2630 ticket: 'XcmV2MultiLocation',2631 },2632 Trap: 'Compact<u64>',2633 SubscribeVersion: {2634 queryId: 'Compact<u64>',2635 maxResponseWeight: 'Compact<u64>',2636 },2637 UnsubscribeVersion: 'Null'2638 }2639 },2640 /**2641 * Lookup310: xcm::v2::Response2642 **/2643 XcmV2Response: {2644 _enum: {2645 Null: 'Null',2646 Assets: 'XcmV2MultiassetMultiAssets',2647 ExecutionResult: 'Option<(u32,XcmV2TraitsError)>',2648 Version: 'u32'2649 }2650 },2651 /**2652 * Lookup313: xcm::v2::traits::Error2653 **/2654 XcmV2TraitsError: {2655 _enum: {2656 Overflow: 'Null',2657 Unimplemented: 'Null',2658 UntrustedReserveLocation: 'Null',2659 UntrustedTeleportLocation: 'Null',2660 MultiLocationFull: 'Null',2661 MultiLocationNotInvertible: 'Null',2662 BadOrigin: 'Null',2663 InvalidLocation: 'Null',2664 AssetNotFound: 'Null',2665 FailedToTransactAsset: 'Null',2666 NotWithdrawable: 'Null',2667 LocationCannotHold: 'Null',2668 ExceedsMaxMessageSize: 'Null',2669 DestinationUnsupported: 'Null',2670 Transport: 'Null',2671 Unroutable: 'Null',2672 UnknownClaim: 'Null',2673 FailedToDecode: 'Null',2674 MaxWeightInvalid: 'Null',2675 NotHoldingFees: 'Null',2676 TooExpensive: 'Null',2677 Trap: 'u64',2678 UnhandledXcmVersion: 'Null',2679 WeightLimitReached: 'u64',2680 Barrier: 'Null',2681 WeightNotComputable: 'Null'2682 }2683 },2684 /**2685 * Lookup314: xcm::v2::multiasset::MultiAssetFilter2686 **/2687 XcmV2MultiassetMultiAssetFilter: {2688 _enum: {2689 Definite: 'XcmV2MultiassetMultiAssets',2690 Wild: 'XcmV2MultiassetWildMultiAsset'2691 }2692 },2693 /**2694 * Lookup315: xcm::v2::multiasset::WildMultiAsset2695 **/2696 XcmV2MultiassetWildMultiAsset: {2697 _enum: {2698 All: 'Null',2699 AllOf: {2700 id: 'XcmV2MultiassetAssetId',2701 fun: 'XcmV2MultiassetWildFungibility'2702 }2703 }2704 },2705 /**2706 * Lookup316: xcm::v2::multiasset::WildFungibility2707 **/2708 XcmV2MultiassetWildFungibility: {2709 _enum: ['Fungible', 'NonFungible']2710 },2711 /**2712 * Lookup317: xcm::v2::WeightLimit2713 **/2714 XcmV2WeightLimit: {2715 _enum: {2716 Unlimited: 'Null',2717 Limited: 'Compact<u64>'2718 }2719 },2720 /**2721 * Lookup326: cumulus_pallet_xcm::pallet::Call<T>2722 **/2723 CumulusPalletXcmCall: 'Null',2724 /**2725 * Lookup327: cumulus_pallet_dmp_queue::pallet::Call<T>2726 **/2727 CumulusPalletDmpQueueCall: {2728 _enum: {2729 service_overweight: {2730 index: 'u64',2731 weightLimit: 'SpWeightsWeightV2Weight'2732 }2733 }2734 },2735 /**2736 * Lookup328: pallet_inflation::pallet::Call<T>2737 **/2738 PalletInflationCall: {2739 _enum: {2740 start_inflation: {2741 inflationStartRelayBlock: 'u32'2742 }2743 }2744 },2745 /**2746 * Lookup329: pallet_unique::pallet::Call<T>2747 **/2748 PalletUniqueCall: {2749 _enum: {2750 create_collection: {2751 collectionName: 'Vec<u16>',2752 collectionDescription: 'Vec<u16>',2753 tokenPrefix: 'Bytes',2754 mode: 'UpDataStructsCollectionMode',2755 },2756 create_collection_ex: {2757 data: 'UpDataStructsCreateCollectionData',2758 },2759 destroy_collection: {2760 collectionId: 'u32',2761 },2762 add_to_allow_list: {2763 collectionId: 'u32',2764 address: 'PalletEvmAccountBasicCrossAccountIdRepr',2765 },2766 remove_from_allow_list: {2767 collectionId: 'u32',2768 address: 'PalletEvmAccountBasicCrossAccountIdRepr',2769 },2770 change_collection_owner: {2771 collectionId: 'u32',2772 newOwner: 'AccountId32',2773 },2774 add_collection_admin: {2775 collectionId: 'u32',2776 newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr',2777 },2778 remove_collection_admin: {2779 collectionId: 'u32',2780 accountId: 'PalletEvmAccountBasicCrossAccountIdRepr',2781 },2782 set_collection_sponsor: {2783 collectionId: 'u32',2784 newSponsor: 'AccountId32',2785 },2786 confirm_sponsorship: {2787 collectionId: 'u32',2788 },2789 remove_collection_sponsor: {2790 collectionId: 'u32',2791 },2792 create_item: {2793 collectionId: 'u32',2794 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',2795 data: 'UpDataStructsCreateItemData',2796 },2797 create_multiple_items: {2798 collectionId: 'u32',2799 owner: 'PalletEvmAccountBasicCrossAccountIdRepr',2800 itemsData: 'Vec<UpDataStructsCreateItemData>',2801 },2802 set_collection_properties: {2803 collectionId: 'u32',2804 properties: 'Vec<UpDataStructsProperty>',2805 },2806 delete_collection_properties: {2807 collectionId: 'u32',2808 propertyKeys: 'Vec<Bytes>',2809 },2810 set_token_properties: {2811 collectionId: 'u32',2812 tokenId: 'u32',2813 properties: 'Vec<UpDataStructsProperty>',2814 },2815 delete_token_properties: {2816 collectionId: 'u32',2817 tokenId: 'u32',2818 propertyKeys: 'Vec<Bytes>',2819 },2820 set_token_property_permissions: {2821 collectionId: 'u32',2822 propertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2823 },2824 create_multiple_items_ex: {2825 collectionId: 'u32',2826 data: 'UpDataStructsCreateItemExData',2827 },2828 set_transfers_enabled_flag: {2829 collectionId: 'u32',2830 value: 'bool',2831 },2832 burn_item: {2833 collectionId: 'u32',2834 itemId: 'u32',2835 value: 'u128',2836 },2837 burn_from: {2838 collectionId: 'u32',2839 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2840 itemId: 'u32',2841 value: 'u128',2842 },2843 transfer: {2844 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',2845 collectionId: 'u32',2846 itemId: 'u32',2847 value: 'u128',2848 },2849 approve: {2850 spender: 'PalletEvmAccountBasicCrossAccountIdRepr',2851 collectionId: 'u32',2852 itemId: 'u32',2853 amount: 'u128',2854 },2855 approve_from: {2856 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2857 to: 'PalletEvmAccountBasicCrossAccountIdRepr',2858 collectionId: 'u32',2859 itemId: 'u32',2860 amount: 'u128',2861 },2862 transfer_from: {2863 from: 'PalletEvmAccountBasicCrossAccountIdRepr',2864 recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',2865 collectionId: 'u32',2866 itemId: 'u32',2867 value: 'u128',2868 },2869 set_collection_limits: {2870 collectionId: 'u32',2871 newLimit: 'UpDataStructsCollectionLimits',2872 },2873 set_collection_permissions: {2874 collectionId: 'u32',2875 newPermission: 'UpDataStructsCollectionPermissions',2876 },2877 repartition: {2878 collectionId: 'u32',2879 tokenId: 'u32',2880 amount: 'u128',2881 },2882 set_allowance_for_all: {2883 collectionId: 'u32',2884 operator: 'PalletEvmAccountBasicCrossAccountIdRepr',2885 approve: 'bool',2886 },2887 force_repair_collection: {2888 collectionId: 'u32',2889 },2890 force_repair_item: {2891 collectionId: 'u32',2892 itemId: 'u32'2893 }2894 }2895 },2896 /**2897 * Lookup334: up_data_structs::CollectionMode2898 **/2899 UpDataStructsCollectionMode: {2900 _enum: {2901 NFT: 'Null',2902 Fungible: 'u8',2903 ReFungible: 'Null'2904 }2905 },2906 /**2907 * Lookup335: up_data_structs::CreateCollectionData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2908 **/2909 UpDataStructsCreateCollectionData: {2910 mode: 'UpDataStructsCollectionMode',2911 access: 'Option<UpDataStructsAccessMode>',2912 name: 'Vec<u16>',2913 description: 'Vec<u16>',2914 tokenPrefix: 'Bytes',2915 limits: 'Option<UpDataStructsCollectionLimits>',2916 permissions: 'Option<UpDataStructsCollectionPermissions>',2917 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2918 properties: 'Vec<UpDataStructsProperty>',2919 adminList: 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>',2920 pendingSponsor: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>',2921 flags: '[u8;1]'2922 },2923 /**2924 * Lookup337: up_data_structs::AccessMode2925 **/2926 UpDataStructsAccessMode: {2927 _enum: ['Normal', 'AllowList']2928 },2929 /**2930 * Lookup339: up_data_structs::CollectionLimits2931 **/2932 UpDataStructsCollectionLimits: {2933 accountTokenOwnershipLimit: 'Option<u32>',2934 sponsoredDataSize: 'Option<u32>',2935 sponsoredDataRateLimit: 'Option<UpDataStructsSponsoringRateLimit>',2936 tokenLimit: 'Option<u32>',2937 sponsorTransferTimeout: 'Option<u32>',2938 sponsorApproveTimeout: 'Option<u32>',2939 ownerCanTransfer: 'Option<bool>',2940 ownerCanDestroy: 'Option<bool>',2941 transfersEnabled: 'Option<bool>'2942 },2943 /**2944 * Lookup341: up_data_structs::SponsoringRateLimit2945 **/2946 UpDataStructsSponsoringRateLimit: {2947 _enum: {2948 SponsoringDisabled: 'Null',2949 Blocks: 'u32'2950 }2951 },2952 /**2953 * Lookup344: up_data_structs::CollectionPermissions2954 **/2955 UpDataStructsCollectionPermissions: {2956 access: 'Option<UpDataStructsAccessMode>',2957 mintMode: 'Option<bool>',2958 nesting: 'Option<UpDataStructsNestingPermissions>'2959 },2960 /**2961 * Lookup346: up_data_structs::NestingPermissions2962 **/2963 UpDataStructsNestingPermissions: {2964 tokenOwner: 'bool',2965 collectionAdmin: 'bool',2966 restricted: 'Option<UpDataStructsOwnerRestrictedSet>'2967 },2968 /**2969 * Lookup348: up_data_structs::OwnerRestrictedSet2970 **/2971 UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',2972 /**2973 * Lookup353: up_data_structs::PropertyKeyPermission2974 **/2975 UpDataStructsPropertyKeyPermission: {2976 key: 'Bytes',2977 permission: 'UpDataStructsPropertyPermission'2978 },2979 /**2980 * Lookup354: up_data_structs::PropertyPermission2981 **/2982 UpDataStructsPropertyPermission: {2983 mutable: 'bool',2984 collectionAdmin: 'bool',2985 tokenOwner: 'bool'2986 },2987 /**2988 * Lookup357: up_data_structs::Property2989 **/2990 UpDataStructsProperty: {2991 key: 'Bytes',2992 value: 'Bytes'2993 },2994 /**2995 * Lookup362: up_data_structs::CreateItemData2996 **/2997 UpDataStructsCreateItemData: {2998 _enum: {2999 NFT: 'UpDataStructsCreateNftData',3000 Fungible: 'UpDataStructsCreateFungibleData',3001 ReFungible: 'UpDataStructsCreateReFungibleData'3002 }3003 },3004 /**3005 * Lookup363: up_data_structs::CreateNftData3006 **/3007 UpDataStructsCreateNftData: {3008 properties: 'Vec<UpDataStructsProperty>'3009 },3010 /**3011 * Lookup364: up_data_structs::CreateFungibleData3012 **/3013 UpDataStructsCreateFungibleData: {3014 value: 'u128'3015 },3016 /**3017 * Lookup365: up_data_structs::CreateReFungibleData3018 **/3019 UpDataStructsCreateReFungibleData: {3020 pieces: 'u128',3021 properties: 'Vec<UpDataStructsProperty>'3022 },3023 /**3024 * Lookup368: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3025 **/3026 UpDataStructsCreateItemExData: {3027 _enum: {3028 NFT: 'Vec<UpDataStructsCreateNftExData>',3029 Fungible: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',3030 RefungibleMultipleItems: 'Vec<UpDataStructsCreateRefungibleExSingleOwner>',3031 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExMultipleOwners'3032 }3033 },3034 /**3035 * Lookup370: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3036 **/3037 UpDataStructsCreateNftExData: {3038 properties: 'Vec<UpDataStructsProperty>',3039 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'3040 },3041 /**3042 * Lookup377: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3043 **/3044 UpDataStructsCreateRefungibleExSingleOwner: {3045 user: 'PalletEvmAccountBasicCrossAccountIdRepr',3046 pieces: 'u128',3047 properties: 'Vec<UpDataStructsProperty>'3048 },3049 /**3050 * Lookup379: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3051 **/3052 UpDataStructsCreateRefungibleExMultipleOwners: {3053 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',3054 properties: 'Vec<UpDataStructsProperty>'3055 },3056 /**3057 * Lookup380: pallet_configuration::pallet::Call<T>3058 **/3059 PalletConfigurationCall: {3060 _enum: {3061 set_weight_to_fee_coefficient_override: {3062 coeff: 'Option<u64>',3063 },3064 set_min_gas_price_override: {3065 coeff: 'Option<u64>',3066 },3067 __Unused2: 'Null',3068 set_app_promotion_configuration_override: {3069 configuration: 'PalletConfigurationAppPromotionConfiguration',3070 },3071 set_collator_selection_desired_collators: {3072 max: 'Option<u32>',3073 },3074 set_collator_selection_license_bond: {3075 amount: 'Option<u128>',3076 },3077 set_collator_selection_kick_threshold: {3078 threshold: 'Option<u32>'3079 }3080 }3081 },3082 /**3083 * Lookup382: pallet_configuration::AppPromotionConfiguration<BlockNumber>3084 **/3085 PalletConfigurationAppPromotionConfiguration: {3086 recalculationInterval: 'Option<u32>',3087 pendingInterval: 'Option<u32>',3088 intervalIncome: 'Option<Perbill>',3089 maxStakersPerCalculation: 'Option<u8>'3090 },3091 /**3092 * Lookup386: pallet_structure::pallet::Call<T>3093 **/3094 PalletStructureCall: 'Null',3095 /**3096 * Lookup387: pallet_app_promotion::pallet::Call<T>3097 **/3098 PalletAppPromotionCall: {3099 _enum: {3100 set_admin_address: {3101 admin: 'PalletEvmAccountBasicCrossAccountIdRepr',3102 },3103 stake: {3104 amount: 'u128',3105 },3106 unstake_all: 'Null',3107 sponsor_collection: {3108 collectionId: 'u32',3109 },3110 stop_sponsoring_collection: {3111 collectionId: 'u32',3112 },3113 sponsor_contract: {3114 contractId: 'H160',3115 },3116 stop_sponsoring_contract: {3117 contractId: 'H160',3118 },3119 payout_stakers: {3120 stakersNumber: 'Option<u8>',3121 },3122 unstake_partial: {3123 amount: 'u128',3124 },3125 force_unstake: {3126 pendingBlocks: 'Vec<u32>'3127 }3128 }3129 },3130 /**3131 * Lookup388: pallet_foreign_assets::module::Call<T>3132 **/3133 PalletForeignAssetsModuleCall: {3134 _enum: {3135 register_foreign_asset: {3136 owner: 'AccountId32',3137 location: 'XcmVersionedMultiLocation',3138 metadata: 'PalletForeignAssetsModuleAssetMetadata',3139 },3140 update_foreign_asset: {3141 foreignAssetId: 'u32',3142 location: 'XcmVersionedMultiLocation',3143 metadata: 'PalletForeignAssetsModuleAssetMetadata'3144 }3145 }3146 },3147 /**3148 * Lookup389: pallet_evm::pallet::Call<T>3149 **/3150 PalletEvmCall: {3151 _enum: {3152 withdraw: {3153 address: 'H160',3154 value: 'u128',3155 },3156 call: {3157 source: 'H160',3158 target: 'H160',3159 input: 'Bytes',3160 value: 'U256',3161 gasLimit: 'u64',3162 maxFeePerGas: 'U256',3163 maxPriorityFeePerGas: 'Option<U256>',3164 nonce: 'Option<U256>',3165 accessList: 'Vec<(H160,Vec<H256>)>',3166 },3167 create: {3168 source: 'H160',3169 init: 'Bytes',3170 value: 'U256',3171 gasLimit: 'u64',3172 maxFeePerGas: 'U256',3173 maxPriorityFeePerGas: 'Option<U256>',3174 nonce: 'Option<U256>',3175 accessList: 'Vec<(H160,Vec<H256>)>',3176 },3177 create2: {3178 source: 'H160',3179 init: 'Bytes',3180 salt: 'H256',3181 value: 'U256',3182 gasLimit: 'u64',3183 maxFeePerGas: 'U256',3184 maxPriorityFeePerGas: 'Option<U256>',3185 nonce: 'Option<U256>',3186 accessList: 'Vec<(H160,Vec<H256>)>'3187 }3188 }3189 },3190 /**3191 * Lookup395: pallet_ethereum::pallet::Call<T>3192 **/3193 PalletEthereumCall: {3194 _enum: {3195 transact: {3196 transaction: 'EthereumTransactionTransactionV2'3197 }3198 }3199 },3200 /**3201 * Lookup396: ethereum::transaction::TransactionV23202 **/3203 EthereumTransactionTransactionV2: {3204 _enum: {3205 Legacy: 'EthereumTransactionLegacyTransaction',3206 EIP2930: 'EthereumTransactionEip2930Transaction',3207 EIP1559: 'EthereumTransactionEip1559Transaction'3208 }3209 },3210 /**3211 * Lookup397: ethereum::transaction::LegacyTransaction3212 **/3213 EthereumTransactionLegacyTransaction: {3214 nonce: 'U256',3215 gasPrice: 'U256',3216 gasLimit: 'U256',3217 action: 'EthereumTransactionTransactionAction',3218 value: 'U256',3219 input: 'Bytes',3220 signature: 'EthereumTransactionTransactionSignature'3221 },3222 /**3223 * Lookup398: ethereum::transaction::TransactionAction3224 **/3225 EthereumTransactionTransactionAction: {3226 _enum: {3227 Call: 'H160',3228 Create: 'Null'3229 }3230 },3231 /**3232 * Lookup399: ethereum::transaction::TransactionSignature3233 **/3234 EthereumTransactionTransactionSignature: {3235 v: 'u64',3236 r: 'H256',3237 s: 'H256'3238 },3239 /**3240 * Lookup401: ethereum::transaction::EIP2930Transaction3241 **/3242 EthereumTransactionEip2930Transaction: {3243 chainId: 'u64',3244 nonce: 'U256',3245 gasPrice: 'U256',3246 gasLimit: 'U256',3247 action: 'EthereumTransactionTransactionAction',3248 value: 'U256',3249 input: 'Bytes',3250 accessList: 'Vec<EthereumTransactionAccessListItem>',3251 oddYParity: 'bool',3252 r: 'H256',3253 s: 'H256'3254 },3255 /**3256 * Lookup403: ethereum::transaction::AccessListItem3257 **/3258 EthereumTransactionAccessListItem: {3259 address: 'H160',3260 storageKeys: 'Vec<H256>'3261 },3262 /**3263 * Lookup404: ethereum::transaction::EIP1559Transaction3264 **/3265 EthereumTransactionEip1559Transaction: {3266 chainId: 'u64',3267 nonce: 'U256',3268 maxPriorityFeePerGas: 'U256',3269 maxFeePerGas: 'U256',3270 gasLimit: 'U256',3271 action: 'EthereumTransactionTransactionAction',3272 value: 'U256',3273 input: 'Bytes',3274 accessList: 'Vec<EthereumTransactionAccessListItem>',3275 oddYParity: 'bool',3276 r: 'H256',3277 s: 'H256'3278 },3279 /**3280 * Lookup405: pallet_evm_contract_helpers::pallet::Call<T>3281 **/3282 PalletEvmContractHelpersCall: {3283 _enum: {3284 migrate_from_self_sponsoring: {3285 addresses: 'Vec<H160>'3286 }3287 }3288 },3289 /**3290 * Lookup407: pallet_evm_migration::pallet::Call<T>3291 **/3292 PalletEvmMigrationCall: {3293 _enum: {3294 begin: {3295 address: 'H160',3296 },3297 set_data: {3298 address: 'H160',3299 data: 'Vec<(H256,H256)>',3300 },3301 finish: {3302 address: 'H160',3303 code: 'Bytes',3304 },3305 insert_eth_logs: {3306 logs: 'Vec<EthereumLog>',3307 },3308 insert_events: {3309 events: 'Vec<Bytes>',3310 },3311 remove_rmrk_data: 'Null'3312 }3313 },3314 /**3315 * Lookup411: pallet_maintenance::pallet::Call<T>3316 **/3317 PalletMaintenanceCall: {3318 _enum: {3319 enable: 'Null',3320 disable: 'Null',3321 execute_preimage: {3322 _alias: {3323 hash_: 'hash',3324 },3325 hash_: 'H256',3326 weightBound: 'SpWeightsWeightV2Weight'3327 }3328 }3329 },3330 /**3331 * Lookup412: pallet_test_utils::pallet::Call<T>3332 **/3333 PalletTestUtilsCall: {3334 _enum: {3335 enable: 'Null',3336 set_test_value: {3337 value: 'u32',3338 },3339 set_test_value_and_rollback: {3340 value: 'u32',3341 },3342 inc_test_value: 'Null',3343 just_take_fee: 'Null',3344 batch_all: {3345 calls: 'Vec<Call>'3346 }3347 }3348 },3349 /**3350 * Lookup414: pallet_sudo::pallet::Error<T>3351 **/3352 PalletSudoError: {3353 _enum: ['RequireSudo']3354 },3355 /**3356 * Lookup416: orml_vesting::module::Error<T>3357 **/3358 OrmlVestingModuleError: {3359 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']3360 },3361 /**3362 * Lookup417: orml_xtokens::module::Error<T>3363 **/3364 OrmlXtokensModuleError: {3365 _enum: ['AssetHasNoReserve', 'NotCrossChainTransfer', 'InvalidDest', 'NotCrossChainTransferableCurrency', 'UnweighableMessage', 'XcmExecutionFailed', 'CannotReanchor', 'InvalidAncestry', 'InvalidAsset', 'DestinationNotInvertible', 'BadVersion', 'DistinctReserveForAssetAndFee', 'ZeroFee', 'ZeroAmount', 'TooManyAssetsBeingSent', 'AssetIndexNonExistent', 'FeeNotEnough', 'NotSupportedMultiLocation', 'MinXcmFeeNotDefined']3366 },3367 /**3368 * Lookup420: orml_tokens::BalanceLock<Balance>3369 **/3370 OrmlTokensBalanceLock: {3371 id: '[u8;8]',3372 amount: 'u128'3373 },3374 /**3375 * Lookup422: orml_tokens::AccountData<Balance>3376 **/3377 OrmlTokensAccountData: {3378 free: 'u128',3379 reserved: 'u128',3380 frozen: 'u128'3381 },3382 /**3383 * Lookup424: orml_tokens::ReserveData<ReserveIdentifier, Balance>3384 **/3385 OrmlTokensReserveData: {3386 id: 'Null',3387 amount: 'u128'3388 },3389 /**3390 * Lookup426: orml_tokens::module::Error<T>3391 **/3392 OrmlTokensModuleError: {3393 _enum: ['BalanceTooLow', 'AmountIntoBalanceFailed', 'LiquidityRestrictions', 'MaxLocksExceeded', 'KeepAlive', 'ExistentialDeposit', 'DeadAccount', 'TooManyReserves']3394 },3395 /**3396 * Lookup431: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>3397 **/3398 PalletIdentityRegistrarInfo: {3399 account: 'AccountId32',3400 fee: 'u128',3401 fields: 'PalletIdentityBitFlags'3402 },3403 /**3404 * Lookup433: pallet_identity::pallet::Error<T>3405 **/3406 PalletIdentityError: {3407 _enum: ['TooManySubAccounts', 'NotFound', 'NotNamed', 'EmptyIndex', 'FeeChanged', 'NoIdentity', 'StickyJudgement', 'JudgementGiven', 'InvalidJudgement', 'InvalidIndex', 'InvalidTarget', 'TooManyFields', 'TooManyRegistrars', 'AlreadyClaimed', 'NotSub', 'NotOwned', 'JudgementForDifferentIdentity', 'JudgementPaymentFailed']3408 },3409 /**3410 * Lookup434: pallet_preimage::RequestStatus<sp_core::crypto::AccountId32, Balance>3411 **/3412 PalletPreimageRequestStatus: {3413 _enum: {3414 Unrequested: {3415 deposit: '(AccountId32,u128)',3416 len: 'u32',3417 },3418 Requested: {3419 deposit: 'Option<(AccountId32,u128)>',3420 count: 'u32',3421 len: 'Option<u32>'3422 }3423 }3424 },3425 /**3426 * Lookup439: pallet_preimage::pallet::Error<T>3427 **/3428 PalletPreimageError: {3429 _enum: ['TooBig', 'AlreadyNoted', 'NotAuthorized', 'NotNoted', 'Requested', 'NotRequested']3430 },3431 /**3432 * Lookup441: cumulus_pallet_xcmp_queue::InboundChannelDetails3433 **/3434 CumulusPalletXcmpQueueInboundChannelDetails: {3435 sender: 'u32',3436 state: 'CumulusPalletXcmpQueueInboundState',3437 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'3438 },3439 /**3440 * Lookup442: cumulus_pallet_xcmp_queue::InboundState3441 **/3442 CumulusPalletXcmpQueueInboundState: {3443 _enum: ['Ok', 'Suspended']3444 },3445 /**3446 * Lookup445: polkadot_parachain::primitives::XcmpMessageFormat3447 **/3448 PolkadotParachainPrimitivesXcmpMessageFormat: {3449 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']3450 },3451 /**3452 * Lookup448: cumulus_pallet_xcmp_queue::OutboundChannelDetails3453 **/3454 CumulusPalletXcmpQueueOutboundChannelDetails: {3455 recipient: 'u32',3456 state: 'CumulusPalletXcmpQueueOutboundState',3457 signalsExist: 'bool',3458 firstIndex: 'u16',3459 lastIndex: 'u16'3460 },3461 /**3462 * Lookup449: cumulus_pallet_xcmp_queue::OutboundState3463 **/3464 CumulusPalletXcmpQueueOutboundState: {3465 _enum: ['Ok', 'Suspended']3466 },3467 /**3468 * Lookup451: cumulus_pallet_xcmp_queue::QueueConfigData3469 **/3470 CumulusPalletXcmpQueueQueueConfigData: {3471 suspendThreshold: 'u32',3472 dropThreshold: 'u32',3473 resumeThreshold: 'u32',3474 thresholdWeight: 'SpWeightsWeightV2Weight',3475 weightRestrictDecay: 'SpWeightsWeightV2Weight',3476 xcmpMaxIndividualWeight: 'SpWeightsWeightV2Weight'3477 },3478 /**3479 * Lookup453: cumulus_pallet_xcmp_queue::pallet::Error<T>3480 **/3481 CumulusPalletXcmpQueueError: {3482 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']3483 },3484 /**3485 * Lookup454: pallet_xcm::pallet::QueryStatus<BlockNumber>3486 **/3487 PalletXcmQueryStatus: {3488 _enum: {3489 Pending: {3490 responder: 'XcmVersionedMultiLocation',3491 maybeMatchQuerier: 'Option<XcmVersionedMultiLocation>',3492 maybeNotify: 'Option<(u8,u8)>',3493 timeout: 'u32',3494 },3495 VersionNotifier: {3496 origin: 'XcmVersionedMultiLocation',3497 isActive: 'bool',3498 },3499 Ready: {3500 response: 'XcmVersionedResponse',3501 at: 'u32'3502 }3503 }3504 },3505 /**3506 * Lookup458: xcm::VersionedResponse3507 **/3508 XcmVersionedResponse: {3509 _enum: {3510 __Unused0: 'Null',3511 __Unused1: 'Null',3512 V2: 'XcmV2Response',3513 V3: 'XcmV3Response'3514 }3515 },3516 /**3517 * Lookup464: pallet_xcm::pallet::VersionMigrationStage3518 **/3519 PalletXcmVersionMigrationStage: {3520 _enum: {3521 MigrateSupportedVersion: 'Null',3522 MigrateVersionNotifiers: 'Null',3523 NotifyCurrentTargets: 'Option<Bytes>',3524 MigrateAndNotifyOldTargets: 'Null'3525 }3526 },3527 /**3528 * Lookup467: xcm::VersionedAssetId3529 **/3530 XcmVersionedAssetId: {3531 _enum: {3532 __Unused0: 'Null',3533 __Unused1: 'Null',3534 __Unused2: 'Null',3535 V3: 'XcmV3MultiassetAssetId'3536 }3537 },3538 /**3539 * Lookup468: pallet_xcm::pallet::RemoteLockedFungibleRecord<ConsumerIdentifier, MaxConsumers>3540 **/3541 PalletXcmRemoteLockedFungibleRecord: {3542 amount: 'u128',3543 owner: 'XcmVersionedMultiLocation',3544 locker: 'XcmVersionedMultiLocation',3545 consumers: 'Vec<(Null,u128)>'3546 },3547 /**3548 * Lookup475: pallet_xcm::pallet::Error<T>3549 **/3550 PalletXcmError: {3551 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed', 'InvalidAsset', 'LowBalance', 'TooManyLocks', 'AccountNotSovereign', 'FeesNotMet', 'LockNotFound', 'InUse']3552 },3553 /**3554 * Lookup476: cumulus_pallet_xcm::pallet::Error<T>3555 **/3556 CumulusPalletXcmError: 'Null',3557 /**3558 * Lookup477: cumulus_pallet_dmp_queue::ConfigData3559 **/3560 CumulusPalletDmpQueueConfigData: {3561 maxIndividual: 'SpWeightsWeightV2Weight'3562 },3563 /**3564 * Lookup478: cumulus_pallet_dmp_queue::PageIndexData3565 **/3566 CumulusPalletDmpQueuePageIndexData: {3567 beginUsed: 'u32',3568 endUsed: 'u32',3569 overweightCount: 'u64'3570 },3571 /**3572 * Lookup481: cumulus_pallet_dmp_queue::pallet::Error<T>3573 **/3574 CumulusPalletDmpQueueError: {3575 _enum: ['Unknown', 'OverLimit']3576 },3577 /**3578 * Lookup485: pallet_unique::pallet::Error<T>3579 **/3580 PalletUniqueError: {3581 _enum: ['CollectionDecimalPointLimitExceeded', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']3582 },3583 /**3584 * Lookup486: pallet_configuration::pallet::Error<T>3585 **/3586 PalletConfigurationError: {3587 _enum: ['InconsistentConfiguration']3588 },3589 /**3590 * Lookup487: up_data_structs::Collection<sp_core::crypto::AccountId32>3591 **/3592 UpDataStructsCollection: {3593 owner: 'AccountId32',3594 mode: 'UpDataStructsCollectionMode',3595 name: 'Vec<u16>',3596 description: 'Vec<u16>',3597 tokenPrefix: 'Bytes',3598 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',3599 limits: 'UpDataStructsCollectionLimits',3600 permissions: 'UpDataStructsCollectionPermissions',3601 flags: '[u8;1]'3602 },3603 /**3604 * Lookup488: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>3605 **/3606 UpDataStructsSponsorshipStateAccountId32: {3607 _enum: {3608 Disabled: 'Null',3609 Unconfirmed: 'AccountId32',3610 Confirmed: 'AccountId32'3611 }3612 },3613 /**3614 * Lookup489: up_data_structs::Properties3615 **/3616 UpDataStructsProperties: {3617 map: 'UpDataStructsPropertiesMapBoundedVec',3618 consumedSpace: 'u32',3619 reserved: 'u32'3620 },3621 /**3622 * Lookup490: up_data_structs::PropertiesMap<bounded_collections::bounded_vec::BoundedVec<T, S>>3623 **/3624 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',3625 /**3626 * Lookup495: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>3627 **/3628 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',3629 /**3630 * Lookup502: up_data_structs::CollectionStats3631 **/3632 UpDataStructsCollectionStats: {3633 created: 'u32',3634 destroyed: 'u32',3635 alive: 'u32'3636 },3637 /**3638 * Lookup503: up_data_structs::TokenChild3639 **/3640 UpDataStructsTokenChild: {3641 token: 'u32',3642 collection: 'u32'3643 },3644 /**3645 * Lookup504: PhantomType::up_data_structs<T>3646 **/3647 PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,UpPovEstimateRpcPovInfo);0]',3648 /**3649 * Lookup506: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3650 **/3651 UpDataStructsTokenData: {3652 properties: 'Vec<UpDataStructsProperty>',3653 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>',3654 pieces: 'u128'3655 },3656 /**3657 * Lookup507: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>3658 **/3659 UpDataStructsRpcCollection: {3660 owner: 'AccountId32',3661 mode: 'UpDataStructsCollectionMode',3662 name: 'Vec<u16>',3663 description: 'Vec<u16>',3664 tokenPrefix: 'Bytes',3665 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',3666 limits: 'UpDataStructsCollectionLimits',3667 permissions: 'UpDataStructsCollectionPermissions',3668 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',3669 properties: 'Vec<UpDataStructsProperty>',3670 readOnly: 'bool',3671 flags: 'UpDataStructsRpcCollectionFlags'3672 },3673 /**3674 * Lookup508: up_data_structs::RpcCollectionFlags3675 **/3676 UpDataStructsRpcCollectionFlags: {3677 foreign: 'bool',3678 erc721metadata: 'bool'3679 },3680 /**3681 * Lookup509: up_pov_estimate_rpc::PovInfo3682 **/3683 UpPovEstimateRpcPovInfo: {3684 proofSize: 'u64',3685 compactProofSize: 'u64',3686 compressedProofSize: 'u64',3687 results: 'Vec<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>',3688 keyValues: 'Vec<UpPovEstimateRpcTrieKeyValue>'3689 },3690 /**3691 * Lookup512: sp_runtime::transaction_validity::TransactionValidityError3692 **/3693 SpRuntimeTransactionValidityTransactionValidityError: {3694 _enum: {3695 Invalid: 'SpRuntimeTransactionValidityInvalidTransaction',3696 Unknown: 'SpRuntimeTransactionValidityUnknownTransaction'3697 }3698 },3699 /**3700 * Lookup513: sp_runtime::transaction_validity::InvalidTransaction3701 **/3702 SpRuntimeTransactionValidityInvalidTransaction: {3703 _enum: {3704 Call: 'Null',3705 Payment: 'Null',3706 Future: 'Null',3707 Stale: 'Null',3708 BadProof: 'Null',3709 AncientBirthBlock: 'Null',3710 ExhaustsResources: 'Null',3711 Custom: 'u8',3712 BadMandatory: 'Null',3713 MandatoryValidation: 'Null',3714 BadSigner: 'Null'3715 }3716 },3717 /**3718 * Lookup514: sp_runtime::transaction_validity::UnknownTransaction3719 **/3720 SpRuntimeTransactionValidityUnknownTransaction: {3721 _enum: {3722 CannotLookup: 'Null',3723 NoUnsignedValidator: 'Null',3724 Custom: 'u8'3725 }3726 },3727 /**3728 * Lookup516: up_pov_estimate_rpc::TrieKeyValue3729 **/3730 UpPovEstimateRpcTrieKeyValue: {3731 key: 'Bytes',3732 value: 'Bytes'3733 },3734 /**3735 * Lookup518: pallet_common::pallet::Error<T>3736 **/3737 PalletCommonError: {3738 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsNotEthMirror', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal', 'ConfirmSponsorshipFail', 'UserIsNotCollectionAdmin']3739 },3740 /**3741 * Lookup520: pallet_fungible::pallet::Error<T>3742 **/3743 PalletFungibleError: {3744 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed', 'SettingAllowanceForAllNotAllowed', 'FungibleTokensAreAlwaysValid']3745 },3746 /**3747 * Lookup525: pallet_refungible::pallet::Error<T>3748 **/3749 PalletRefungibleError: {3750 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']3751 },3752 /**3753 * Lookup526: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3754 **/3755 PalletNonfungibleItemData: {3756 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'3757 },3758 /**3759 * Lookup528: up_data_structs::PropertyScope3760 **/3761 UpDataStructsPropertyScope: {3762 _enum: ['None', 'Rmrk']3763 },3764 /**3765 * Lookup531: pallet_nonfungible::pallet::Error<T>3766 **/3767 PalletNonfungibleError: {3768 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']3769 },3770 /**3771 * Lookup532: pallet_structure::pallet::Error<T>3772 **/3773 PalletStructureError: {3774 _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound', 'CantNestTokenUnderCollection']3775 },3776 /**3777 * Lookup537: pallet_app_promotion::pallet::Error<T>3778 **/3779 PalletAppPromotionError: {3780 _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFunds', 'PendingForBlockOverflow', 'SponsorNotSet', 'InsufficientStakedBalance', 'InconsistencyState']3781 },3782 /**3783 * Lookup538: pallet_foreign_assets::module::Error<T>3784 **/3785 PalletForeignAssetsModuleError: {3786 _enum: ['BadLocation', 'MultiLocationExisted', 'AssetIdNotExists', 'AssetIdExisted']3787 },3788 /**3789 * Lookup539: pallet_evm::CodeMetadata3790 **/3791 PalletEvmCodeMetadata: {3792 _alias: {3793 size_: 'size',3794 hash_: 'hash'3795 },3796 size_: 'u64',3797 hash_: 'H256'3798 },3799 /**3800 * Lookup541: pallet_evm::pallet::Error<T>3801 **/3802 PalletEvmError: {3803 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce', 'GasLimitTooLow', 'GasLimitTooHigh', 'Undefined', 'Reentrancy', 'TransactionMustComeFromEOA']3804 },3805 /**3806 * Lookup544: fp_rpc::TransactionStatus3807 **/3808 FpRpcTransactionStatus: {3809 transactionHash: 'H256',3810 transactionIndex: 'u32',3811 from: 'H160',3812 to: 'Option<H160>',3813 contractAddress: 'Option<H160>',3814 logs: 'Vec<EthereumLog>',3815 logsBloom: 'EthbloomBloom'3816 },3817 /**3818 * Lookup546: ethbloom::Bloom3819 **/3820 EthbloomBloom: '[u8;256]',3821 /**3822 * Lookup548: ethereum::receipt::ReceiptV33823 **/3824 EthereumReceiptReceiptV3: {3825 _enum: {3826 Legacy: 'EthereumReceiptEip658ReceiptData',3827 EIP2930: 'EthereumReceiptEip658ReceiptData',3828 EIP1559: 'EthereumReceiptEip658ReceiptData'3829 }3830 },3831 /**3832 * Lookup549: ethereum::receipt::EIP658ReceiptData3833 **/3834 EthereumReceiptEip658ReceiptData: {3835 statusCode: 'u8',3836 usedGas: 'U256',3837 logsBloom: 'EthbloomBloom',3838 logs: 'Vec<EthereumLog>'3839 },3840 /**3841 * Lookup550: ethereum::block::Block<ethereum::transaction::TransactionV2>3842 **/3843 EthereumBlock: {3844 header: 'EthereumHeader',3845 transactions: 'Vec<EthereumTransactionTransactionV2>',3846 ommers: 'Vec<EthereumHeader>'3847 },3848 /**3849 * Lookup551: ethereum::header::Header3850 **/3851 EthereumHeader: {3852 parentHash: 'H256',3853 ommersHash: 'H256',3854 beneficiary: 'H160',3855 stateRoot: 'H256',3856 transactionsRoot: 'H256',3857 receiptsRoot: 'H256',3858 logsBloom: 'EthbloomBloom',3859 difficulty: 'U256',3860 number: 'U256',3861 gasLimit: 'U256',3862 gasUsed: 'U256',3863 timestamp: 'u64',3864 extraData: 'Bytes',3865 mixHash: 'H256',3866 nonce: 'EthereumTypesHashH64'3867 },3868 /**3869 * Lookup552: ethereum_types::hash::H643870 **/3871 EthereumTypesHashH64: '[u8;8]',3872 /**3873 * Lookup557: pallet_ethereum::pallet::Error<T>3874 **/3875 PalletEthereumError: {3876 _enum: ['InvalidSignature', 'PreLogExists']3877 },3878 /**3879 * Lookup558: pallet_evm_coder_substrate::pallet::Error<T>3880 **/3881 PalletEvmCoderSubstrateError: {3882 _enum: ['OutOfGas', 'OutOfFund']3883 },3884 /**3885 * Lookup559: up_data_structs::SponsorshipState<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3886 **/3887 UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: {3888 _enum: {3889 Disabled: 'Null',3890 Unconfirmed: 'PalletEvmAccountBasicCrossAccountIdRepr',3891 Confirmed: 'PalletEvmAccountBasicCrossAccountIdRepr'3892 }3893 },3894 /**3895 * Lookup560: pallet_evm_contract_helpers::SponsoringModeT3896 **/3897 PalletEvmContractHelpersSponsoringModeT: {3898 _enum: ['Disabled', 'Allowlisted', 'Generous']3899 },3900 /**3901 * Lookup566: pallet_evm_contract_helpers::pallet::Error<T>3902 **/3903 PalletEvmContractHelpersError: {3904 _enum: ['NoPermission', 'NoPendingSponsor', 'TooManyMethodsHaveSponsoredLimit']3905 },3906 /**3907 * Lookup567: pallet_evm_migration::pallet::Error<T>3908 **/3909 PalletEvmMigrationError: {3910 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating', 'BadEvent']3911 },3912 /**3913 * Lookup568: pallet_maintenance::pallet::Error<T>3914 **/3915 PalletMaintenanceError: 'Null',3916 /**3917 * Lookup569: pallet_test_utils::pallet::Error<T>3918 **/3919 PalletTestUtilsError: {3920 _enum: ['TestPalletDisabled', 'TriggerRollback']3921 },3922 /**3923 * Lookup571: sp_runtime::MultiSignature3924 **/3925 SpRuntimeMultiSignature: {3926 _enum: {3927 Ed25519: 'SpCoreEd25519Signature',3928 Sr25519: 'SpCoreSr25519Signature',3929 Ecdsa: 'SpCoreEcdsaSignature'3930 }3931 },3932 /**3933 * Lookup572: sp_core::ed25519::Signature3934 **/3935 SpCoreEd25519Signature: '[u8;64]',3936 /**3937 * Lookup574: sp_core::sr25519::Signature3938 **/3939 SpCoreSr25519Signature: '[u8;64]',3940 /**3941 * Lookup575: sp_core::ecdsa::Signature3942 **/3943 SpCoreEcdsaSignature: '[u8;65]',3944 /**3945 * Lookup578: frame_system::extensions::check_spec_version::CheckSpecVersion<T>3946 **/3947 FrameSystemExtensionsCheckSpecVersion: 'Null',3948 /**3949 * Lookup579: frame_system::extensions::check_tx_version::CheckTxVersion<T>3950 **/3951 FrameSystemExtensionsCheckTxVersion: 'Null',3952 /**3953 * Lookup580: frame_system::extensions::check_genesis::CheckGenesis<T>3954 **/3955 FrameSystemExtensionsCheckGenesis: 'Null',3956 /**3957 * Lookup583: frame_system::extensions::check_nonce::CheckNonce<T>3958 **/3959 FrameSystemExtensionsCheckNonce: 'Compact<u32>',3960 /**3961 * Lookup584: frame_system::extensions::check_weight::CheckWeight<T>3962 **/3963 FrameSystemExtensionsCheckWeight: 'Null',3964 /**3965 * Lookup585: opal_runtime::runtime_common::maintenance::CheckMaintenance3966 **/3967 OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance: 'Null',3968 /**3969 * Lookup586: opal_runtime::runtime_common::identity::DisableIdentityCalls3970 **/3971 OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls: 'Null',3972 /**3973 * Lookup587: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>3974 **/3975 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',3976 /**3977 * Lookup588: opal_runtime::Runtime3978 **/3979 OpalRuntimeRuntime: 'Null',3980 /**3981 * Lookup589: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>3982 **/3983 PalletEthereumFakeTransactionFinalizer: 'Null'3984};tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -3181,11 +3181,13 @@
readonly name: Vec<u16>;
readonly description: Vec<u16>;
readonly tokenPrefix: Bytes;
- readonly pendingSponsor: Option<AccountId32>;
readonly limits: Option<UpDataStructsCollectionLimits>;
readonly permissions: Option<UpDataStructsCollectionPermissions>;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
+ readonly adminList: Vec<PalletEvmAccountBasicCrossAccountIdRepr>;
+ readonly pendingSponsor: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
+ readonly flags: U8aFixed;
}
/** @name UpDataStructsAccessMode (337) */
@@ -3252,7 +3254,7 @@
readonly value: Bytes;
}
- /** @name UpDataStructsCreateItemData (360) */
+ /** @name UpDataStructsCreateItemData (362) */
interface UpDataStructsCreateItemData extends Enum {
readonly isNft: boolean;
readonly asNft: UpDataStructsCreateNftData;
@@ -3263,23 +3265,23 @@
readonly type: 'Nft' | 'Fungible' | 'ReFungible';
}
- /** @name UpDataStructsCreateNftData (361) */
+ /** @name UpDataStructsCreateNftData (363) */
interface UpDataStructsCreateNftData extends Struct {
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsCreateFungibleData (362) */
+ /** @name UpDataStructsCreateFungibleData (364) */
interface UpDataStructsCreateFungibleData extends Struct {
readonly value: u128;
}
- /** @name UpDataStructsCreateReFungibleData (363) */
+ /** @name UpDataStructsCreateReFungibleData (365) */
interface UpDataStructsCreateReFungibleData extends Struct {
readonly pieces: u128;
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsCreateItemExData (366) */
+ /** @name UpDataStructsCreateItemExData (368) */
interface UpDataStructsCreateItemExData extends Enum {
readonly isNft: boolean;
readonly asNft: Vec<UpDataStructsCreateNftExData>;
@@ -3292,26 +3294,26 @@
readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';
}
- /** @name UpDataStructsCreateNftExData (368) */
+ /** @name UpDataStructsCreateNftExData (370) */
interface UpDataStructsCreateNftExData extends Struct {
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
- /** @name UpDataStructsCreateRefungibleExSingleOwner (375) */
+ /** @name UpDataStructsCreateRefungibleExSingleOwner (377) */
interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {
readonly user: PalletEvmAccountBasicCrossAccountIdRepr;
readonly pieces: u128;
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsCreateRefungibleExMultipleOwners (377) */
+ /** @name UpDataStructsCreateRefungibleExMultipleOwners (379) */
interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {
readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name PalletConfigurationCall (378) */
+ /** @name PalletConfigurationCall (380) */
interface PalletConfigurationCall extends Enum {
readonly isSetWeightToFeeCoefficientOverride: boolean;
readonly asSetWeightToFeeCoefficientOverride: {
@@ -3340,7 +3342,7 @@
readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride' | 'SetAppPromotionConfigurationOverride' | 'SetCollatorSelectionDesiredCollators' | 'SetCollatorSelectionLicenseBond' | 'SetCollatorSelectionKickThreshold';
}
- /** @name PalletConfigurationAppPromotionConfiguration (380) */
+ /** @name PalletConfigurationAppPromotionConfiguration (382) */
interface PalletConfigurationAppPromotionConfiguration extends Struct {
readonly recalculationInterval: Option<u32>;
readonly pendingInterval: Option<u32>;
@@ -3348,10 +3350,10 @@
readonly maxStakersPerCalculation: Option<u8>;
}
- /** @name PalletStructureCall (384) */
+ /** @name PalletStructureCall (386) */
type PalletStructureCall = Null;
- /** @name PalletAppPromotionCall (385) */
+ /** @name PalletAppPromotionCall (387) */
interface PalletAppPromotionCall extends Enum {
readonly isSetAdminAddress: boolean;
readonly asSetAdminAddress: {
@@ -3393,7 +3395,7 @@
readonly type: 'SetAdminAddress' | 'Stake' | 'UnstakeAll' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers' | 'UnstakePartial' | 'ForceUnstake';
}
- /** @name PalletForeignAssetsModuleCall (386) */
+ /** @name PalletForeignAssetsModuleCall (388) */
interface PalletForeignAssetsModuleCall extends Enum {
readonly isRegisterForeignAsset: boolean;
readonly asRegisterForeignAsset: {
@@ -3410,7 +3412,7 @@
readonly type: 'RegisterForeignAsset' | 'UpdateForeignAsset';
}
- /** @name PalletEvmCall (387) */
+ /** @name PalletEvmCall (389) */
interface PalletEvmCall extends Enum {
readonly isWithdraw: boolean;
readonly asWithdraw: {
@@ -3455,7 +3457,7 @@
readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';
}
- /** @name PalletEthereumCall (393) */
+ /** @name PalletEthereumCall (395) */
interface PalletEthereumCall extends Enum {
readonly isTransact: boolean;
readonly asTransact: {
@@ -3464,7 +3466,7 @@
readonly type: 'Transact';
}
- /** @name EthereumTransactionTransactionV2 (394) */
+ /** @name EthereumTransactionTransactionV2 (396) */
interface EthereumTransactionTransactionV2 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: EthereumTransactionLegacyTransaction;
@@ -3475,7 +3477,7 @@
readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
}
- /** @name EthereumTransactionLegacyTransaction (395) */
+ /** @name EthereumTransactionLegacyTransaction (397) */
interface EthereumTransactionLegacyTransaction extends Struct {
readonly nonce: U256;
readonly gasPrice: U256;
@@ -3486,7 +3488,7 @@
readonly signature: EthereumTransactionTransactionSignature;
}
- /** @name EthereumTransactionTransactionAction (396) */
+ /** @name EthereumTransactionTransactionAction (398) */
interface EthereumTransactionTransactionAction extends Enum {
readonly isCall: boolean;
readonly asCall: H160;
@@ -3494,14 +3496,14 @@
readonly type: 'Call' | 'Create';
}
- /** @name EthereumTransactionTransactionSignature (397) */
+ /** @name EthereumTransactionTransactionSignature (399) */
interface EthereumTransactionTransactionSignature extends Struct {
readonly v: u64;
readonly r: H256;
readonly s: H256;
}
- /** @name EthereumTransactionEip2930Transaction (399) */
+ /** @name EthereumTransactionEip2930Transaction (401) */
interface EthereumTransactionEip2930Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
@@ -3516,13 +3518,13 @@
readonly s: H256;
}
- /** @name EthereumTransactionAccessListItem (401) */
+ /** @name EthereumTransactionAccessListItem (403) */
interface EthereumTransactionAccessListItem extends Struct {
readonly address: H160;
readonly storageKeys: Vec<H256>;
}
- /** @name EthereumTransactionEip1559Transaction (402) */
+ /** @name EthereumTransactionEip1559Transaction (404) */
interface EthereumTransactionEip1559Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
@@ -3538,7 +3540,7 @@
readonly s: H256;
}
- /** @name PalletEvmContractHelpersCall (403) */
+ /** @name PalletEvmContractHelpersCall (405) */
interface PalletEvmContractHelpersCall extends Enum {
readonly isMigrateFromSelfSponsoring: boolean;
readonly asMigrateFromSelfSponsoring: {
@@ -3547,7 +3549,7 @@
readonly type: 'MigrateFromSelfSponsoring';
}
- /** @name PalletEvmMigrationCall (405) */
+ /** @name PalletEvmMigrationCall (407) */
interface PalletEvmMigrationCall extends Enum {
readonly isBegin: boolean;
readonly asBegin: {
@@ -3575,7 +3577,7 @@
readonly type: 'Begin' | 'SetData' | 'Finish' | 'InsertEthLogs' | 'InsertEvents' | 'RemoveRmrkData';
}
- /** @name PalletMaintenanceCall (409) */
+ /** @name PalletMaintenanceCall (411) */
interface PalletMaintenanceCall extends Enum {
readonly isEnable: boolean;
readonly isDisable: boolean;
@@ -3587,7 +3589,7 @@
readonly type: 'Enable' | 'Disable' | 'ExecutePreimage';
}
- /** @name PalletTestUtilsCall (410) */
+ /** @name PalletTestUtilsCall (412) */
interface PalletTestUtilsCall extends Enum {
readonly isEnable: boolean;
readonly isSetTestValue: boolean;
@@ -3607,13 +3609,13 @@
readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'JustTakeFee' | 'BatchAll';
}
- /** @name PalletSudoError (412) */
+ /** @name PalletSudoError (414) */
interface PalletSudoError extends Enum {
readonly isRequireSudo: boolean;
readonly type: 'RequireSudo';
}
- /** @name OrmlVestingModuleError (414) */
+ /** @name OrmlVestingModuleError (416) */
interface OrmlVestingModuleError extends Enum {
readonly isZeroVestingPeriod: boolean;
readonly isZeroVestingPeriodCount: boolean;
@@ -3624,7 +3626,7 @@
readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';
}
- /** @name OrmlXtokensModuleError (415) */
+ /** @name OrmlXtokensModuleError (417) */
interface OrmlXtokensModuleError extends Enum {
readonly isAssetHasNoReserve: boolean;
readonly isNotCrossChainTransfer: boolean;
@@ -3648,26 +3650,26 @@
readonly type: 'AssetHasNoReserve' | 'NotCrossChainTransfer' | 'InvalidDest' | 'NotCrossChainTransferableCurrency' | 'UnweighableMessage' | 'XcmExecutionFailed' | 'CannotReanchor' | 'InvalidAncestry' | 'InvalidAsset' | 'DestinationNotInvertible' | 'BadVersion' | 'DistinctReserveForAssetAndFee' | 'ZeroFee' | 'ZeroAmount' | 'TooManyAssetsBeingSent' | 'AssetIndexNonExistent' | 'FeeNotEnough' | 'NotSupportedMultiLocation' | 'MinXcmFeeNotDefined';
}
- /** @name OrmlTokensBalanceLock (418) */
+ /** @name OrmlTokensBalanceLock (420) */
interface OrmlTokensBalanceLock extends Struct {
readonly id: U8aFixed;
readonly amount: u128;
}
- /** @name OrmlTokensAccountData (420) */
+ /** @name OrmlTokensAccountData (422) */
interface OrmlTokensAccountData extends Struct {
readonly free: u128;
readonly reserved: u128;
readonly frozen: u128;
}
- /** @name OrmlTokensReserveData (422) */
+ /** @name OrmlTokensReserveData (424) */
interface OrmlTokensReserveData extends Struct {
readonly id: Null;
readonly amount: u128;
}
- /** @name OrmlTokensModuleError (424) */
+ /** @name OrmlTokensModuleError (426) */
interface OrmlTokensModuleError extends Enum {
readonly isBalanceTooLow: boolean;
readonly isAmountIntoBalanceFailed: boolean;
@@ -3680,14 +3682,14 @@
readonly type: 'BalanceTooLow' | 'AmountIntoBalanceFailed' | 'LiquidityRestrictions' | 'MaxLocksExceeded' | 'KeepAlive' | 'ExistentialDeposit' | 'DeadAccount' | 'TooManyReserves';
}
- /** @name PalletIdentityRegistrarInfo (429) */
+ /** @name PalletIdentityRegistrarInfo (431) */
interface PalletIdentityRegistrarInfo extends Struct {
readonly account: AccountId32;
readonly fee: u128;
readonly fields: PalletIdentityBitFlags;
}
- /** @name PalletIdentityError (431) */
+ /** @name PalletIdentityError (433) */
interface PalletIdentityError extends Enum {
readonly isTooManySubAccounts: boolean;
readonly isNotFound: boolean;
@@ -3710,7 +3712,7 @@
readonly type: 'TooManySubAccounts' | 'NotFound' | 'NotNamed' | 'EmptyIndex' | 'FeeChanged' | 'NoIdentity' | 'StickyJudgement' | 'JudgementGiven' | 'InvalidJudgement' | 'InvalidIndex' | 'InvalidTarget' | 'TooManyFields' | 'TooManyRegistrars' | 'AlreadyClaimed' | 'NotSub' | 'NotOwned' | 'JudgementForDifferentIdentity' | 'JudgementPaymentFailed';
}
- /** @name PalletPreimageRequestStatus (432) */
+ /** @name PalletPreimageRequestStatus (434) */
interface PalletPreimageRequestStatus extends Enum {
readonly isUnrequested: boolean;
readonly asUnrequested: {
@@ -3726,7 +3728,7 @@
readonly type: 'Unrequested' | 'Requested';
}
- /** @name PalletPreimageError (437) */
+ /** @name PalletPreimageError (439) */
interface PalletPreimageError extends Enum {
readonly isTooBig: boolean;
readonly isAlreadyNoted: boolean;
@@ -3737,21 +3739,21 @@
readonly type: 'TooBig' | 'AlreadyNoted' | 'NotAuthorized' | 'NotNoted' | 'Requested' | 'NotRequested';
}
- /** @name CumulusPalletXcmpQueueInboundChannelDetails (439) */
+ /** @name CumulusPalletXcmpQueueInboundChannelDetails (441) */
interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {
readonly sender: u32;
readonly state: CumulusPalletXcmpQueueInboundState;
readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;
}
- /** @name CumulusPalletXcmpQueueInboundState (440) */
+ /** @name CumulusPalletXcmpQueueInboundState (442) */
interface CumulusPalletXcmpQueueInboundState extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
readonly type: 'Ok' | 'Suspended';
}
- /** @name PolkadotParachainPrimitivesXcmpMessageFormat (443) */
+ /** @name PolkadotParachainPrimitivesXcmpMessageFormat (445) */
interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {
readonly isConcatenatedVersionedXcm: boolean;
readonly isConcatenatedEncodedBlob: boolean;
@@ -3759,7 +3761,7 @@
readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
}
- /** @name CumulusPalletXcmpQueueOutboundChannelDetails (446) */
+ /** @name CumulusPalletXcmpQueueOutboundChannelDetails (448) */
interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {
readonly recipient: u32;
readonly state: CumulusPalletXcmpQueueOutboundState;
@@ -3768,14 +3770,14 @@
readonly lastIndex: u16;
}
- /** @name CumulusPalletXcmpQueueOutboundState (447) */
+ /** @name CumulusPalletXcmpQueueOutboundState (449) */
interface CumulusPalletXcmpQueueOutboundState extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
readonly type: 'Ok' | 'Suspended';
}
- /** @name CumulusPalletXcmpQueueQueueConfigData (449) */
+ /** @name CumulusPalletXcmpQueueQueueConfigData (451) */
interface CumulusPalletXcmpQueueQueueConfigData extends Struct {
readonly suspendThreshold: u32;
readonly dropThreshold: u32;
@@ -3785,7 +3787,7 @@
readonly xcmpMaxIndividualWeight: SpWeightsWeightV2Weight;
}
- /** @name CumulusPalletXcmpQueueError (451) */
+ /** @name CumulusPalletXcmpQueueError (453) */
interface CumulusPalletXcmpQueueError extends Enum {
readonly isFailedToSend: boolean;
readonly isBadXcmOrigin: boolean;
@@ -3795,7 +3797,7 @@
readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';
}
- /** @name PalletXcmQueryStatus (452) */
+ /** @name PalletXcmQueryStatus (454) */
interface PalletXcmQueryStatus extends Enum {
readonly isPending: boolean;
readonly asPending: {
@@ -3817,7 +3819,7 @@
readonly type: 'Pending' | 'VersionNotifier' | 'Ready';
}
- /** @name XcmVersionedResponse (456) */
+ /** @name XcmVersionedResponse (458) */
interface XcmVersionedResponse extends Enum {
readonly isV2: boolean;
readonly asV2: XcmV2Response;
@@ -3826,7 +3828,7 @@
readonly type: 'V2' | 'V3';
}
- /** @name PalletXcmVersionMigrationStage (462) */
+ /** @name PalletXcmVersionMigrationStage (464) */
interface PalletXcmVersionMigrationStage extends Enum {
readonly isMigrateSupportedVersion: boolean;
readonly isMigrateVersionNotifiers: boolean;
@@ -3836,14 +3838,14 @@
readonly type: 'MigrateSupportedVersion' | 'MigrateVersionNotifiers' | 'NotifyCurrentTargets' | 'MigrateAndNotifyOldTargets';
}
- /** @name XcmVersionedAssetId (465) */
+ /** @name XcmVersionedAssetId (467) */
interface XcmVersionedAssetId extends Enum {
readonly isV3: boolean;
readonly asV3: XcmV3MultiassetAssetId;
readonly type: 'V3';
}
- /** @name PalletXcmRemoteLockedFungibleRecord (466) */
+ /** @name PalletXcmRemoteLockedFungibleRecord (468) */
interface PalletXcmRemoteLockedFungibleRecord extends Struct {
readonly amount: u128;
readonly owner: XcmVersionedMultiLocation;
@@ -3851,7 +3853,7 @@
readonly consumers: Vec<ITuple<[Null, u128]>>;
}
- /** @name PalletXcmError (473) */
+ /** @name PalletXcmError (475) */
interface PalletXcmError extends Enum {
readonly isUnreachable: boolean;
readonly isSendFailure: boolean;
@@ -3876,29 +3878,29 @@
readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed' | 'InvalidAsset' | 'LowBalance' | 'TooManyLocks' | 'AccountNotSovereign' | 'FeesNotMet' | 'LockNotFound' | 'InUse';
}
- /** @name CumulusPalletXcmError (474) */
+ /** @name CumulusPalletXcmError (476) */
type CumulusPalletXcmError = Null;
- /** @name CumulusPalletDmpQueueConfigData (475) */
+ /** @name CumulusPalletDmpQueueConfigData (477) */
interface CumulusPalletDmpQueueConfigData extends Struct {
readonly maxIndividual: SpWeightsWeightV2Weight;
}
- /** @name CumulusPalletDmpQueuePageIndexData (476) */
+ /** @name CumulusPalletDmpQueuePageIndexData (478) */
interface CumulusPalletDmpQueuePageIndexData extends Struct {
readonly beginUsed: u32;
readonly endUsed: u32;
readonly overweightCount: u64;
}
- /** @name CumulusPalletDmpQueueError (479) */
+ /** @name CumulusPalletDmpQueueError (481) */
interface CumulusPalletDmpQueueError extends Enum {
readonly isUnknown: boolean;
readonly isOverLimit: boolean;
readonly type: 'Unknown' | 'OverLimit';
}
- /** @name PalletUniqueError (483) */
+ /** @name PalletUniqueError (485) */
interface PalletUniqueError extends Enum {
readonly isCollectionDecimalPointLimitExceeded: boolean;
readonly isEmptyArgument: boolean;
@@ -3906,13 +3908,13 @@
readonly type: 'CollectionDecimalPointLimitExceeded' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';
}
- /** @name PalletConfigurationError (484) */
+ /** @name PalletConfigurationError (486) */
interface PalletConfigurationError extends Enum {
readonly isInconsistentConfiguration: boolean;
readonly type: 'InconsistentConfiguration';
}
- /** @name UpDataStructsCollection (485) */
+ /** @name UpDataStructsCollection (487) */
interface UpDataStructsCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -3925,7 +3927,7 @@
readonly flags: U8aFixed;
}
- /** @name UpDataStructsSponsorshipStateAccountId32 (486) */
+ /** @name UpDataStructsSponsorshipStateAccountId32 (488) */
interface UpDataStructsSponsorshipStateAccountId32 extends Enum {
readonly isDisabled: boolean;
readonly isUnconfirmed: boolean;
@@ -3935,43 +3937,43 @@
readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
}
- /** @name UpDataStructsProperties (487) */
+ /** @name UpDataStructsProperties (489) */
interface UpDataStructsProperties extends Struct {
readonly map: UpDataStructsPropertiesMapBoundedVec;
readonly consumedSpace: u32;
readonly reserved: u32;
}
- /** @name UpDataStructsPropertiesMapBoundedVec (488) */
+ /** @name UpDataStructsPropertiesMapBoundedVec (490) */
interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}
- /** @name UpDataStructsPropertiesMapPropertyPermission (493) */
+ /** @name UpDataStructsPropertiesMapPropertyPermission (495) */
interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}
- /** @name UpDataStructsCollectionStats (500) */
+ /** @name UpDataStructsCollectionStats (502) */
interface UpDataStructsCollectionStats extends Struct {
readonly created: u32;
readonly destroyed: u32;
readonly alive: u32;
}
- /** @name UpDataStructsTokenChild (501) */
+ /** @name UpDataStructsTokenChild (503) */
interface UpDataStructsTokenChild extends Struct {
readonly token: u32;
readonly collection: u32;
}
- /** @name PhantomTypeUpDataStructs (502) */
+ /** @name PhantomTypeUpDataStructs (504) */
interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, UpPovEstimateRpcPovInfo]>> {}
- /** @name UpDataStructsTokenData (504) */
+ /** @name UpDataStructsTokenData (506) */
interface UpDataStructsTokenData extends Struct {
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
readonly pieces: u128;
}
- /** @name UpDataStructsRpcCollection (506) */
+ /** @name UpDataStructsRpcCollection (507) */
interface UpDataStructsRpcCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -3987,13 +3989,13 @@
readonly flags: UpDataStructsRpcCollectionFlags;
}
- /** @name UpDataStructsRpcCollectionFlags (507) */
+ /** @name UpDataStructsRpcCollectionFlags (508) */
interface UpDataStructsRpcCollectionFlags extends Struct {
readonly foreign: bool;
readonly erc721metadata: bool;
}
- /** @name UpPovEstimateRpcPovInfo (508) */
+ /** @name UpPovEstimateRpcPovInfo (509) */
interface UpPovEstimateRpcPovInfo extends Struct {
readonly proofSize: u64;
readonly compactProofSize: u64;
@@ -4002,7 +4004,7 @@
readonly keyValues: Vec<UpPovEstimateRpcTrieKeyValue>;
}
- /** @name SpRuntimeTransactionValidityTransactionValidityError (511) */
+ /** @name SpRuntimeTransactionValidityTransactionValidityError (512) */
interface SpRuntimeTransactionValidityTransactionValidityError extends Enum {
readonly isInvalid: boolean;
readonly asInvalid: SpRuntimeTransactionValidityInvalidTransaction;
@@ -4011,7 +4013,7 @@
readonly type: 'Invalid' | 'Unknown';
}
- /** @name SpRuntimeTransactionValidityInvalidTransaction (512) */
+ /** @name SpRuntimeTransactionValidityInvalidTransaction (513) */
interface SpRuntimeTransactionValidityInvalidTransaction extends Enum {
readonly isCall: boolean;
readonly isPayment: boolean;
@@ -4028,7 +4030,7 @@
readonly type: 'Call' | 'Payment' | 'Future' | 'Stale' | 'BadProof' | 'AncientBirthBlock' | 'ExhaustsResources' | 'Custom' | 'BadMandatory' | 'MandatoryValidation' | 'BadSigner';
}
- /** @name SpRuntimeTransactionValidityUnknownTransaction (513) */
+ /** @name SpRuntimeTransactionValidityUnknownTransaction (514) */
interface SpRuntimeTransactionValidityUnknownTransaction extends Enum {
readonly isCannotLookup: boolean;
readonly isNoUnsignedValidator: boolean;
@@ -4037,13 +4039,13 @@
readonly type: 'CannotLookup' | 'NoUnsignedValidator' | 'Custom';
}
- /** @name UpPovEstimateRpcTrieKeyValue (515) */
+ /** @name UpPovEstimateRpcTrieKeyValue (516) */
interface UpPovEstimateRpcTrieKeyValue extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name PalletCommonError (517) */
+ /** @name PalletCommonError (518) */
interface PalletCommonError extends Enum {
readonly isCollectionNotFound: boolean;
readonly isMustBeTokenOwner: boolean;
@@ -4085,7 +4087,7 @@
readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsNotEthMirror' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal' | 'ConfirmSponsorshipFail' | 'UserIsNotCollectionAdmin';
}
- /** @name PalletFungibleError (519) */
+ /** @name PalletFungibleError (520) */
interface PalletFungibleError extends Enum {
readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isFungibleItemsHaveNoId: boolean;
@@ -4097,7 +4099,7 @@
readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingAllowanceForAllNotAllowed' | 'FungibleTokensAreAlwaysValid';
}
- /** @name PalletRefungibleError (524) */
+ /** @name PalletRefungibleError (525) */
interface PalletRefungibleError extends Enum {
readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isWrongRefungiblePieces: boolean;
@@ -4107,19 +4109,19 @@
readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
}
- /** @name PalletNonfungibleItemData (525) */
+ /** @name PalletNonfungibleItemData (526) */
interface PalletNonfungibleItemData extends Struct {
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
- /** @name UpDataStructsPropertyScope (527) */
+ /** @name UpDataStructsPropertyScope (528) */
interface UpDataStructsPropertyScope extends Enum {
readonly isNone: boolean;
readonly isRmrk: boolean;
readonly type: 'None' | 'Rmrk';
}
- /** @name PalletNonfungibleError (530) */
+ /** @name PalletNonfungibleError (531) */
interface PalletNonfungibleError extends Enum {
readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isNonfungibleItemsHaveNoAmount: boolean;
@@ -4127,7 +4129,7 @@
readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';
}
- /** @name PalletStructureError (531) */
+ /** @name PalletStructureError (532) */
interface PalletStructureError extends Enum {
readonly isOuroborosDetected: boolean;
readonly isDepthLimit: boolean;
@@ -4137,7 +4139,7 @@
readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound' | 'CantNestTokenUnderCollection';
}
- /** @name PalletAppPromotionError (536) */
+ /** @name PalletAppPromotionError (537) */
interface PalletAppPromotionError extends Enum {
readonly isAdminNotSet: boolean;
readonly isNoPermission: boolean;
@@ -4149,7 +4151,7 @@
readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'InsufficientStakedBalance' | 'InconsistencyState';
}
- /** @name PalletForeignAssetsModuleError (537) */
+ /** @name PalletForeignAssetsModuleError (538) */
interface PalletForeignAssetsModuleError extends Enum {
readonly isBadLocation: boolean;
readonly isMultiLocationExisted: boolean;
@@ -4158,13 +4160,13 @@
readonly type: 'BadLocation' | 'MultiLocationExisted' | 'AssetIdNotExists' | 'AssetIdExisted';
}
- /** @name PalletEvmCodeMetadata (538) */
+ /** @name PalletEvmCodeMetadata (539) */
interface PalletEvmCodeMetadata extends Struct {
readonly size_: u64;
readonly hash_: H256;
}
- /** @name PalletEvmError (540) */
+ /** @name PalletEvmError (541) */
interface PalletEvmError extends Enum {
readonly isBalanceLow: boolean;
readonly isFeeOverflow: boolean;
@@ -4180,7 +4182,7 @@
readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce' | 'GasLimitTooLow' | 'GasLimitTooHigh' | 'Undefined' | 'Reentrancy' | 'TransactionMustComeFromEOA';
}
- /** @name FpRpcTransactionStatus (543) */
+ /** @name FpRpcTransactionStatus (544) */
interface FpRpcTransactionStatus extends Struct {
readonly transactionHash: H256;
readonly transactionIndex: u32;
@@ -4191,10 +4193,10 @@
readonly logsBloom: EthbloomBloom;
}
- /** @name EthbloomBloom (545) */
+ /** @name EthbloomBloom (546) */
interface EthbloomBloom extends U8aFixed {}
- /** @name EthereumReceiptReceiptV3 (547) */
+ /** @name EthereumReceiptReceiptV3 (548) */
interface EthereumReceiptReceiptV3 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: EthereumReceiptEip658ReceiptData;
@@ -4205,7 +4207,7 @@
readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
}
- /** @name EthereumReceiptEip658ReceiptData (548) */
+ /** @name EthereumReceiptEip658ReceiptData (549) */
interface EthereumReceiptEip658ReceiptData extends Struct {
readonly statusCode: u8;
readonly usedGas: U256;
@@ -4213,14 +4215,14 @@
readonly logs: Vec<EthereumLog>;
}
- /** @name EthereumBlock (549) */
+ /** @name EthereumBlock (550) */
interface EthereumBlock extends Struct {
readonly header: EthereumHeader;
readonly transactions: Vec<EthereumTransactionTransactionV2>;
readonly ommers: Vec<EthereumHeader>;
}
- /** @name EthereumHeader (550) */
+ /** @name EthereumHeader (551) */
interface EthereumHeader extends Struct {
readonly parentHash: H256;
readonly ommersHash: H256;
@@ -4239,24 +4241,24 @@
readonly nonce: EthereumTypesHashH64;
}
- /** @name EthereumTypesHashH64 (551) */
+ /** @name EthereumTypesHashH64 (552) */
interface EthereumTypesHashH64 extends U8aFixed {}
- /** @name PalletEthereumError (556) */
+ /** @name PalletEthereumError (557) */
interface PalletEthereumError extends Enum {
readonly isInvalidSignature: boolean;
readonly isPreLogExists: boolean;
readonly type: 'InvalidSignature' | 'PreLogExists';
}
- /** @name PalletEvmCoderSubstrateError (557) */
+ /** @name PalletEvmCoderSubstrateError (558) */
interface PalletEvmCoderSubstrateError extends Enum {
readonly isOutOfGas: boolean;
readonly isOutOfFund: boolean;
readonly type: 'OutOfGas' | 'OutOfFund';
}
- /** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr (558) */
+ /** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr (559) */
interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {
readonly isDisabled: boolean;
readonly isUnconfirmed: boolean;
@@ -4266,7 +4268,7 @@
readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
}
- /** @name PalletEvmContractHelpersSponsoringModeT (559) */
+ /** @name PalletEvmContractHelpersSponsoringModeT (560) */
interface PalletEvmContractHelpersSponsoringModeT extends Enum {
readonly isDisabled: boolean;
readonly isAllowlisted: boolean;
@@ -4274,7 +4276,7 @@
readonly type: 'Disabled' | 'Allowlisted' | 'Generous';
}
- /** @name PalletEvmContractHelpersError (565) */
+ /** @name PalletEvmContractHelpersError (566) */
interface PalletEvmContractHelpersError extends Enum {
readonly isNoPermission: boolean;
readonly isNoPendingSponsor: boolean;
@@ -4282,7 +4284,7 @@
readonly type: 'NoPermission' | 'NoPendingSponsor' | 'TooManyMethodsHaveSponsoredLimit';
}
- /** @name PalletEvmMigrationError (566) */
+ /** @name PalletEvmMigrationError (567) */
interface PalletEvmMigrationError extends Enum {
readonly isAccountNotEmpty: boolean;
readonly isAccountIsNotMigrating: boolean;
@@ -4290,17 +4292,17 @@
readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating' | 'BadEvent';
}
- /** @name PalletMaintenanceError (567) */
+ /** @name PalletMaintenanceError (568) */
type PalletMaintenanceError = Null;
- /** @name PalletTestUtilsError (568) */
+ /** @name PalletTestUtilsError (569) */
interface PalletTestUtilsError extends Enum {
readonly isTestPalletDisabled: boolean;
readonly isTriggerRollback: boolean;
readonly type: 'TestPalletDisabled' | 'TriggerRollback';
}
- /** @name SpRuntimeMultiSignature (570) */
+ /** @name SpRuntimeMultiSignature (571) */
interface SpRuntimeMultiSignature extends Enum {
readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Signature;
@@ -4311,43 +4313,43 @@
readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
}
- /** @name SpCoreEd25519Signature (571) */
+ /** @name SpCoreEd25519Signature (572) */
interface SpCoreEd25519Signature extends U8aFixed {}
- /** @name SpCoreSr25519Signature (573) */
+ /** @name SpCoreSr25519Signature (574) */
interface SpCoreSr25519Signature extends U8aFixed {}
- /** @name SpCoreEcdsaSignature (574) */
+ /** @name SpCoreEcdsaSignature (575) */
interface SpCoreEcdsaSignature extends U8aFixed {}
- /** @name FrameSystemExtensionsCheckSpecVersion (577) */
+ /** @name FrameSystemExtensionsCheckSpecVersion (578) */
type FrameSystemExtensionsCheckSpecVersion = Null;
- /** @name FrameSystemExtensionsCheckTxVersion (578) */
+ /** @name FrameSystemExtensionsCheckTxVersion (579) */
type FrameSystemExtensionsCheckTxVersion = Null;
- /** @name FrameSystemExtensionsCheckGenesis (579) */
+ /** @name FrameSystemExtensionsCheckGenesis (580) */
type FrameSystemExtensionsCheckGenesis = Null;
- /** @name FrameSystemExtensionsCheckNonce (582) */
+ /** @name FrameSystemExtensionsCheckNonce (583) */
interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
- /** @name FrameSystemExtensionsCheckWeight (583) */
+ /** @name FrameSystemExtensionsCheckWeight (584) */
type FrameSystemExtensionsCheckWeight = Null;
- /** @name OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance (584) */
+ /** @name OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance (585) */
type OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance = Null;
- /** @name OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls (585) */
+ /** @name OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls (586) */
type OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls = Null;
- /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (586) */
+ /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (587) */
interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
- /** @name OpalRuntimeRuntime (587) */
+ /** @name OpalRuntimeRuntime (588) */
type OpalRuntimeRuntime = Null;
- /** @name PalletEthereumFakeTransactionFinalizer (588) */
+ /** @name PalletEthereumFakeTransactionFinalizer (589) */
type PalletEthereumFakeTransactionFinalizer = Null;
} // declare module
tests/src/sub/appPromotion/appPromotion.test.tsdiffbeforeafterboth--- a/tests/src/sub/appPromotion/appPromotion.test.ts
+++ b/tests/src/sub/appPromotion/appPromotion.test.ts
@@ -51,6 +51,7 @@
donor = await privateKey({url: import.meta.url});
palletAddress = helper.arrange.calculatePalletAddress('appstake');
palletAdmin = await privateKey('//PromotionAdmin');
+
nominal = helper.balance.getOneTokenNominal();
const accountBalances = new Array(200).fill(1000n);
@@ -96,7 +97,6 @@
expect(await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(999n);
// it is potentially flaky test. Promotion can credited some tokens. Maybe we need to use closeTo?
expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedBefore + 100n * nominal); // total tokens amount staked in app-promotion increased
-
await helper.staking.stake(staker, 200n * nominal);
expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(300n * nominal);
@@ -497,13 +497,13 @@
expect((await collectionWithoutSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress});
// Can set sponsoring for collection with unconfirmed sponsor
- const collectionWithUnconfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Unconfirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: oldSponsor.address});
+ const collectionWithUnconfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Unconfirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: {Substrate: oldSponsor.address}});
expect((await collectionWithUnconfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Unconfirmed: oldSponsor.address});
await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithUnconfirmedSponsor.collectionId))).to.be.fulfilled;
expect((await collectionWithUnconfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress});
// Can set sponsoring for collection with confirmed sponsor
- const collectionWithConfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Confirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: oldSponsor.address});
+ const collectionWithConfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Confirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: {Substrate: oldSponsor.address}});
await collectionWithConfirmedSponsor.confirmSponsorship(oldSponsor);
await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithConfirmedSponsor.collectionId))).to.be.fulfilled;
expect((await collectionWithConfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress});
@@ -584,7 +584,7 @@
itSub('should not affect collection which is not sponsored by pallete', async ({helper}) => {
const api = helper.getApi();
const [collectionOwner] = await getAccounts(1);
- const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: collectionOwner.address});
+ const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: {Substrate: collectionOwner.address}});
await collection.confirmSponsorship(collectionOwner);
await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.stopSponsoringCollection(collection.collectionId))).to.be.rejected;
tests/src/util/playgrounds/types.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/types.ts
+++ b/tests/src/util/playgrounds/types.ts
@@ -142,6 +142,21 @@
}
}
+export interface ICollectionFlags {
+ foreign: boolean,
+ erc721metadata: boolean,
+}
+
+export enum CollectionFlag {
+ None = 0,
+ /// External collections can't be managed using `unique` api
+ External = 1,
+ /// Supports ERC721Metadata
+ Erc721metadata = 64,
+ /// Tokens in foreign collections can be transferred, but not burnt
+ Foreign = 128,
+}
+
export interface ICollectionCreationOptions {
name?: string | number[];
description?: string | number[];
@@ -155,7 +170,9 @@
properties?: IProperty[];
tokenPropertyPermissions?: ITokenPropertyPermission[];
limits?: ICollectionLimits;
- pendingSponsor?: TSubstrateAccount;
+ pendingSponsor?: ICrossAccountId;
+ adminList?: ICrossAccountId[];
+ flags?: number[] | CollectionFlag[] ,
}
export interface IChainProperties {
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -44,10 +44,12 @@
MoonbeamAssetInfo,
DemocracyStandardAccountVote,
IEthCrossAccountId,
+ CollectionFlag,
} from './types';
import {RuntimeDispatchInfo} from '@polkadot/types/interfaces';
import type {Vec} from '@polkadot/types-codec';
import {FrameSystemEventRecord, PalletBalancesIdAmount} from '@polkadot/types/lookup';
+import {arrayUnzip} from '@polkadot/util';
export class CrossAccountId {
Substrate!: TSubstrateAccount;
@@ -1624,6 +1626,17 @@
for(const key of ['name', 'description', 'tokenPrefix']) {
if(typeof collectionOptions[key as 'name' | 'description' | 'tokenPrefix'] === 'string') collectionOptions[key as 'name' | 'description' | 'tokenPrefix'] = this.helper.util.str2vec(collectionOptions[key as 'name' | 'description' | 'tokenPrefix'] as string);
}
+
+ let flags = 0;
+ // convert CollectionFlags to number and join them in one number
+ if(collectionOptions.flags) {
+ for(let i = 0; i < collectionOptions.flags.length; i++){
+ const flag = collectionOptions.flags[i];
+ flags = flags | flag;
+ }
+ }
+ collectionOptions.flags = [flags];
+
const creationResult = await this.helper.executeExtrinsic(
signer,
'api.tx.unique.createCollectionEx', [collectionOptions],