difftreelog
Merge branch 'feature/pallet-structure-rebased' of https://github.com/UniqueNetwork/unique-chain into feature/pallet-structure-rebased
in: master
68 files changed
.maintain/scripts/generate_api.shdiffbeforeafterboth--- a/.maintain/scripts/generate_api.sh
+++ b/.maintain/scripts/generate_api.sh
@@ -7,6 +7,5 @@
sed -n '/=== SNIP START ===/, /=== SNIP END ===/{ /=== SNIP START ===/! { /=== SNIP END ===/! p } }' $tmp > $raw
formatted=$(mktemp)
prettier --use-tabs $raw > $formatted
-solhint --fix $formatted
mv $formatted $OUTPUT
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6391,6 +6391,7 @@
"sp-core",
"sp-runtime",
"sp-std",
+ "struct-versioning",
"up-data-structs",
]
@@ -6508,6 +6509,7 @@
"sp-core",
"sp-runtime",
"sp-std",
+ "struct-versioning",
"up-data-structs",
]
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -30,8 +30,8 @@
// RMRK
use rmrk_rpc::RmrkApi as RmrkRuntimeApi;
use up_data_structs::{
- RmrkCollectionId, RmrkNftId, RmrkBaseId, RmrkNftChild,
- RmrkThemeName, RmrkPropertyKey, RmrkResourceId
+ RmrkCollectionId, RmrkNftId, RmrkBaseId, RmrkNftChild, RmrkThemeName, RmrkPropertyKey,
+ RmrkResourceId,
};
pub use rmrk_unique_rpc::RmrkApi;
@@ -75,13 +75,6 @@
) -> Result<Option<CrossAccountId>>;
#[rpc(name = "unique_constMetadata")]
fn const_metadata(
- &self,
- collection: CollectionId,
- token: TokenId,
- at: Option<BlockHash>,
- ) -> Result<Vec<u8>>;
- #[rpc(name = "unique_variableMetadata")]
- fn variable_metadata(
&self,
collection: CollectionId,
token: TokenId,
@@ -92,7 +85,7 @@
fn collection_properties(
&self,
collection: CollectionId,
- keys: Vec<String>,
+ keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<Property>>;
@@ -101,7 +94,7 @@
&self,
collection: CollectionId,
token_id: TokenId,
- properties: Vec<String>,
+ keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<Property>>;
@@ -109,7 +102,7 @@
fn property_permissions(
&self,
collection: CollectionId,
- keys: Vec<String>,
+ keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<PropertyKeyPermission>>;
@@ -118,7 +111,7 @@
&self,
collection: CollectionId,
token_id: TokenId,
- keys: Vec<String>,
+ keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<TokenData<CrossAccountId>>;
@@ -428,10 +421,6 @@
);
pass_method!(
const_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>, unique_api
- );
- pass_method!(
- variable_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>,
- unique_api
);
pass_method!(total_supply(collection: CollectionId) -> u32, unique_api);
pass_method!(account_balance(collection: CollectionId, account: CrossAccountId) -> u32, unique_api);
@@ -445,7 +434,7 @@
collection: CollectionId,
#[map(|keys| string_keys_to_bytes_keys(keys))]
- keys: Vec<String>
+ keys: Option<Vec<String>>
) -> Vec<Property>, unique_api);
pass_method!(token_properties(
@@ -453,14 +442,14 @@
token_id: TokenId,
#[map(|keys| string_keys_to_bytes_keys(keys))]
- properties: Vec<String>
+ keys: Option<Vec<String>>
) -> Vec<Property>, unique_api);
pass_method!(property_permissions(
collection: CollectionId,
#[map(|keys| string_keys_to_bytes_keys(keys))]
- keys: Vec<String>
+ keys: Option<Vec<String>>
) -> Vec<PropertyKeyPermission>, unique_api);
pass_method!(token_data(
@@ -468,7 +457,7 @@
token_id: TokenId,
#[map(|keys| string_keys_to_bytes_keys(keys))]
- keys: Vec<String>,
+ keys: Option<Vec<String>>,
) -> TokenData<CrossAccountId>, unique_api);
pass_method!(adminlist(collection: CollectionId) -> Vec<CrossAccountId>, unique_api);
@@ -549,6 +538,6 @@
pass_method!(theme(base_id: RmrkBaseId, theme_name: RmrkThemeName, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Option<Theme>, rmrk_api);
}
-fn string_keys_to_bytes_keys(keys: Vec<String>) -> Vec<Vec<u8>> {
- keys.into_iter().map(|key| key.into_bytes()).collect()
+fn string_keys_to_bytes_keys(keys: Option<Vec<String>>) -> Option<Vec<Vec<u8>>> {
+ keys.map(|keys| keys.into_iter().map(|key| key.into_bytes()).collect())
}
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -65,25 +65,12 @@
use fc_rpc_core::types::FilterPool;
use fc_mapping_sync::{MappingSyncWorker, SyncStrategy};
-use unique_runtime_common::types::{
- AuraId,
- RuntimeInstance,
- AccountId,
- Balance,
- Index,
- Hash,
- Block,
-};
+use unique_runtime_common::types::{AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block};
// RMRK
use up_data_structs::{
- RmrkCollectionInfo,
- RmrkInstanceInfo,
- RmrkResourceInfo,
- RmrkPropertyInfo,
- RmrkBaseInfo,
- RmrkPartType,
- RmrkTheme,
+ RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo,
+ RmrkPartType, RmrkTheme,
};
/// Unique native executor instance.
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -41,17 +41,12 @@
use std::{collections::BTreeMap, sync::Arc};
use unique_runtime_common::types::{
- Hash,
- AccountId,
- RuntimeInstance,
- Index,
- Block,
- BlockNumber,
- Balance,
+ Hash, AccountId, RuntimeInstance, Index, Block, BlockNumber, Balance,
};
// RMRK
use up_data_structs::{
- RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo, RmrkPartType, RmrkTheme,
+ RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo,
+ RmrkPartType, RmrkTheme,
};
/// Public io handler for exporting into other modules
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -21,7 +21,7 @@
use sp_std::vec::Vec;
use up_data_structs::Property;
-use crate::{Pallet, CollectionHandle, Config};
+use crate::{Pallet, CollectionHandle, Config, CollectionProperties};
/// Does not always represent a full collection, for RFT it is either
/// collection (Implementing ERC721), or specific collection token (Implementing ERC20)
@@ -33,24 +33,35 @@
#[solidity_interface(name = "CollectionProperties")]
impl<T: Config> CollectionHandle<T> {
- fn set_property(&mut self, caller: caller, key: string, value: string) -> Result<()> {
- <Pallet<T>>::set_collection_property(
- self,
- &T::CrossAccountId::from_eth(caller),
- Property {
- key: <Vec<u8>>::from(key)
- .try_into()
- .map_err(|_| "key too large")?,
- value: <Vec<u8>>::from(value)
- .try_into()
- .map_err(|_| "value too large")?,
- },
- )
- .map_err(dispatch_to_evm::<T>)?;
- Ok(())
+ fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too large")?;
+ let value = value.try_into().map_err(|_| "value too large")?;
+
+ <Pallet<T>>::set_collection_property(self, &caller, Property { key, value })
+ .map_err(dispatch_to_evm::<T>)
}
- fn delete_property(&mut self, caller: caller, key: string) -> Result<()> {
- self.set_property(caller, key, string::new())
+ fn delete_collection_property(&mut self, caller: caller, key: string) -> Result<()> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too large")?;
+
+ <Pallet<T>>::delete_collection_property(self, &caller, key).map_err(dispatch_to_evm::<T>)
+ }
+
+ /// Throws error if key not found
+ fn collection_property(&self, key: string) -> Result<bytes> {
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too large")?;
+
+ let props = <CollectionProperties<T>>::get(self.id);
+ let prop = props.get(&key).ok_or("key not found")?;
+
+ Ok(prop.to_vec())
}
}
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -22,23 +22,56 @@
use pallet_evm::account::CrossAccountId;
use frame_support::{
dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},
- ensure, fail,
+ ensure,
traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},
BoundedVec,
weights::Pays,
+ transactional,
};
use pallet_evm::GasWeightMapping;
use up_data_structs::{
- COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionId, CreateItemData,
- MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, TokenId,
- CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
- FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT,
- CUSTOM_DATA_LIMIT, CollectionLimits, CustomDataLimit, CreateCollectionData, SponsorshipState,
- CreateItemExData, SponsoringRateLimit, budget::Budget, COLLECTION_FIELD_LIMIT, CollectionField,
- PhantomType, Property, Properties, PropertiesPermissionMap, PropertyKey, PropertyPermission,
- PropertiesError, PropertyKeyPermission, TokenData, TrySet,
+ COLLECTION_NUMBER_LIMIT,
+ Collection,
+ RpcCollection,
+ CollectionId,
+ CreateItemData,
+ MAX_TOKEN_PREFIX_LENGTH,
+ COLLECTION_ADMINS_LIMIT,
+ TokenId,
+ 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,
+ COLLECTION_FIELD_LIMIT,
+ CollectionField,
+ PhantomType,
+ Property,
+ Properties,
+ PropertiesPermissionMap,
+ PropertyKey,
+ PropertyPermission,
+ PropertiesError,
+ PropertyKeyPermission,
+ TokenData,
+ TrySetProperty,
// RMRK
- RmrkCollectionInfo, RmrkInstanceInfo, RmrkResourceInfo, RmrkPropertyInfo, RmrkBaseInfo, RmrkPartType, RmrkTheme,
+ RmrkCollectionInfo,
+ RmrkInstanceInfo,
+ RmrkResourceInfo,
+ RmrkPropertyInfo,
+ RmrkBaseInfo,
+ RmrkPartType,
+ RmrkTheme,
RmrkNftChild,
};
@@ -138,21 +171,6 @@
<Error<T>>::AddressNotInAllowlist
);
Ok(())
- }
-
- pub fn check_can_update_meta(
- &self,
- subject: &T::CrossAccountId,
- item_owner: &T::CrossAccountId,
- ) -> DispatchResult {
- match self.meta_update_permission {
- MetaUpdatePermission::ItemOwner => {
- ensure!(subject == item_owner, <Error<T>>::NoPermission);
- Ok(())
- }
- MetaUpdatePermission::Admin => self.check_is_owner_or_admin(subject),
- MetaUpdatePermission::None => fail!(<Error<T>>::NoPermission),
- }
}
}
@@ -316,8 +334,6 @@
CollectionTokenPrefixLimitExceeded,
/// Total collections bound exceeded.
TotalCollectionsLimitExceeded,
- /// variable_data exceeded data limit.
- TokenVariableDataLimitExceeded,
/// Exceeded max admin count
CollectionAdminCountExceeded,
/// Collection limit bounds per collection exceeded
@@ -366,8 +382,8 @@
/// Tried to store more property keys than allowed
PropertyLimitReached,
- /// Unable to read array of unbounded keys
- UnableToReadUnboundedKeys,
+ /// Property key is too long
+ PropertyKeyIsTooLong,
/// Only ASCII letters, digits, and '_', '-' are allowed
InvalidCharacterInPropertyKey,
@@ -580,7 +596,6 @@
schema_version,
sponsorship,
limits,
- meta_update_permission,
} = <CollectionById<T>>::get(collection)?;
let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)
@@ -610,7 +625,6 @@
schema_version,
sponsorship,
limits,
- meta_update_permission,
offchain_schema: <CollectionData<T>>::get((
collection,
CollectionField::OffchainSchema,
@@ -671,7 +685,6 @@
.limits
.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))
.unwrap_or_else(|| Ok(CollectionLimits::default()))?,
- meta_update_permission: data.meta_update_permission.unwrap_or_default(),
};
let mut collection_properties = up_data_structs::CollectionProperties::get();
@@ -775,6 +788,7 @@
Ok(())
}
+ #[transactional]
pub fn set_collection_properties(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
@@ -807,6 +821,7 @@
Ok(())
}
+ #[transactional]
pub fn delete_collection_properties(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
@@ -849,6 +864,7 @@
Ok(())
}
+ #[transactional]
pub fn set_property_permissions(
collection: &CollectionHandle<T>,
sender: &T::CrossAccountId,
@@ -867,60 +883,69 @@
keys.into_iter()
.map(|key| -> Result<PropertyKey, DispatchError> {
key.try_into()
- .map_err(|_| <Error<T>>::UnableToReadUnboundedKeys.into())
+ .map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())
})
.collect::<Result<Vec<PropertyKey>, DispatchError>>()
- }
-
- pub fn check_property_key(key: &PropertyKey) -> Result<(), DispatchError> {
- let key_str = sp_std::str::from_utf8(key.as_slice())
- .map_err(|_| <Error<T>>::InvalidCharacterInPropertyKey)?;
-
- for ch in key_str.chars() {
- if !ch.is_ascii_alphanumeric() && ch != '_' && ch != '-' {
- return Err(<Error<T>>::InvalidCharacterInPropertyKey.into());
- }
- }
-
- Ok(())
}
pub fn filter_collection_properties(
collection_id: CollectionId,
- keys: Vec<PropertyKey>,
+ keys: Option<Vec<PropertyKey>>,
) -> Result<Vec<Property>, DispatchError> {
let properties = Self::collection_properties(collection_id);
let properties = keys
- .into_iter()
- .filter_map(|key| {
- properties.get(&key).map(|value| Property {
- key,
- value: value.clone(),
- })
+ .map(|keys| {
+ keys.into_iter()
+ .filter_map(|key| {
+ properties.get(&key).map(|value| Property {
+ key,
+ value: value.clone(),
+ })
+ })
+ .collect()
})
- .collect();
+ .unwrap_or_else(|| {
+ properties
+ .iter()
+ .map(|(key, value)| Property {
+ key: key.clone(),
+ value: value.clone(),
+ })
+ .collect()
+ });
Ok(properties)
}
pub fn filter_property_permissions(
collection_id: CollectionId,
- keys: Vec<PropertyKey>,
+ keys: Option<Vec<PropertyKey>>,
) -> Result<Vec<PropertyKeyPermission>, DispatchError> {
let permissions = Self::property_permissions(collection_id);
let key_permissions = keys
- .into_iter()
- .filter_map(|key| {
+ .map(|keys| {
+ keys.into_iter()
+ .filter_map(|key| {
+ permissions
+ .get(&key)
+ .map(|permission| PropertyKeyPermission {
+ key,
+ permission: permission.clone(),
+ })
+ })
+ .collect()
+ })
+ .unwrap_or_else(|| {
permissions
- .get(&key)
- .map(|permission| PropertyKeyPermission {
- key,
+ .iter()
+ .map(|(key, permission)| PropertyKeyPermission {
+ key: key.clone(),
permission: permission.clone(),
})
- })
- .collect();
+ .collect()
+ });
Ok(key_permissions)
}
@@ -1086,7 +1111,6 @@
fn approve() -> Weight;
fn transfer_from() -> Weight;
fn burn_from() -> Weight;
- fn set_variable_metadata(bytes: u32) -> Weight;
}
pub trait CommonCollectionOperations<T: Config> {
@@ -1174,13 +1198,6 @@
token: TokenId,
amount: u128,
nesting_budget: &dyn Budget,
- ) -> DispatchResultWithPostInfo;
-
- fn set_variable_metadata(
- &self,
- sender: T::CrossAccountId,
- token: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo;
fn check_nesting(
@@ -1198,8 +1215,7 @@
fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;
fn const_metadata(&self, token: TokenId) -> Vec<u8>;
- fn variable_metadata(&self, token: TokenId) -> Vec<u8>;
- fn token_properties(&self, token_id: TokenId, keys: Vec<PropertyKey>) -> Vec<Property>;
+ fn token_properties(&self, token_id: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;
/// Amount of unique collection tokens
fn total_supply(&self) -> u32;
/// Amount of different tokens account has (Applicable to nonfungible/refungible)
@@ -1232,6 +1248,7 @@
PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,
PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,
PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,
+ PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,
PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,
}
}
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/common.rsdiffbeforeafterboth--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -16,12 +16,12 @@
use core::marker::PhantomData;
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
use up_data_structs::{TokenId, CollectionId, CreateItemExData, budget::Budget};
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::ArithmeticError;
use sp_std::{vec::Vec, vec};
-use up_data_structs::{CustomDataLimit, Property, PropertyKey, PropertyKeyPermission};
+use up_data_structs::{Property, PropertyKey, PropertyKeyPermission};
use crate::{
Allowance, Balance, Config, Error, FungibleHandle, Pallet, SelfWeightOf, weights::WeightInfo,
@@ -84,11 +84,6 @@
fn burn_from() -> Weight {
<SelfWeightOf<T>>::burn_from()
- }
-
- fn set_variable_metadata(_bytes: u32) -> Weight {
- // Error
- 0
}
}
@@ -287,15 +282,6 @@
fail!(<Error<T>>::SettingPropertiesNotAllowed)
}
- fn set_variable_metadata(
- &self,
- _sender: T::CrossAccountId,
- _token: TokenId,
- _data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResultWithPostInfo {
- fail!(<Error<T>>::FungibleItemsDontHaveData)
- }
-
fn check_nesting(
&self,
_sender: <T>::CrossAccountId,
@@ -330,13 +316,14 @@
None
}
fn const_metadata(&self, _token: TokenId) -> Vec<u8> {
- Vec::new()
- }
- fn variable_metadata(&self, _token: TokenId) -> Vec<u8> {
Vec::new()
}
- fn token_properties(&self, _token_id: TokenId, _keys: Vec<PropertyKey>) -> Vec<Property> {
+ fn token_properties(
+ &self,
+ _token_id: TokenId,
+ _keys: Option<Vec<PropertyKey>>,
+ ) -> Vec<Property> {
Vec::new()
}
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
@@ -8,8 +8,13 @@
uint8 dummy;
string stub_error = "this contract is implemented in native";
}
+
contract ERC165 is Dummy {
- function supportsInterface(bytes4 interfaceID) external view returns (bool) {
+ function supportsInterface(bytes4 interfaceID)
+ external
+ view
+ returns (bool)
+ {
require(false, stub_error);
interfaceID;
return true;
@@ -19,24 +24,11 @@
// Inline
contract ERC20Events {
event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(address indexed owner, address indexed spender, uint256 value);
-}
-
-// Selector: 56fd500b
-contract CollectionProperties is Dummy, ERC165 {
- // Selector: setProperty(string,string) 62d9491f
- function setProperty(string memory key, string memory value) public {
- require(false, stub_error);
- key;
- value;
- dummy = 0;
- }
- // Selector: deleteProperty(string) 34241914
- function deleteProperty(string memory key) public {
- require(false, stub_error);
- key;
- dummy = 0;
- }
+ event Approval(
+ address indexed owner,
+ address indexed spender,
+ uint256 value
+ );
}
// Selector: 79cc6790
@@ -59,24 +51,28 @@
dummy;
return "";
}
+
// Selector: symbol() 95d89b41
function symbol() public view returns (string memory) {
require(false, stub_error);
dummy;
return "";
}
+
// Selector: totalSupply() 18160ddd
function totalSupply() public view returns (uint256) {
require(false, stub_error);
dummy;
return 0;
}
+
// Selector: decimals() 313ce567
function decimals() public view returns (uint8) {
require(false, stub_error);
dummy;
return 0;
}
+
// Selector: balanceOf(address) 70a08231
function balanceOf(address owner) public view returns (uint256) {
require(false, stub_error);
@@ -84,6 +80,7 @@
dummy;
return 0;
}
+
// Selector: transfer(address,uint256) a9059cbb
function transfer(address to, uint256 amount) public returns (bool) {
require(false, stub_error);
@@ -92,8 +89,13 @@
dummy = 0;
return false;
}
+
// Selector: transferFrom(address,address,uint256) 23b872dd
- function transferFrom(address from, address to, uint256 amount) public returns (bool) {
+ function transferFrom(
+ address from,
+ address to,
+ uint256 amount
+ ) public returns (bool) {
require(false, stub_error);
from;
to;
@@ -101,6 +103,7 @@
dummy = 0;
return false;
}
+
// Selector: approve(address,uint256) 095ea7b3
function approve(address spender, uint256 amount) public returns (bool) {
require(false, stub_error);
@@ -109,8 +112,13 @@
dummy = 0;
return false;
}
+
// Selector: allowance(address,address) dd62ed3e
- function allowance(address owner, address spender) public view returns (uint256) {
+ function allowance(address owner, address spender)
+ public
+ view
+ returns (uint256)
+ {
require(false, stub_error);
owner;
spender;
@@ -119,6 +127,44 @@
}
}
-contract UniqueFungible is Dummy, ERC165, ERC20, ERC20UniqueExtensions, CollectionProperties {
+// Selector: 9b5e29c5
+contract CollectionProperties is Dummy, ERC165 {
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ public
+ {
+ require(false, stub_error);
+ key;
+ value;
+ dummy = 0;
+ }
+
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) public {
+ require(false, stub_error);
+ key;
+ dummy = 0;
+ }
+
+ // Throws error if key not found
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ public
+ view
+ returns (bytes memory)
+ {
+ require(false, stub_error);
+ key;
+ dummy;
+ return hex"";
+ }
}
+contract UniqueFungible is
+ Dummy,
+ ERC165,
+ ERC20,
+ ERC20UniqueExtensions,
+ CollectionProperties
+{}
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -27,6 +27,7 @@
scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
+struct-versioning = { path = "../../crates/struct-versioning" }
[features]
default = ["std"]
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -28,12 +28,7 @@
fn create_max_item_data<T: Config>(owner: T::CrossAccountId) -> CreateItemData<T> {
let const_data = create_data::<CUSTOM_DATA_LIMIT>();
- let variable_data = create_data::<CUSTOM_DATA_LIMIT>();
- CreateItemData::<T> {
- const_data,
- variable_data,
- owner,
- }
+ CreateItemData::<T> { const_data, owner }
}
fn create_max_item<T: Config>(
collection: &NonfungibleHandle<T>,
@@ -125,14 +120,4 @@
let item = create_max_item(&collection, &owner, sender.clone())?;
<Pallet<T>>::set_allowance(&collection, &sender, item, Some(&burner))?;
}: {<Pallet<T>>::burn_from(&collection, &burner, &sender, item, &Unlimited)?}
-
- set_variable_metadata {
- let b in 0..CUSTOM_DATA_LIMIT;
- bench_init!{
- owner: sub; collection: collection(owner);
- owner: cross_from_sub; sender: cross_sub;
- };
- let item = create_max_item(&collection, &owner, sender.clone())?;
- let data = create_var_data(b).try_into().unwrap();
- }: {<Pallet<T>>::set_variable_metadata(&collection, &sender, item, data)?}
}
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -16,10 +16,10 @@
use core::marker::PhantomData;
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
use up_data_structs::{
- TokenId, CustomDataLimit, CreateItemExData, CollectionId, budget::Budget, Property,
- PropertyKey, PropertyKeyPermission,
+ TokenId, CreateItemExData, CollectionId, budget::Budget, Property, PropertyKey,
+ PropertyKeyPermission,
};
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::DispatchError;
@@ -86,10 +86,6 @@
fn burn_from() -> Weight {
<SelfWeightOf<T>>::burn_from()
}
-
- fn set_variable_metadata(bytes: u32) -> Weight {
- <SelfWeightOf<T>>::set_variable_metadata(bytes)
- }
}
fn map_create_data<T: Config>(
@@ -99,7 +95,6 @@
match data {
up_data_structs::CreateItemData::NFT(data) => Ok(CreateItemData::<T> {
const_data: data.const_data,
- variable_data: data.variable_data,
properties: data.properties,
owner: to.clone(),
}),
@@ -184,7 +179,7 @@
let weight = <CommonWeights<T>>::delete_collection_properties(property_keys.len() as u32);
with_weight(
- <Pallet<T>>::delete_collection_properties(self, &sender, property_keys),
+ <Pallet<T>>::delete_collection_properties(self, sender, property_keys),
weight,
)
}
@@ -327,19 +322,6 @@
}
}
- fn set_variable_metadata(
- &self,
- sender: T::CrossAccountId,
- token: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResultWithPostInfo {
- let len = data.len();
- with_weight(
- <Pallet<T>>::set_variable_metadata(self, &sender, token, data),
- <CommonWeights<T>>::set_variable_metadata(len as u32),
- )
- }
-
fn check_nesting(
&self,
sender: T::CrossAccountId,
@@ -379,24 +361,29 @@
.unwrap_or_default()
.into_inner()
}
- fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
- <TokenData<T>>::get((self.id, token))
- .map(|t| t.variable_data)
- .unwrap_or_default()
- .into_inner()
- }
- fn token_properties(&self, token_id: TokenId, keys: Vec<PropertyKey>) -> Vec<Property> {
+ fn token_properties(&self, token_id: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property> {
let properties = <Pallet<T>>::token_properties((self.id, token_id));
- keys.into_iter()
- .filter_map(|key| {
- properties.get(&key).map(|value| Property {
- key,
+ keys.map(|keys| {
+ keys.into_iter()
+ .filter_map(|key| {
+ properties.get(&key).map(|value| Property {
+ key,
+ value: value.clone(),
+ })
+ })
+ .collect()
+ })
+ .unwrap_or_else(|| {
+ properties
+ .iter()
+ .map(|(key, value)| Property {
+ key: key.clone(),
value: value.clone(),
})
- })
- .collect()
+ .collect()
+ })
}
fn total_supply(&self) -> u32 {
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -21,10 +21,10 @@
};
use evm_coder::{ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*, weight};
use frame_support::BoundedVec;
-use up_data_structs::{TokenId, SchemaVersion};
+use up_data_structs::{TokenId, SchemaVersion, PropertyPermission, PropertyKeyPermission, Property};
use pallet_evm_coder_substrate::dispatch_to_evm;
use sp_core::{H160, U256};
-use sp_std::{vec::Vec, vec};
+use sp_std::vec::Vec;
use pallet_common::{
erc::{CommonEvmHandler, PrecompileResult, CollectionPropertiesCall},
CollectionHandle,
@@ -35,9 +35,80 @@
use crate::{
AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
- SelfWeightOf, weights::WeightInfo,
+ SelfWeightOf, weights::WeightInfo, TokenProperties,
};
+#[solidity_interface(name = "TokenProperties")]
+impl<T: Config> NonfungibleHandle<T> {
+ fn set_token_property_permission(
+ &mut self,
+ caller: caller,
+ key: string,
+ is_mutable: bool,
+ collection_admin: bool,
+ token_owner: bool,
+ ) -> Result<()> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ <Pallet<T>>::set_property_permission(
+ self,
+ &caller,
+ PropertyKeyPermission {
+ key: <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "too long key")?,
+ permission: PropertyPermission {
+ mutable: is_mutable,
+ collection_admin,
+ token_owner,
+ },
+ },
+ )
+ .map_err(dispatch_to_evm::<T>)
+ }
+
+ fn set_property(
+ &mut self,
+ caller: caller,
+ token_id: uint256,
+ key: string,
+ value: bytes,
+ ) -> Result<()> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too long")?;
+ let value = value.try_into().map_err(|_| "value too long")?;
+
+ <Pallet<T>>::set_token_property(self, &caller, TokenId(token_id), Property { key, value })
+ .map_err(dispatch_to_evm::<T>)
+ }
+
+ fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too long")?;
+
+ <Pallet<T>>::delete_token_property(self, &caller, TokenId(token_id), key)
+ .map_err(dispatch_to_evm::<T>)
+ }
+
+ /// Throws error if key not found
+ fn property(&self, token_id: uint256, key: string) -> Result<bytes> {
+ let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+ let key = <Vec<u8>>::from(key)
+ .try_into()
+ .map_err(|_| "key too long")?;
+
+ let props = <TokenProperties<T>>::get((self.id, token_id));
+ let prop = props.get(&key).ok_or("key not found")?;
+
+ Ok(prop.to_vec())
+ }
+}
+
fn error_unsupported_schema_version() -> Error {
alloc::format!(
"Unsupported schema version! Support only {:?}",
@@ -274,7 +345,6 @@
&caller,
CreateItemData::<T> {
const_data: BoundedVec::default(),
- variable_data: BoundedVec::default(),
properties: BoundedVec::default(),
owner: to,
},
@@ -322,7 +392,6 @@
const_data: Vec::<u8>::from(token_uri)
.try_into()
.map_err(|_| "token uri is too long")?,
- variable_data: BoundedVec::default(),
properties: BoundedVec::default(),
owner: to,
},
@@ -387,37 +456,6 @@
.into())
}
- #[weight(<SelfWeightOf<T>>::set_variable_metadata(data.len() as u32))]
- fn set_variable_metadata(
- &mut self,
- caller: caller,
- token_id: uint256,
- data: bytes,
- ) -> Result<void> {
- let caller = T::CrossAccountId::from_eth(caller);
- let token = token_id.try_into()?;
-
- <Pallet<T>>::set_variable_metadata(
- self,
- &caller,
- token,
- data.try_into()
- .map_err(|_| "metadata size exceeded limit")?,
- )
- .map_err(dispatch_to_evm::<T>)?;
- Ok(())
- }
-
- fn get_variable_metadata(&self, token_id: uint256) -> Result<bytes> {
- self.consume_store_reads(1)?;
- let token: TokenId = token_id.try_into()?;
-
- Ok(<TokenData<T>>::get((self.id, token))
- .ok_or("token not found")?
- .variable_data
- .into_inner())
- }
-
#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
@@ -440,7 +478,6 @@
let data = (0..total_tokens)
.map(|_| CreateItemData::<T> {
const_data: BoundedVec::default(),
- variable_data: BoundedVec::default(),
properties: BoundedVec::default(),
owner: to.clone(),
})
@@ -484,7 +521,6 @@
const_data: Vec::<u8>::from(token_uri)
.try_into()
.map_err(|_| "token uri is too long")?,
- variable_data: vec![].try_into().unwrap(),
properties: BoundedVec::default(),
owner: to.clone(),
});
@@ -505,7 +541,8 @@
ERC721UniqueExtensions,
ERC721Mintable,
ERC721Burnable,
- via("CollectionHandle<T>", common_mut, CollectionProperties)
+ via("CollectionHandle<T>", common_mut, CollectionProperties),
+ TokenProperties,
)
)]
impl<T: Config> NonfungibleHandle<T> {}
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -18,11 +18,11 @@
use erc::ERC721Events;
use evm_coder::ToLog;
-use frame_support::{BoundedVec, ensure, fail};
+use frame_support::{BoundedVec, ensure, fail, transactional};
use up_data_structs::{
AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
mapping::TokenAddressMapping, NestingRule, budget::Budget, Property, PropertyPermission,
- PropertyKey, PropertyKeyPermission, Properties, TrySet,
+ PropertyKey, PropertyKeyPermission, Properties, TrySetProperty,
};
use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
use pallet_common::{
@@ -49,17 +49,24 @@
pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
+#[struct_versioning::versioned(version = 2, upper)]
#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]
pub struct ItemData<CrossAccountId> {
pub const_data: BoundedVec<u8, CustomDataLimit>,
+
+ #[version(..2)]
pub variable_data: BoundedVec<u8, CustomDataLimit>,
+
pub owner: CrossAccountId,
}
#[frame_support::pallet]
pub mod pallet {
use super::*;
- use frame_support::{Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key};
+ use frame_support::{
+ Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, traits::StorageVersion,
+ };
+ use frame_system::pallet_prelude::*;
use up_data_structs::{CollectionId, TokenId};
use super::weights::WeightInfo;
@@ -78,7 +85,10 @@
type WeightInfo: WeightInfo;
}
+ const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
+
#[pallet::pallet]
+ #[pallet::storage_version(STORAGE_VERSION)]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
@@ -133,6 +143,19 @@
Value = T::CrossAccountId,
QueryKind = OptionQuery,
>;
+
+ #[pallet::hooks]
+ impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
+ fn on_runtime_upgrade() -> Weight {
+ if StorageVersion::get::<Pallet<T>>() < StorageVersion::new(1) {
+ <TokenData<T>>::translate_values::<ItemDataVersion1<T::CrossAccountId>, _>(|v| {
+ Some(<ItemDataVersion2<T::CrossAccountId>>::from(v))
+ })
+ }
+
+ 0
+ }
+ }
}
pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);
@@ -286,6 +309,7 @@
Ok(())
}
+ #[transactional]
pub fn set_token_properties(
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
@@ -329,8 +353,8 @@
) -> DispatchResult {
let permission = <PalletCommon<T>>::property_permissions(collection.id)
.get(property_key)
- .map(|p| p.clone())
- .unwrap_or(PropertyPermission::none());
+ .cloned()
+ .unwrap_or_else(PropertyPermission::none);
let token_data = <TokenData<T>>::get((collection.id, token_id))
.ok_or(<CommonError<T>>::TokenNotFound)?;
@@ -369,6 +393,7 @@
}
}
+ #[transactional]
pub fn delete_token_properties(
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
@@ -406,6 +431,14 @@
<PalletCommon<T>>::set_property_permissions(collection, sender, property_permissions)
}
+ pub fn set_property_permission(
+ collection: &CollectionHandle<T>,
+ sender: &T::CrossAccountId,
+ permission: PropertyKeyPermission,
+ ) -> DispatchResult {
+ <PalletCommon<T>>::set_property_permission(collection, sender, permission)
+ }
+
pub fn transfer(
collection: &NonfungibleHandle<T>,
from: &T::CrossAccountId,
@@ -577,7 +610,6 @@
(collection.id, token),
ItemData {
const_data: data.const_data,
- variable_data: data.variable_data,
owner: data.owner.clone(),
},
);
@@ -773,28 +805,6 @@
// =========
Self::burn(collection, from, token)
- }
-
- pub fn set_variable_metadata(
- collection: &NonfungibleHandle<T>,
- sender: &T::CrossAccountId,
- token: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResult {
- let token_data =
- <TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;
- collection.check_can_update_meta(sender, &token_data.owner)?;
-
- // =========
-
- <TokenData<T>>::insert(
- (collection.id, token),
- ItemData {
- variable_data: data,
- ..token_data
- },
- );
- Ok(())
}
pub fn check_nesting(
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
@@ -51,6 +51,60 @@
event MintingFinished();
}
+// Selector: 41369377
+contract TokenProperties is Dummy, ERC165 {
+ // Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+ function setTokenPropertyPermission(
+ string memory key,
+ bool isMutable,
+ bool collectionAdmin,
+ bool tokenOwner
+ ) public {
+ require(false, stub_error);
+ key;
+ isMutable;
+ collectionAdmin;
+ tokenOwner;
+ dummy = 0;
+ }
+
+ // Selector: setProperty(uint256,string,bytes) 1752d67b
+ function setProperty(
+ uint256 tokenId,
+ string memory key,
+ bytes memory value
+ ) public {
+ require(false, stub_error);
+ tokenId;
+ key;
+ value;
+ dummy = 0;
+ }
+
+ // Selector: deleteProperty(uint256,string) 066111d1
+ function deleteProperty(uint256 tokenId, string memory key) public {
+ require(false, stub_error);
+ tokenId;
+ key;
+ dummy = 0;
+ }
+
+ // Throws error if key not found
+ //
+ // Selector: property(uint256,string) 7228c327
+ function property(uint256 tokenId, string memory key)
+ public
+ view
+ returns (bytes memory)
+ {
+ require(false, stub_error);
+ tokenId;
+ key;
+ dummy;
+ return hex"";
+ }
+}
+
// Selector: 42966c68
contract ERC721Burnable is Dummy, ERC165 {
// Selector: burn(uint256) 42966c68
@@ -276,7 +330,41 @@
}
}
-// Selector: e562194d
+// Selector: 9b5e29c5
+contract CollectionProperties is Dummy, ERC165 {
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ public
+ {
+ require(false, stub_error);
+ key;
+ value;
+ dummy = 0;
+ }
+
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) public {
+ require(false, stub_error);
+ key;
+ dummy = 0;
+ }
+
+ // Throws error if key not found
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ public
+ view
+ returns (bytes memory)
+ {
+ require(false, stub_error);
+ key;
+ dummy;
+ return hex"";
+ }
+}
+
+// Selector: d74d154f
contract ERC721UniqueExtensions is Dummy, ERC165 {
// Selector: transfer(address,uint256) a9059cbb
function transfer(address to, uint256 tokenId) public {
@@ -299,26 +387,6 @@
require(false, stub_error);
dummy;
return 0;
- }
-
- // Selector: setVariableMetadata(uint256,bytes) d4eac26d
- function setVariableMetadata(uint256 tokenId, bytes memory data) public {
- require(false, stub_error);
- tokenId;
- data;
- dummy = 0;
- }
-
- // Selector: getVariableMetadata(uint256) e6c5ce6f
- function getVariableMetadata(uint256 tokenId)
- public
- view
- returns (bytes memory)
- {
- require(false, stub_error);
- tokenId;
- dummy;
- return hex"";
}
// Selector: mintBulk(address,uint256[]) 44a9945e
@@ -354,5 +422,7 @@
ERC721Enumerable,
ERC721UniqueExtensions,
ERC721Mintable,
- ERC721Burnable
+ ERC721Burnable,
+ CollectionProperties,
+ TokenProperties
{}
pallets/nonfungible/src/weights.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -45,7 +45,6 @@
fn approve() -> Weight;
fn transfer_from() -> Weight;
fn burn_from() -> Weight;
- fn set_variable_metadata(b: u32, ) -> Weight;
}
/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.
@@ -155,12 +154,6 @@
(27_580_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
- }
- // Storage: Nonfungible TokenData (r:1 w:1)
- fn set_variable_metadata(_b: u32, ) -> Weight {
- (7_700_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(1 as Weight))
- .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
@@ -270,11 +263,5 @@
(27_580_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
- }
- // Storage: Nonfungible TokenData (r:1 w:1)
- fn set_variable_metadata(_b: u32, ) -> Weight {
- (7_700_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(1 as Weight))
- .saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
}
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -24,6 +24,7 @@
scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
+struct-versioning = { path = "../../crates/struct-versioning" }
[features]
default = ["std"]
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -31,10 +31,8 @@
users: impl IntoIterator<Item = (CrossAccountId, u128)>,
) -> CreateRefungibleExData<CrossAccountId> {
let const_data = create_data::<CUSTOM_DATA_LIMIT>();
- let variable_data = create_data::<CUSTOM_DATA_LIMIT>();
CreateRefungibleExData {
const_data,
- variable_data,
users: users
.into_iter()
.collect::<BTreeMap<_, _>>()
@@ -203,14 +201,4 @@
let item = create_max_item(&collection, &owner, [(sender.clone(), 200)])?;
<Pallet<T>>::set_allowance(&collection, &sender, &burner, item, 200)?;
}: {<Pallet<T>>::burn_from(&collection, &burner, &sender, item, 200, &Unlimited)?}
-
- set_variable_metadata {
- let b in 0..CUSTOM_DATA_LIMIT;
- bench_init!{
- owner: sub; collection: collection(owner);
- sender: cross_from_sub(owner);
- };
- let item = create_max_item(&collection, &sender, [(sender.clone(), 200)])?;
- let data = create_var_data(b).try_into().unwrap();
- }: {<Pallet<T>>::set_variable_metadata(&collection, &sender, item, data)?}
}
pallets/refungible/src/common.rsdiffbeforeafterboth--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -17,10 +17,10 @@
use core::marker::PhantomData;
use sp_std::collections::btree_map::BTreeMap;
-use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight, BoundedVec};
+use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight};
use up_data_structs::{
- CollectionId, TokenId, CustomDataLimit, CreateItemExData, CreateRefungibleExData,
- budget::Budget, Property, PropertyKey, PropertyKeyPermission,
+ CollectionId, TokenId, CreateItemExData, CreateRefungibleExData, budget::Budget, Property,
+ PropertyKey, PropertyKeyPermission,
};
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::DispatchError;
@@ -110,10 +110,6 @@
fn burn_from() -> Weight {
<SelfWeightOf<T>>::burn_from()
- }
-
- fn set_variable_metadata(bytes: u32) -> Weight {
- <SelfWeightOf<T>>::set_variable_metadata(bytes)
}
}
@@ -124,7 +120,6 @@
match data {
up_data_structs::CreateItemData::ReFungible(data) => Ok(CreateRefungibleExData {
const_data: data.const_data,
- variable_data: data.variable_data,
users: {
let mut out = BTreeMap::new();
out.insert(to.clone(), data.pieces);
@@ -306,19 +301,6 @@
fail!(<Error<T>>::SettingPropertiesNotAllowed)
}
- fn set_variable_metadata(
- &self,
- sender: T::CrossAccountId,
- token: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResultWithPostInfo {
- let len = data.len();
- with_weight(
- <Pallet<T>>::set_variable_metadata(self, &sender, token, data),
- <CommonWeights<T>>::set_variable_metadata(len as u32),
- )
- }
-
fn check_nesting(
&self,
_sender: <T>::CrossAccountId,
@@ -357,13 +339,12 @@
.const_data
.into_inner()
}
- fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
- <TokenData<T>>::get((self.id, token))
- .variable_data
- .into_inner()
- }
- fn token_properties(&self, _token_id: TokenId, _keys: Vec<PropertyKey>) -> Vec<Property> {
+ fn token_properties(
+ &self,
+ _token_id: TokenId,
+ _keys: Option<Vec<PropertyKey>>,
+ ) -> Vec<Property> {
Vec::new()
}
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -41,16 +41,23 @@
pub mod weights;
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
+#[struct_versioning::versioned(version = 2, upper)]
#[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]
pub struct ItemData {
pub const_data: BoundedVec<u8, CustomDataLimit>,
+
+ #[version(..2)]
pub variable_data: BoundedVec<u8, CustomDataLimit>,
}
#[frame_support::pallet]
pub mod pallet {
use super::*;
- use frame_support::{Blake2_128, Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key};
+ use frame_support::{
+ Blake2_128, Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key,
+ traits::StorageVersion,
+ };
+ use frame_system::pallet_prelude::*;
use up_data_structs::{CollectionId, TokenId};
use super::weights::WeightInfo;
@@ -73,7 +80,10 @@
type WeightInfo: WeightInfo;
}
+ const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
+
#[pallet::pallet]
+ #[pallet::storage_version(STORAGE_VERSION)]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
@@ -146,6 +156,19 @@
Value = u128,
QueryKind = ValueQuery,
>;
+
+ #[pallet::hooks]
+ impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
+ fn on_runtime_upgrade() -> Weight {
+ if StorageVersion::get::<Pallet<T>>() < StorageVersion::new(1) {
+ <TokenData<T>>::translate_values::<ItemDataVersion1, _>(|v| {
+ Some(<ItemDataVersion2>::from(v))
+ })
+ }
+
+ 0
+ }
+ }
}
pub struct RefungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);
@@ -494,7 +517,6 @@
(collection.id, token_id),
ItemData {
const_data: token.const_data,
- variable_data: token.variable_data,
},
);
for (user, amount) in token.users.into_iter() {
@@ -643,31 +665,6 @@
if let Some(allowance) = allowance {
Self::set_allowance_unchecked(collection, from, spender, token, allowance);
}
- Ok(())
- }
-
- pub fn set_variable_metadata(
- collection: &RefungibleHandle<T>,
- sender: &T::CrossAccountId,
- token: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResult {
- collection.check_can_update_meta(
- sender,
- &T::CrossAccountId::from_sub(collection.owner.clone()),
- )?;
-
- let token_data = <TokenData<T>>::get((collection.id, token));
-
- // =========
-
- <TokenData<T>>::insert(
- (collection.id, token),
- ItemData {
- variable_data: data,
- ..token_data
- },
- );
Ok(())
}
pallets/refungible/src/weights.rsdiffbeforeafterboth--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/src/weights.rs
@@ -53,7 +53,6 @@
fn transfer_from_removing() -> Weight;
fn transfer_from_creating_removing() -> Weight;
fn burn_from() -> Weight;
- fn set_variable_metadata(b: u32, ) -> Weight;
}
/// Weights for pallet_refungible using the Substrate node and recommended hardware.
@@ -242,12 +241,6 @@
(42_043_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
- }
- // Storage: Refungible TokenData (r:1 w:1)
- fn set_variable_metadata(_b: u32, ) -> Weight {
- (7_364_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(1 as Weight))
- .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
@@ -436,11 +429,5 @@
(42_043_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(7 as Weight))
- }
- // Storage: Refungible TokenData (r:1 w:1)
- fn set_variable_metadata(_b: u32, ) -> Weight {
- (7_364_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(1 as Weight))
- .saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
}
pallets/unique/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -168,9 +168,4 @@
nesting_rule: None,
};
}: set_collection_limits(RawOrigin::Signed(caller.clone()), collection, cl)
-
- set_meta_update_permission_flag {
- let caller: T::AccountId = account("caller", 0, SEED);
- let collection = create_nft_collection::<T>(caller.clone())?;
- }: _(RawOrigin::Signed(caller.clone()), collection, MetaUpdatePermission::Admin)
}
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -35,16 +35,16 @@
use frame_system::{self as system, ensure_signed};
use sp_runtime::{sp_std::prelude::Vec};
use up_data_structs::{
- CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT,
- MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
- AccessMode, CreateItemData, CollectionLimits, CollectionId, CollectionMode, TokenId,
- SchemaVersion, SponsorshipState, MetaUpdatePermission, CreateCollectionData, CustomDataLimit,
- CreateItemExData, budget, CollectionField, Property, PropertyKey, PropertyKeyPermission,
+ CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT, MAX_COLLECTION_NAME_LENGTH,
+ MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH, AccessMode, CreateItemData,
+ CollectionLimits, CollectionId, CollectionMode, TokenId, SchemaVersion, SponsorshipState,
+ CreateCollectionData, CreateItemExData, budget, CollectionField, Property, PropertyKey,
+ PropertyKeyPermission,
};
use pallet_evm::account::CrossAccountId;
use pallet_common::{
- CollectionHandle, Pallet as PalletCommon, Error as CommonError, CommonWeightInfo,
- dispatch::dispatch_call, dispatch::CollectionDispatch,
+ CollectionHandle, Pallet as PalletCommon, CommonWeightInfo, dispatch::dispatch_call,
+ dispatch::CollectionDispatch,
};
#[cfg(feature = "runtime-benchmarks")]
@@ -240,7 +240,9 @@
/// Variable metadata sponsoring
/// Collection id (controlled?2), token id (controlled?2)
+ #[deprecated]
pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
+
/// Approval sponsoring
pub NftApproveBasket get(fn nft_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
pub FungibleApproveBasket get(fn fungible_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;
@@ -261,6 +263,14 @@
0
}
+ fn on_runtime_upgrade() -> Weight {
+ let limit = None;
+
+ <VariableMetaDataBasket<T>>::remove_all(limit);
+
+ 0
+ }
+
/// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner of the collection is set to the address that signed the transaction and can be changed later.
///
/// # Permissions
@@ -333,7 +343,6 @@
<FungibleTransferBasket<T>>::remove_prefix(collection_id, None);
<ReFungibleTransferBasket<T>>::remove_prefix((collection_id,), None);
- <VariableMetaDataBasket<T>>::remove_prefix(collection_id, None);
<NftApproveBasket<T>>::remove_prefix(collection_id, None);
<FungibleApproveBasket<T>>::remove_prefix(collection_id, None);
<RefungibleApproveBasket<T>>::remove_prefix((collection_id,), None);
@@ -929,59 +938,6 @@
let budget = budget::Value::new(2);
dispatch_call::<T, _>(collection_id, |d| d.transfer_from(sender, from, recipient, item_id, value, &budget))
- }
-
- /// Set off-chain data schema.
- ///
- /// # Permissions
- ///
- /// * Collection Owner
- /// * Collection Admin
- ///
- /// # Arguments
- ///
- /// * collection_id.
- ///
- /// * schema: String representing the offchain data schema.
- #[weight = T::CommonWeightInfo::set_variable_metadata(data.len() as u32)]
- #[transactional]
- pub fn set_variable_meta_data (
- origin,
- collection_id: CollectionId,
- item_id: TokenId,
- data: BoundedVec<u8, CustomDataLimit>,
- ) -> DispatchResultWithPostInfo {
- let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
-
- dispatch_call::<T, _>(collection_id, |d| d.set_variable_metadata(sender, item_id, data))
- }
-
- /// Set meta_update_permission value for particular collection
- ///
- /// # Permissions
- ///
- /// * Collection Owner.
- ///
- /// # Arguments
- ///
- /// * collection_id: ID of the collection.
- ///
- /// * value: New flag value.
- #[weight = <SelfWeightOf<T>>::set_meta_update_permission_flag()]
- #[transactional]
- pub fn set_meta_update_permission_flag(origin, collection_id: CollectionId, value: MetaUpdatePermission) -> DispatchResult {
- let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
-
- ensure!(
- target_collection.meta_update_permission != MetaUpdatePermission::None,
- <CommonError<T>>::MetadataFlagFrozen,
- );
- target_collection.check_is_owner(&sender)?;
-
- target_collection.meta_update_permission = value;
-
- target_collection.save()
}
/// Set schema standard
pallets/unique/src/weights.rsdiffbeforeafterboth--- a/pallets/unique/src/weights.rs
+++ b/pallets/unique/src/weights.rs
@@ -49,7 +49,6 @@
fn set_const_on_chain_schema(b: u32, ) -> Weight;
fn set_schema_version() -> Weight;
fn set_collection_limits() -> Weight;
- fn set_meta_update_permission_flag() -> Weight;
}
/// Weights for pallet_unique using the Substrate node and recommended hardware.
@@ -167,12 +166,6 @@
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_limits() -> Weight {
(15_339_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(1 as Weight))
- .saturating_add(T::DbWeight::get().writes(1 as Weight))
- }
- // Storage: Common CollectionById (r:1 w:1)
- fn set_meta_update_permission_flag() -> Weight {
- (7_214_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -292,12 +285,6 @@
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_limits() -> Weight {
(15_339_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(1 as Weight))
- .saturating_add(RocksDbWeight::get().writes(1 as Weight))
- }
- // Storage: Common CollectionById (r:1 w:1)
- fn set_meta_update_permission_flag() -> Weight {
- (7_214_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -22,7 +22,8 @@
};
use frame_support::{
storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet},
- traits::Get, parameter_types,
+ traits::Get,
+ parameter_types,
};
#[cfg(feature = "serde")]
@@ -40,7 +41,10 @@
CollectionInfo, NftInfo, ResourceInfo, PropertyInfo, BaseInfo, PartType, Theme, ThemeProperty,
};
pub use rmrk_types::{
- primitives::{CollectionId as RmrkCollectionId, NftId as RmrkNftId, BaseId as RmrkBaseId, PartId as RmrkPartId, ResourceId as RmrkResourceId},
+ primitives::{
+ CollectionId as RmrkCollectionId, NftId as RmrkNftId, BaseId as RmrkBaseId,
+ PartId as RmrkPartId, ResourceId as RmrkResourceId,
+ },
NftChild as RmrkNftChild, AccountIdOrCollectionNftTuple as RmrkAccountIdOrCollectionNftTuple,
};
@@ -85,6 +89,7 @@
// Schema limits
pub const OFFCHAIN_SCHEMA_LIMIT: u32 = 8192;
+pub const VARIABLE_ON_CHAIN_SCHEMA_LIMIT: u32 = 8192;
pub const CONST_ON_CHAIN_SCHEMA_LIMIT: u32 = 32768;
pub const COLLECTION_FIELD_LIMIT: u32 = CONST_ON_CHAIN_SCHEMA_LIMIT;
@@ -318,8 +323,12 @@
pub limits: CollectionLimitsVersion2,
#[version(..2)]
+ pub variable_on_chain_schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>,
+
+ #[version(..2)]
pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
+ #[version(..2)]
pub meta_update_permission: MetaUpdatePermission,
}
@@ -339,7 +348,6 @@
pub sponsorship: SponsorshipState<AccountId>,
pub limits: CollectionLimits,
pub const_on_chain_schema: Vec<u8>,
- pub meta_update_permission: MetaUpdatePermission,
pub token_property_permissions: Vec<PropertyKeyPermission>,
pub properties: Vec<Property>,
}
@@ -365,7 +373,6 @@
pub pending_sponsor: Option<AccountId>,
pub limits: Option<CollectionLimits>,
pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
- pub meta_update_permission: Option<MetaUpdatePermission>,
pub token_property_permissions: CollectionPropertiesPermissionsVec,
pub properties: CollectionPropertiesVec,
}
@@ -376,28 +383,6 @@
pub type CollectionPropertiesVec =
BoundedVec<Property, ConstU32<MAX_COLLECTION_PROPERTIES_ENCODE_LEN>>;
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
-pub struct NftItemType<AccountId> {
- pub owner: AccountId,
- pub const_data: Vec<u8>,
- pub variable_data: Vec<u8>,
-}
-
-#[derive(Encode, Decode, Default, Debug, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
-pub struct FungibleItemType {
- pub value: u128,
-}
-
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
-#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
-pub struct ReFungibleItemType<AccountId> {
- pub owner: Vec<Ownership<AccountId>>,
- pub const_data: Vec<u8>,
- pub variable_data: Vec<u8>,
-}
-
/// All fields are wrapped in `Option`s, where None means chain default
#[struct_versioning::versioned(version = 2, upper)]
#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
@@ -405,6 +390,8 @@
pub struct CollectionLimits {
pub account_token_ownership_limit: Option<u32>,
pub sponsored_data_size: Option<u32>,
+
+ /// FIXME should we delete this or repurpose it?
/// None - setVariableMetadata is not sponsored
/// Some(v) - setVariableMetadata is sponsored
/// if there is v block between txs
@@ -502,9 +489,6 @@
#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
#[derivative(Debug(format_with = "bounded::vec_debug"))]
pub const_data: BoundedVec<u8, CustomDataLimit>,
- #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
- #[derivative(Debug(format_with = "bounded::vec_debug"))]
- pub variable_data: BoundedVec<u8, CustomDataLimit>,
#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
#[derivative(Debug(format_with = "bounded::vec_debug"))]
@@ -524,26 +508,16 @@
#[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
#[derivative(Debug(format_with = "bounded::vec_debug"))]
pub const_data: BoundedVec<u8, CustomDataLimit>,
- #[cfg_attr(feature = "serde1", serde(with = "bounded::vec_serde"))]
- #[derivative(Debug(format_with = "bounded::vec_debug"))]
- pub variable_data: BoundedVec<u8, CustomDataLimit>,
pub pieces: u128,
}
#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum MetaUpdatePermission {
ItemOwner,
Admin,
None,
}
-impl Default for MetaUpdatePermission {
- fn default() -> Self {
- Self::ItemOwner
- }
-}
-
#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enum CreateItemData {
@@ -557,8 +531,6 @@
pub struct CreateNftExData<CrossAccountId> {
#[derivative(Debug(format_with = "bounded::vec_debug"))]
pub const_data: BoundedVec<u8, CustomDataLimit>,
- #[derivative(Debug(format_with = "bounded::vec_debug"))]
- pub variable_data: BoundedVec<u8, CustomDataLimit>,
#[derivative(Debug(format_with = "bounded::vec_debug"))]
pub properties: CollectionPropertiesVec,
pub owner: CrossAccountId,
@@ -569,8 +541,6 @@
pub struct CreateRefungibleExData<CrossAccountId> {
#[derivative(Debug(format_with = "bounded::vec_debug"))]
pub const_data: BoundedVec<u8, CustomDataLimit>,
- #[derivative(Debug(format_with = "bounded::vec_debug"))]
- pub variable_data: BoundedVec<u8, CustomDataLimit>,
#[derivative(Debug(format_with = "bounded::map_debug"))]
pub users: BoundedBTreeMap<CrossAccountId, u128, ConstU32<MAX_ITEMS_PER_BATCH>>,
}
@@ -598,8 +568,8 @@
impl CreateItemData {
pub fn data_size(&self) -> usize {
match self {
- CreateItemData::NFT(data) => data.variable_data.len() + data.const_data.len(),
- CreateItemData::ReFungible(data) => data.variable_data.len() + data.const_data.len(),
+ CreateItemData::NFT(data) => data.const_data.len(),
+ CreateItemData::ReFungible(data) => data.const_data.len(),
_ => 0,
}
}
@@ -700,24 +670,65 @@
NoSpaceForProperty,
PropertyLimitReached,
InvalidCharacterInPropertyKey,
+ PropertyKeyIsTooLong,
EmptyPropertyKey,
}
-pub trait TrySet: Sized {
+#[derive(Clone, Copy)]
+pub enum PropertyScope {
+ None,
+ Rmrk,
+}
+
+impl PropertyScope {
+ fn apply(self, key: PropertyKey) -> Result<PropertyKey, PropertiesError> {
+ let scope_str: &[u8] = match self {
+ Self::None => return Ok(key),
+ Self::Rmrk => b"rmrk",
+ };
+
+ [scope_str, b":", key.as_slice()]
+ .concat()
+ .try_into()
+ .map_err(|_| PropertiesError::PropertyKeyIsTooLong)
+ }
+}
+
+pub trait TrySetProperty: Sized {
type Value;
- fn try_set(&mut self, key: PropertyKey, value: Self::Value) -> Result<(), PropertiesError>;
+ fn try_scoped_set(
+ &mut self,
+ scope: PropertyScope,
+ key: PropertyKey,
+ value: Self::Value,
+ ) -> Result<(), PropertiesError>;
- fn try_set_from_iter<I>(&mut self, iter: I) -> Result<(), PropertiesError>
+ fn try_scoped_set_from_iter<I>(
+ &mut self,
+ scope: PropertyScope,
+ iter: I,
+ ) -> Result<(), PropertiesError>
where
I: Iterator<Item = (PropertyKey, Self::Value)>,
{
for (key, value) in iter {
- self.try_set(key, value)?;
+ self.try_scoped_set(scope, key, value)?;
}
Ok(())
}
+
+ fn try_set(&mut self, key: PropertyKey, value: Self::Value) -> Result<(), PropertiesError> {
+ self.try_scoped_set(PropertyScope::None, key, value)
+ }
+
+ fn try_set_from_iter<I>(&mut self, iter: I) -> Result<(), PropertiesError>
+ where
+ I: Iterator<Item = (PropertyKey, Self::Value)>,
+ {
+ self.try_scoped_set_from_iter(PropertyScope::None, iter)
+ }
}
#[derive(Encode, Decode, TypeInfo, Derivative, Clone, PartialEq, MaxEncodedLen)]
@@ -751,12 +762,10 @@
}
for byte in key.as_slice().iter() {
- match char::from_u32(*byte as u32) {
- Some(ch)
- if ch.is_ascii_alphanumeric()
- || ch == '_'
- || ch == '-' => { /* OK */ },
- _ => return Err(PropertiesError::InvalidCharacterInPropertyKey)
+ let byte = *byte;
+
+ if !byte.is_ascii_alphanumeric() && byte != b'_' && byte != b'-' {
+ return Err(PropertiesError::InvalidCharacterInPropertyKey);
}
}
@@ -764,12 +773,18 @@
}
}
-impl<Value> TrySet for PropertiesMap<Value> {
+impl<Value> TrySetProperty for PropertiesMap<Value> {
type Value = Value;
- fn try_set(&mut self, key: PropertyKey, value: Self::Value) -> Result<(), PropertiesError> {
+ fn try_scoped_set(
+ &mut self,
+ scope: PropertyScope,
+ key: PropertyKey,
+ value: Self::Value,
+ ) -> Result<(), PropertiesError> {
Self::check_property_key(&key)?;
+ let key = scope.apply(key)?;
self.0
.try_insert(key, value)
.map_err(|_| PropertiesError::PropertyLimitReached)?;
@@ -816,17 +831,22 @@
}
}
-impl TrySet for Properties {
+impl TrySetProperty for Properties {
type Value = PropertyValue;
- fn try_set(&mut self, key: PropertyKey, value: Self::Value) -> Result<(), PropertiesError> {
+ fn try_scoped_set(
+ &mut self,
+ scope: PropertyScope,
+ key: PropertyKey,
+ value: Self::Value,
+ ) -> Result<(), PropertiesError> {
let value_len = value.len();
if self.consumed_space as usize + value_len > self.space_limit as usize {
return Err(PropertiesError::NoSpaceForProperty);
}
- self.map.try_set(key, value)?;
+ self.map.try_scoped_set(scope, key, value)?;
self.consumed_space += value_len as u32;
@@ -869,34 +889,23 @@
pub const RmrkPartsLimit: u32 = 3;
}
-pub type RmrkCollectionInfo<AccountId> = CollectionInfo<
- RmrkString,
- BoundedVec<u8, RmrkCollectionSymbolLimit>,
- AccountId
->;
-pub type RmrkInstanceInfo<AccountId> = NftInfo<
- AccountId,
- Permill,
- RmrkString
->;
-pub type RmrkResourceInfo = ResourceInfo::<
+pub type RmrkCollectionInfo<AccountId> =
+ CollectionInfo<RmrkString, BoundedVec<u8, RmrkCollectionSymbolLimit>, AccountId>;
+pub type RmrkInstanceInfo<AccountId> = NftInfo<AccountId, Permill, RmrkString>;
+pub type RmrkResourceInfo = ResourceInfo<
BoundedVec<u8, RmrkResourceSymbolLimit>,
RmrkString,
- BoundedVec<RmrkPartId, RmrkPartsLimit>
->;
-pub type RmrkPropertyInfo = PropertyInfo<
- BoundedVec<u8, RmrkKeyLimit>,
- BoundedVec<u8, RmrkValueLimit>
+ BoundedVec<RmrkPartId, RmrkPartsLimit>,
>;
+pub type RmrkPropertyInfo =
+ PropertyInfo<BoundedVec<u8, RmrkKeyLimit>, BoundedVec<u8, RmrkValueLimit>>;
pub type RmrkBaseInfo<AccountId> = BaseInfo<AccountId, RmrkString>;
-pub type RmrkPartType = PartType<
- RmrkString,
- BoundedVec<RmrkCollectionId, RmrkMaxCollectionsEquippablePerPart>
->;
+pub type RmrkPartType =
+ PartType<RmrkString, BoundedVec<RmrkCollectionId, RmrkMaxCollectionsEquippablePerPart>>;
pub type RmrkTheme = Theme<RmrkString, Vec<ThemeProperty<RmrkString>>>;
pub type RmrkRpcString = Vec<u8>;
pub type RmrkThemeName = RmrkRpcString;
pub type RmrkPropertyKey = RmrkRpcString;
-type RmrkString = BoundedVec<u8, RmrkStringLimit>;
\ No newline at end of file
+type RmrkString = BoundedVec<u8, RmrkStringLimit>;
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -42,22 +42,25 @@
fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>>;
fn topmost_token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>>;
fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
- fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
- fn collection_properties(collection: CollectionId, properties: Vec<Vec<u8>>) -> Result<Vec<Property>>;
+ fn collection_properties(collection: CollectionId, properties: Option<Vec<Vec<u8>>>) -> Result<Vec<Property>>;
fn token_properties(
collection: CollectionId,
token_id: TokenId,
- properties: Vec<Vec<u8>>
+ properties: Option<Vec<Vec<u8>>>
) -> Result<Vec<Property>>;
fn property_permissions(
collection: CollectionId,
- properties: Vec<Vec<u8>>
+ properties: Option<Vec<Vec<u8>>>
) -> Result<Vec<PropertyKeyPermission>>;
- fn token_data(collection: CollectionId, token_id: TokenId, keys: Vec<Vec<u8>>) -> Result<TokenData<CrossAccountId>>;
+ fn token_data(
+ collection: CollectionId,
+ token_id: TokenId,
+ keys: Option<Vec<Vec<u8>>>
+ ) -> Result<TokenData<CrossAccountId>>;
fn total_supply(collection: CollectionId) -> Result<u32>;
fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32>;
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -32,15 +32,14 @@
fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {
dispatch_unique_runtime!(collection.const_metadata(token))
}
- fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {
- dispatch_unique_runtime!(collection.variable_metadata(token))
- }
fn collection_properties(
collection: CollectionId,
- keys: Vec<Vec<u8>>
+ keys: Option<Vec<Vec<u8>>>
) -> Result<Vec<Property>, DispatchError> {
- let keys = pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)?;
+ let keys = keys.map(
+ |keys| pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)
+ ).transpose()?;
pallet_common::Pallet::<Runtime>::filter_collection_properties(collection, keys)
}
@@ -48,17 +47,22 @@
fn token_properties(
collection: CollectionId,
token_id: TokenId,
- keys: Vec<Vec<u8>>
+ keys: Option<Vec<Vec<u8>>>
) -> Result<Vec<Property>, DispatchError> {
- let keys = pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)?;
+ let keys = keys.map(
+ |keys| pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)
+ ).transpose()?;
+
dispatch_unique_runtime!(collection.token_properties(token_id, keys))
}
fn property_permissions(
collection: CollectionId,
- keys: Vec<Vec<u8>>
+ keys: Option<Vec<Vec<u8>>>
) -> Result<Vec<PropertyKeyPermission>, DispatchError> {
- let keys = pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)?;
+ let keys = keys.map(
+ |keys| pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)
+ ).transpose()?;
pallet_common::Pallet::<Runtime>::filter_property_permissions(collection, keys)
}
@@ -66,7 +70,7 @@
fn token_data(
collection: CollectionId,
token_id: TokenId,
- keys: Vec<Vec<u8>>
+ keys: Option<Vec<Vec<u8>>>
) -> Result<TokenData<CrossAccountId>, DispatchError> {
let token_data = TokenData {
const_data: Self::const_metadata(collection, token_id)?,
@@ -232,7 +236,7 @@
})
})
.collect();
-
+
properties
}
None => {
@@ -253,7 +257,7 @@
let token_id = TokenId(nft_id);
let properties = pallet_nonfungible::Pallet::<Runtime>::token_properties((collection_id, token_id)); // todo look into usage of nonfungible
-
+
return Ok(match filter_keys {
Some(keys) => {
let keys = pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(keys)?;
@@ -266,7 +270,7 @@
})
})
.collect();
-
+
properties
}
None => {
@@ -300,7 +304,7 @@
let keys = pallet_common::Pallet::<Runtime>::bytes_keys_to_property_keys(
Vec::from([String::from("rmrk:base-type").into_bytes()])
)?;
- let properties = pallet_common::Pallet::<Runtime>::filter_collection_properties(collection_id, keys)?;
+ let properties = pallet_common::Pallet::<Runtime>::filter_collection_properties(collection_id, Some(keys))?;
//ensure!(properties.len() == 1); // todo make sure it's fine to have ensure in place // no access to errors from here? displace?
Ok(Some( RmrkBaseInfo {
runtime/common/src/sponsoring.rsdiffbeforeafterboth--- a/runtime/common/src/sponsoring.rs
+++ b/runtime/common/src/sponsoring.rs
@@ -21,17 +21,16 @@
storage::{StorageMap, StorageDoubleMap, StorageNMap},
};
use up_data_structs::{
- CollectionId, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MetaUpdatePermission,
- NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId, CollectionMode,
- CreateItemData,
+ CollectionId, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, NFT_SPONSOR_TRANSFER_TIMEOUT,
+ REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId, CollectionMode, CreateItemData,
};
use sp_runtime::traits::Saturating;
use pallet_common::{CollectionHandle};
use pallet_evm::account::CrossAccountId;
use pallet_unique::{
Call as UniqueCall, Config as UniqueConfig, FungibleApproveBasket, RefungibleApproveBasket,
- NftApproveBasket, VariableMetaDataBasket, CreateItemBasket, ReFungibleTransferBasket,
- FungibleTransferBasket, NftTransferBasket,
+ NftApproveBasket, CreateItemBasket, ReFungibleTransferBasket, FungibleTransferBasket,
+ NftTransferBasket,
};
use pallet_fungible::Config as FungibleConfig;
use pallet_nonfungible::Config as NonfungibleConfig;
@@ -136,63 +135,6 @@
}
CreateItemBasket::<T>::insert((collection.id, who.as_sub()), block_number);
-
- Some(())
-}
-
-pub fn withdraw_set_variable_meta_data<T: Config>(
- who: &T::CrossAccountId,
- collection: &CollectionHandle<T>,
- item_id: &TokenId,
- data: &[u8],
-) -> Option<()> {
- // TODO: make it work for admins
- if collection.meta_update_permission != MetaUpdatePermission::ItemOwner {
- return None;
- }
- // preliminary sponsoring correctness check
- match collection.mode {
- CollectionMode::NFT => {
- let owner = pallet_nonfungible::TokenData::<T>::get((collection.id, item_id))?.owner;
- if !owner.conv_eq(who) {
- return None;
- }
- }
- CollectionMode::Fungible(_) => {
- if item_id != &TokenId::default() {
- return None;
- }
- if <pallet_fungible::Balance<T>>::get((collection.id, who)) == 0 {
- return None;
- }
- }
- CollectionMode::ReFungible => {
- if !<pallet_refungible::Owned<T>>::get((collection.id, who, item_id)) {
- return None;
- }
- }
- }
-
- // Can't sponsor fungible collection, this tx will be rejected
- // as invalid
- if matches!(collection.mode, CollectionMode::Fungible(_)) {
- return None;
- }
- if data.len() > collection.limits.sponsored_data_size() as usize {
- return None;
- }
-
- let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
- let limit = collection.limits.sponsored_data_rate_limit()?;
-
- if let Some(last_tx_block) = VariableMetaDataBasket::<T>::get(collection.id, item_id) {
- let timeout = last_tx_block + limit.into();
- if block_number < timeout {
- return None;
- }
- }
-
- <VariableMetaDataBasket<T>>::insert(collection.id, item_id, block_number);
Some(())
}
@@ -290,20 +232,6 @@
} => {
let (sponsor, collection) = load(*collection_id)?;
withdraw_approve::<T>(&collection, who, item_id).map(|()| sponsor)
- }
- UniqueCall::set_variable_meta_data {
- collection_id,
- item_id,
- data,
- } => {
- let (sponsor, collection) = load(*collection_id)?;
- withdraw_set_variable_meta_data::<T>(
- &T::CrossAccountId::from_sub(who.clone()),
- &collection,
- item_id,
- data,
- )
- .map(|()| sponsor)
}
_ => None,
}
runtime/common/src/weights.rsdiffbeforeafterboth--- a/runtime/common/src/weights.rs
+++ b/runtime/common/src/weights.rs
@@ -86,10 +86,6 @@
dispatch_weight::<T>() + max_weight_of!(transfer_from())
}
- fn set_variable_metadata(bytes: u32) -> Weight {
- dispatch_weight::<T>() + max_weight_of!(set_variable_metadata(bytes))
- }
-
fn burn_from() -> Weight {
dispatch_weight::<T>() + max_weight_of!(burn_from())
}
runtime/tests/src/tests.rsdiffbeforeafterboth--- a/runtime/tests/src/tests.rs
+++ b/runtime/tests/src/tests.rs
@@ -18,9 +18,9 @@
use crate::{Test, TestCrossAccountId, CollectionCreationPrice, Origin, Unique, new_test_ext};
use up_data_structs::{
COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,
- CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,
- TokenId, MAX_TOKEN_OWNERSHIP, CreateCollectionData, CollectionField, SchemaVersion,
- CollectionMode, AccessMode,
+ CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, TokenId,
+ MAX_TOKEN_OWNERSHIP, CreateCollectionData, CollectionField, SchemaVersion, CollectionMode,
+ AccessMode,
};
use frame_support::{assert_noop, assert_ok, assert_err};
use sp_std::convert::TryInto;
@@ -47,7 +47,7 @@
fn default_nft_data() -> CreateNftData {
CreateNftData {
const_data: vec![1, 2, 3].try_into().unwrap(),
- variable_data: vec![3, 2, 1].try_into().unwrap(),
+ properties: vec![].try_into().unwrap(),
}
}
@@ -58,7 +58,6 @@
fn default_re_fungible_data() -> CreateReFungibleData {
CreateReFungibleData {
const_data: vec![1, 2, 3].try_into().unwrap(),
- variable_data: vec![3, 2, 1].try_into().unwrap(),
pieces: 1023,
}
}
@@ -215,7 +214,6 @@
let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();
assert_eq!(item.const_data, data.const_data.into_inner());
- assert_eq!(item.variable_data, data.variable_data.into_inner());
});
}
@@ -247,7 +245,6 @@
))
.unwrap();
assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());
- assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());
}
});
}
@@ -263,7 +260,6 @@
let balance =
<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));
assert_eq!(item.const_data, data.const_data.into_inner());
- assert_eq!(item.variable_data, data.variable_data.into_inner());
assert_eq!(balance, 1023);
});
}
@@ -299,7 +295,6 @@
let balance =
<pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));
assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());
- assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());
assert_eq!(balance, 1023);
}
});
@@ -413,7 +408,6 @@
create_test_item(collection_id, &data.clone().into());
let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));
assert_eq!(item.const_data, data.const_data.into_inner());
- assert_eq!(item.variable_data, data.variable_data.into_inner());
assert_eq!(
<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),
1
@@ -2427,117 +2421,6 @@
}
#[test]
-fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {
- new_test_ext().execute_with(|| {
- let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));
-
- let origin1 = Origin::signed(1);
-
- let data = default_nft_data();
- create_test_item(CollectionId(1), &data.into());
-
- let variable_data = b"test data".to_vec();
- assert_ok!(Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(1),
- variable_data.clone().try_into().unwrap()
- ));
-
- assert_eq!(
- <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))
- .unwrap()
- .variable_data,
- variable_data
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {
- new_test_ext().execute_with(|| {
- let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));
-
- let origin1 = Origin::signed(1);
-
- let data = default_re_fungible_data();
- create_test_item(collection_id, &data.into());
-
- let variable_data = b"test data".to_vec();
- assert_ok!(Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(1),
- variable_data.clone().try_into().unwrap()
- ));
-
- assert_eq!(
- <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,
- variable_data
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_fungible_token_fails() {
- new_test_ext().execute_with(|| {
- let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));
-
- let origin1 = Origin::signed(1);
-
- let data = default_fungible_data();
- create_test_item(collection_id, &data.into());
-
- let variable_data = b"test data".to_vec();
- assert_noop!(
- Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(0),
- variable_data.try_into().unwrap()
- )
- .map_err(|e| e.error),
- <pallet_fungible::Error<Test>>::FungibleItemsDontHaveData
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {
- new_test_ext().execute_with(|| {
- //default_limits();
-
- let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));
-
- let origin1 = Origin::signed(1);
-
- let data = default_nft_data();
- create_test_item(collection_id, &data.into());
-
- assert_ok!(Unique::set_meta_update_permission_flag(
- origin1.clone(),
- collection_id,
- MetaUpdatePermission::ItemOwner,
- ));
-
- let variable_data = b"ten chars.".to_vec();
- assert_ok!(Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(1),
- variable_data.clone().try_into().unwrap()
- ));
-
- assert_eq!(
- <pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))
- .unwrap()
- .variable_data,
- variable_data
- );
- });
-}
-
-#[test]
fn collection_transfer_flag_works() {
new_test_ext().execute_with(|| {
let origin1 = Origin::signed(1);
@@ -2585,163 +2468,6 @@
assert_eq!(
<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),
1
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_nft_with_admin_flag() {
- new_test_ext().execute_with(|| {
- // default_limits();
-
- let collection_id =
- create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));
-
- let origin1 = Origin::signed(1);
- let origin2 = Origin::signed(2);
-
- assert_ok!(Unique::set_mint_permission(
- origin2.clone(),
- collection_id,
- true
- ));
- assert_ok!(Unique::add_to_allow_list(
- origin2.clone(),
- collection_id,
- account(1)
- ));
-
- assert_ok!(Unique::add_collection_admin(
- origin2.clone(),
- collection_id,
- account(1)
- ));
-
- let data = default_nft_data();
- create_test_item(collection_id, &data.into());
-
- assert_ok!(Unique::set_meta_update_permission_flag(
- origin2.clone(),
- collection_id,
- MetaUpdatePermission::Admin,
- ));
-
- let variable_data = b"test.".to_vec();
- assert_ok!(Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(1),
- variable_data.clone().try_into().unwrap()
- ));
-
- assert_eq!(
- <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))
- .unwrap()
- .variable_data,
- variable_data
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_nft_with_admin_flag_neg() {
- new_test_ext().execute_with(|| {
- // default_limits();
-
- let collection_id =
- create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));
-
- let origin1 = Origin::signed(1);
- let origin2 = Origin::signed(2);
-
- assert_ok!(Unique::set_mint_permission(
- origin2.clone(),
- collection_id,
- true
- ));
- assert_ok!(Unique::add_to_allow_list(
- origin2.clone(),
- collection_id,
- account(1)
- ));
-
- let data = default_nft_data();
- create_test_item(collection_id, &data.into());
-
- assert_ok!(Unique::set_meta_update_permission_flag(
- origin2.clone(),
- collection_id,
- MetaUpdatePermission::Admin,
- ));
-
- let variable_data = b"test.".to_vec();
- assert_noop!(
- Unique::set_variable_meta_data(
- origin1,
- collection_id,
- TokenId(1),
- variable_data.try_into().unwrap()
- )
- .map_err(|e| e.error),
- CommonError::<Test>::NoPermission
- );
- });
-}
-
-#[test]
-fn set_variable_meta_flag_after_freeze() {
- new_test_ext().execute_with(|| {
- // default_limits();
-
- let collection_id =
- create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));
-
- let origin2 = Origin::signed(2);
-
- assert_ok!(Unique::set_meta_update_permission_flag(
- origin2.clone(),
- collection_id,
- MetaUpdatePermission::None,
- ));
- assert_noop!(
- Unique::set_meta_update_permission_flag(
- origin2.clone(),
- collection_id,
- MetaUpdatePermission::Admin
- ),
- CommonError::<Test>::MetadataFlagFrozen
- );
- });
-}
-
-#[test]
-fn set_variable_meta_data_on_nft_with_none_flag_neg() {
- new_test_ext().execute_with(|| {
- // default_limits();
-
- let collection_id =
- create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));
- let origin1 = Origin::signed(1);
-
- let data = default_nft_data();
- create_test_item(collection_id, &data.into());
-
- assert_ok!(Unique::set_meta_update_permission_flag(
- origin1.clone(),
- collection_id,
- MetaUpdatePermission::None,
- ));
-
- let variable_data = b"test.".to_vec();
- assert_noop!(
- Unique::set_variable_meta_data(
- origin1.clone(),
- collection_id,
- TokenId(1),
- variable_data.try_into().unwrap()
- )
- .map_err(|e| e.error),
- CommonError::<Test>::NoPermission
);
});
}
smart_contracs/transfer/lib.rsdiffbeforeafterboth--- a/smart_contracs/transfer/lib.rs
+++ b/smart_contracs/transfer/lib.rs
@@ -58,14 +58,12 @@
pub enum CreateItemData {
Nft {
const_data: Vec<u8>,
- variable_data: Vec<u8>,
},
Fungible {
value: u128,
},
ReFungible {
const_data: Vec<u8>,
- variable_data: Vec<u8>,
pieces: u128,
},
}
@@ -88,8 +86,6 @@
fn approve(spender: DefaultAccountId, collection_id: u32, item_id: u32, amount: u128);
#[ink(extension = 4, returns_result = false)]
fn transfer_from(owner: DefaultAccountId, recipient: DefaultAccountId, collection_id: u32, item_id: u32, amount: u128);
- #[ink(extension = 5, returns_result = false)]
- fn set_variable_meta_data(collection_id: u32, item_id: u32, data: Vec<u8>);
#[ink(extension = 6, returns_result = false)]
fn toggle_allow_list(collection_id: u32, address: DefaultAccountId, allowlisted: bool);
}
@@ -143,12 +139,6 @@
let _ = self.env()
.extension()
.transfer_from(owner, recipient, collection_id, item_id, amount);
- }
- #[ink(message)]
- pub fn set_variable_meta_data(&mut self, collection_id: u32, item_id: u32, data: Vec<u8>) {
- let _ = self.env()
- .extension()
- .set_variable_meta_data(collection_id, item_id, data);
}
#[ink(message)]
pub fn toggle_allow_list(&mut self, collection_id: u32, address: AccountId, allowlisted: bool) {
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -40,7 +40,6 @@
"testMigrationStructure": "mocha --timeout 9999999 -r ts-node/register ./**/nesting/migration-check.test.ts",
"testAddCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/addCollectionAdmin.test.ts",
"testSetSchemaVersion": "mocha --timeout 9999999 -r ts-node/register ./**/setSchemaVersion.test.ts",
- "testSetVariableMetaData": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetaData.test.ts",
"testSetCollectionLimits": "mocha --timeout 9999999 -r ts-node/register ./**/setCollectionLimits.test.ts",
"testSetCollectionSponsor": "mocha --timeout 9999999 -r ts-node/register ./**/setCollectionSponsor.test.ts",
"testConfirmSponsorship": "mocha --timeout 9999999 -r ts-node/register ./**/confirmSponsorship.test.ts",
tests/src/contracts.test.tsdiffbeforeafterboth--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -111,7 +111,7 @@
await addToAllowListExpectSuccess(alice, collectionId, contract.address);
await addToAllowListExpectSuccess(alice, collectionId, bob.address);
- const transferTx = contract.tx.createItem(value, gasLimit, bob.address, collectionId, {Nft: {const_data: '0x010203', variable_data: '0x020304'}});
+ const transferTx = contract.tx.createItem(value, gasLimit, bob.address, collectionId, {Nft: {const_data: '0x010203'}});
const events = await submitTransactionAsync(alice, transferTx);
const result = getGenericResult(events);
expect(result.success).to.be.true;
@@ -121,7 +121,6 @@
{
owner: bob.address,
constData: '0x010203',
- variableData: '0x020304',
},
]);
});
@@ -140,9 +139,9 @@
await addToAllowListExpectSuccess(alice, collectionId, bob.address);
const transferTx = contract.tx.createMultipleItems(value, gasLimit, bob.address, collectionId, [
- {Nft: {const_data: '0x010203', variable_data: '0x020304'}},
- {Nft: {const_data: '0x010204', variable_data: '0x020305'}},
- {Nft: {const_data: '0x010205', variable_data: '0x020306'}},
+ {Nft: {const_data: '0x010203'}},
+ {Nft: {const_data: '0x010204'}},
+ {Nft: {const_data: '0x010205'}},
]);
const events = await submitTransactionAsync(alice, transferTx);
const result = getGenericResult(events);
@@ -155,17 +154,14 @@
{
Owner: bob.address,
ConstData: '0x010203',
- VariableData: '0x020304',
},
{
Owner: bob.address,
ConstData: '0x010204',
- VariableData: '0x020305',
},
{
Owner: bob.address,
ConstData: '0x010205',
- VariableData: '0x020306',
},
]);
});
@@ -208,24 +204,6 @@
const token: any = (await api.query.unique.nftItemList(collectionId, tokenId) as any).unwrap();
expect(token.owner.toString()).to.be.equal(charlie.address);
- });
- });
-
- it('SetVariableMetaData CE', async () => {
- await usingApi(async api => {
- const alice = privateKey('//Alice');
-
- const collectionId = await createCollectionExpectSuccess();
- const [contract] = await deployTransferContract(api);
- const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', contract.address.toString());
-
- const transferTx = contract.tx.setVariableMetaData(value, gasLimit, collectionId, tokenId, '0x121314');
- const events = await submitTransactionAsync(alice, transferTx);
- const result = getGenericResult(events);
- expect(result.success).to.be.true;
-
- const token: any = (await api.query.unique.nftItemList(collectionId, tokenId) as any).unwrap();
- expect(token.variableData.toString()).to.be.equal('0x121314');
});
});
tests/src/createCollection.test.tsdiffbeforeafterboth--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -74,7 +74,6 @@
accountTokenOwnershipLimit: 3,
},
constOnChainSchema: '0x333333',
- metaUpdatePermission: 'Admin',
});
const events = await submitTransactionAsync(alice, tx);
const result = getCreateCollectionResult(events);
@@ -91,7 +90,6 @@
expect(collection.sponsorship.asUnconfirmed.toString()).to.equal(bob.address);
expect(collection.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.equal(3);
expect(collection.constOnChainSchema.toString()).to.equal('0x333333');
- expect(collection.metaUpdatePermission.isAdmin).to.be.true;
});
});
});
tests/src/createMultipleItems.test.tsdiffbeforeafterboth--- a/tests/src/createMultipleItems.test.ts
+++ b/tests/src/createMultipleItems.test.ts
@@ -30,7 +30,6 @@
getBalance,
getTokenOwner,
getLastTokenId,
- getVariableMetadata,
getConstMetadata,
getCreatedCollectionCount,
createCollectionWithPropsExpectSuccess,
@@ -47,9 +46,9 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
const alice = privateKey('//Alice');
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -63,10 +62,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
@@ -97,9 +92,9 @@
expect(itemsListIndexBefore).to.be.equal(0);
const alice = privateKey('//Alice');
const args = [
- {ReFungible: {const_data: [0x31], variable_data: [0x31], pieces: 1}},
- {ReFungible: {const_data: [0x32], variable_data: [0x32], pieces: 1}},
- {ReFungible: {const_data: [0x33], variable_data: [0x33], pieces: 1}},
+ {ReFungible: {const_data: [0x31], pieces: 1}},
+ {ReFungible: {const_data: [0x32], pieces: 1}},
+ {ReFungible: {const_data: [0x33], pieces: 1}},
];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
@@ -114,10 +109,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
@@ -130,8 +121,8 @@
tokenLimit: 2,
});
const args = [
- {NFT: {const_data: 'A', variable_data: 'A'}},
- {NFT: {const_data: 'B', variable_data: 'B'}},
+ {NFT: {const_data: 'A'}},
+ {NFT: {const_data: 'B'}},
];
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -146,9 +137,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
const alice = privateKey('//Alice');
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const bob = privateKey('//Bob');
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -156,9 +148,9 @@
expect(itemsListIndexAfter).to.be.equal(3);
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]),
)).to.not.be.rejected;
expect(await getTokenOwner(api, collectionId, 1)).to.be.deep.equal(normalizeAccountId(alice.address));
@@ -168,10 +160,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
@@ -181,9 +169,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
const alice = privateKey('//Alice');
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const bob = privateKey('//Bob');
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -191,9 +180,9 @@
expect(itemsListIndexAfter).to.be.equal(3);
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]),
)).to.not.be.rejected;
expect(await getTokenOwner(api, collectionId, 1)).to.be.deep.equal(normalizeAccountId(alice.address));
@@ -203,10 +192,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
@@ -216,9 +201,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
const alice = privateKey('//Alice');
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const bob = privateKey('//Bob');
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -226,9 +212,9 @@
expect(itemsListIndexAfter).to.be.equal(3);
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collectionId, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]),
)).to.not.be.rejected;
expect(await getTokenOwner(api, collectionId, 1)).to.be.deep.equal(normalizeAccountId(alice.address));
@@ -238,10 +224,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
});
@@ -264,9 +246,9 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(bob.address), args);
await submitTransactionAsync(bob, createMultipleItemsTx);
@@ -280,10 +262,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
@@ -314,9 +292,9 @@
expect(itemsListIndexBefore).to.be.equal(0);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
const args = [
- {ReFungible: {const_data: [0x31], variable_data: [0x31], pieces: 1}},
- {ReFungible: {const_data: [0x32], variable_data: [0x32], pieces: 1}},
- {ReFungible: {const_data: [0x33], variable_data: [0x33], pieces: 1}},
+ {ReFungible: {const_data: [0x31], pieces: 1}},
+ {ReFungible: {const_data: [0x32], pieces: 1}},
+ {ReFungible: {const_data: [0x33], pieces: 1}},
];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(bob.address), args);
@@ -331,10 +309,6 @@
expect(await getConstMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
expect(await getConstMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
expect(await getConstMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
-
- expect(await getVariableMetadata(api, collectionId, 1)).to.be.deep.equal([0x31]);
- expect(await getVariableMetadata(api, collectionId, 2)).to.be.deep.equal([0x32]);
- expect(await getVariableMetadata(api, collectionId, 3)).to.be.deep.equal([0x33]);
});
});
});
@@ -356,9 +330,9 @@
const collectionId = await createCollectionExpectSuccess();
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await expect(submitTransactionAsync(bob, createMultipleItemsTx)).to.be.rejected;
@@ -387,9 +361,9 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
const args = [
- {ReFungible: {const_data: [0x31], variable_data: [0x31], pieces: 1}},
- {ReFungible: {const_data: [0x32], variable_data: [0x32], pieces: 1}},
- {ReFungible: {const_data: [0x33], variable_data: [0x33], pieces: 1}},
+ {ReFungible: {const_data: [0x31], pieces: 1}},
+ {ReFungible: {const_data: [0x32], pieces: 1}},
+ {ReFungible: {const_data: [0x33], pieces: 1}},
];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
@@ -412,9 +386,9 @@
const collectionId = await createCollectionExpectSuccess();
const alice = privateKey('//Alice');
const args = [
- {NFT: {const_data: 'A'.repeat(2049), variable_data: 'A'.repeat(2049)}},
- {NFT: {const_data: 'B'.repeat(2049), variable_data: 'B'.repeat(2049)}},
- {NFT: {const_data: 'C'.repeat(2049), variable_data: 'C'.repeat(2049)}},
+ {NFT: {const_data: 'A'.repeat(2049)}},
+ {NFT: {const_data: 'B'.repeat(2049)}},
+ {NFT: {const_data: 'C'.repeat(2049)}},
];
const createMultipleItemsTx = api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
@@ -424,9 +398,9 @@
const collectionIdReFungible =
await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
const argsReFungible = [
- {ReFungible: ['1'.repeat(2049), '1'.repeat(2049), 10]},
- {ReFungible: ['2'.repeat(2049), '2'.repeat(2049), 10]},
- {ReFungible: ['3'.repeat(2049), '3'.repeat(2049), 10]},
+ {ReFungible: ['1'.repeat(2049), 10]},
+ {ReFungible: ['2'.repeat(2049), 10]},
+ {ReFungible: ['3'.repeat(2049), 10]},
];
const createMultipleItemsTxFungible = api.tx.unique
.createMultipleItems(collectionIdReFungible, normalizeAccountId(alice.address), argsReFungible);
@@ -449,9 +423,8 @@
await usingApi(async (api: ApiPromise) => {
const collectionId = await createCollectionExpectSuccess();
const args = [
- {NFT: {const_data: 'A', variable_data: 'A'}},
- {NFT: {const_data: 'B', variable_data: 'B'.repeat(2049)}},
- {NFT: {const_data: 'C'.repeat(2049), variable_data: 'C'}},
+ {NFT: {const_data: 'A'}},
+ {NFT: {const_data: 'B'.repeat(2049)}},
];
const createMultipleItemsTx = await api.tx.unique
.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
@@ -467,8 +440,8 @@
tokenLimit: 1,
});
const args = [
- {NFT: {const_data: 'A', variable_data: 'A'}},
- {NFT: {const_data: 'B', variable_data: 'B'}},
+ {NFT: {const_data: 'A'}},
+ {NFT: {const_data: 'B'}},
];
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await expect(submitTransactionExpectFailAsync(alice, createMultipleItemsTx)).to.be.rejected;
@@ -482,10 +455,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
-
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
+
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -493,9 +466,9 @@
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
@@ -510,10 +483,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
-
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
+
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -521,9 +494,9 @@
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
});
@@ -535,10 +508,10 @@
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
expect(itemsListIndexBefore).to.be.equal(0);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
-
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
+
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -546,9 +519,9 @@
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
});
@@ -562,28 +535,28 @@
expect(itemsListIndexBefore).to.be.equal(0);
await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
-
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
+
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
const result = getCreateItemsResult(events);
-
+
const prps = [];
-
+
for (let i = 0; i < 65; i++) {
prps.push({key: `key${i}`, value: `value${i}`});
}
await expect(executeTransaction(api, bob, api.tx.unique.setCollectionProperties(collectionId, prps))).to.be.rejectedWith(/common\.PropertyLimitReached/);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
)).to.be.rejected;
}
});
@@ -595,10 +568,10 @@
propPerm: [{key: 'key1', mutable: true, collectionAdmin: false, tokenOwner: false}]});
const itemsListIndexBefore = await getLastTokenId(api, collectionId);
expect(itemsListIndexBefore).to.be.equal(0);
- const args = [{Nft: {const_data: '0x31', variable_data: '0x31'}},
- {Nft: {const_data: '0x32', variable_data: '0x32'}},
- {Nft: {const_data: '0x33', variable_data: '0x33'}}];
-
+ const args = [{Nft: {const_data: '0x31'}},
+ {Nft: {const_data: '0x32'}},
+ {Nft: {const_data: '0x33'}}];
+
const createMultipleItemsTx = api.tx.unique.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
@@ -609,9 +582,9 @@
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'k', value: 'vvvvvv'.repeat(5000)}, {key: 'k2', value: 'vvv'.repeat(5000)}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'k', value: 'vvvvvv'.repeat(5000)}, {key: 'k2', value: 'vvv'.repeat(5000)}]),
)).to.be.rejected;
}
});
tests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth--- a/tests/src/createMultipleItemsEx.test.ts
+++ b/tests/src/createMultipleItemsEx.test.ts
@@ -30,15 +30,12 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
@@ -61,22 +58,19 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: false}}]),
)).to.not.be.rejected;
await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
@@ -98,28 +92,25 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: false, collectionAdmin: true, tokenOwner: false}}]),
)).to.not.be.rejected;
await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
NFT: data,
}));
-
+
const tokens = await api.query.nonfungible.tokenData.entries(collection);
const json = tokens.map(([, token]) => token.toJSON());
expect(json).to.be.deep.equal(data);
@@ -136,28 +127,25 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
await expect(executeTransaction(
- api,
- alice,
- api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]),
+ api,
+ alice,
+ api.tx.unique.setPropertyPermissions(collection, [{key: 'k', permission: {mutable: true, collectionAdmin: true, tokenOwner: true}}]),
)).to.not.be.rejected;
await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
NFT: data,
}));
-
+
const tokens = await api.query.nonfungible.tokenData.entries(collection);
const json = tokens.map(([, token]) => token.toJSON());
expect(json).to.be.deep.equal(data);
@@ -184,15 +172,15 @@
const tx = api.tx.unique.createMultipleItemsEx(collection, {NFT: data});
await executeTransaction(api, alice, tx);
-
+
const events = await submitTransactionAsync(alice, tx);
const result = getCreateItemsResult(events);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
});
@@ -218,15 +206,15 @@
const tx = api.tx.unique.createMultipleItemsEx(collection, {NFT: data});
await executeTransaction(api, alice, tx);
-
+
const events = await submitTransactionAsync(alice, tx);
const result = getCreateItemsResult(events);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
});
@@ -251,15 +239,15 @@
const tx = api.tx.unique.createMultipleItemsEx(collection, {NFT: data});
await executeTransaction(api, alice, tx);
-
+
const events = await submitTransactionAsync(alice, tx);
const result = getCreateItemsResult(events);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, [{key: 'key1', value: 'v2'}]),
)).to.be.rejected;
}
});
@@ -284,24 +272,24 @@
const tx = api.tx.unique.createMultipleItemsEx(collection, {NFT: data});
await executeTransaction(api, alice, tx);
-
+
const events = await submitTransactionAsync(alice, tx);
const result = getCreateItemsResult(events);
const prps = [];
-
+
for (let i = 0; i < 65; i++) {
prps.push({key: `key${i}`, value: `value${i}`});
}
await expect(executeTransaction(api, bob, api.tx.unique.setCollectionProperties(collection, prps))).to.be.rejectedWith(/common\.PropertyLimitReached/);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
)).to.be.rejected;
}
});
@@ -326,7 +314,7 @@
const tx = api.tx.unique.createMultipleItemsEx(collection, {NFT: data});
await executeTransaction(api, alice, tx);
-
+
const events = await submitTransactionAsync(alice, tx);
const result = getCreateItemsResult(events);
@@ -334,12 +322,12 @@
await expect(executeTransaction(api, bob, api.tx.unique.setCollectionProperties(collection, prps))).to.be.rejectedWith(/common\.NoSpaceForProperty/);
-
+
for (const elem of result) {
await expect(executeTransaction(
- api,
- bob,
- api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
+ api,
+ bob,
+ api.tx.unique.setTokenProperties(elem.collectionId, elem.itemId, prps),
)).to.be.rejected;
}
});
@@ -355,15 +343,12 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
@@ -386,15 +371,12 @@
{
owner: {substrate: alice.address},
constData: '0x0000',
- variableData: '0x1111',
}, {
owner: {substrate: bob.address},
constData: '0x2222',
- variableData: '0x3333',
}, {
owner: {substrate: charlie.address},
constData: '0x4444',
- variableData: '0x5555',
},
];
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -22,6 +22,12 @@
);
}
+// Selector: 79cc6790
+interface ERC20UniqueExtensions is Dummy, ERC165 {
+ // Selector: burnFrom(address,uint256) 79cc6790
+ function burnFrom(address from, uint256 amount) external returns (bool);
+}
+
// Selector: 942e8b22
interface ERC20 is Dummy, ERC165, ERC20Events {
// Selector: name() 06fdde03
@@ -59,4 +65,28 @@
returns (uint256);
}
-interface UniqueFungible is Dummy, ERC165, ERC20 {}
+// Selector: 9b5e29c5
+interface CollectionProperties is Dummy, ERC165 {
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ external;
+
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) external;
+
+ // Throws error if key not found
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ external
+ view
+ returns (bytes memory);
+}
+
+interface UniqueFungible is
+ Dummy,
+ ERC165,
+ ERC20,
+ ERC20UniqueExtensions,
+ CollectionProperties
+{}
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -42,6 +42,35 @@
event MintingFinished();
}
+// Selector: 41369377
+interface TokenProperties is Dummy, ERC165 {
+ // Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+ function setTokenPropertyPermission(
+ string memory key,
+ bool isMutable,
+ bool collectionAdmin,
+ bool tokenOwner
+ ) external;
+
+ // Selector: setProperty(uint256,string,bytes) 1752d67b
+ function setProperty(
+ uint256 tokenId,
+ string memory key,
+ bytes memory value
+ ) external;
+
+ // Selector: deleteProperty(uint256,string) 066111d1
+ function deleteProperty(uint256 tokenId, string memory key) external;
+
+ // Throws error if key not found
+ //
+ // Selector: property(uint256,string) 7228c327
+ function property(uint256 tokenId, string memory key)
+ external
+ view
+ returns (bytes memory);
+}
+
// Selector: 42966c68
interface ERC721Burnable is Dummy, ERC165 {
// Selector: burn(uint256) 42966c68
@@ -162,7 +191,25 @@
function totalSupply() external view returns (uint256);
}
-// Selector: e562194d
+// Selector: 9b5e29c5
+interface CollectionProperties is Dummy, ERC165 {
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ external;
+
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) external;
+
+ // Throws error if key not found
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ external
+ view
+ returns (bytes memory);
+}
+
+// Selector: d74d154f
interface ERC721UniqueExtensions is Dummy, ERC165 {
// Selector: transfer(address,uint256) a9059cbb
function transfer(address to, uint256 tokenId) external;
@@ -172,16 +219,7 @@
// Selector: nextTokenId() 75794a3c
function nextTokenId() external view returns (uint256);
-
- // Selector: setVariableMetadata(uint256,bytes) d4eac26d
- function setVariableMetadata(uint256 tokenId, bytes memory data) external;
- // Selector: getVariableMetadata(uint256) e6c5ce6f
- function getVariableMetadata(uint256 tokenId)
- external
- view
- returns (bytes memory);
-
// Selector: mintBulk(address,uint256[]) 44a9945e
function mintBulk(address to, uint256[] memory tokenIds)
external
@@ -201,5 +239,7 @@
ERC721Enumerable,
ERC721UniqueExtensions,
ERC721Mintable,
- ERC721Burnable
+ ERC721Burnable,
+ CollectionProperties,
+ TokenProperties
{}
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -79,7 +79,7 @@
minter = createEthAccount(web3);
});
});
-
+
itWeb3('interfaceID == 0xffffffff always false', async ({web3}) => {
expect(await contract(web3).methods.supportsInterface('0xffffffff').call()).to.be.false;
});
@@ -101,7 +101,7 @@
});
itWeb3('ERC721UniqueExtensions support', async ({web3}) => {
- expect(await contract(web3).methods.supportsInterface('0xe562194d').call()).to.be.true;
+ expect(await contract(web3).methods.supportsInterface('0xd74d154f').call()).to.be.true;
});
itWeb3('ERC721Burnable support', async ({web3}) => {
tests/src/eth/collectionProperties.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -0,0 +1,54 @@
+import privateKey from '../substrate/privateKey';
+import {addCollectionAdminExpectSuccess, createCollectionExpectSuccess} from '../util/helpers';
+import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3} from './util/helpers';
+import nonFungibleAbi from './nonFungibleAbi.json';
+import {expect} from 'chai';
+import {executeTransaction} from '../substrate/substrate-api';
+
+describe('EVM collection properties', () => {
+ itWeb3('Can be set', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = await createEthAccountWithBalance(api, web3);
+ const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+
+ await addCollectionAdminExpectSuccess(alice, collection, {Ethereum: caller});
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ await contract.methods.setCollectionProperty('testKey', Buffer.from('testValue')).send({from: caller});
+
+ const [{value}] = (await api.rpc.unique.collectionProperties(collection, ['testKey'])).toHuman()! as any;
+ expect(value).to.equal('testValue');
+ });
+ itWeb3('Can be deleted', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = await createEthAccountWithBalance(api, web3);
+ const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+
+ await executeTransaction(api, alice, api.tx.unique.setCollectionProperties(collection, [{key: 'testKey', value: 'testValue'}]));
+
+ await addCollectionAdminExpectSuccess(alice, collection, {Ethereum: caller});
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ await contract.methods.deleteCollectionProperty('testKey').send({from: caller});
+
+ const result = (await api.rpc.unique.collectionProperties(collection, ['testKey'])).toJSON()! as any;
+ expect(result.length).to.equal(0);
+ });
+ itWeb3('Can be read', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = createEthAccount(web3);
+ const collection = await createCollectionExpectSuccess({mode: {type:'NFT'}});
+
+ await executeTransaction(api, alice, api.tx.unique.setCollectionProperties(collection, [{key: 'testKey', value: 'testValue'}]));
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ const value = await contract.methods.collectionProperty('testKey').call();
+ expect(value).to.equal(web3.utils.toHex('testValue'));
+ });
+});
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import privateKey from '../substrate/privateKey';
-import {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, setVariableMetaDataExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE, setMetadataUpdatePermissionFlagExpectSuccess} from '../util/helpers';
+import {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE} from '../util/helpers';
import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth} from './util/helpers';
import nonFungibleAbi from './nonFungibleAbi.json';
import {expect} from 'chai';
@@ -331,41 +331,6 @@
const balance = await contract.methods.balanceOf(receiver).call();
expect(+balance).to.equal(1);
}
- });
-
- itWeb3('Can perform getVariableMetadata', async ({web3, api}) => {
- const collection = await createCollectionExpectSuccess({
- mode: {type: 'NFT'},
- });
- const alice = privateKey('//Alice');
-
- const owner = await createEthAccountWithBalance(api, web3);
-
- const item = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, collection, 'Admin');
- await setVariableMetaDataExpectSuccess(alice, collection, item, [1, 2, 3]);
-
- const address = collectionIdToAddress(collection);
- const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});
-
- expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');
- });
-
- itWeb3('Can perform setVariableMetadata', async ({web3, api}) => {
- const collection = await createCollectionExpectSuccess({
- mode: {type: 'NFT'},
- });
- const alice = privateKey('//Alice');
-
- const owner = await createEthAccountWithBalance(api, web3);
-
- const item = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: owner});
-
- const address = collectionIdToAddress(collection);
- const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: owner, ...GAS_ARGS});
-
- expect(await contract.methods.setVariableMetadata(item, '0x010203').send({from: owner}));
- expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');
});
});
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -1,614 +1,738 @@
[
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "approved",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "operator",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bool",
- "name": "approved",
- "type": "bool"
- }
- ],
- "name": "ApprovalForAll",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [],
- "name": "MintingFinished",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "approved",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "burn",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "finishMinting",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "getApproved",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "getVariableMetadata",
- "outputs": [
- {
- "internalType": "bytes",
- "name": "",
- "type": "bytes"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "operator",
- "type": "address"
- }
- ],
- "name": "isApprovedForAll",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "mint",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256[]",
- "name": "tokenIds",
- "type": "uint256[]"
- }
- ],
- "name": "mintBulk",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "components": [
- {
- "internalType": "uint256",
- "name": "field_0",
- "type": "uint256"
- },
- {
- "internalType": "string",
- "name": "field_1",
- "type": "string"
- }
- ],
- "internalType": "struct Tuple0[]",
- "name": "tokens",
- "type": "tuple[]"
- }
- ],
- "name": "mintBulkWithTokenURI",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- },
- {
- "internalType": "string",
- "name": "tokenUri",
- "type": "string"
- }
- ],
- "name": "mintWithTokenURI",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "mintingFinished",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "nextTokenId",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "ownerOf",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "safeTransferFrom",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "safeTransferFromWithData",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "operator",
- "type": "address"
- },
- {
- "internalType": "bool",
- "name": "approved",
- "type": "bool"
- }
- ],
- "name": "setApprovalForAll",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "setVariableMetadata",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes4",
- "name": "interfaceId",
- "type": "bytes4"
- }
- ],
- "name": "supportsInterface",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- }
- ],
- "name": "tokenByIndex",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "index",
- "type": "uint256"
- }
- ],
- "name": "tokenOfOwnerByIndex",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "tokenURI",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "tokenId",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
-]
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "approved",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
+ }
+ ],
+ "name": "ApprovalForAll",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [],
+ "name": "MintingFinished",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "approved",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "burn",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "burnFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ }
+ ],
+ "name": "collectionProperty",
+ "outputs": [
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ }
+ ],
+ "name": "deleteCollectionProperty",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ }
+ ],
+ "name": "deleteProperty",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "finishMinting",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getApproved",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ }
+ ],
+ "name": "isApprovedForAll",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "mint",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "mintBulk",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "field_0",
+ "type": "uint256"
+ },
+ {
+ "internalType": "string",
+ "name": "field_1",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct Tuple0[]",
+ "name": "tokens",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "mintBulkWithTokenURI",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "string",
+ "name": "tokenUri",
+ "type": "string"
+ }
+ ],
+ "name": "mintWithTokenURI",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "mintingFinished",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextTokenId",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "ownerOf",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ }
+ ],
+ "name": "property",
+ "outputs": [
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "safeTransferFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "safeTransferFromWithData",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
+ }
+ ],
+ "name": "setApprovalForAll",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ },
+ {
+ "internalType": "bytes",
+ "name": "value",
+ "type": "bytes"
+ }
+ ],
+ "name": "setCollectionProperty",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ },
+ {
+ "internalType": "bytes",
+ "name": "value",
+ "type": "bytes"
+ }
+ ],
+ "name": "setProperty",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "key",
+ "type": "string"
+ },
+ {
+ "internalType": "bool",
+ "name": "isMutable",
+ "type": "bool"
+ },
+ {
+ "internalType": "bool",
+ "name": "collectionAdmin",
+ "type": "bool"
+ },
+ {
+ "internalType": "bool",
+ "name": "tokenOwner",
+ "type": "bool"
+ }
+ ],
+ "name": "setTokenPropertyPermission",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceID",
+ "type": "bytes4"
+ }
+ ],
+ "name": "supportsInterface",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "index",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenByIndex",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "index",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenOfOwnerByIndex",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenURI",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+]
\ No newline at end of file
tests/src/eth/proxy/UniqueNFTProxy.abidiffbeforeafterboth--- a/tests/src/eth/proxy/UniqueNFTProxy.abi
+++ b/tests/src/eth/proxy/UniqueNFTProxy.abi
@@ -1 +1 @@
-[{"inputs":[{"internalType":"address","name":"_proxied","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"MintingFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"approved","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getVariableMetadata","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintBulk","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"uint256","name":"field_0","type":"uint256"},{"internalType":"string","name":"field_1","type":"string"}],"internalType":"struct Tuple0[]","name":"tokens","type":"tuple[]"}],"name":"mintBulkWithTokenURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"}],"name":"mintWithTokenURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFromWithData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setVariableMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"interfaceId","type":"uint32"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]
\ No newline at end of file
+[{"inputs":[{"internalType":"address","name":"_proxied","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"MintingFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"approved","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"}],"name":"deleteProperty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintBulk","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"uint256","name":"field_0","type":"uint256"},{"internalType":"string","name":"field_1","type":"string"}],"internalType":"struct Tuple0[]","name":"tokens","type":"tuple[]"}],"name":"mintBulkWithTokenURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"}],"name":"mintWithTokenURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFromWithData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setProperty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]
\ No newline at end of file
tests/src/eth/proxy/UniqueNFTProxy.bindiffbeforeafterboth--- a/tests/src/eth/proxy/UniqueNFTProxy.bin
+++ b/tests/src/eth/proxy/UniqueNFTProxy.bin
@@ -1 +1 @@
-608060405234801561001057600080fd5b5060405161168d38038061168d83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6115fa806100936000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c806350bb4e7f116100f9578063a22cb46511610097578063d4eac26d11610071578063d4eac26d1461036b578063e6c5ce6f1461037e578063e985e9c514610391578063f4f4b500146103a457600080fd5b8063a22cb46514610332578063a9059cbb14610345578063c87b56dd1461035857600080fd5b806370a08231116100d357806370a082311461030757806375794a3c1461031a5780637d64bcb41461032257806395d89b411461032a57600080fd5b806350bb4e7f146102ce57806360a11672146102e15780636352211e146102f457600080fd5b80632f745c591161016657806342842e0e1161014057806342842e0e1461028257806342966c681461029557806344a9945e146102a85780634f6ccce7146102bb57600080fd5b80632f745c5914610249578063365430061461025c57806340c10f191461026f57600080fd5b806305d2035b146101ae57806306fdde03146101cb578063081812fc146101e0578063095ea7b31461020b57806318160ddd1461022057806323b872dd14610236575b600080fd5b6101b66103b7565b60405190151581526020015b60405180910390f35b6101d3610443565b6040516101c2919061148a565b6101f36101ee366004611277565b6104c3565b6040516001600160a01b0390911681526020016101c2565b61021e61021936600461118c565b610547565b005b6102286105b2565b6040519081526020016101c2565b61021e610244366004610eff565b610639565b61022861025736600461118c565b6106ad565b6101b661026a366004610fac565b610739565b6101b661027d36600461118c565b6107be565b61021e610290366004610eff565b6107f8565b61021e6102a3366004611277565b610839565b6101b66102b63660046110b1565b61089a565b6102286102c9366004611277565b6108cd565b6101b66102dc3660046111b8565b61094b565b61021e6102ef366004610f40565b6109da565b6101f3610302366004611277565b610a49565b610228610315366004610e8c565b610a7b565b610228610aae565b6101b6610afd565b6101d3610b62565b61021e61034036600461115e565b610ba6565b61021e61035336600461118c565b610be0565b6101d3610366366004611277565b610c19565b61021e6103793660046112a9565b610c9b565b6101d361038c366004611277565b610ccd565b6101f361039f366004610ec6565b610cff565b6101b66103b23660046112f0565b610d85565b60008060009054906101000a90046001600160a01b03166001600160a01b03166305d2035b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190611211565b905090565b60008054604080516306fdde0360e01b815290516060936001600160a01b03909316926306fdde039260048082019391829003018186803b15801561048757600080fd5b505afa15801561049b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261043e919081019061122e565b6000805460405163020604bf60e21b8152600481018490526001600160a01b039091169063081812fc906024015b60206040518083038186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105419190610ea9565b92915050565b60005460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044015b600060405180830381600087803b15801561059657600080fd5b505af11580156105aa573d6000803e3d6000fd5b505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561060157600080fd5b505afa158015610615573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190611290565b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052909116906323b872dd906064015b600060405180830381600087803b15801561069057600080fd5b505af11580156106a4573d6000803e3d6000fd5b50505050505050565b60008054604051632f745c5960e01b81526001600160a01b0385811660048301526024820185905290911690632f745c599060440160206040518083038186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107329190611290565b9392505050565b60008054604051631b2a180360e11b81526001600160a01b039091169063365430069061076c908690869060040161137f565b602060405180830381600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107329190611211565b600080546040516340c10f1960e01b81526001600160a01b03858116600483015260248201859052909116906340c10f199060440161076c565b600054604051632142170760e11b81526001600160a01b038581166004830152848116602483015260448201849052909116906342842e0e90606401610676565b600054604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561087f57600080fd5b505af1158015610893573d6000803e3d6000fd5b5050505050565b60008054604051632254ca2f60e11b81526001600160a01b03909116906344a9945e9061076c9086908690600401611404565b60008054604051634f6ccce760e01b8152600481018490526001600160a01b0390911690634f6ccce7906024015b60206040518083038186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105419190611290565b600080546040516350bb4e7f60e01b81526001600160a01b03909116906350bb4e7f906109809087908790879060040161145a565b602060405180830381600087803b15801561099a57600080fd5b505af11580156109ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d29190611211565b949350505050565b6000546040516330508b3960e11b81526001600160a01b03909116906360a1167290610a10908790879087908790600401611342565b600060405180830381600087803b158015610a2a57600080fd5b505af1158015610a3e573d6000803e3d6000fd5b505050505b50505050565b600080546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e906024016104f1565b600080546040516370a0823160e01b81526001600160a01b038481166004830152909116906370a08231906024016108fb565b60008060009054906101000a90046001600160a01b03166001600160a01b03166375794a3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561060157600080fd5b60008060009054906101000a90046001600160a01b03166001600160a01b0316637d64bcb46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610b4e57600080fd5b505af115801561041a573d6000803e3d6000fd5b60008054604080516395d89b4160e01b815290516060936001600160a01b03909316926395d89b419260048082019391829003018186803b15801561048757600080fd5b60005460405163a22cb46560e01b81526001600160a01b03848116600483015283151560248301529091169063a22cb4659060440161057c565b60005460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb9060440161057c565b60005460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd906024015b60006040518083038186803b158015610c5f57600080fd5b505afa158015610c73573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610541919081019061122e565b60005460405163d4eac26d60e01b81526001600160a01b039091169063d4eac26d9061057c908590859060040161149d565b60005460405163e6c5ce6f60e01b8152600481018390526060916001600160a01b03169063e6c5ce6f90602401610c47565b6000805460405163e985e9c560e01b81526001600160a01b03858116600483015284811660248301529091169063e985e9c59060440160206040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107329190610ea9565b6000805460405162f4f4b560e81b815263ffffffff841660048201526001600160a01b039091169063f4f4b5009060240160206040518083038186803b158015610dce57600080fd5b505afa158015610de2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105419190611211565b6000610e19610e1484611534565b6114df565b9050828152838383011115610e2d57600080fd5b61073283602083018461155c565b600082601f830112610e4c57600080fd5b8135610e5a610e1482611534565b818152846020838601011115610e6f57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215610e9e57600080fd5b81356107328161159e565b600060208284031215610ebb57600080fd5b81516107328161159e565b60008060408385031215610ed957600080fd5b8235610ee48161159e565b91506020830135610ef48161159e565b809150509250929050565b600080600060608486031215610f1457600080fd5b8335610f1f8161159e565b92506020840135610f2f8161159e565b929592945050506040919091013590565b60008060008060808587031215610f5657600080fd5b8435610f618161159e565b93506020850135610f718161159e565b925060408501359150606085013567ffffffffffffffff811115610f9457600080fd5b610fa087828801610e3b565b91505092959194509250565b60008060408385031215610fbf57600080fd5b8235610fca8161159e565b915060208381013567ffffffffffffffff80821115610fe857600080fd5b818601915086601f830112610ffc57600080fd5b813561100a610e1482611510565b8082825285820191508585018a878560051b880101111561102a57600080fd5b60005b848110156110a05781358681111561104457600080fd5b87016040818e03601f1901121561105a57600080fd5b6110626114b6565b89820135815260408201358881111561107a57600080fd5b6110888f8c83860101610e3b565b828c015250855250928701929087019060010161102d565b50979a909950975050505050505050565b600080604083850312156110c457600080fd5b82356110cf8161159e565b915060208381013567ffffffffffffffff8111156110ec57600080fd5b8401601f810186136110fd57600080fd5b803561110b610e1482611510565b80828252848201915084840189868560051b870101111561112b57600080fd5b600094505b8385101561114e578035835260019490940193918501918501611130565b5080955050505050509250929050565b6000806040838503121561117157600080fd5b823561117c8161159e565b91506020830135610ef4816115b6565b6000806040838503121561119f57600080fd5b82356111aa8161159e565b946020939093013593505050565b6000806000606084860312156111cd57600080fd5b83356111d88161159e565b925060208401359150604084013567ffffffffffffffff8111156111fb57600080fd5b61120786828701610e3b565b9150509250925092565b60006020828403121561122357600080fd5b8151610732816115b6565b60006020828403121561124057600080fd5b815167ffffffffffffffff81111561125757600080fd5b8201601f8101841361126857600080fd5b6109d284825160208401610e06565b60006020828403121561128957600080fd5b5035919050565b6000602082840312156112a257600080fd5b5051919050565b600080604083850312156112bc57600080fd5b82359150602083013567ffffffffffffffff8111156112da57600080fd5b6112e685828601610e3b565b9150509250929050565b60006020828403121561130257600080fd5b813563ffffffff8116811461073257600080fd5b6000815180845261132e81602086016020860161155c565b601f01601f19169290920160200192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061137590830184611316565b9695505050505050565b6001600160a01b0383168152604060208083018290528351828401819052600092916060600583901b860181019290860190878301865b828110156113f557888603605f190184528151805187528501518587018890526113e288880182611316565b96505092840192908401906001016113b6565b50939998505050505050505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b8181101561144d57845183529383019391830191600101611431565b5090979650505050505050565b60018060a01b03841681528260208201526060604082015260006114816060830184611316565b95945050505050565b6020815260006107326020830184611316565b8281526040602082015260006109d26040830184611316565b6040805190810167ffffffffffffffff811182821017156114d9576114d9611588565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561150857611508611588565b604052919050565b600067ffffffffffffffff82111561152a5761152a611588565b5060051b60200190565b600067ffffffffffffffff82111561154e5761154e611588565b50601f01601f191660200190565b60005b8381101561157757818101518382015260200161155f565b83811115610a435750506000910152565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146115b357600080fd5b50565b80151581146115b357600080fdfea2646970667358221220669a75a3efcdc6b60606caa5c7e41cab1d727e89a03fd231d1cda27f4de159a064736f6c63430008070033
\ No newline at end of file
+608060405234801561001057600080fd5b506040516116bb3803806116bb83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b611628806100936000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80634f6ccce7116100f957806379cc679011610097578063a22cb46511610071578063a22cb46514610399578063a9059cbb146103ac578063c87b56dd146103bf578063e985e9c5146103d257600080fd5b806379cc6790146103765780637d64bcb41461038957806395d89b411461039157600080fd5b806362d9491f116100d357806362d9491f146103355780636352211e1461034857806370a082311461035b57806375794a3c1461036e57600080fd5b80634f6ccce7146102fc57806350bb4e7f1461030f57806360a116721461032257600080fd5b80632f745c591161016657806340c10f191161014057806340c10f19146102b057806342842e0e146102c357806342966c68146102d657806344a9945e146102e957600080fd5b80632f745c5914610277578063342419141461028a578063365430061461029d57600080fd5b8063081812fc116101a2578063081812fc1461020e578063095ea7b31461023957806318160ddd1461024e57806323b872dd1461026457600080fd5b806301ffc9a7146101c957806305d2035b146101f157806306fdde03146101f9575b600080fd5b6101dc6101d7366004610dca565b6103e5565b60405190151581526020015b60405180910390f35b6101dc610462565b6102016104df565b6040516101e89190610e4c565b61022161021c366004610e5f565b610550565b6040516001600160a01b0390911681526020016101e8565b61024c610247366004610e90565b6105bf565b005b61025661062a565b6040519081526020016101e8565b61024c610272366004610ebc565b6106a2565b610256610285366004610e90565b610716565b61024c610298366004610ff3565b610793565b6101dc6102ab36600461104c565b6107f8565b6101dc6102be366004610e90565b61086e565b61024c6102d1366004610ebc565b6108a8565b61024c6102e4366004610e5f565b6108e9565b6101dc6102f736600461114f565b61091a565b61025661030a366004610e5f565b61094d565b6101dc61031d3660046111f5565b6109bc565b61024c61033036600461124e565b610a3c565b61024c6103433660046112ce565b610aab565b610221610356366004610e5f565b610add565b610256610369366004611332565b610b0f565b610256610b42565b61024c610384366004610e90565b610b96565b6101dc610bcf565b610201610c25565b61024c6103a736600461135d565b610c6e565b61024c6103ba366004610e90565b610ca8565b6102016103cd366004610e5f565b610ce1565b6102216103e0366004611396565b610d53565b600080546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b03909116906301ffc9a790602401602060405180830381865afa158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c91906113c4565b92915050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166305d2035b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104da91906113c4565b905090565b60008054604080516306fdde0360e01b815290516060936001600160a01b03909316926306fdde0392600480820193918290030181865afa158015610528573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104da91908101906113e1565b6000805460405163020604bf60e21b8152600481018490526001600160a01b039091169063081812fc906024015b602060405180830381865afa15801561059b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c9190611458565b60005460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044015b600060405180830381600087803b15801561060e57600080fd5b505af1158015610622573d6000803e3d6000fd5b505050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104da9190611475565b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052909116906323b872dd906064015b600060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b50505050505050565b60008054604051632f745c5960e01b81526001600160a01b0385811660048301526024820185905290911690632f745c5990604401602060405180830381865afa158015610768573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078c9190611475565b9392505050565b600054604051630d09064560e21b81526001600160a01b03909116906334241914906107c3908490600401610e4c565b600060405180830381600087803b1580156107dd57600080fd5b505af11580156107f1573d6000803e3d6000fd5b5050505050565b60008054604051631b2a180360e11b81526001600160a01b039091169063365430069061082b908690869060040161148e565b6020604051808303816000875af115801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078c91906113c4565b600080546040516340c10f1960e01b81526001600160a01b03858116600483015260248201859052909116906340c10f199060440161082b565b600054604051632142170760e11b81526001600160a01b038581166004830152848116602483015260448201849052909116906342842e0e906064016106df565b600054604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c68906024016107c3565b60008054604051632254ca2f60e11b81526001600160a01b03909116906344a9945e9061082b9086908690600401611513565b60008054604051634f6ccce760e01b8152600481018490526001600160a01b0390911690634f6ccce7906024015b602060405180830381865afa158015610998573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c9190611475565b600080546040516350bb4e7f60e01b81526001600160a01b03909116906350bb4e7f906109f190879087908790600401611569565b6020604051808303816000875af1158015610a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3491906113c4565b949350505050565b6000546040516330508b3960e11b81526001600160a01b03909116906360a1167290610a72908790879087908790600401611590565b600060405180830381600087803b158015610a8c57600080fd5b505af1158015610aa0573d6000803e3d6000fd5b505050505b50505050565b6000546040516362d9491f60e01b81526001600160a01b03909116906362d9491f906105f490859085906004016115cd565b600080546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e9060240161057e565b600080546040516370a0823160e01b81526001600160a01b038481166004830152909116906370a082319060240161097b565b60008060009054906101000a90046001600160a01b03166001600160a01b03166375794a3c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067e573d6000803e3d6000fd5b60005460405163079cc67960e41b81526001600160a01b03848116600483015260248201849052909116906379cc6790906044016105f4565b60008060009054906101000a90046001600160a01b03166001600160a01b0316637d64bcb46040518163ffffffff1660e01b81526004016020604051808303816000875af11580156104b6573d6000803e3d6000fd5b60008054604080516395d89b4160e01b815290516060936001600160a01b03909316926395d89b4192600480820193918290030181865afa158015610528573d6000803e3d6000fd5b60005460405163a22cb46560e01b81526001600160a01b03848116600483015283151560248301529091169063a22cb465906044016105f4565b60005460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016105f4565b60005460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd90602401600060405180830381865afa158015610d2b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261045c91908101906113e1565b6000805460405163e985e9c560e01b81526001600160a01b03858116600483015284811660248301529091169063e985e9c590604401602060405180830381865afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078c9190611458565b600060208284031215610ddc57600080fd5b81356001600160e01b03198116811461078c57600080fd5b60005b83811015610e0f578181015183820152602001610df7565b83811115610aa55750506000910152565b60008151808452610e38816020860160208601610df4565b601f01601f19169290920160200192915050565b60208152600061078c6020830184610e20565b600060208284031215610e7157600080fd5b5035919050565b6001600160a01b0381168114610e8d57600080fd5b50565b60008060408385031215610ea357600080fd5b8235610eae81610e78565b946020939093013593505050565b600080600060608486031215610ed157600080fd5b8335610edc81610e78565b92506020840135610eec81610e78565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610f3657610f36610efd565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610f6557610f65610efd565b604052919050565b600067ffffffffffffffff821115610f8757610f87610efd565b50601f01601f191660200190565b6000610fa8610fa384610f6d565b610f3c565b9050828152838383011115610fbc57600080fd5b828260208301376000602084830101529392505050565b600082601f830112610fe457600080fd5b61078c83833560208501610f95565b60006020828403121561100557600080fd5b813567ffffffffffffffff81111561101c57600080fd5b610a3484828501610fd3565b600067ffffffffffffffff82111561104257611042610efd565b5060051b60200190565b600080604080848603121561106057600080fd5b833561106b81610e78565b925060208481013567ffffffffffffffff8082111561108957600080fd5b818701915087601f83011261109d57600080fd5b81356110ab610fa382611028565b81815260059190911b8301840190848101908a8311156110ca57600080fd5b8585015b8381101561113d578035858111156110e65760008081fd5b8601808d03601f19018913156110fc5760008081fd5b611104610f13565b888201358152898201358781111561111c5760008081fd5b61112a8f8b83860101610fd3565b828b0152508452509186019186016110ce565b50809750505050505050509250929050565b6000806040838503121561116257600080fd5b823561116d81610e78565b915060208381013567ffffffffffffffff81111561118a57600080fd5b8401601f8101861361119b57600080fd5b80356111a9610fa382611028565b81815260059190911b820183019083810190888311156111c857600080fd5b928401925b828410156111e6578335825292840192908401906111cd565b80955050505050509250929050565b60008060006060848603121561120a57600080fd5b833561121581610e78565b925060208401359150604084013567ffffffffffffffff81111561123857600080fd5b61124486828701610fd3565b9150509250925092565b6000806000806080858703121561126457600080fd5b843561126f81610e78565b9350602085013561127f81610e78565b925060408501359150606085013567ffffffffffffffff8111156112a257600080fd5b8501601f810187136112b357600080fd5b6112c287823560208401610f95565b91505092959194509250565b600080604083850312156112e157600080fd5b823567ffffffffffffffff808211156112f957600080fd5b61130586838701610fd3565b9350602085013591508082111561131b57600080fd5b5061132885828601610fd3565b9150509250929050565b60006020828403121561134457600080fd5b813561078c81610e78565b8015158114610e8d57600080fd5b6000806040838503121561137057600080fd5b823561137b81610e78565b9150602083013561138b8161134f565b809150509250929050565b600080604083850312156113a957600080fd5b82356113b481610e78565b9150602083013561138b81610e78565b6000602082840312156113d657600080fd5b815161078c8161134f565b6000602082840312156113f357600080fd5b815167ffffffffffffffff81111561140a57600080fd5b8201601f8101841361141b57600080fd5b8051611429610fa382610f6d565b81815285602083850101111561143e57600080fd5b61144f826020830160208601610df4565b95945050505050565b60006020828403121561146a57600080fd5b815161078c81610e78565b60006020828403121561148757600080fd5b5051919050565b6001600160a01b0383168152604060208083018290528351828401819052600092916060600583901b860181019290860190878301865b8281101561150457888603605f190184528151805187528501518587018890526114f188880182610e20565b96505092840192908401906001016114c5565b50939998505050505050505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b8181101561155c57845183529383019391830191600101611540565b5090979650505050505050565b60018060a01b038416815282602082015260606040820152600061144f6060830184610e20565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906115c390830184610e20565b9695505050505050565b6040815260006115e06040830185610e20565b828103602084015261144f8185610e2056fea26469706673582212205bdf4275f4b714a1029ccfe77c0f9a0e20e121a932e1e5840cace97dfa886da964736f6c634300080d0033
\ No newline at end of file
tests/src/eth/proxy/UniqueNFTProxy.soldiffbeforeafterboth--- a/tests/src/eth/proxy/UniqueNFTProxy.sol
+++ b/tests/src/eth/proxy/UniqueNFTProxy.sol
@@ -148,29 +148,17 @@
return proxied.nextTokenId();
}
- function supportsInterface(uint32 interfaceId)
+ function burnFrom(address from, uint256 tokenId) external override {
+ return proxied.burnFrom(from, tokenId);
+ }
+
+ function supportsInterface(bytes4 interfaceId)
external
view
override
returns (bool)
{
return proxied.supportsInterface(interfaceId);
- }
-
- function setVariableMetadata(uint256 tokenId, bytes memory data)
- external
- override
- {
- return proxied.setVariableMetadata(tokenId, data);
- }
-
- function getVariableMetadata(uint256 tokenId)
- external
- view
- override
- returns (bytes memory)
- {
- return proxied.getVariableMetadata(tokenId);
}
function mintBulk(address to, uint256[] memory tokenIds)
@@ -188,4 +176,12 @@
{
return proxied.mintBulkWithTokenURI(to, tokens);
}
+
+ function setProperty(string memory key, string memory value) external override {
+ return proxied.setProperty(key, value);
+ }
+
+ function deleteProperty(string memory key) external override {
+ return proxied.deleteProperty(key);
+ }
}
tests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import privateKey from '../../substrate/privateKey';
-import {createCollectionExpectSuccess, createItemExpectSuccess, setVariableMetaDataExpectSuccess, setMetadataUpdatePermissionFlagExpectSuccess} from '../../util/helpers';
+import {createCollectionExpectSuccess, createItemExpectSuccess} from '../../util/helpers';
import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents} from '../util/helpers';
import nonFungibleAbi from '../nonFungibleAbi.json';
import {expect} from 'chai';
@@ -333,36 +333,5 @@
const balance = await contract.methods.balanceOf(receiver).call();
expect(+balance).to.equal(1);
}
- });
-
- itWeb3('Can perform getVariableMetadata', async ({web3, api}) => {
- const collection = await createCollectionExpectSuccess({
- mode: {type: 'NFT'},
- });
- const alice = privateKey('//Alice');
- const caller = await createEthAccountWithBalance(api, web3);
-
- const address = collectionIdToAddress(collection);
- const contract = await proxyWrap(api, web3, new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS}));
- const item = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: contract.options.address});
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, collection, 'Admin');
- await setVariableMetaDataExpectSuccess(alice, collection, item, [1, 2, 3]);
-
- expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');
- });
-
- itWeb3('Can perform setVariableMetadata', async ({web3, api}) => {
- const collection = await createCollectionExpectSuccess({
- mode: {type: 'NFT'},
- });
- const alice = privateKey('//Alice');
- const caller = await createEthAccountWithBalance(api, web3);
-
- const address = collectionIdToAddress(collection);
- const contract = await proxyWrap(api, web3, new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS}));
- const item = await createItemExpectSuccess(alice, collection, 'NFT', {Ethereum: contract.options.address});
-
- expect(await contract.methods.setVariableMetadata(item, '0x010203').send({from: caller}));
- expect(await contract.methods.getVariableMetadata(item).call()).to.be.equal('0x010203');
});
});
tests/src/eth/tokenProperties.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/tokenProperties.test.ts
@@ -0,0 +1,95 @@
+import privateKey from '../substrate/privateKey';
+import {addCollectionAdminExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess} from '../util/helpers';
+import {cartesian, collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3} from './util/helpers';
+import nonFungibleAbi from './nonFungibleAbi.json';
+import {expect} from 'chai';
+import {executeTransaction} from '../substrate/substrate-api';
+
+describe('EVM token properties', () => {
+ itWeb3('Can be reconfigured', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = await createEthAccountWithBalance(api, web3);
+ for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {
+ const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+ await addCollectionAdminExpectSuccess(alice, collection, {Ethereum: caller});
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ await contract.methods.setTokenPropertyPermission('testKey', mutable, collectionAdmin, tokenOwner).send({from: caller});
+
+ const state = (await api.query.common.collectionPropertyPermissions(collection)).toJSON();
+ expect(state).to.be.deep.equal({
+ [web3.utils.toHex('testKey')]: {mutable, collectionAdmin, tokenOwner},
+ });
+ }
+ });
+ itWeb3('Can be set', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = await createEthAccountWithBalance(api, web3);
+ const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+ const token = await createItemExpectSuccess(alice, collection, 'NFT');
+
+ await executeTransaction(api, alice, api.tx.unique.setPropertyPermissions(collection, [{
+ key: 'testKey',
+ permission: {
+ collectionAdmin: true,
+ },
+ }]));
+
+ await addCollectionAdminExpectSuccess(alice, collection, {Ethereum: caller});
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ await contract.methods.setProperty(token, 'testKey', Buffer.from('testValue')).send({from: caller});
+
+ const [{value}] = (await api.rpc.unique.tokenProperties(collection, token, ['testKey'])).toHuman()! as any;
+ expect(value).to.equal('testValue');
+ });
+ itWeb3('Can be deleted', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = await createEthAccountWithBalance(api, web3);
+ const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+ const token = await createItemExpectSuccess(alice, collection, 'NFT');
+
+ await executeTransaction(api, alice, api.tx.unique.setPropertyPermissions(collection, [{
+ key: 'testKey',
+ permission: {
+ mutable: true,
+ collectionAdmin: true,
+ },
+ }]));
+ await executeTransaction(api, alice, api.tx.unique.setTokenProperties(collection, token, [{key: 'testKey', value: 'testValue'}]));
+
+ await addCollectionAdminExpectSuccess(alice, collection, {Ethereum: caller});
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ await contract.methods.deleteProperty(token, 'testKey').send({from: caller});
+
+ const result = (await api.rpc.unique.tokenProperties(collection, token, ['testKey'])).toJSON()! as any;
+ expect(result.length).to.equal(0);
+ });
+ itWeb3('Can be read', async({web3, api}) => {
+ const alice = privateKey('//Alice');
+ const caller = createEthAccount(web3);
+ const collection = await createCollectionExpectSuccess({mode: {type:'NFT'}});
+ const token = await createItemExpectSuccess(alice, collection, 'NFT');
+
+ await executeTransaction(api, alice, api.tx.unique.setPropertyPermissions(collection, [{
+ key: 'testKey',
+ permission: {
+ collectionAdmin: true,
+ },
+ }]));
+ await executeTransaction(api, alice, api.tx.unique.setTokenProperties(collection, token, [{key: 'testKey', value: 'testValue'}]));
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
+
+ const value = await contract.methods.property(token, 'testKey').call();
+ expect(value).to.equal(web3.utils.toHex('testValue'));
+ });
+});
tests/src/eth/util/helpers.tsdiffbeforeafterboth--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -322,3 +322,15 @@
return before - after;
}
+
+type ElementOf<A> = A extends readonly (infer T)[] ? T : never;
+// I want a fancier api, not a memory efficiency
+export 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;
+ }
+}
\ No newline at end of file
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -137,6 +137,10 @@
**/
OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
/**
+ * Property key is too long
+ **/
+ PropertyKeyIsTooLong: AugmentedError<ApiType>;
+ /**
* Tried to store more property keys than allowed
**/
PropertyLimitReached: AugmentedError<ApiType>;
@@ -156,10 +160,6 @@
* Item balance not enough.
**/
TokenValueTooLow: AugmentedError<ApiType>;
- /**
- * variable_data exceeded data limit.
- **/
- TokenVariableDataLimitExceeded: AugmentedError<ApiType>;
/**
* Total collections bound exceeded.
**/
@@ -168,10 +168,6 @@
* Collection settings not allowing items transferring
**/
TransferNotAllowed: AugmentedError<ApiType>;
- /**
- * Unable to read array of unbounded keys
- **/
- UnableToReadUnboundedKeys: AugmentedError<ApiType>;
/**
* Target collection doesn't supports this operation
**/
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
-import type { PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollectionLimits, UpDataStructsCollectionStats, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsRpcCollection, UpDataStructsTokenData } from './unique';
+import type { PalletEvmAccountBasicCrossAccountIdRepr, RmrkTypesBaseInfo, RmrkTypesCollectionInfo, RmrkTypesNftChild, RmrkTypesNftInfo, RmrkTypesPartType, RmrkTypesPropertyInfo, RmrkTypesResourceInfo, RmrkTypesTheme, UpDataStructsCollectionLimits, UpDataStructsCollectionStats, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsRpcCollection, UpDataStructsTokenData } from './unique';
import type { AugmentedRpc } from '@polkadot/rpc-core/types';
import type { Metadata, StorageKey } from '@polkadot/types';
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';
@@ -401,19 +401,19 @@
/**
* Get base info
**/
- base: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsBaseBaseInfo>>>;
+ base: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTypesBaseInfo>>>;
/**
* Get all Base's parts
**/
- baseParts: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPartPartType>>>;
+ baseParts: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTypesPartType>>>;
/**
* Get collection by id
**/
- collectionById: AugmentedRpc<(id: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsCollectionCollectionInfo>>>;
+ collectionById: AugmentedRpc<(id: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTypesCollectionInfo>>>;
/**
* Get collection properties
**/
- collectionProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;
+ collectionProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTypesPropertyInfo>>>;
/**
* Get the latest created collection id
**/
@@ -421,15 +421,15 @@
/**
* Get NFT by collection id and NFT id
**/
- nftById: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsNftNftInfo>>>;
+ nftById: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTypesNftInfo>>>;
/**
* Get NFT children
**/
- nftChildren: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsNftNftChild>>>;
+ nftChildren: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTypesNftChild>>>;
/**
* Get NFT properties
**/
- nftProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;
+ nftProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTypesPropertyInfo>>>;
/**
* Get NFT resource priorities
**/
@@ -437,7 +437,7 @@
/**
* Get NFT resources
**/
- nftResources: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsResourceResourceInfo>>>;
+ nftResources: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTypesResourceInfo>>>;
/**
* Get Base's theme names
**/
@@ -445,7 +445,7 @@
/**
* Get Theme's keys values
**/
- themes: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, themeName: Text | string, keys: Option<Vec<Text>> | null | object | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsTheme>>>;
+ themes: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, themeName: Text | string, keys: Option<Vec<Text>> | null | object | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTypesTheme>>>;
};
rpc: {
/**
@@ -659,7 +659,7 @@
/**
* Get collection properties
**/
- collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;
+ collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;
/**
* Get collection stats
**/
@@ -687,11 +687,11 @@
/**
* Get property permissions
**/
- propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;
+ propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;
/**
* Get token data
**/
- tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;
+ tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;
/**
* Check if token exists
**/
@@ -703,7 +703,7 @@
/**
* Get token properties
**/
- tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;
+ tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;
/**
* Get token owner, in case of nested token - find parent recursive
**/
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -5,7 +5,7 @@
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -679,7 +679,7 @@
*
* Prefer it to deprecated [`created_collection`] method
**/
- createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; offchainSchema?: any; schemaVersion?: any; pendingSponsor?: any; limits?: any; constOnChainSchema?: any; metaUpdatePermission?: any; tokenPropertyPermissions?: any; properties?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
+ createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; offchainSchema?: any; schemaVersion?: any; pendingSponsor?: any; limits?: any; constOnChainSchema?: any; tokenPropertyPermissions?: any; properties?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
/**
* This method creates a concrete instance of NFT Collection created with CreateCollection method.
*
@@ -809,20 +809,6 @@
**/
setConstOnChainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
/**
- * Set meta_update_permission value for particular collection
- *
- * # Permissions
- *
- * * Collection Owner.
- *
- * # Arguments
- *
- * * collection_id: ID of the collection.
- *
- * * value: New flag value.
- **/
- setMetaUpdatePermissionFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: UpDataStructsMetaUpdatePermission | 'ItemOwner' | 'Admin' | 'None' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsMetaUpdatePermission]>;
- /**
* Allows Anyone to create tokens if:
* * Allow List is enabled, and
* * Address is added to allow list, and
@@ -900,21 +886,6 @@
* * value: New flag value.
**/
setTransfersEnabledFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
- /**
- * Set off-chain data schema.
- *
- * # Permissions
- *
- * * Collection Owner
- * * Collection Admin
- *
- * # Arguments
- *
- * * collection_id.
- *
- * * schema: String representing the offchain data schema.
- **/
- setVariableMetaData: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes]>;
/**
* Change ownership of the token.
*
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportStorageBoundedBTreeSet, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PhantomTypeUpDataStructsBaseInfo, PhantomTypeUpDataStructsCollectionInfo, PhantomTypeUpDataStructsNftChild, PhantomTypeUpDataStructsNftInfo, PhantomTypeUpDataStructsPartType, PhantomTypeUpDataStructsPropertyInfo, PhantomTypeUpDataStructsResourceInfo, PhantomTypeUpDataStructsRpcCollection, PhantomTypeUpDataStructsTheme, PhantomTypeUpDataStructsTokenData, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTypesAccountIdOrCollectionNftTuple, RmrkTypesBaseInfo, RmrkTypesCollectionInfo, RmrkTypesEquippableList, RmrkTypesFixedPart, RmrkTypesNftChild, RmrkTypesNftInfo, RmrkTypesPartType, RmrkTypesPropertyInfo, RmrkTypesResourceInfo, RmrkTypesRoyaltyInfo, RmrkTypesSlotPart, RmrkTypesTheme, RmrkTypesThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionField, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PhantomTypeUpDataStructsBaseInfo, PhantomTypeUpDataStructsCollectionInfo, PhantomTypeUpDataStructsNftChild, PhantomTypeUpDataStructsNftInfo, PhantomTypeUpDataStructsPartType, PhantomTypeUpDataStructsPropertyInfo, PhantomTypeUpDataStructsResourceInfo, PhantomTypeUpDataStructsRpcCollection, PhantomTypeUpDataStructsTheme, PhantomTypeUpDataStructsTokenData, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTypesAccountIdOrCollectionNftTuple, RmrkTypesBaseInfo, RmrkTypesCollectionInfo, RmrkTypesEquippableList, RmrkTypesFixedPart, RmrkTypesNftChild, RmrkTypesNftInfo, RmrkTypesPartType, RmrkTypesPropertyInfo, RmrkTypesResourceInfo, RmrkTypesRoyaltyInfo, RmrkTypesSlotPart, RmrkTypesTheme, RmrkTypesThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionField, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
import type { Data, StorageKey } from '@polkadot/types';
import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
@@ -478,7 +478,6 @@
ForkTreePendingChangeNode: ForkTreePendingChangeNode;
FpRpcTransactionStatus: FpRpcTransactionStatus;
FrameSupportPalletId: FrameSupportPalletId;
- FrameSupportStorageBoundedBTreeSet: FrameSupportStorageBoundedBTreeSet;
FrameSupportTokensMiscBalanceStatus: FrameSupportTokensMiscBalanceStatus;
FrameSupportWeightsDispatchClass: FrameSupportWeightsDispatchClass;
FrameSupportWeightsDispatchInfo: FrameSupportWeightsDispatchInfo;
@@ -1204,7 +1203,6 @@
UpDataStructsCreateNftExData: UpDataStructsCreateNftExData;
UpDataStructsCreateReFungibleData: UpDataStructsCreateReFungibleData;
UpDataStructsCreateRefungibleExData: UpDataStructsCreateRefungibleExData;
- UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;
UpDataStructsNestingRule: UpDataStructsNestingRule;
UpDataStructsProperties: UpDataStructsProperties;
UpDataStructsPropertiesMapBoundedVec: UpDataStructsPropertiesMapBoundedVec;
tests/src/interfaces/lookup.tsdiffbeforeafterboth1360 itemId: 'u32',1360 itemId: 'u32',1361 value: 'u128',1361 value: 'u128',1362 },1362 },1363 set_variable_meta_data: {1364 collectionId: 'u32',1365 itemId: 'u32',1366 data: 'Bytes',1367 },1368 set_meta_update_permission_flag: {1369 collectionId: 'u32',1370 value: 'UpDataStructsMetaUpdatePermission',1371 },1372 set_schema_version: {1363 set_schema_version: {1373 collectionId: 'u32',1364 collectionId: 'u32',1374 version: 'UpDataStructsSchemaVersion',1365 version: 'UpDataStructsSchemaVersion',1411 pendingSponsor: 'Option<AccountId32>',1402 pendingSponsor: 'Option<AccountId32>',1412 limits: 'Option<UpDataStructsCollectionLimits>',1403 limits: 'Option<UpDataStructsCollectionLimits>',1413 constOnChainSchema: 'Bytes',1404 constOnChainSchema: 'Bytes',1414 metaUpdatePermission: 'Option<UpDataStructsMetaUpdatePermission>',1415 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',1405 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',1416 properties: 'Vec<UpDataStructsProperty>'1406 properties: 'Vec<UpDataStructsProperty>'1417 },1407 },1461 OwnerRestricted: 'BTreeSet<u32>'1451 OwnerRestricted: 'BTreeSet<u32>'1462 }1452 }1463 },1453 },1464 /**1465 * Lookup177: up_data_structs::MetaUpdatePermission1466 **/1467 UpDataStructsMetaUpdatePermission: {1468 _enum: ['ItemOwner', 'Admin', 'None']1469 },1470 /**1454 /**1471 * Lookup179: up_data_structs::PropertyKeyPermission1455 * Lookup177: up_data_structs::PropertyKeyPermission1472 **/1456 **/1473 UpDataStructsPropertyKeyPermission: {1457 UpDataStructsPropertyKeyPermission: {1474 key: 'Bytes',1458 key: 'Bytes',1475 permission: 'UpDataStructsPropertyPermission'1459 permission: 'UpDataStructsPropertyPermission'1476 },1460 },1477 /**1461 /**1478 * Lookup181: up_data_structs::PropertyPermission1462 * Lookup179: up_data_structs::PropertyPermission1479 **/1463 **/1480 UpDataStructsPropertyPermission: {1464 UpDataStructsPropertyPermission: {1481 mutable: 'bool',1465 mutable: 'bool',1482 collectionAdmin: 'bool',1466 collectionAdmin: 'bool',1483 tokenOwner: 'bool'1467 tokenOwner: 'bool'1484 },1468 },1485 /**1469 /**1486 * Lookup184: up_data_structs::Property1470 * Lookup182: up_data_structs::Property1487 **/1471 **/1488 UpDataStructsProperty: {1472 UpDataStructsProperty: {1489 key: 'Bytes',1473 key: 'Bytes',1490 value: 'Bytes'1474 value: 'Bytes'1491 },1475 },1492 /**1476 /**1493 * Lookup186: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1477 * Lookup184: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>1494 **/1478 **/1495 PalletEvmAccountBasicCrossAccountIdRepr: {1479 PalletEvmAccountBasicCrossAccountIdRepr: {1496 _enum: {1480 _enum: {1497 Substrate: 'AccountId32',1481 Substrate: 'AccountId32',1498 Ethereum: 'H160'1482 Ethereum: 'H160'1499 }1483 }1500 },1484 },1501 /**1485 /**1502 * Lookup188: up_data_structs::CreateItemData1486 * Lookup186: up_data_structs::CreateItemData1503 **/1487 **/1504 UpDataStructsCreateItemData: {1488 UpDataStructsCreateItemData: {1505 _enum: {1489 _enum: {1506 NFT: 'UpDataStructsCreateNftData',1490 NFT: 'UpDataStructsCreateNftData',1507 Fungible: 'UpDataStructsCreateFungibleData',1491 Fungible: 'UpDataStructsCreateFungibleData',1508 ReFungible: 'UpDataStructsCreateReFungibleData'1492 ReFungible: 'UpDataStructsCreateReFungibleData'1509 }1493 }1510 },1494 },1511 /**1495 /**1512 * Lookup189: up_data_structs::CreateNftData1496 * Lookup187: up_data_structs::CreateNftData1513 **/1497 **/1514 UpDataStructsCreateNftData: {1498 UpDataStructsCreateNftData: {1515 constData: 'Bytes',1499 constData: 'Bytes',1516 variableData: 'Bytes',1517 properties: 'Vec<UpDataStructsProperty>'1500 properties: 'Vec<UpDataStructsProperty>'1518 },1501 },1519 /**1502 /**1520 * Lookup191: up_data_structs::CreateFungibleData1503 * Lookup189: up_data_structs::CreateFungibleData1521 **/1504 **/1522 UpDataStructsCreateFungibleData: {1505 UpDataStructsCreateFungibleData: {1523 value: 'u128'1506 value: 'u128'1524 },1507 },1525 /**1508 /**1526 * Lookup192: up_data_structs::CreateReFungibleData1509 * Lookup190: up_data_structs::CreateReFungibleData1527 **/1510 **/1528 UpDataStructsCreateReFungibleData: {1511 UpDataStructsCreateReFungibleData: {1529 constData: 'Bytes',1512 constData: 'Bytes',1530 variableData: 'Bytes',1531 pieces: 'u128'1513 pieces: 'u128'1532 },1514 },1533 /**1515 /**1534 * Lookup196: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1516 * Lookup194: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1535 **/1517 **/1536 UpDataStructsCreateItemExData: {1518 UpDataStructsCreateItemExData: {1537 _enum: {1519 _enum: {1538 NFT: 'Vec<UpDataStructsCreateNftExData>',1520 NFT: 'Vec<UpDataStructsCreateNftExData>',1541 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData'1523 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData'1542 }1524 }1543 },1525 },1544 /**1526 /**1545 * Lookup198: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1527 * Lookup196: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1546 **/1528 **/1547 UpDataStructsCreateNftExData: {1529 UpDataStructsCreateNftExData: {1548 constData: 'Bytes',1530 constData: 'Bytes',1549 variableData: 'Bytes',1550 properties: 'Vec<UpDataStructsProperty>',1531 properties: 'Vec<UpDataStructsProperty>',1551 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'1532 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'1552 },1533 },1553 /**1534 /**1554 * Lookup205: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1535 * Lookup203: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1555 **/1536 **/1556 UpDataStructsCreateRefungibleExData: {1537 UpDataStructsCreateRefungibleExData: {1557 constData: 'Bytes',1538 constData: 'Bytes',1558 variableData: 'Bytes',1559 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'1539 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'1560 },1540 },1561 /**1541 /**1562 * Lookup207: pallet_template_transaction_payment::Call<T>1542 * Lookup205: pallet_template_transaction_payment::Call<T>1563 **/1543 **/1564 PalletTemplateTransactionPaymentCall: 'Null',1544 PalletTemplateTransactionPaymentCall: 'Null',1565 /**1545 /**1566 * Lookup208: pallet_structure::pallet::Call<T>1546 * Lookup206: pallet_structure::pallet::Call<T>1567 **/1547 **/1568 PalletStructureCall: 'Null',1548 PalletStructureCall: 'Null',1569 /**1549 /**1570 * Lookup209: pallet_evm::pallet::Call<T>1550 * Lookup207: pallet_evm::pallet::Call<T>1571 **/1551 **/1572 PalletEvmCall: {1552 PalletEvmCall: {1573 _enum: {1553 _enum: {1574 withdraw: {1554 withdraw: {1609 }1589 }1610 }1590 }1611 },1591 },1612 /**1592 /**1613 * Lookup215: pallet_ethereum::pallet::Call<T>1593 * Lookup213: pallet_ethereum::pallet::Call<T>1614 **/1594 **/1615 PalletEthereumCall: {1595 PalletEthereumCall: {1616 _enum: {1596 _enum: {1617 transact: {1597 transact: {1618 transaction: 'EthereumTransactionTransactionV2'1598 transaction: 'EthereumTransactionTransactionV2'1619 }1599 }1620 }1600 }1621 },1601 },1622 /**1602 /**1623 * Lookup216: ethereum::transaction::TransactionV21603 * Lookup214: ethereum::transaction::TransactionV21624 **/1604 **/1625 EthereumTransactionTransactionV2: {1605 EthereumTransactionTransactionV2: {1626 _enum: {1606 _enum: {1627 Legacy: 'EthereumTransactionLegacyTransaction',1607 Legacy: 'EthereumTransactionLegacyTransaction',1628 EIP2930: 'EthereumTransactionEip2930Transaction',1608 EIP2930: 'EthereumTransactionEip2930Transaction',1629 EIP1559: 'EthereumTransactionEip1559Transaction'1609 EIP1559: 'EthereumTransactionEip1559Transaction'1630 }1610 }1631 },1611 },1632 /**1612 /**1633 * Lookup217: ethereum::transaction::LegacyTransaction1613 * Lookup215: ethereum::transaction::LegacyTransaction1634 **/1614 **/1635 EthereumTransactionLegacyTransaction: {1615 EthereumTransactionLegacyTransaction: {1636 nonce: 'U256',1616 nonce: 'U256',1637 gasPrice: 'U256',1617 gasPrice: 'U256',1641 input: 'Bytes',1621 input: 'Bytes',1642 signature: 'EthereumTransactionTransactionSignature'1622 signature: 'EthereumTransactionTransactionSignature'1643 },1623 },1644 /**1624 /**1645 * Lookup218: ethereum::transaction::TransactionAction1625 * Lookup216: ethereum::transaction::TransactionAction1646 **/1626 **/1647 EthereumTransactionTransactionAction: {1627 EthereumTransactionTransactionAction: {1648 _enum: {1628 _enum: {1649 Call: 'H160',1629 Call: 'H160',1650 Create: 'Null'1630 Create: 'Null'1651 }1631 }1652 },1632 },1653 /**1633 /**1654 * Lookup219: ethereum::transaction::TransactionSignature1634 * Lookup217: ethereum::transaction::TransactionSignature1655 **/1635 **/1656 EthereumTransactionTransactionSignature: {1636 EthereumTransactionTransactionSignature: {1657 v: 'u64',1637 v: 'u64',1658 r: 'H256',1638 r: 'H256',1659 s: 'H256'1639 s: 'H256'1660 },1640 },1661 /**1641 /**1662 * Lookup221: ethereum::transaction::EIP2930Transaction1642 * Lookup219: ethereum::transaction::EIP2930Transaction1663 **/1643 **/1664 EthereumTransactionEip2930Transaction: {1644 EthereumTransactionEip2930Transaction: {1665 chainId: 'u64',1645 chainId: 'u64',1666 nonce: 'U256',1646 nonce: 'U256',1674 r: 'H256',1654 r: 'H256',1675 s: 'H256'1655 s: 'H256'1676 },1656 },1677 /**1657 /**1678 * Lookup223: ethereum::transaction::AccessListItem1658 * Lookup221: ethereum::transaction::AccessListItem1679 **/1659 **/1680 EthereumTransactionAccessListItem: {1660 EthereumTransactionAccessListItem: {1681 address: 'H160',1661 address: 'H160',1682 storageKeys: 'Vec<H256>'1662 storageKeys: 'Vec<H256>'1683 },1663 },1684 /**1664 /**1685 * Lookup224: ethereum::transaction::EIP1559Transaction1665 * Lookup222: ethereum::transaction::EIP1559Transaction1686 **/1666 **/1687 EthereumTransactionEip1559Transaction: {1667 EthereumTransactionEip1559Transaction: {1688 chainId: 'u64',1668 chainId: 'u64',1689 nonce: 'U256',1669 nonce: 'U256',1698 r: 'H256',1678 r: 'H256',1699 s: 'H256'1679 s: 'H256'1700 },1680 },1701 /**1681 /**1702 * Lookup225: pallet_evm_migration::pallet::Call<T>1682 * Lookup223: pallet_evm_migration::pallet::Call<T>1703 **/1683 **/1704 PalletEvmMigrationCall: {1684 PalletEvmMigrationCall: {1705 _enum: {1685 _enum: {1706 begin: {1686 begin: {1716 }1696 }1717 }1697 }1718 },1698 },1719 /**1699 /**1720 * Lookup228: pallet_sudo::pallet::Event<T>1700 * Lookup226: pallet_sudo::pallet::Event<T>1721 **/1701 **/1722 PalletSudoEvent: {1702 PalletSudoEvent: {1723 _enum: {1703 _enum: {1724 Sudid: {1704 Sudid: {1732 }1712 }1733 }1713 }1734 },1714 },1735 /**1715 /**1736 * Lookup230: sp_runtime::DispatchError1716 * Lookup228: sp_runtime::DispatchError1737 **/1717 **/1738 SpRuntimeDispatchError: {1718 SpRuntimeDispatchError: {1739 _enum: {1719 _enum: {1740 Other: 'Null',1720 Other: 'Null',1749 Transactional: 'SpRuntimeTransactionalError'1729 Transactional: 'SpRuntimeTransactionalError'1750 }1730 }1751 },1731 },1752 /**1732 /**1753 * Lookup231: sp_runtime::ModuleError1733 * Lookup229: sp_runtime::ModuleError1754 **/1734 **/1755 SpRuntimeModuleError: {1735 SpRuntimeModuleError: {1756 index: 'u8',1736 index: 'u8',1757 error: '[u8;4]'1737 error: '[u8;4]'1758 },1738 },1759 /**1739 /**1760 * Lookup232: sp_runtime::TokenError1740 * Lookup230: sp_runtime::TokenError1761 **/1741 **/1762 SpRuntimeTokenError: {1742 SpRuntimeTokenError: {1763 _enum: ['NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported']1743 _enum: ['NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported']1764 },1744 },1765 /**1745 /**1766 * Lookup233: sp_runtime::ArithmeticError1746 * Lookup231: sp_runtime::ArithmeticError1767 **/1747 **/1768 SpRuntimeArithmeticError: {1748 SpRuntimeArithmeticError: {1769 _enum: ['Underflow', 'Overflow', 'DivisionByZero']1749 _enum: ['Underflow', 'Overflow', 'DivisionByZero']1770 },1750 },1771 /**1751 /**1772 * Lookup234: sp_runtime::TransactionalError1752 * Lookup232: sp_runtime::TransactionalError1773 **/1753 **/1774 SpRuntimeTransactionalError: {1754 SpRuntimeTransactionalError: {1775 _enum: ['LimitReached', 'NoLayer']1755 _enum: ['LimitReached', 'NoLayer']1776 },1756 },1777 /**1757 /**1778 * Lookup235: pallet_sudo::pallet::Error<T>1758 * Lookup233: pallet_sudo::pallet::Error<T>1779 **/1759 **/1780 PalletSudoError: {1760 PalletSudoError: {1781 _enum: ['RequireSudo']1761 _enum: ['RequireSudo']1782 },1762 },1783 /**1763 /**1784 * Lookup236: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>1764 * Lookup234: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>1785 **/1765 **/1786 FrameSystemAccountInfo: {1766 FrameSystemAccountInfo: {1787 nonce: 'u32',1767 nonce: 'u32',1788 consumers: 'u32',1768 consumers: 'u32',1789 providers: 'u32',1769 providers: 'u32',1790 sufficients: 'u32',1770 sufficients: 'u32',1791 data: 'PalletBalancesAccountData'1771 data: 'PalletBalancesAccountData'1792 },1772 },1793 /**1773 /**1794 * Lookup237: frame_support::weights::PerDispatchClass<T>1774 * Lookup235: frame_support::weights::PerDispatchClass<T>1795 **/1775 **/1796 FrameSupportWeightsPerDispatchClassU64: {1776 FrameSupportWeightsPerDispatchClassU64: {1797 normal: 'u64',1777 normal: 'u64',1798 operational: 'u64',1778 operational: 'u64',1799 mandatory: 'u64'1779 mandatory: 'u64'1800 },1780 },1801 /**1781 /**1802 * Lookup238: sp_runtime::generic::digest::Digest1782 * Lookup236: sp_runtime::generic::digest::Digest1803 **/1783 **/1804 SpRuntimeDigest: {1784 SpRuntimeDigest: {1805 logs: 'Vec<SpRuntimeDigestDigestItem>'1785 logs: 'Vec<SpRuntimeDigestDigestItem>'1806 },1786 },1807 /**1787 /**1808 * Lookup240: sp_runtime::generic::digest::DigestItem1788 * Lookup238: sp_runtime::generic::digest::DigestItem1809 **/1789 **/1810 SpRuntimeDigestDigestItem: {1790 SpRuntimeDigestDigestItem: {1811 _enum: {1791 _enum: {1812 Other: 'Bytes',1792 Other: 'Bytes',1820 RuntimeEnvironmentUpdated: 'Null'1800 RuntimeEnvironmentUpdated: 'Null'1821 }1801 }1822 },1802 },1823 /**1803 /**1824 * Lookup242: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>1804 * Lookup240: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>1825 **/1805 **/1826 FrameSystemEventRecord: {1806 FrameSystemEventRecord: {1827 phase: 'FrameSystemPhase',1807 phase: 'FrameSystemPhase',1828 event: 'Event',1808 event: 'Event',1829 topics: 'Vec<H256>'1809 topics: 'Vec<H256>'1830 },1810 },1831 /**1811 /**1832 * Lookup244: frame_system::pallet::Event<T>1812 * Lookup242: frame_system::pallet::Event<T>1833 **/1813 **/1834 FrameSystemEvent: {1814 FrameSystemEvent: {1835 _enum: {1815 _enum: {1836 ExtrinsicSuccess: {1816 ExtrinsicSuccess: {1856 }1836 }1857 }1837 }1858 },1838 },1859 /**1839 /**1860 * Lookup245: frame_support::weights::DispatchInfo1840 * Lookup243: frame_support::weights::DispatchInfo1861 **/1841 **/1862 FrameSupportWeightsDispatchInfo: {1842 FrameSupportWeightsDispatchInfo: {1863 weight: 'u64',1843 weight: 'u64',1864 class: 'FrameSupportWeightsDispatchClass',1844 class: 'FrameSupportWeightsDispatchClass',1865 paysFee: 'FrameSupportWeightsPays'1845 paysFee: 'FrameSupportWeightsPays'1866 },1846 },1867 /**1847 /**1868 * Lookup246: frame_support::weights::DispatchClass1848 * Lookup244: frame_support::weights::DispatchClass1869 **/1849 **/1870 FrameSupportWeightsDispatchClass: {1850 FrameSupportWeightsDispatchClass: {1871 _enum: ['Normal', 'Operational', 'Mandatory']1851 _enum: ['Normal', 'Operational', 'Mandatory']1872 },1852 },1873 /**1853 /**1874 * Lookup247: frame_support::weights::Pays1854 * Lookup245: frame_support::weights::Pays1875 **/1855 **/1876 FrameSupportWeightsPays: {1856 FrameSupportWeightsPays: {1877 _enum: ['Yes', 'No']1857 _enum: ['Yes', 'No']1878 },1858 },1879 /**1859 /**1880 * Lookup248: orml_vesting::module::Event<T>1860 * Lookup246: orml_vesting::module::Event<T>1881 **/1861 **/1882 OrmlVestingModuleEvent: {1862 OrmlVestingModuleEvent: {1883 _enum: {1863 _enum: {1884 VestingScheduleAdded: {1864 VestingScheduleAdded: {1895 }1875 }1896 }1876 }1897 },1877 },1898 /**1878 /**1899 * Lookup249: cumulus_pallet_xcmp_queue::pallet::Event<T>1879 * Lookup247: cumulus_pallet_xcmp_queue::pallet::Event<T>1900 **/1880 **/1901 CumulusPalletXcmpQueueEvent: {1881 CumulusPalletXcmpQueueEvent: {1902 _enum: {1882 _enum: {1903 Success: 'Option<H256>',1883 Success: 'Option<H256>',1910 OverweightServiced: '(u64,u64)'1890 OverweightServiced: '(u64,u64)'1911 }1891 }1912 },1892 },1913 /**1893 /**1914 * Lookup250: pallet_xcm::pallet::Event<T>1894 * Lookup248: pallet_xcm::pallet::Event<T>1915 **/1895 **/1916 PalletXcmEvent: {1896 PalletXcmEvent: {1917 _enum: {1897 _enum: {1918 Attempted: 'XcmV2TraitsOutcome',1898 Attempted: 'XcmV2TraitsOutcome',1933 NotifyTargetMigrationFail: '(XcmVersionedMultiLocation,u64)'1913 NotifyTargetMigrationFail: '(XcmVersionedMultiLocation,u64)'1934 }1914 }1935 },1915 },1936 /**1916 /**1937 * Lookup251: xcm::v2::traits::Outcome1917 * Lookup249: xcm::v2::traits::Outcome1938 **/1918 **/1939 XcmV2TraitsOutcome: {1919 XcmV2TraitsOutcome: {1940 _enum: {1920 _enum: {1941 Complete: 'u64',1921 Complete: 'u64',1942 Incomplete: '(u64,XcmV2TraitsError)',1922 Incomplete: '(u64,XcmV2TraitsError)',1943 Error: 'XcmV2TraitsError'1923 Error: 'XcmV2TraitsError'1944 }1924 }1945 },1925 },1946 /**1926 /**1947 * Lookup253: cumulus_pallet_xcm::pallet::Event<T>1927 * Lookup251: cumulus_pallet_xcm::pallet::Event<T>1948 **/1928 **/1949 CumulusPalletXcmEvent: {1929 CumulusPalletXcmEvent: {1950 _enum: {1930 _enum: {1951 InvalidFormat: '[u8;8]',1931 InvalidFormat: '[u8;8]',1952 UnsupportedVersion: '[u8;8]',1932 UnsupportedVersion: '[u8;8]',1953 ExecutedDownward: '([u8;8],XcmV2TraitsOutcome)'1933 ExecutedDownward: '([u8;8],XcmV2TraitsOutcome)'1954 }1934 }1955 },1935 },1956 /**1936 /**1957 * Lookup254: cumulus_pallet_dmp_queue::pallet::Event<T>1937 * Lookup252: cumulus_pallet_dmp_queue::pallet::Event<T>1958 **/1938 **/1959 CumulusPalletDmpQueueEvent: {1939 CumulusPalletDmpQueueEvent: {1960 _enum: {1940 _enum: {1961 InvalidFormat: '[u8;32]',1941 InvalidFormat: '[u8;32]',1966 OverweightServiced: '(u64,u64)'1946 OverweightServiced: '(u64,u64)'1967 }1947 }1968 },1948 },1969 /**1949 /**1970 * Lookup255: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1950 * Lookup253: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>1971 **/1951 **/1972 PalletUniqueRawEvent: {1952 PalletUniqueRawEvent: {1973 _enum: {1953 _enum: {1974 CollectionSponsorRemoved: 'u32',1954 CollectionSponsorRemoved: 'u32',1987 SchemaVersionSet: 'u32'1967 SchemaVersionSet: 'u32'1988 }1968 }1989 },1969 },1990 /**1970 /**1991 * Lookup256: pallet_common::pallet::Event<T>1971 * Lookup254: pallet_common::pallet::Event<T>1992 **/1972 **/1993 PalletCommonEvent: {1973 PalletCommonEvent: {1994 _enum: {1974 _enum: {1995 CollectionCreated: '(u32,u8,AccountId32)',1975 CollectionCreated: '(u32,u8,AccountId32)',2005 PropertyPermissionSet: '(u32,Bytes)'1985 PropertyPermissionSet: '(u32,Bytes)'2006 }1986 }2007 },1987 },2008 /**1988 /**2009 * Lookup257: pallet_structure::pallet::Event<T>1989 * Lookup255: pallet_structure::pallet::Event<T>2010 **/1990 **/2011 PalletStructureEvent: {1991 PalletStructureEvent: {2012 _enum: {1992 _enum: {2013 Executed: 'Result<Null, SpRuntimeDispatchError>'1993 Executed: 'Result<Null, SpRuntimeDispatchError>'2014 }1994 }2015 },1995 },2016 /**1996 /**2017 * Lookup258: pallet_evm::pallet::Event<T>1997 * Lookup256: pallet_evm::pallet::Event<T>2018 **/1998 **/2019 PalletEvmEvent: {1999 PalletEvmEvent: {2020 _enum: {2000 _enum: {2021 Log: 'EthereumLog',2001 Log: 'EthereumLog',2027 BalanceWithdraw: '(AccountId32,H160,U256)'2007 BalanceWithdraw: '(AccountId32,H160,U256)'2028 }2008 }2029 },2009 },2030 /**2010 /**2031 * Lookup259: ethereum::log::Log2011 * Lookup257: ethereum::log::Log2032 **/2012 **/2033 EthereumLog: {2013 EthereumLog: {2034 address: 'H160',2014 address: 'H160',2035 topics: 'Vec<H256>',2015 topics: 'Vec<H256>',2036 data: 'Bytes'2016 data: 'Bytes'2037 },2017 },2038 /**2018 /**2039 * Lookup260: pallet_ethereum::pallet::Event2019 * Lookup258: pallet_ethereum::pallet::Event2040 **/2020 **/2041 PalletEthereumEvent: {2021 PalletEthereumEvent: {2042 _enum: {2022 _enum: {2043 Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'2023 Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'2044 }2024 }2045 },2025 },2046 /**2026 /**2047 * Lookup261: evm_core::error::ExitReason2027 * Lookup259: evm_core::error::ExitReason2048 **/2028 **/2049 EvmCoreErrorExitReason: {2029 EvmCoreErrorExitReason: {2050 _enum: {2030 _enum: {2051 Succeed: 'EvmCoreErrorExitSucceed',2031 Succeed: 'EvmCoreErrorExitSucceed',2054 Fatal: 'EvmCoreErrorExitFatal'2034 Fatal: 'EvmCoreErrorExitFatal'2055 }2035 }2056 },2036 },2057 /**2037 /**2058 * Lookup262: evm_core::error::ExitSucceed2038 * Lookup260: evm_core::error::ExitSucceed2059 **/2039 **/2060 EvmCoreErrorExitSucceed: {2040 EvmCoreErrorExitSucceed: {2061 _enum: ['Stopped', 'Returned', 'Suicided']2041 _enum: ['Stopped', 'Returned', 'Suicided']2062 },2042 },2063 /**2043 /**2064 * Lookup263: evm_core::error::ExitError2044 * Lookup261: evm_core::error::ExitError2065 **/2045 **/2066 EvmCoreErrorExitError: {2046 EvmCoreErrorExitError: {2067 _enum: {2047 _enum: {2068 StackUnderflow: 'Null',2048 StackUnderflow: 'Null',2082 InvalidCode: 'Null'2062 InvalidCode: 'Null'2083 }2063 }2084 },2064 },2085 /**2065 /**2086 * Lookup266: evm_core::error::ExitRevert2066 * Lookup264: evm_core::error::ExitRevert2087 **/2067 **/2088 EvmCoreErrorExitRevert: {2068 EvmCoreErrorExitRevert: {2089 _enum: ['Reverted']2069 _enum: ['Reverted']2090 },2070 },2091 /**2071 /**2092 * Lookup267: evm_core::error::ExitFatal2072 * Lookup265: evm_core::error::ExitFatal2093 **/2073 **/2094 EvmCoreErrorExitFatal: {2074 EvmCoreErrorExitFatal: {2095 _enum: {2075 _enum: {2096 NotSupported: 'Null',2076 NotSupported: 'Null',2099 Other: 'Text'2079 Other: 'Text'2100 }2080 }2101 },2081 },2102 /**2082 /**2103 * Lookup268: frame_system::Phase2083 * Lookup266: frame_system::Phase2104 **/2084 **/2105 FrameSystemPhase: {2085 FrameSystemPhase: {2106 _enum: {2086 _enum: {2107 ApplyExtrinsic: 'u32',2087 ApplyExtrinsic: 'u32',2108 Finalization: 'Null',2088 Finalization: 'Null',2109 Initialization: 'Null'2089 Initialization: 'Null'2110 }2090 }2111 },2091 },2112 /**2092 /**2113 * Lookup270: frame_system::LastRuntimeUpgradeInfo2093 * Lookup268: frame_system::LastRuntimeUpgradeInfo2114 **/2094 **/2115 FrameSystemLastRuntimeUpgradeInfo: {2095 FrameSystemLastRuntimeUpgradeInfo: {2116 specVersion: 'Compact<u32>',2096 specVersion: 'Compact<u32>',2117 specName: 'Text'2097 specName: 'Text'2118 },2098 },2119 /**2099 /**2120 * Lookup271: frame_system::limits::BlockWeights2100 * Lookup269: frame_system::limits::BlockWeights2121 **/2101 **/2122 FrameSystemLimitsBlockWeights: {2102 FrameSystemLimitsBlockWeights: {2123 baseBlock: 'u64',2103 baseBlock: 'u64',2124 maxBlock: 'u64',2104 maxBlock: 'u64',2125 perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'2105 perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'2126 },2106 },2127 /**2107 /**2128 * Lookup272: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>2108 * Lookup270: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>2129 **/2109 **/2130 FrameSupportWeightsPerDispatchClassWeightsPerClass: {2110 FrameSupportWeightsPerDispatchClassWeightsPerClass: {2131 normal: 'FrameSystemLimitsWeightsPerClass',2111 normal: 'FrameSystemLimitsWeightsPerClass',2132 operational: 'FrameSystemLimitsWeightsPerClass',2112 operational: 'FrameSystemLimitsWeightsPerClass',2133 mandatory: 'FrameSystemLimitsWeightsPerClass'2113 mandatory: 'FrameSystemLimitsWeightsPerClass'2134 },2114 },2135 /**2115 /**2136 * Lookup273: frame_system::limits::WeightsPerClass2116 * Lookup271: frame_system::limits::WeightsPerClass2137 **/2117 **/2138 FrameSystemLimitsWeightsPerClass: {2118 FrameSystemLimitsWeightsPerClass: {2139 baseExtrinsic: 'u64',2119 baseExtrinsic: 'u64',2140 maxExtrinsic: 'Option<u64>',2120 maxExtrinsic: 'Option<u64>',2141 maxTotal: 'Option<u64>',2121 maxTotal: 'Option<u64>',2142 reserved: 'Option<u64>'2122 reserved: 'Option<u64>'2143 },2123 },2144 /**2124 /**2145 * Lookup275: frame_system::limits::BlockLength2125 * Lookup273: frame_system::limits::BlockLength2146 **/2126 **/2147 FrameSystemLimitsBlockLength: {2127 FrameSystemLimitsBlockLength: {2148 max: 'FrameSupportWeightsPerDispatchClassU32'2128 max: 'FrameSupportWeightsPerDispatchClassU32'2149 },2129 },2150 /**2130 /**2151 * Lookup276: frame_support::weights::PerDispatchClass<T>2131 * Lookup274: frame_support::weights::PerDispatchClass<T>2152 **/2132 **/2153 FrameSupportWeightsPerDispatchClassU32: {2133 FrameSupportWeightsPerDispatchClassU32: {2154 normal: 'u32',2134 normal: 'u32',2155 operational: 'u32',2135 operational: 'u32',2156 mandatory: 'u32'2136 mandatory: 'u32'2157 },2137 },2158 /**2138 /**2159 * Lookup277: frame_support::weights::RuntimeDbWeight2139 * Lookup275: frame_support::weights::RuntimeDbWeight2160 **/2140 **/2161 FrameSupportWeightsRuntimeDbWeight: {2141 FrameSupportWeightsRuntimeDbWeight: {2162 read: 'u64',2142 read: 'u64',2163 write: 'u64'2143 write: 'u64'2164 },2144 },2165 /**2145 /**2166 * Lookup278: sp_version::RuntimeVersion2146 * Lookup276: sp_version::RuntimeVersion2167 **/2147 **/2168 SpVersionRuntimeVersion: {2148 SpVersionRuntimeVersion: {2169 specName: 'Text',2149 specName: 'Text',2170 implName: 'Text',2150 implName: 'Text',2175 transactionVersion: 'u32',2155 transactionVersion: 'u32',2176 stateVersion: 'u8'2156 stateVersion: 'u8'2177 },2157 },2178 /**2158 /**2179 * Lookup282: frame_system::pallet::Error<T>2159 * Lookup280: frame_system::pallet::Error<T>2180 **/2160 **/2181 FrameSystemError: {2161 FrameSystemError: {2182 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']2162 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']2183 },2163 },2184 /**2164 /**2185 * Lookup284: orml_vesting::module::Error<T>2165 * Lookup282: orml_vesting::module::Error<T>2186 **/2166 **/2187 OrmlVestingModuleError: {2167 OrmlVestingModuleError: {2188 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']2168 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']2189 },2169 },2190 /**2170 /**2191 * Lookup286: cumulus_pallet_xcmp_queue::InboundChannelDetails2171 * Lookup284: cumulus_pallet_xcmp_queue::InboundChannelDetails2192 **/2172 **/2193 CumulusPalletXcmpQueueInboundChannelDetails: {2173 CumulusPalletXcmpQueueInboundChannelDetails: {2194 sender: 'u32',2174 sender: 'u32',2195 state: 'CumulusPalletXcmpQueueInboundState',2175 state: 'CumulusPalletXcmpQueueInboundState',2196 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'2176 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'2197 },2177 },2198 /**2178 /**2199 * Lookup287: cumulus_pallet_xcmp_queue::InboundState2179 * Lookup285: cumulus_pallet_xcmp_queue::InboundState2200 **/2180 **/2201 CumulusPalletXcmpQueueInboundState: {2181 CumulusPalletXcmpQueueInboundState: {2202 _enum: ['Ok', 'Suspended']2182 _enum: ['Ok', 'Suspended']2203 },2183 },2204 /**2184 /**2205 * Lookup290: polkadot_parachain::primitives::XcmpMessageFormat2185 * Lookup288: polkadot_parachain::primitives::XcmpMessageFormat2206 **/2186 **/2207 PolkadotParachainPrimitivesXcmpMessageFormat: {2187 PolkadotParachainPrimitivesXcmpMessageFormat: {2208 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']2188 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']2209 },2189 },2210 /**2190 /**2211 * Lookup293: cumulus_pallet_xcmp_queue::OutboundChannelDetails2191 * Lookup291: cumulus_pallet_xcmp_queue::OutboundChannelDetails2212 **/2192 **/2213 CumulusPalletXcmpQueueOutboundChannelDetails: {2193 CumulusPalletXcmpQueueOutboundChannelDetails: {2214 recipient: 'u32',2194 recipient: 'u32',2215 state: 'CumulusPalletXcmpQueueOutboundState',2195 state: 'CumulusPalletXcmpQueueOutboundState',2216 signalsExist: 'bool',2196 signalsExist: 'bool',2217 firstIndex: 'u16',2197 firstIndex: 'u16',2218 lastIndex: 'u16'2198 lastIndex: 'u16'2219 },2199 },2220 /**2200 /**2221 * Lookup294: cumulus_pallet_xcmp_queue::OutboundState2201 * Lookup292: cumulus_pallet_xcmp_queue::OutboundState2222 **/2202 **/2223 CumulusPalletXcmpQueueOutboundState: {2203 CumulusPalletXcmpQueueOutboundState: {2224 _enum: ['Ok', 'Suspended']2204 _enum: ['Ok', 'Suspended']2225 },2205 },2226 /**2206 /**2227 * Lookup296: cumulus_pallet_xcmp_queue::QueueConfigData2207 * Lookup294: cumulus_pallet_xcmp_queue::QueueConfigData2228 **/2208 **/2229 CumulusPalletXcmpQueueQueueConfigData: {2209 CumulusPalletXcmpQueueQueueConfigData: {2230 suspendThreshold: 'u32',2210 suspendThreshold: 'u32',2231 dropThreshold: 'u32',2211 dropThreshold: 'u32',2234 weightRestrictDecay: 'u64',2214 weightRestrictDecay: 'u64',2235 xcmpMaxIndividualWeight: 'u64'2215 xcmpMaxIndividualWeight: 'u64'2236 },2216 },2237 /**2217 /**2238 * Lookup298: cumulus_pallet_xcmp_queue::pallet::Error<T>2218 * Lookup296: cumulus_pallet_xcmp_queue::pallet::Error<T>2239 **/2219 **/2240 CumulusPalletXcmpQueueError: {2220 CumulusPalletXcmpQueueError: {2241 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']2221 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']2242 },2222 },2243 /**2223 /**2244 * Lookup299: pallet_xcm::pallet::Error<T>2224 * Lookup297: pallet_xcm::pallet::Error<T>2245 **/2225 **/2246 PalletXcmError: {2226 PalletXcmError: {2247 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']2227 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']2248 },2228 },2249 /**2229 /**2250 * Lookup300: cumulus_pallet_xcm::pallet::Error<T>2230 * Lookup298: cumulus_pallet_xcm::pallet::Error<T>2251 **/2231 **/2252 CumulusPalletXcmError: 'Null',2232 CumulusPalletXcmError: 'Null',2253 /**2233 /**2254 * Lookup301: cumulus_pallet_dmp_queue::ConfigData2234 * Lookup299: cumulus_pallet_dmp_queue::ConfigData2255 **/2235 **/2256 CumulusPalletDmpQueueConfigData: {2236 CumulusPalletDmpQueueConfigData: {2257 maxIndividual: 'u64'2237 maxIndividual: 'u64'2258 },2238 },2259 /**2239 /**2260 * Lookup302: cumulus_pallet_dmp_queue::PageIndexData2240 * Lookup300: cumulus_pallet_dmp_queue::PageIndexData2261 **/2241 **/2262 CumulusPalletDmpQueuePageIndexData: {2242 CumulusPalletDmpQueuePageIndexData: {2263 beginUsed: 'u32',2243 beginUsed: 'u32',2264 endUsed: 'u32',2244 endUsed: 'u32',2265 overweightCount: 'u64'2245 overweightCount: 'u64'2266 },2246 },2267 /**2247 /**2268 * Lookup305: cumulus_pallet_dmp_queue::pallet::Error<T>2248 * Lookup303: cumulus_pallet_dmp_queue::pallet::Error<T>2269 **/2249 **/2270 CumulusPalletDmpQueueError: {2250 CumulusPalletDmpQueueError: {2271 _enum: ['Unknown', 'OverLimit']2251 _enum: ['Unknown', 'OverLimit']2272 },2252 },2273 /**2253 /**2274 * Lookup309: pallet_unique::Error<T>2254 * Lookup307: pallet_unique::Error<T>2275 **/2255 **/2276 PalletUniqueError: {2256 PalletUniqueError: {2277 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']2257 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']2278 },2258 },2279 /**2259 /**2280 * Lookup310: up_data_structs::Collection<sp_core::crypto::AccountId32>2260 * Lookup308: up_data_structs::Collection<sp_core::crypto::AccountId32>2281 **/2261 **/2282 UpDataStructsCollection: {2262 UpDataStructsCollection: {2283 owner: 'AccountId32',2263 owner: 'AccountId32',2284 mode: 'UpDataStructsCollectionMode',2264 mode: 'UpDataStructsCollectionMode',2289 mintMode: 'bool',2269 mintMode: 'bool',2290 schemaVersion: 'UpDataStructsSchemaVersion',2270 schemaVersion: 'UpDataStructsSchemaVersion',2291 sponsorship: 'UpDataStructsSponsorshipState',2271 sponsorship: 'UpDataStructsSponsorshipState',2292 limits: 'UpDataStructsCollectionLimits',2272 limits: 'UpDataStructsCollectionLimits'2293 metaUpdatePermission: 'UpDataStructsMetaUpdatePermission'2294 },2273 },2295 /**2274 /**2296 * Lookup311: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>2275 * Lookup309: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>2297 **/2276 **/2298 UpDataStructsSponsorshipState: {2277 UpDataStructsSponsorshipState: {2299 _enum: {2278 _enum: {2300 Disabled: 'Null',2279 Disabled: 'Null',2301 Unconfirmed: 'AccountId32',2280 Unconfirmed: 'AccountId32',2302 Confirmed: 'AccountId32'2281 Confirmed: 'AccountId32'2303 }2282 }2304 },2283 },2305 /**2284 /**2306 * Lookup312: up_data_structs::Properties2285 * Lookup310: up_data_structs::Properties2307 **/2286 **/2308 UpDataStructsProperties: {2287 UpDataStructsProperties: {2309 map: 'UpDataStructsPropertiesMapBoundedVec',2288 map: 'UpDataStructsPropertiesMapBoundedVec',2310 consumedSpace: 'u32',2289 consumedSpace: 'u32',2311 spaceLimit: 'u32'2290 spaceLimit: 'u32'2312 },2291 },2313 /**2292 /**2314 * Lookup313: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>2293 * Lookup311: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>2315 **/2294 **/2316 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',2295 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',2317 /**2296 /**2318 * Lookup318: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>2297 * Lookup316: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>2319 **/2298 **/2320 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',2299 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',2321 /**2300 /**2322 * Lookup324: up_data_structs::CollectionField2301 * Lookup322: up_data_structs::CollectionField2323 **/2302 **/2324 UpDataStructsCollectionField: {2303 UpDataStructsCollectionField: {2325 _enum: ['ConstOnChainSchema', 'OffchainSchema']2304 _enum: ['ConstOnChainSchema', 'OffchainSchema']2326 },2305 },2327 /**2306 /**2328 * Lookup327: up_data_structs::CollectionStats2307 * Lookup325: up_data_structs::CollectionStats2329 **/2308 **/2330 UpDataStructsCollectionStats: {2309 UpDataStructsCollectionStats: {2331 created: 'u32',2310 created: 'u32',2332 destroyed: 'u32',2311 destroyed: 'u32',2333 alive: 'u32'2312 alive: 'u32'2334 },2313 },2335 /**2314 /**2336 * Lookup328: PhantomType::up_data_structs<up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>>2315 * Lookup326: PhantomType::up_data_structs<up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>>2337 **/2316 **/2338 PhantomTypeUpDataStructsTokenData: '[Lookup329;0]',2317 PhantomTypeUpDataStructsTokenData: '[Lookup327;0]',2339 /**2318 /**2340 * Lookup329: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2319 * Lookup327: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2341 **/2320 **/2342 UpDataStructsTokenData: {2321 UpDataStructsTokenData: {2343 constData: 'Bytes',2322 constData: 'Bytes',2344 properties: 'Vec<UpDataStructsProperty>',2323 properties: 'Vec<UpDataStructsProperty>',2345 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>'2324 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>'2346 },2325 },2347 /**2326 /**2348 * Lookup332: PhantomType::up_data_structs<up_data_structs::RpcCollection<sp_core::crypto::AccountId32>>2327 * Lookup330: PhantomType::up_data_structs<up_data_structs::RpcCollection<sp_core::crypto::AccountId32>>2349 **/2328 **/2350 PhantomTypeUpDataStructsRpcCollection: '[Lookup333;0]',2329 PhantomTypeUpDataStructsRpcCollection: '[Lookup331;0]',2351 /**2330 /**2352 * Lookup333: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>2331 * Lookup331: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>2353 **/2332 **/2354 UpDataStructsRpcCollection: {2333 UpDataStructsRpcCollection: {2355 owner: 'AccountId32',2334 owner: 'AccountId32',2356 mode: 'UpDataStructsCollectionMode',2335 mode: 'UpDataStructsCollectionMode',2364 sponsorship: 'UpDataStructsSponsorshipState',2343 sponsorship: 'UpDataStructsSponsorshipState',2365 limits: 'UpDataStructsCollectionLimits',2344 limits: 'UpDataStructsCollectionLimits',2366 constOnChainSchema: 'Bytes',2345 constOnChainSchema: 'Bytes',2367 metaUpdatePermission: 'UpDataStructsMetaUpdatePermission',2368 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2346 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2369 properties: 'Vec<UpDataStructsProperty>'2347 properties: 'Vec<UpDataStructsProperty>'2370 },2348 },2371 /**2349 /**2372 * Lookup335: PhantomType::up_data_structs<rmrk_types::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>>2350 * Lookup333: PhantomType::up_data_structs<rmrk_types::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>>2373 **/2351 **/2374 PhantomTypeUpDataStructsCollectionInfo: '[Lookup336;0]',2352 PhantomTypeUpDataStructsCollectionInfo: '[Lookup334;0]',2375 /**2353 /**2376 * Lookup336: rmrk_types::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>2354 * Lookup334: rmrk_types::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>2377 **/2355 **/2378 RmrkTypesCollectionInfo: {2356 RmrkTypesCollectionInfo: {2379 issuer: 'AccountId32',2357 issuer: 'AccountId32',2380 metadata: 'Bytes',2358 metadata: 'Bytes',2381 max: 'Option<u32>',2359 max: 'Option<u32>',2382 symbol: 'Bytes',2360 symbol: 'Bytes',2383 nftsCount: 'u32'2361 nftsCount: 'u32'2384 },2362 },2385 /**2363 /**2386 * Lookup340: PhantomType::up_data_structs<rmrk_types::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2364 * Lookup338: PhantomType::up_data_structs<rmrk_types::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2387 **/2365 **/2388 PhantomTypeUpDataStructsNftInfo: '[Lookup341;0]',2366 PhantomTypeUpDataStructsNftInfo: '[Lookup339;0]',2389 /**2367 /**2390 * Lookup341: rmrk_types::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>2368 * Lookup339: rmrk_types::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>2391 **/2369 **/2392 RmrkTypesNftInfo: {2370 RmrkTypesNftInfo: {2393 owner: 'RmrkTypesAccountIdOrCollectionNftTuple',2371 owner: 'RmrkTypesAccountIdOrCollectionNftTuple',2394 royalty: 'Option<RmrkTypesRoyaltyInfo>',2372 royalty: 'Option<RmrkTypesRoyaltyInfo>',2395 metadata: 'Bytes',2373 metadata: 'Bytes',2396 equipped: 'bool',2374 equipped: 'bool',2397 pending: 'bool'2375 pending: 'bool'2398 },2376 },2399 /**2377 /**2400 * Lookup342: rmrk_types::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>2378 * Lookup340: rmrk_types::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>2401 **/2379 **/2402 RmrkTypesAccountIdOrCollectionNftTuple: {2380 RmrkTypesAccountIdOrCollectionNftTuple: {2403 _enum: {2381 _enum: {2404 AccountId: 'AccountId32',2382 AccountId: 'AccountId32',2405 CollectionAndNftTuple: '(u32,u32)'2383 CollectionAndNftTuple: '(u32,u32)'2406 }2384 }2407 },2385 },2408 /**2386 /**2409 * Lookup344: rmrk_types::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>2387 * Lookup342: rmrk_types::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>2410 **/2388 **/2411 RmrkTypesRoyaltyInfo: {2389 RmrkTypesRoyaltyInfo: {2412 recipient: 'AccountId32',2390 recipient: 'AccountId32',2413 amount: 'Permill'2391 amount: 'Permill'2414 },2392 },2415 /**2393 /**2416 * Lookup346: PhantomType::up_data_structs<rmrk_types::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2394 * Lookup344: PhantomType::up_data_structs<rmrk_types::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2417 **/2395 **/2418 PhantomTypeUpDataStructsResourceInfo: '[Lookup347;0]',2396 PhantomTypeUpDataStructsResourceInfo: '[Lookup345;0]',2419 /**2397 /**2420 * Lookup347: rmrk_types::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2398 * Lookup345: rmrk_types::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2421 **/2399 **/2422 RmrkTypesResourceInfo: {2400 RmrkTypesResourceInfo: {2423 id: 'Bytes',2401 id: 'Bytes',2424 pending: 'bool',2402 pending: 'bool',2431 license: 'Option<Bytes>',2409 license: 'Option<Bytes>',2432 thumb: 'Option<Bytes>'2410 thumb: 'Option<Bytes>'2433 },2411 },2434 /**2412 /**2435 * Lookup353: PhantomType::up_data_structs<rmrk_types::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2413 * Lookup351: PhantomType::up_data_structs<rmrk_types::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2436 **/2414 **/2437 PhantomTypeUpDataStructsPropertyInfo: '[Lookup354;0]',2415 PhantomTypeUpDataStructsPropertyInfo: '[Lookup352;0]',2438 /**2416 /**2439 * Lookup354: rmrk_types::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2417 * Lookup352: rmrk_types::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2440 **/2418 **/2441 RmrkTypesPropertyInfo: {2419 RmrkTypesPropertyInfo: {2442 key: 'Bytes',2420 key: 'Bytes',2443 value: 'Bytes'2421 value: 'Bytes'2444 },2422 },2445 /**2423 /**2446 * Lookup358: PhantomType::up_data_structs<rmrk_types::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2424 * Lookup356: PhantomType::up_data_structs<rmrk_types::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2447 **/2425 **/2448 PhantomTypeUpDataStructsBaseInfo: '[Lookup359;0]',2426 PhantomTypeUpDataStructsBaseInfo: '[Lookup357;0]',2449 /**2427 /**2450 * Lookup359: rmrk_types::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>2428 * Lookup357: rmrk_types::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>2451 **/2429 **/2452 RmrkTypesBaseInfo: {2430 RmrkTypesBaseInfo: {2453 issuer: 'AccountId32',2431 issuer: 'AccountId32',2454 baseType: 'Bytes',2432 baseType: 'Bytes',2455 symbol: 'Bytes'2433 symbol: 'Bytes'2456 },2434 },2457 /**2435 /**2458 * Lookup361: PhantomType::up_data_structs<rmrk_types::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2436 * Lookup359: PhantomType::up_data_structs<rmrk_types::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>>2459 **/2437 **/2460 PhantomTypeUpDataStructsPartType: '[Lookup362;0]',2438 PhantomTypeUpDataStructsPartType: '[Lookup360;0]',2461 /**2439 /**2462 * Lookup362: rmrk_types::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2440 * Lookup360: rmrk_types::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2463 **/2441 **/2464 RmrkTypesPartType: {2442 RmrkTypesPartType: {2465 _enum: {2443 _enum: {2466 FixedPart: 'RmrkTypesFixedPart',2444 FixedPart: 'RmrkTypesFixedPart',2467 SlotPart: 'RmrkTypesSlotPart'2445 SlotPart: 'RmrkTypesSlotPart'2468 }2446 }2469 },2447 },2470 /**2448 /**2471 * Lookup364: rmrk_types::FixedPart<frame_support::storage::bounded_vec::BoundedVec<T, S>>2449 * Lookup362: rmrk_types::FixedPart<frame_support::storage::bounded_vec::BoundedVec<T, S>>2472 **/2450 **/2473 RmrkTypesFixedPart: {2451 RmrkTypesFixedPart: {2474 id: 'u32',2452 id: 'u32',2475 z: 'u32',2453 z: 'u32',2476 src: 'Bytes'2454 src: 'Bytes'2477 },2455 },2478 /**2456 /**2479 * Lookup365: rmrk_types::SlotPart<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2457 * Lookup363: rmrk_types::SlotPart<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>2480 **/2458 **/2481 RmrkTypesSlotPart: {2459 RmrkTypesSlotPart: {2482 id: 'u32',2460 id: 'u32',2483 equippable: 'RmrkTypesEquippableList',2461 equippable: 'RmrkTypesEquippableList',2484 src: 'Bytes',2462 src: 'Bytes',2485 z: 'u32'2463 z: 'u32'2486 },2464 },2487 /**2465 /**2488 * Lookup366: rmrk_types::EquippableList<frame_support::storage::bounded_vec::BoundedVec<T, S>>2466 * Lookup364: rmrk_types::EquippableList<frame_support::storage::bounded_vec::BoundedVec<T, S>>2489 **/2467 **/2490 RmrkTypesEquippableList: {2468 RmrkTypesEquippableList: {2491 _enum: {2469 _enum: {2492 All: 'Null',2470 All: 'Null',2493 Empty: 'Null',2471 Empty: 'Null',2494 Custom: 'Vec<u32>'2472 Custom: 'Vec<u32>'2495 }2473 }2496 },2474 },2497 /**2475 /**2498 * Lookup368: PhantomType::up_data_structs<rmrk_types::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, BoundedPropertyList>>2476 * Lookup366: PhantomType::up_data_structs<rmrk_types::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, BoundedPropertyList>>2499 **/2477 **/2500 PhantomTypeUpDataStructsTheme: '[Lookup369;0]',2478 PhantomTypeUpDataStructsTheme: '[Lookup367;0]',2501 /**2479 /**2502 * Lookup369: rmrk_types::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, BoundedPropertyList>2480 * Lookup367: rmrk_types::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, BoundedPropertyList>2503 **/2481 **/2504 RmrkTypesTheme: {2482 RmrkTypesTheme: {2505 name: 'Bytes',2483 name: 'Bytes',2506 properties: 'Vec<RmrkTypesThemeProperty>',2484 properties: 'Vec<RmrkTypesThemeProperty>',2507 inherit: 'bool'2485 inherit: 'bool'2508 },2486 },2509 /**2487 /**2510 * Lookup371: rmrk_types::ThemeProperty<frame_support::storage::bounded_vec::BoundedVec<T, S>>2488 * Lookup369: rmrk_types::ThemeProperty<frame_support::storage::bounded_vec::BoundedVec<T, S>>2511 **/2489 **/2512 RmrkTypesThemeProperty: {2490 RmrkTypesThemeProperty: {2513 key: 'Bytes',2491 key: 'Bytes',2514 value: 'Bytes'2492 value: 'Bytes'2515 },2493 },2516 /**2494 /**2517 * Lookup373: PhantomType::up_data_structs<rmrk_types::NftChild>2495 * Lookup371: PhantomType::up_data_structs<rmrk_types::NftChild>2518 **/2496 **/2519 PhantomTypeUpDataStructsNftChild: '[Lookup374;0]',2497 PhantomTypeUpDataStructsNftChild: '[Lookup372;0]',2520 /**2498 /**2521 * Lookup374: rmrk_types::NftChild2499 * Lookup372: rmrk_types::NftChild2522 **/2500 **/2523 RmrkTypesNftChild: {2501 RmrkTypesNftChild: {2524 collectionId: 'u32',2502 collectionId: 'u32',2525 nftId: 'u32'2503 nftId: 'u32'2526 },2504 },2527 /**2505 /**2528 * Lookup376: pallet_common::pallet::Error<T>2506 * Lookup374: pallet_common::pallet::Error<T>2529 **/2507 **/2530 PalletCommonError: {2508 PalletCommonError: {2531 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'NestingIsDisabled', 'OnlyOwnerAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'UnableToReadUnboundedKeys', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey']2509 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'NestingIsDisabled', 'OnlyOwnerAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey']2532 },2510 },2533 /**2511 /**2534 * Lookup378: pallet_fungible::pallet::Error<T>2512 * Lookup376: pallet_fungible::pallet::Error<T>2535 **/2513 **/2536 PalletFungibleError: {2514 PalletFungibleError: {2537 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']2515 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']2538 },2516 },2539 /**2517 /**2540 * Lookup379: pallet_refungible::ItemData2518 * Lookup377: pallet_refungible::ItemData2541 **/2519 **/2542 PalletRefungibleItemData: {2520 PalletRefungibleItemData: {2543 constData: 'Bytes',2521 constData: 'Bytes'2544 variableData: 'Bytes'2545 },2522 },2546 /**2523 /**2547 * Lookup383: pallet_refungible::pallet::Error<T>2524 * Lookup381: pallet_refungible::pallet::Error<T>2548 **/2525 **/2549 PalletRefungibleError: {2526 PalletRefungibleError: {2550 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']2527 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']2551 },2528 },2552 /**2529 /**2553 * Lookup384: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2530 * Lookup382: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2554 **/2531 **/2555 PalletNonfungibleItemData: {2532 PalletNonfungibleItemData: {2556 constData: 'Bytes',2533 constData: 'Bytes',2557 variableData: 'Bytes',2558 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'2534 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'2559 },2535 },2560 /**2536 /**2561 * Lookup385: pallet_nonfungible::pallet::Error<T>2537 * Lookup383: pallet_nonfungible::pallet::Error<T>2562 **/2538 **/2563 PalletNonfungibleError: {2539 PalletNonfungibleError: {2564 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount']2540 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount']2565 },2541 },2566 /**2542 /**2567 * Lookup386: pallet_structure::pallet::Error<T>2543 * Lookup384: pallet_structure::pallet::Error<T>2568 **/2544 **/2569 PalletStructureError: {2545 PalletStructureError: {2570 _enum: ['OuroborosDetected', 'DepthLimit', 'TokenNotFound']2546 _enum: ['OuroborosDetected', 'DepthLimit', 'TokenNotFound']2571 },2547 },2572 /**2548 /**2573 * Lookup389: pallet_evm::pallet::Error<T>2549 * Lookup387: pallet_evm::pallet::Error<T>2574 **/2550 **/2575 PalletEvmError: {2551 PalletEvmError: {2576 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']2552 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']2577 },2553 },2578 /**2554 /**2579 * Lookup392: fp_rpc::TransactionStatus2555 * Lookup390: fp_rpc::TransactionStatus2580 **/2556 **/2581 FpRpcTransactionStatus: {2557 FpRpcTransactionStatus: {2582 transactionHash: 'H256',2558 transactionHash: 'H256',2583 transactionIndex: 'u32',2559 transactionIndex: 'u32',2587 logs: 'Vec<EthereumLog>',2563 logs: 'Vec<EthereumLog>',2588 logsBloom: 'EthbloomBloom'2564 logsBloom: 'EthbloomBloom'2589 },2565 },2590 /**2566 /**2591 * Lookup394: ethbloom::Bloom2567 * Lookup392: ethbloom::Bloom2592 **/2568 **/2593 EthbloomBloom: '[u8;256]',2569 EthbloomBloom: '[u8;256]',2594 /**2570 /**2595 * Lookup396: ethereum::receipt::ReceiptV32571 * Lookup394: ethereum::receipt::ReceiptV32596 **/2572 **/2597 EthereumReceiptReceiptV3: {2573 EthereumReceiptReceiptV3: {2598 _enum: {2574 _enum: {2599 Legacy: 'EthereumReceiptEip658ReceiptData',2575 Legacy: 'EthereumReceiptEip658ReceiptData',2600 EIP2930: 'EthereumReceiptEip658ReceiptData',2576 EIP2930: 'EthereumReceiptEip658ReceiptData',2601 EIP1559: 'EthereumReceiptEip658ReceiptData'2577 EIP1559: 'EthereumReceiptEip658ReceiptData'2602 }2578 }2603 },2579 },2604 /**2580 /**2605 * Lookup397: ethereum::receipt::EIP658ReceiptData2581 * Lookup395: ethereum::receipt::EIP658ReceiptData2606 **/2582 **/2607 EthereumReceiptEip658ReceiptData: {2583 EthereumReceiptEip658ReceiptData: {2608 statusCode: 'u8',2584 statusCode: 'u8',2609 usedGas: 'U256',2585 usedGas: 'U256',2610 logsBloom: 'EthbloomBloom',2586 logsBloom: 'EthbloomBloom',2611 logs: 'Vec<EthereumLog>'2587 logs: 'Vec<EthereumLog>'2612 },2588 },2613 /**2589 /**2614 * Lookup398: ethereum::block::Block<ethereum::transaction::TransactionV2>2590 * Lookup396: ethereum::block::Block<ethereum::transaction::TransactionV2>2615 **/2591 **/2616 EthereumBlock: {2592 EthereumBlock: {2617 header: 'EthereumHeader',2593 header: 'EthereumHeader',2618 transactions: 'Vec<EthereumTransactionTransactionV2>',2594 transactions: 'Vec<EthereumTransactionTransactionV2>',2619 ommers: 'Vec<EthereumHeader>'2595 ommers: 'Vec<EthereumHeader>'2620 },2596 },2621 /**2597 /**2622 * Lookup399: ethereum::header::Header2598 * Lookup397: ethereum::header::Header2623 **/2599 **/2624 EthereumHeader: {2600 EthereumHeader: {2625 parentHash: 'H256',2601 parentHash: 'H256',2626 ommersHash: 'H256',2602 ommersHash: 'H256',2638 mixHash: 'H256',2614 mixHash: 'H256',2639 nonce: 'EthereumTypesHashH64'2615 nonce: 'EthereumTypesHashH64'2640 },2616 },2641 /**2617 /**2642 * Lookup400: ethereum_types::hash::H642618 * Lookup398: ethereum_types::hash::H642643 **/2619 **/2644 EthereumTypesHashH64: '[u8;8]',2620 EthereumTypesHashH64: '[u8;8]',2645 /**2621 /**2646 * Lookup405: pallet_ethereum::pallet::Error<T>2622 * Lookup403: pallet_ethereum::pallet::Error<T>2647 **/2623 **/2648 PalletEthereumError: {2624 PalletEthereumError: {2649 _enum: ['InvalidSignature', 'PreLogExists']2625 _enum: ['InvalidSignature', 'PreLogExists']2650 },2626 },2651 /**2627 /**2652 * Lookup406: pallet_evm_coder_substrate::pallet::Error<T>2628 * Lookup404: pallet_evm_coder_substrate::pallet::Error<T>2653 **/2629 **/2654 PalletEvmCoderSubstrateError: {2630 PalletEvmCoderSubstrateError: {2655 _enum: ['OutOfGas', 'OutOfFund']2631 _enum: ['OutOfGas', 'OutOfFund']2656 },2632 },2657 /**2633 /**2658 * Lookup407: pallet_evm_contract_helpers::SponsoringModeT2634 * Lookup405: pallet_evm_contract_helpers::SponsoringModeT2659 **/2635 **/2660 PalletEvmContractHelpersSponsoringModeT: {2636 PalletEvmContractHelpersSponsoringModeT: {2661 _enum: ['Disabled', 'Allowlisted', 'Generous']2637 _enum: ['Disabled', 'Allowlisted', 'Generous']2662 },2638 },2663 /**2639 /**2664 * Lookup409: pallet_evm_contract_helpers::pallet::Error<T>2640 * Lookup407: pallet_evm_contract_helpers::pallet::Error<T>2665 **/2641 **/2666 PalletEvmContractHelpersError: {2642 PalletEvmContractHelpersError: {2667 _enum: ['NoPermission']2643 _enum: ['NoPermission']2668 },2644 },2669 /**2645 /**2670 * Lookup410: pallet_evm_migration::pallet::Error<T>2646 * Lookup408: pallet_evm_migration::pallet::Error<T>2671 **/2647 **/2672 PalletEvmMigrationError: {2648 PalletEvmMigrationError: {2673 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']2649 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']2674 },2650 },2675 /**2651 /**2676 * Lookup412: sp_runtime::MultiSignature2652 * Lookup410: sp_runtime::MultiSignature2677 **/2653 **/2678 SpRuntimeMultiSignature: {2654 SpRuntimeMultiSignature: {2679 _enum: {2655 _enum: {2680 Ed25519: 'SpCoreEd25519Signature',2656 Ed25519: 'SpCoreEd25519Signature',2681 Sr25519: 'SpCoreSr25519Signature',2657 Sr25519: 'SpCoreSr25519Signature',2682 Ecdsa: 'SpCoreEcdsaSignature'2658 Ecdsa: 'SpCoreEcdsaSignature'2683 }2659 }2684 },2660 },2685 /**2661 /**2686 * Lookup413: sp_core::ed25519::Signature2662 * Lookup411: sp_core::ed25519::Signature2687 **/2663 **/2688 SpCoreEd25519Signature: '[u8;64]',2664 SpCoreEd25519Signature: '[u8;64]',2689 /**2665 /**2690 * Lookup415: sp_core::sr25519::Signature2666 * Lookup413: sp_core::sr25519::Signature2691 **/2667 **/2692 SpCoreSr25519Signature: '[u8;64]',2668 SpCoreSr25519Signature: '[u8;64]',2693 /**2669 /**2694 * Lookup416: sp_core::ecdsa::Signature2670 * Lookup414: sp_core::ecdsa::Signature2695 **/2671 **/2696 SpCoreEcdsaSignature: '[u8;65]',2672 SpCoreEcdsaSignature: '[u8;65]',2697 /**2673 /**2698 * Lookup419: frame_system::extensions::check_spec_version::CheckSpecVersion<T>2674 * Lookup417: frame_system::extensions::check_spec_version::CheckSpecVersion<T>2699 **/2675 **/2700 FrameSystemExtensionsCheckSpecVersion: 'Null',2676 FrameSystemExtensionsCheckSpecVersion: 'Null',2701 /**2677 /**2702 * Lookup420: frame_system::extensions::check_genesis::CheckGenesis<T>2678 * Lookup418: frame_system::extensions::check_genesis::CheckGenesis<T>2703 **/2679 **/2704 FrameSystemExtensionsCheckGenesis: 'Null',2680 FrameSystemExtensionsCheckGenesis: 'Null',2705 /**2681 /**2706 * Lookup423: frame_system::extensions::check_nonce::CheckNonce<T>2682 * Lookup421: frame_system::extensions::check_nonce::CheckNonce<T>2707 **/2683 **/2708 FrameSystemExtensionsCheckNonce: 'Compact<u32>',2684 FrameSystemExtensionsCheckNonce: 'Compact<u32>',2709 /**2685 /**2710 * Lookup424: frame_system::extensions::check_weight::CheckWeight<T>2686 * Lookup422: frame_system::extensions::check_weight::CheckWeight<T>2711 **/2687 **/2712 FrameSystemExtensionsCheckWeight: 'Null',2688 FrameSystemExtensionsCheckWeight: 'Null',2713 /**2689 /**2714 * Lookup425: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>2690 * Lookup423: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>2715 **/2691 **/2716 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',2692 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',2717 /**2693 /**2718 * Lookup426: opal_runtime::Runtime2694 * Lookup424: opal_runtime::Runtime2719 **/2695 **/2720 OpalRuntimeRuntime: 'Null',2696 OpalRuntimeRuntime: 'Null',2721 /**2697 /**2722 * Lookup427: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>2698 * Lookup425: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>2723 **/2699 **/2724 PalletEthereumFakeTransactionFinalizer: 'Null'2700 PalletEthereumFakeTransactionFinalizer: 'Null'2725};2701};27262702tests/src/interfaces/registry.tsdiffbeforeafterboth--- a/tests/src/interfaces/registry.ts
+++ b/tests/src/interfaces/registry.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PhantomTypeUpDataStructsBaseInfo, PhantomTypeUpDataStructsCollectionInfo, PhantomTypeUpDataStructsNftChild, PhantomTypeUpDataStructsNftInfo, PhantomTypeUpDataStructsPartType, PhantomTypeUpDataStructsPropertyInfo, PhantomTypeUpDataStructsResourceInfo, PhantomTypeUpDataStructsRpcCollection, PhantomTypeUpDataStructsTheme, PhantomTypeUpDataStructsTokenData, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTypesAccountIdOrCollectionNftTuple, RmrkTypesBaseInfo, RmrkTypesCollectionInfo, RmrkTypesEquippableList, RmrkTypesFixedPart, RmrkTypesNftChild, RmrkTypesNftInfo, RmrkTypesPartType, RmrkTypesPropertyInfo, RmrkTypesResourceInfo, RmrkTypesRoyaltyInfo, RmrkTypesSlotPart, RmrkTypesTheme, RmrkTypesThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionField, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PhantomTypeUpDataStructsBaseInfo, PhantomTypeUpDataStructsCollectionInfo, PhantomTypeUpDataStructsNftChild, PhantomTypeUpDataStructsNftInfo, PhantomTypeUpDataStructsPartType, PhantomTypeUpDataStructsPropertyInfo, PhantomTypeUpDataStructsResourceInfo, PhantomTypeUpDataStructsRpcCollection, PhantomTypeUpDataStructsTheme, PhantomTypeUpDataStructsTokenData, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTypesAccountIdOrCollectionNftTuple, RmrkTypesBaseInfo, RmrkTypesCollectionInfo, RmrkTypesEquippableList, RmrkTypesFixedPart, RmrkTypesNftChild, RmrkTypesNftInfo, RmrkTypesPartType, RmrkTypesPropertyInfo, RmrkTypesResourceInfo, RmrkTypesRoyaltyInfo, RmrkTypesSlotPart, RmrkTypesTheme, RmrkTypesThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionField, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/types/types/registry' {
export interface InterfaceTypes {
@@ -183,7 +183,6 @@
UpDataStructsCreateNftExData: UpDataStructsCreateNftExData;
UpDataStructsCreateReFungibleData: UpDataStructsCreateReFungibleData;
UpDataStructsCreateRefungibleExData: UpDataStructsCreateRefungibleExData;
- UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;
UpDataStructsNestingRule: UpDataStructsNestingRule;
UpDataStructsProperties: UpDataStructsProperties;
UpDataStructsPropertiesMapBoundedVec: UpDataStructsPropertiesMapBoundedVec;
tests/src/interfaces/rmrk/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/rmrk/definitions.ts
+++ b/tests/src/interfaces/rmrk/definitions.ts
@@ -33,14 +33,14 @@
types,
rpc: {
lastCollectionIdx: fn('Get the latest created collection id', [], 'u32'),
- collectionById: fn('Get collection by id', [{name: 'id', type: 'u32'}], 'Option<RmrkTraitsCollectionCollectionInfo>'),
+ collectionById: fn('Get collection by id', [{name: 'id', type: 'u32'}], 'Option<RmrkTypesCollectionInfo>'),
nftById: fn(
'Get NFT by collection id and NFT id',
[
{name: 'collectionId', type: 'u32'},
{name: 'nftId', type: 'u32'},
],
- 'Option<RmrkTraitsNftNftInfo>'
+ 'Option<RmrkTypesNftInfo>'
),
accountTokens: fn(
'Get tokens owned by an account in a collection',
@@ -56,12 +56,12 @@
{name: 'collectionId', type: 'u32'},
{name: 'nftId', type: 'u32'},
],
- 'Vec<RmrkTraitsNftNftChild>'
+ 'Vec<RmrkTypesNftChild>'
),
collectionProperties: fn(
'Get collection properties',
[{name: 'collectionId', type: 'u32'}],
- 'Vec<RmrkTraitsPropertyPropertyInfo>'
+ 'Vec<RmrkTypesPropertyInfo>'
),
nftProperties: fn(
'Get NFT properties',
@@ -69,7 +69,7 @@
{name: 'collectionId', type: 'u32'},
{name: 'nftId', type: 'u32'}
],
- 'Vec<RmrkTraitsPropertyPropertyInfo>'
+ 'Vec<RmrkTypesPropertyInfo>'
),
nftResources: fn(
'Get NFT resources',
@@ -77,7 +77,7 @@
{name: 'collectionId', type: 'u32'},
{name: 'nftId', type: 'u32'}
],
- 'Vec<RmrkTraitsResourceResourceInfo>'
+ 'Vec<RmrkTypesResourceInfo>'
),
nftResourcePriorities: fn(
'Get NFT resource priorities',
@@ -90,12 +90,12 @@
base: fn(
'Get base info',
[{name: 'baseId', type: 'u32'}],
- 'Option<RmrkTraitsBaseBaseInfo>'
+ 'Option<RmrkTypesBaseInfo>'
),
baseParts: fn(
'Get all Base\'s parts',
[{name: 'baseId', type: 'u32'}],
- 'Vec<RmrkTraitsPartPartType>'
+ 'Vec<RmrkTypesPartType>'
),
themeNames: fn(
'Get Base\'s theme names',
@@ -109,7 +109,7 @@
{name: 'themeName', type: 'String'},
{name: 'keys', type: 'Option<Vec<String>>'}
],
- 'Option<RmrkTraitsTheme>'
+ 'Option<RmrkTypesTheme>'
)
}
};
tests/src/interfaces/rmrk/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/rmrk/types.ts
+++ b/tests/src/interfaces/rmrk/types.ts
@@ -446,9 +446,6 @@
/** @name FrameSupportPalletId */
export interface FrameSupportPalletId extends U8aFixed {}
-/** @name FrameSupportStorageBoundedBTreeSet */
-export interface FrameSupportStorageBoundedBTreeSet extends BTreeSet<u32> {}
-
/** @name FrameSupportTokensMiscBalanceStatus */
export interface FrameSupportTokensMiscBalanceStatus extends Enum {
readonly isFree: boolean;
@@ -875,7 +872,6 @@
readonly isCollectionDescriptionLimitExceeded: boolean;
readonly isCollectionTokenPrefixLimitExceeded: boolean;
readonly isTotalCollectionsLimitExceeded: boolean;
- readonly isTokenVariableDataLimitExceeded: boolean;
readonly isCollectionAdminCountExceeded: boolean;
readonly isCollectionLimitBoundsExceeded: boolean;
readonly isOwnerPermissionsCantBeReverted: boolean;
@@ -896,10 +892,10 @@
readonly isCollectionFieldSizeExceeded: boolean;
readonly isNoSpaceForProperty: boolean;
readonly isPropertyLimitReached: boolean;
- readonly isUnableToReadUnboundedKeys: boolean;
+ readonly isPropertyKeyIsTooLong: boolean;
readonly isInvalidCharacterInPropertyKey: boolean;
readonly isEmptyPropertyKey: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'UnableToReadUnboundedKeys' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
}
/** @name PalletCommonEvent */
@@ -1115,7 +1111,6 @@
/** @name PalletNonfungibleItemData */
export interface PalletNonfungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
@@ -1131,7 +1126,6 @@
/** @name PalletRefungibleItemData */
export interface PalletRefungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
}
/** @name PalletStructureCall */
@@ -1438,17 +1432,6 @@
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
- } & Struct;
- readonly isSetVariableMetaData: boolean;
- readonly asSetVariableMetaData: {
- readonly collectionId: u32;
- readonly itemId: u32;
- readonly data: Bytes;
- } & Struct;
- readonly isSetMetaUpdatePermissionFlag: boolean;
- readonly asSetMetaUpdatePermissionFlag: {
- readonly collectionId: u32;
- readonly value: UpDataStructsMetaUpdatePermission;
} & Struct;
readonly isSetSchemaVersion: boolean;
readonly asSetSchemaVersion: {
@@ -1470,7 +1453,7 @@
readonly collectionId: u32;
readonly newLimit: UpDataStructsCollectionLimits;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetVariableMetaData' | 'SetMetaUpdatePermissionFlag' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
}
/** @name PalletUniqueError */
@@ -1632,34 +1615,34 @@
}
/** @name PhantomTypeUpDataStructsBaseInfo */
-export interface PhantomTypeUpDataStructsBaseInfo extends Vec<Lookup359> {}
+export interface PhantomTypeUpDataStructsBaseInfo extends Vec<Lookup357> {}
/** @name PhantomTypeUpDataStructsCollectionInfo */
-export interface PhantomTypeUpDataStructsCollectionInfo extends Vec<Lookup336> {}
+export interface PhantomTypeUpDataStructsCollectionInfo extends Vec<Lookup334> {}
/** @name PhantomTypeUpDataStructsNftChild */
-export interface PhantomTypeUpDataStructsNftChild extends Vec<Lookup374> {}
+export interface PhantomTypeUpDataStructsNftChild extends Vec<Lookup372> {}
/** @name PhantomTypeUpDataStructsNftInfo */
-export interface PhantomTypeUpDataStructsNftInfo extends Vec<Lookup341> {}
+export interface PhantomTypeUpDataStructsNftInfo extends Vec<Lookup339> {}
/** @name PhantomTypeUpDataStructsPartType */
-export interface PhantomTypeUpDataStructsPartType extends Vec<Lookup362> {}
+export interface PhantomTypeUpDataStructsPartType extends Vec<Lookup360> {}
/** @name PhantomTypeUpDataStructsPropertyInfo */
-export interface PhantomTypeUpDataStructsPropertyInfo extends Vec<Lookup354> {}
+export interface PhantomTypeUpDataStructsPropertyInfo extends Vec<Lookup352> {}
/** @name PhantomTypeUpDataStructsResourceInfo */
-export interface PhantomTypeUpDataStructsResourceInfo extends Vec<Lookup347> {}
+export interface PhantomTypeUpDataStructsResourceInfo extends Vec<Lookup345> {}
/** @name PhantomTypeUpDataStructsRpcCollection */
-export interface PhantomTypeUpDataStructsRpcCollection extends Vec<Lookup333> {}
+export interface PhantomTypeUpDataStructsRpcCollection extends Vec<Lookup331> {}
/** @name PhantomTypeUpDataStructsTheme */
-export interface PhantomTypeUpDataStructsTheme extends Vec<Lookup369> {}
+export interface PhantomTypeUpDataStructsTheme extends Vec<Lookup367> {}
/** @name PhantomTypeUpDataStructsTokenData */
-export interface PhantomTypeUpDataStructsTokenData extends Vec<Lookup329> {}
+export interface PhantomTypeUpDataStructsTokenData extends Vec<Lookup327> {}
/** @name PolkadotCorePrimitivesInboundDownwardMessage */
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
@@ -1963,7 +1946,6 @@
readonly schemaVersion: UpDataStructsSchemaVersion;
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
}
/** @name UpDataStructsCollectionField */
@@ -2015,7 +1997,6 @@
readonly pendingSponsor: Option<AccountId32>;
readonly limits: Option<UpDataStructsCollectionLimits>;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: Option<UpDataStructsMetaUpdatePermission>;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
@@ -2052,14 +2033,12 @@
/** @name UpDataStructsCreateNftData */
export interface UpDataStructsCreateNftData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
}
/** @name UpDataStructsCreateNftExData */
export interface UpDataStructsCreateNftExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
@@ -2067,31 +2046,21 @@
/** @name UpDataStructsCreateReFungibleData */
export interface UpDataStructsCreateReFungibleData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly pieces: u128;
}
/** @name UpDataStructsCreateRefungibleExData */
export interface UpDataStructsCreateRefungibleExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
}
-/** @name UpDataStructsMetaUpdatePermission */
-export interface UpDataStructsMetaUpdatePermission extends Enum {
- readonly isItemOwner: boolean;
- readonly isAdmin: boolean;
- readonly isNone: boolean;
- readonly type: 'ItemOwner' | 'Admin' | 'None';
-}
-
/** @name UpDataStructsNestingRule */
export interface UpDataStructsNestingRule extends Enum {
readonly isDisabled: boolean;
readonly isOwner: boolean;
readonly isOwnerRestricted: boolean;
- readonly asOwnerRestricted: FrameSupportStorageBoundedBTreeSet;
+ readonly asOwnerRestricted: BTreeSet<u32>;
readonly type: 'Disabled' | 'Owner' | 'OwnerRestricted';
}
@@ -2141,7 +2110,6 @@
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -1493,17 +1493,6 @@
readonly itemId: u32;
readonly value: u128;
} & Struct;
- readonly isSetVariableMetaData: boolean;
- readonly asSetVariableMetaData: {
- readonly collectionId: u32;
- readonly itemId: u32;
- readonly data: Bytes;
- } & Struct;
- readonly isSetMetaUpdatePermissionFlag: boolean;
- readonly asSetMetaUpdatePermissionFlag: {
- readonly collectionId: u32;
- readonly value: UpDataStructsMetaUpdatePermission;
- } & Struct;
readonly isSetSchemaVersion: boolean;
readonly asSetSchemaVersion: {
readonly collectionId: u32;
@@ -1524,7 +1513,7 @@
readonly collectionId: u32;
readonly newLimit: UpDataStructsCollectionLimits;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetVariableMetaData' | 'SetMetaUpdatePermissionFlag' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
}
/** @name UpDataStructsCollectionMode (156) */
@@ -1548,7 +1537,6 @@
readonly pendingSponsor: Option<AccountId32>;
readonly limits: Option<UpDataStructsCollectionLimits>;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: Option<UpDataStructsMetaUpdatePermission>;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
@@ -1598,34 +1586,26 @@
readonly type: 'Disabled' | 'Owner' | 'OwnerRestricted';
}
- /** @name UpDataStructsMetaUpdatePermission (177) */
- export interface UpDataStructsMetaUpdatePermission extends Enum {
- readonly isItemOwner: boolean;
- readonly isAdmin: boolean;
- readonly isNone: boolean;
- readonly type: 'ItemOwner' | 'Admin' | 'None';
- }
-
- /** @name UpDataStructsPropertyKeyPermission (179) */
+ /** @name UpDataStructsPropertyKeyPermission (177) */
export interface UpDataStructsPropertyKeyPermission extends Struct {
readonly key: Bytes;
readonly permission: UpDataStructsPropertyPermission;
}
- /** @name UpDataStructsPropertyPermission (181) */
+ /** @name UpDataStructsPropertyPermission (179) */
export interface UpDataStructsPropertyPermission extends Struct {
readonly mutable: bool;
readonly collectionAdmin: bool;
readonly tokenOwner: bool;
}
- /** @name UpDataStructsProperty (184) */
+ /** @name UpDataStructsProperty (182) */
export interface UpDataStructsProperty extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name PalletEvmAccountBasicCrossAccountIdRepr (186) */
+ /** @name PalletEvmAccountBasicCrossAccountIdRepr (184) */
export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {
readonly isSubstrate: boolean;
readonly asSubstrate: AccountId32;
@@ -1634,7 +1614,7 @@
readonly type: 'Substrate' | 'Ethereum';
}
- /** @name UpDataStructsCreateItemData (188) */
+ /** @name UpDataStructsCreateItemData (186) */
export interface UpDataStructsCreateItemData extends Enum {
readonly isNft: boolean;
readonly asNft: UpDataStructsCreateNftData;
@@ -1645,26 +1625,24 @@
readonly type: 'Nft' | 'Fungible' | 'ReFungible';
}
- /** @name UpDataStructsCreateNftData (189) */
+ /** @name UpDataStructsCreateNftData (187) */
export interface UpDataStructsCreateNftData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsCreateFungibleData (191) */
+ /** @name UpDataStructsCreateFungibleData (189) */
export interface UpDataStructsCreateFungibleData extends Struct {
readonly value: u128;
}
- /** @name UpDataStructsCreateReFungibleData (192) */
+ /** @name UpDataStructsCreateReFungibleData (190) */
export interface UpDataStructsCreateReFungibleData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly pieces: u128;
}
- /** @name UpDataStructsCreateItemExData (196) */
+ /** @name UpDataStructsCreateItemExData (194) */
export interface UpDataStructsCreateItemExData extends Enum {
readonly isNft: boolean;
readonly asNft: Vec<UpDataStructsCreateNftExData>;
@@ -1677,28 +1655,26 @@
readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';
}
- /** @name UpDataStructsCreateNftExData (198) */
+ /** @name UpDataStructsCreateNftExData (196) */
export interface UpDataStructsCreateNftExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
- /** @name UpDataStructsCreateRefungibleExData (205) */
+ /** @name UpDataStructsCreateRefungibleExData (203) */
export interface UpDataStructsCreateRefungibleExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
}
- /** @name PalletTemplateTransactionPaymentCall (207) */
+ /** @name PalletTemplateTransactionPaymentCall (205) */
export type PalletTemplateTransactionPaymentCall = Null;
- /** @name PalletStructureCall (208) */
+ /** @name PalletStructureCall (206) */
export type PalletStructureCall = Null;
- /** @name PalletEvmCall (209) */
+ /** @name PalletEvmCall (207) */
export interface PalletEvmCall extends Enum {
readonly isWithdraw: boolean;
readonly asWithdraw: {
@@ -1743,7 +1719,7 @@
readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';
}
- /** @name PalletEthereumCall (215) */
+ /** @name PalletEthereumCall (213) */
export interface PalletEthereumCall extends Enum {
readonly isTransact: boolean;
readonly asTransact: {
@@ -1752,7 +1728,7 @@
readonly type: 'Transact';
}
- /** @name EthereumTransactionTransactionV2 (216) */
+ /** @name EthereumTransactionTransactionV2 (214) */
export interface EthereumTransactionTransactionV2 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: EthereumTransactionLegacyTransaction;
@@ -1763,7 +1739,7 @@
readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
}
- /** @name EthereumTransactionLegacyTransaction (217) */
+ /** @name EthereumTransactionLegacyTransaction (215) */
export interface EthereumTransactionLegacyTransaction extends Struct {
readonly nonce: U256;
readonly gasPrice: U256;
@@ -1774,7 +1750,7 @@
readonly signature: EthereumTransactionTransactionSignature;
}
- /** @name EthereumTransactionTransactionAction (218) */
+ /** @name EthereumTransactionTransactionAction (216) */
export interface EthereumTransactionTransactionAction extends Enum {
readonly isCall: boolean;
readonly asCall: H160;
@@ -1782,14 +1758,14 @@
readonly type: 'Call' | 'Create';
}
- /** @name EthereumTransactionTransactionSignature (219) */
+ /** @name EthereumTransactionTransactionSignature (217) */
export interface EthereumTransactionTransactionSignature extends Struct {
readonly v: u64;
readonly r: H256;
readonly s: H256;
}
- /** @name EthereumTransactionEip2930Transaction (221) */
+ /** @name EthereumTransactionEip2930Transaction (219) */
export interface EthereumTransactionEip2930Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
@@ -1804,13 +1780,13 @@
readonly s: H256;
}
- /** @name EthereumTransactionAccessListItem (223) */
+ /** @name EthereumTransactionAccessListItem (221) */
export interface EthereumTransactionAccessListItem extends Struct {
readonly address: H160;
readonly storageKeys: Vec<H256>;
}
- /** @name EthereumTransactionEip1559Transaction (224) */
+ /** @name EthereumTransactionEip1559Transaction (222) */
export interface EthereumTransactionEip1559Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
@@ -1826,7 +1802,7 @@
readonly s: H256;
}
- /** @name PalletEvmMigrationCall (225) */
+ /** @name PalletEvmMigrationCall (223) */
export interface PalletEvmMigrationCall extends Enum {
readonly isBegin: boolean;
readonly asBegin: {
@@ -1845,7 +1821,7 @@
readonly type: 'Begin' | 'SetData' | 'Finish';
}
- /** @name PalletSudoEvent (228) */
+ /** @name PalletSudoEvent (226) */
export interface PalletSudoEvent extends Enum {
readonly isSudid: boolean;
readonly asSudid: {
@@ -1862,7 +1838,7 @@
readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';
}
- /** @name SpRuntimeDispatchError (230) */
+ /** @name SpRuntimeDispatchError (228) */
export interface SpRuntimeDispatchError extends Enum {
readonly isOther: boolean;
readonly isCannotLookup: boolean;
@@ -1881,13 +1857,13 @@
readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';
}
- /** @name SpRuntimeModuleError (231) */
+ /** @name SpRuntimeModuleError (229) */
export interface SpRuntimeModuleError extends Struct {
readonly index: u8;
readonly error: U8aFixed;
}
- /** @name SpRuntimeTokenError (232) */
+ /** @name SpRuntimeTokenError (230) */
export interface SpRuntimeTokenError extends Enum {
readonly isNoFunds: boolean;
readonly isWouldDie: boolean;
@@ -1899,7 +1875,7 @@
readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';
}
- /** @name SpRuntimeArithmeticError (233) */
+ /** @name SpRuntimeArithmeticError (231) */
export interface SpRuntimeArithmeticError extends Enum {
readonly isUnderflow: boolean;
readonly isOverflow: boolean;
@@ -1907,20 +1883,20 @@
readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';
}
- /** @name SpRuntimeTransactionalError (234) */
+ /** @name SpRuntimeTransactionalError (232) */
export interface SpRuntimeTransactionalError extends Enum {
readonly isLimitReached: boolean;
readonly isNoLayer: boolean;
readonly type: 'LimitReached' | 'NoLayer';
}
- /** @name PalletSudoError (235) */
+ /** @name PalletSudoError (233) */
export interface PalletSudoError extends Enum {
readonly isRequireSudo: boolean;
readonly type: 'RequireSudo';
}
- /** @name FrameSystemAccountInfo (236) */
+ /** @name FrameSystemAccountInfo (234) */
export interface FrameSystemAccountInfo extends Struct {
readonly nonce: u32;
readonly consumers: u32;
@@ -1929,19 +1905,19 @@
readonly data: PalletBalancesAccountData;
}
- /** @name FrameSupportWeightsPerDispatchClassU64 (237) */
+ /** @name FrameSupportWeightsPerDispatchClassU64 (235) */
export interface FrameSupportWeightsPerDispatchClassU64 extends Struct {
readonly normal: u64;
readonly operational: u64;
readonly mandatory: u64;
}
- /** @name SpRuntimeDigest (238) */
+ /** @name SpRuntimeDigest (236) */
export interface SpRuntimeDigest extends Struct {
readonly logs: Vec<SpRuntimeDigestDigestItem>;
}
- /** @name SpRuntimeDigestDigestItem (240) */
+ /** @name SpRuntimeDigestDigestItem (238) */
export interface SpRuntimeDigestDigestItem extends Enum {
readonly isOther: boolean;
readonly asOther: Bytes;
@@ -1955,14 +1931,14 @@
readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';
}
- /** @name FrameSystemEventRecord (242) */
+ /** @name FrameSystemEventRecord (240) */
export interface FrameSystemEventRecord extends Struct {
readonly phase: FrameSystemPhase;
readonly event: Event;
readonly topics: Vec<H256>;
}
- /** @name FrameSystemEvent (244) */
+ /** @name FrameSystemEvent (242) */
export interface FrameSystemEvent extends Enum {
readonly isExtrinsicSuccess: boolean;
readonly asExtrinsicSuccess: {
@@ -1990,14 +1966,14 @@
readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';
}
- /** @name FrameSupportWeightsDispatchInfo (245) */
+ /** @name FrameSupportWeightsDispatchInfo (243) */
export interface FrameSupportWeightsDispatchInfo extends Struct {
readonly weight: u64;
readonly class: FrameSupportWeightsDispatchClass;
readonly paysFee: FrameSupportWeightsPays;
}
- /** @name FrameSupportWeightsDispatchClass (246) */
+ /** @name FrameSupportWeightsDispatchClass (244) */
export interface FrameSupportWeightsDispatchClass extends Enum {
readonly isNormal: boolean;
readonly isOperational: boolean;
@@ -2005,14 +1981,14 @@
readonly type: 'Normal' | 'Operational' | 'Mandatory';
}
- /** @name FrameSupportWeightsPays (247) */
+ /** @name FrameSupportWeightsPays (245) */
export interface FrameSupportWeightsPays extends Enum {
readonly isYes: boolean;
readonly isNo: boolean;
readonly type: 'Yes' | 'No';
}
- /** @name OrmlVestingModuleEvent (248) */
+ /** @name OrmlVestingModuleEvent (246) */
export interface OrmlVestingModuleEvent extends Enum {
readonly isVestingScheduleAdded: boolean;
readonly asVestingScheduleAdded: {
@@ -2032,7 +2008,7 @@
readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';
}
- /** @name CumulusPalletXcmpQueueEvent (249) */
+ /** @name CumulusPalletXcmpQueueEvent (247) */
export interface CumulusPalletXcmpQueueEvent extends Enum {
readonly isSuccess: boolean;
readonly asSuccess: Option<H256>;
@@ -2053,7 +2029,7 @@
readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';
}
- /** @name PalletXcmEvent (250) */
+ /** @name PalletXcmEvent (248) */
export interface PalletXcmEvent extends Enum {
readonly isAttempted: boolean;
readonly asAttempted: XcmV2TraitsOutcome;
@@ -2090,7 +2066,7 @@
readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';
}
- /** @name XcmV2TraitsOutcome (251) */
+ /** @name XcmV2TraitsOutcome (249) */
export interface XcmV2TraitsOutcome extends Enum {
readonly isComplete: boolean;
readonly asComplete: u64;
@@ -2101,7 +2077,7 @@
readonly type: 'Complete' | 'Incomplete' | 'Error';
}
- /** @name CumulusPalletXcmEvent (253) */
+ /** @name CumulusPalletXcmEvent (251) */
export interface CumulusPalletXcmEvent extends Enum {
readonly isInvalidFormat: boolean;
readonly asInvalidFormat: U8aFixed;
@@ -2112,7 +2088,7 @@
readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';
}
- /** @name CumulusPalletDmpQueueEvent (254) */
+ /** @name CumulusPalletDmpQueueEvent (252) */
export interface CumulusPalletDmpQueueEvent extends Enum {
readonly isInvalidFormat: boolean;
readonly asInvalidFormat: U8aFixed;
@@ -2129,7 +2105,7 @@
readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';
}
- /** @name PalletUniqueRawEvent (255) */
+ /** @name PalletUniqueRawEvent (253) */
export interface PalletUniqueRawEvent extends Enum {
readonly isCollectionSponsorRemoved: boolean;
readonly asCollectionSponsorRemoved: u32;
@@ -2162,7 +2138,7 @@
readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'ConstOnChainSchemaSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'MintPermissionSet' | 'OffchainSchemaSet' | 'PublicAccessModeSet' | 'SchemaVersionSet';
}
- /** @name PalletCommonEvent (256) */
+ /** @name PalletCommonEvent (254) */
export interface PalletCommonEvent extends Enum {
readonly isCollectionCreated: boolean;
readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;
@@ -2189,14 +2165,14 @@
readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';
}
- /** @name PalletStructureEvent (257) */
+ /** @name PalletStructureEvent (255) */
export interface PalletStructureEvent extends Enum {
readonly isExecuted: boolean;
readonly asExecuted: Result<Null, SpRuntimeDispatchError>;
readonly type: 'Executed';
}
- /** @name PalletEvmEvent (258) */
+ /** @name PalletEvmEvent (256) */
export interface PalletEvmEvent extends Enum {
readonly isLog: boolean;
readonly asLog: EthereumLog;
@@ -2215,21 +2191,21 @@
readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';
}
- /** @name EthereumLog (259) */
+ /** @name EthereumLog (257) */
export interface EthereumLog extends Struct {
readonly address: H160;
readonly topics: Vec<H256>;
readonly data: Bytes;
}
- /** @name PalletEthereumEvent (260) */
+ /** @name PalletEthereumEvent (258) */
export interface PalletEthereumEvent extends Enum {
readonly isExecuted: boolean;
readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;
readonly type: 'Executed';
}
- /** @name EvmCoreErrorExitReason (261) */
+ /** @name EvmCoreErrorExitReason (259) */
export interface EvmCoreErrorExitReason extends Enum {
readonly isSucceed: boolean;
readonly asSucceed: EvmCoreErrorExitSucceed;
@@ -2242,7 +2218,7 @@
readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';
}
- /** @name EvmCoreErrorExitSucceed (262) */
+ /** @name EvmCoreErrorExitSucceed (260) */
export interface EvmCoreErrorExitSucceed extends Enum {
readonly isStopped: boolean;
readonly isReturned: boolean;
@@ -2250,7 +2226,7 @@
readonly type: 'Stopped' | 'Returned' | 'Suicided';
}
- /** @name EvmCoreErrorExitError (263) */
+ /** @name EvmCoreErrorExitError (261) */
export interface EvmCoreErrorExitError extends Enum {
readonly isStackUnderflow: boolean;
readonly isStackOverflow: boolean;
@@ -2271,13 +2247,13 @@
readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';
}
- /** @name EvmCoreErrorExitRevert (266) */
+ /** @name EvmCoreErrorExitRevert (264) */
export interface EvmCoreErrorExitRevert extends Enum {
readonly isReverted: boolean;
readonly type: 'Reverted';
}
- /** @name EvmCoreErrorExitFatal (267) */
+ /** @name EvmCoreErrorExitFatal (265) */
export interface EvmCoreErrorExitFatal extends Enum {
readonly isNotSupported: boolean;
readonly isUnhandledInterrupt: boolean;
@@ -2288,7 +2264,7 @@
readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';
}
- /** @name FrameSystemPhase (268) */
+ /** @name FrameSystemPhase (266) */
export interface FrameSystemPhase extends Enum {
readonly isApplyExtrinsic: boolean;
readonly asApplyExtrinsic: u32;
@@ -2297,27 +2273,27 @@
readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';
}
- /** @name FrameSystemLastRuntimeUpgradeInfo (270) */
+ /** @name FrameSystemLastRuntimeUpgradeInfo (268) */
export interface FrameSystemLastRuntimeUpgradeInfo extends Struct {
readonly specVersion: Compact<u32>;
readonly specName: Text;
}
- /** @name FrameSystemLimitsBlockWeights (271) */
+ /** @name FrameSystemLimitsBlockWeights (269) */
export interface FrameSystemLimitsBlockWeights extends Struct {
readonly baseBlock: u64;
readonly maxBlock: u64;
readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;
}
- /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (272) */
+ /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (270) */
export interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {
readonly normal: FrameSystemLimitsWeightsPerClass;
readonly operational: FrameSystemLimitsWeightsPerClass;
readonly mandatory: FrameSystemLimitsWeightsPerClass;
}
- /** @name FrameSystemLimitsWeightsPerClass (273) */
+ /** @name FrameSystemLimitsWeightsPerClass (271) */
export interface FrameSystemLimitsWeightsPerClass extends Struct {
readonly baseExtrinsic: u64;
readonly maxExtrinsic: Option<u64>;
@@ -2325,25 +2301,25 @@
readonly reserved: Option<u64>;
}
- /** @name FrameSystemLimitsBlockLength (275) */
+ /** @name FrameSystemLimitsBlockLength (273) */
export interface FrameSystemLimitsBlockLength extends Struct {
readonly max: FrameSupportWeightsPerDispatchClassU32;
}
- /** @name FrameSupportWeightsPerDispatchClassU32 (276) */
+ /** @name FrameSupportWeightsPerDispatchClassU32 (274) */
export interface FrameSupportWeightsPerDispatchClassU32 extends Struct {
readonly normal: u32;
readonly operational: u32;
readonly mandatory: u32;
}
- /** @name FrameSupportWeightsRuntimeDbWeight (277) */
+ /** @name FrameSupportWeightsRuntimeDbWeight (275) */
export interface FrameSupportWeightsRuntimeDbWeight extends Struct {
readonly read: u64;
readonly write: u64;
}
- /** @name SpVersionRuntimeVersion (278) */
+ /** @name SpVersionRuntimeVersion (276) */
export interface SpVersionRuntimeVersion extends Struct {
readonly specName: Text;
readonly implName: Text;
@@ -2355,7 +2331,7 @@
readonly stateVersion: u8;
}
- /** @name FrameSystemError (282) */
+ /** @name FrameSystemError (280) */
export interface FrameSystemError extends Enum {
readonly isInvalidSpecName: boolean;
readonly isSpecVersionNeedsToIncrease: boolean;
@@ -2366,7 +2342,7 @@
readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';
}
- /** @name OrmlVestingModuleError (284) */
+ /** @name OrmlVestingModuleError (282) */
export interface OrmlVestingModuleError extends Enum {
readonly isZeroVestingPeriod: boolean;
readonly isZeroVestingPeriodCount: boolean;
@@ -2377,21 +2353,21 @@
readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';
}
- /** @name CumulusPalletXcmpQueueInboundChannelDetails (286) */
+ /** @name CumulusPalletXcmpQueueInboundChannelDetails (284) */
export interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {
readonly sender: u32;
readonly state: CumulusPalletXcmpQueueInboundState;
readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;
}
- /** @name CumulusPalletXcmpQueueInboundState (287) */
+ /** @name CumulusPalletXcmpQueueInboundState (285) */
export interface CumulusPalletXcmpQueueInboundState extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
readonly type: 'Ok' | 'Suspended';
}
- /** @name PolkadotParachainPrimitivesXcmpMessageFormat (290) */
+ /** @name PolkadotParachainPrimitivesXcmpMessageFormat (288) */
export interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {
readonly isConcatenatedVersionedXcm: boolean;
readonly isConcatenatedEncodedBlob: boolean;
@@ -2399,7 +2375,7 @@
readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
}
- /** @name CumulusPalletXcmpQueueOutboundChannelDetails (293) */
+ /** @name CumulusPalletXcmpQueueOutboundChannelDetails (291) */
export interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {
readonly recipient: u32;
readonly state: CumulusPalletXcmpQueueOutboundState;
@@ -2408,14 +2384,14 @@
readonly lastIndex: u16;
}
- /** @name CumulusPalletXcmpQueueOutboundState (294) */
+ /** @name CumulusPalletXcmpQueueOutboundState (292) */
export interface CumulusPalletXcmpQueueOutboundState extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
readonly type: 'Ok' | 'Suspended';
}
- /** @name CumulusPalletXcmpQueueQueueConfigData (296) */
+ /** @name CumulusPalletXcmpQueueQueueConfigData (294) */
export interface CumulusPalletXcmpQueueQueueConfigData extends Struct {
readonly suspendThreshold: u32;
readonly dropThreshold: u32;
@@ -2425,7 +2401,7 @@
readonly xcmpMaxIndividualWeight: u64;
}
- /** @name CumulusPalletXcmpQueueError (298) */
+ /** @name CumulusPalletXcmpQueueError (296) */
export interface CumulusPalletXcmpQueueError extends Enum {
readonly isFailedToSend: boolean;
readonly isBadXcmOrigin: boolean;
@@ -2435,7 +2411,7 @@
readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';
}
- /** @name PalletXcmError (299) */
+ /** @name PalletXcmError (297) */
export interface PalletXcmError extends Enum {
readonly isUnreachable: boolean;
readonly isSendFailure: boolean;
@@ -2453,29 +2429,29 @@
readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';
}
- /** @name CumulusPalletXcmError (300) */
+ /** @name CumulusPalletXcmError (298) */
export type CumulusPalletXcmError = Null;
- /** @name CumulusPalletDmpQueueConfigData (301) */
+ /** @name CumulusPalletDmpQueueConfigData (299) */
export interface CumulusPalletDmpQueueConfigData extends Struct {
readonly maxIndividual: u64;
}
- /** @name CumulusPalletDmpQueuePageIndexData (302) */
+ /** @name CumulusPalletDmpQueuePageIndexData (300) */
export interface CumulusPalletDmpQueuePageIndexData extends Struct {
readonly beginUsed: u32;
readonly endUsed: u32;
readonly overweightCount: u64;
}
- /** @name CumulusPalletDmpQueueError (305) */
+ /** @name CumulusPalletDmpQueueError (303) */
export interface CumulusPalletDmpQueueError extends Enum {
readonly isUnknown: boolean;
readonly isOverLimit: boolean;
readonly type: 'Unknown' | 'OverLimit';
}
- /** @name PalletUniqueError (309) */
+ /** @name PalletUniqueError (307) */
export interface PalletUniqueError extends Enum {
readonly isCollectionDecimalPointLimitExceeded: boolean;
readonly isConfirmUnsetSponsorFail: boolean;
@@ -2483,7 +2459,7 @@
readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';
}
- /** @name UpDataStructsCollection (310) */
+ /** @name UpDataStructsCollection (308) */
export interface UpDataStructsCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -2495,10 +2471,9 @@
readonly schemaVersion: UpDataStructsSchemaVersion;
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
}
- /** @name UpDataStructsSponsorshipState (311) */
+ /** @name UpDataStructsSponsorshipState (309) */
export interface UpDataStructsSponsorshipState extends Enum {
readonly isDisabled: boolean;
readonly isUnconfirmed: boolean;
@@ -2508,47 +2483,47 @@
readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
}
- /** @name UpDataStructsProperties (312) */
+ /** @name UpDataStructsProperties (310) */
export interface UpDataStructsProperties extends Struct {
readonly map: UpDataStructsPropertiesMapBoundedVec;
readonly consumedSpace: u32;
readonly spaceLimit: u32;
}
- /** @name UpDataStructsPropertiesMapBoundedVec (313) */
+ /** @name UpDataStructsPropertiesMapBoundedVec (311) */
export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}
- /** @name UpDataStructsPropertiesMapPropertyPermission (318) */
+ /** @name UpDataStructsPropertiesMapPropertyPermission (316) */
export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}
- /** @name UpDataStructsCollectionField (324) */
+ /** @name UpDataStructsCollectionField (322) */
export interface UpDataStructsCollectionField extends Enum {
readonly isConstOnChainSchema: boolean;
readonly isOffchainSchema: boolean;
readonly type: 'ConstOnChainSchema' | 'OffchainSchema';
}
- /** @name UpDataStructsCollectionStats (327) */
+ /** @name UpDataStructsCollectionStats (325) */
export interface UpDataStructsCollectionStats extends Struct {
readonly created: u32;
readonly destroyed: u32;
readonly alive: u32;
}
- /** @name PhantomTypeUpDataStructsTokenData (328) */
+ /** @name PhantomTypeUpDataStructsTokenData (326) */
export interface PhantomTypeUpDataStructsTokenData extends Vec<UpDataStructsTokenData> {}
- /** @name UpDataStructsTokenData (329) */
+ /** @name UpDataStructsTokenData (327) */
export interface UpDataStructsTokenData extends Struct {
readonly constData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
}
- /** @name PhantomTypeUpDataStructsRpcCollection (332) */
+ /** @name PhantomTypeUpDataStructsRpcCollection (330) */
export interface PhantomTypeUpDataStructsRpcCollection extends Vec<UpDataStructsRpcCollection> {}
- /** @name UpDataStructsRpcCollection (333) */
+ /** @name UpDataStructsRpcCollection (331) */
export interface UpDataStructsRpcCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -2562,15 +2537,14 @@
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name PhantomTypeUpDataStructsCollectionInfo (335) */
+ /** @name PhantomTypeUpDataStructsCollectionInfo (333) */
export interface PhantomTypeUpDataStructsCollectionInfo extends Vec<RmrkTypesCollectionInfo> {}
- /** @name RmrkTypesCollectionInfo (336) */
+ /** @name RmrkTypesCollectionInfo (334) */
export interface RmrkTypesCollectionInfo extends Struct {
readonly issuer: AccountId32;
readonly metadata: Bytes;
@@ -2579,10 +2553,10 @@
readonly nftsCount: u32;
}
- /** @name PhantomTypeUpDataStructsNftInfo (340) */
+ /** @name PhantomTypeUpDataStructsNftInfo (338) */
export interface PhantomTypeUpDataStructsNftInfo extends Vec<RmrkTypesNftInfo> {}
- /** @name RmrkTypesNftInfo (341) */
+ /** @name RmrkTypesNftInfo (339) */
export interface RmrkTypesNftInfo extends Struct {
readonly owner: RmrkTypesAccountIdOrCollectionNftTuple;
readonly royalty: Option<RmrkTypesRoyaltyInfo>;
@@ -2591,7 +2565,7 @@
readonly pending: bool;
}
- /** @name RmrkTypesAccountIdOrCollectionNftTuple (342) */
+ /** @name RmrkTypesAccountIdOrCollectionNftTuple (340) */
export interface RmrkTypesAccountIdOrCollectionNftTuple extends Enum {
readonly isAccountId: boolean;
readonly asAccountId: AccountId32;
@@ -2600,16 +2574,16 @@
readonly type: 'AccountId' | 'CollectionAndNftTuple';
}
- /** @name RmrkTypesRoyaltyInfo (344) */
+ /** @name RmrkTypesRoyaltyInfo (342) */
export interface RmrkTypesRoyaltyInfo extends Struct {
readonly recipient: AccountId32;
readonly amount: Permill;
}
- /** @name PhantomTypeUpDataStructsResourceInfo (346) */
+ /** @name PhantomTypeUpDataStructsResourceInfo (344) */
export interface PhantomTypeUpDataStructsResourceInfo extends Vec<RmrkTypesResourceInfo> {}
- /** @name RmrkTypesResourceInfo (347) */
+ /** @name RmrkTypesResourceInfo (345) */
export interface RmrkTypesResourceInfo extends Struct {
readonly id: Bytes;
readonly pending: bool;
@@ -2623,29 +2597,29 @@
readonly thumb: Option<Bytes>;
}
- /** @name PhantomTypeUpDataStructsPropertyInfo (353) */
+ /** @name PhantomTypeUpDataStructsPropertyInfo (351) */
export interface PhantomTypeUpDataStructsPropertyInfo extends Vec<RmrkTypesPropertyInfo> {}
- /** @name RmrkTypesPropertyInfo (354) */
+ /** @name RmrkTypesPropertyInfo (352) */
export interface RmrkTypesPropertyInfo extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name PhantomTypeUpDataStructsBaseInfo (358) */
+ /** @name PhantomTypeUpDataStructsBaseInfo (356) */
export interface PhantomTypeUpDataStructsBaseInfo extends Vec<RmrkTypesBaseInfo> {}
- /** @name RmrkTypesBaseInfo (359) */
+ /** @name RmrkTypesBaseInfo (357) */
export interface RmrkTypesBaseInfo extends Struct {
readonly issuer: AccountId32;
readonly baseType: Bytes;
readonly symbol: Bytes;
}
- /** @name PhantomTypeUpDataStructsPartType (361) */
+ /** @name PhantomTypeUpDataStructsPartType (359) */
export interface PhantomTypeUpDataStructsPartType extends Vec<RmrkTypesPartType> {}
- /** @name RmrkTypesPartType (362) */
+ /** @name RmrkTypesPartType (360) */
export interface RmrkTypesPartType extends Enum {
readonly isFixedPart: boolean;
readonly asFixedPart: RmrkTypesFixedPart;
@@ -2654,14 +2628,14 @@
readonly type: 'FixedPart' | 'SlotPart';
}
- /** @name RmrkTypesFixedPart (364) */
+ /** @name RmrkTypesFixedPart (362) */
export interface RmrkTypesFixedPart extends Struct {
readonly id: u32;
readonly z: u32;
readonly src: Bytes;
}
- /** @name RmrkTypesSlotPart (365) */
+ /** @name RmrkTypesSlotPart (363) */
export interface RmrkTypesSlotPart extends Struct {
readonly id: u32;
readonly equippable: RmrkTypesEquippableList;
@@ -2669,7 +2643,7 @@
readonly z: u32;
}
- /** @name RmrkTypesEquippableList (366) */
+ /** @name RmrkTypesEquippableList (364) */
export interface RmrkTypesEquippableList extends Enum {
readonly isAll: boolean;
readonly isEmpty: boolean;
@@ -2678,32 +2652,32 @@
readonly type: 'All' | 'Empty' | 'Custom';
}
- /** @name PhantomTypeUpDataStructsTheme (368) */
+ /** @name PhantomTypeUpDataStructsTheme (366) */
export interface PhantomTypeUpDataStructsTheme extends Vec<RmrkTypesTheme> {}
- /** @name RmrkTypesTheme (369) */
+ /** @name RmrkTypesTheme (367) */
export interface RmrkTypesTheme extends Struct {
readonly name: Bytes;
readonly properties: Vec<RmrkTypesThemeProperty>;
readonly inherit: bool;
}
- /** @name RmrkTypesThemeProperty (371) */
+ /** @name RmrkTypesThemeProperty (369) */
export interface RmrkTypesThemeProperty extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name PhantomTypeUpDataStructsNftChild (373) */
+ /** @name PhantomTypeUpDataStructsNftChild (371) */
export interface PhantomTypeUpDataStructsNftChild extends Vec<RmrkTypesNftChild> {}
- /** @name RmrkTypesNftChild (374) */
+ /** @name RmrkTypesNftChild (372) */
export interface RmrkTypesNftChild extends Struct {
readonly collectionId: u32;
readonly nftId: u32;
}
- /** @name PalletCommonError (376) */
+ /** @name PalletCommonError (374) */
export interface PalletCommonError extends Enum {
readonly isCollectionNotFound: boolean;
readonly isMustBeTokenOwner: boolean;
@@ -2714,7 +2688,6 @@
readonly isCollectionDescriptionLimitExceeded: boolean;
readonly isCollectionTokenPrefixLimitExceeded: boolean;
readonly isTotalCollectionsLimitExceeded: boolean;
- readonly isTokenVariableDataLimitExceeded: boolean;
readonly isCollectionAdminCountExceeded: boolean;
readonly isCollectionLimitBoundsExceeded: boolean;
readonly isOwnerPermissionsCantBeReverted: boolean;
@@ -2735,13 +2708,13 @@
readonly isCollectionFieldSizeExceeded: boolean;
readonly isNoSpaceForProperty: boolean;
readonly isPropertyLimitReached: boolean;
- readonly isUnableToReadUnboundedKeys: boolean;
+ readonly isPropertyKeyIsTooLong: boolean;
readonly isInvalidCharacterInPropertyKey: boolean;
readonly isEmptyPropertyKey: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'UnableToReadUnboundedKeys' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
}
- /** @name PalletFungibleError (378) */
+ /** @name PalletFungibleError (376) */
export interface PalletFungibleError extends Enum {
readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isFungibleItemsHaveNoId: boolean;
@@ -2751,13 +2724,12 @@
readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
}
- /** @name PalletRefungibleItemData (379) */
+ /** @name PalletRefungibleItemData (377) */
export interface PalletRefungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
}
- /** @name PalletRefungibleError (383) */
+ /** @name PalletRefungibleError (381) */
export interface PalletRefungibleError extends Enum {
readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isWrongRefungiblePieces: boolean;
@@ -2766,21 +2738,20 @@
readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
}
- /** @name PalletNonfungibleItemData (384) */
+ /** @name PalletNonfungibleItemData (382) */
export interface PalletNonfungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
- /** @name PalletNonfungibleError (385) */
+ /** @name PalletNonfungibleError (383) */
export interface PalletNonfungibleError extends Enum {
readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isNonfungibleItemsHaveNoAmount: boolean;
readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount';
}
- /** @name PalletStructureError (386) */
+ /** @name PalletStructureError (384) */
export interface PalletStructureError extends Enum {
readonly isOuroborosDetected: boolean;
readonly isDepthLimit: boolean;
@@ -2788,7 +2759,7 @@
readonly type: 'OuroborosDetected' | 'DepthLimit' | 'TokenNotFound';
}
- /** @name PalletEvmError (389) */
+ /** @name PalletEvmError (387) */
export interface PalletEvmError extends Enum {
readonly isBalanceLow: boolean;
readonly isFeeOverflow: boolean;
@@ -2799,7 +2770,7 @@
readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';
}
- /** @name FpRpcTransactionStatus (392) */
+ /** @name FpRpcTransactionStatus (390) */
export interface FpRpcTransactionStatus extends Struct {
readonly transactionHash: H256;
readonly transactionIndex: u32;
@@ -2810,10 +2781,10 @@
readonly logsBloom: EthbloomBloom;
}
- /** @name EthbloomBloom (394) */
+ /** @name EthbloomBloom (392) */
export interface EthbloomBloom extends U8aFixed {}
- /** @name EthereumReceiptReceiptV3 (396) */
+ /** @name EthereumReceiptReceiptV3 (394) */
export interface EthereumReceiptReceiptV3 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: EthereumReceiptEip658ReceiptData;
@@ -2824,7 +2795,7 @@
readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
}
- /** @name EthereumReceiptEip658ReceiptData (397) */
+ /** @name EthereumReceiptEip658ReceiptData (395) */
export interface EthereumReceiptEip658ReceiptData extends Struct {
readonly statusCode: u8;
readonly usedGas: U256;
@@ -2832,14 +2803,14 @@
readonly logs: Vec<EthereumLog>;
}
- /** @name EthereumBlock (398) */
+ /** @name EthereumBlock (396) */
export interface EthereumBlock extends Struct {
readonly header: EthereumHeader;
readonly transactions: Vec<EthereumTransactionTransactionV2>;
readonly ommers: Vec<EthereumHeader>;
}
- /** @name EthereumHeader (399) */
+ /** @name EthereumHeader (397) */
export interface EthereumHeader extends Struct {
readonly parentHash: H256;
readonly ommersHash: H256;
@@ -2858,24 +2829,24 @@
readonly nonce: EthereumTypesHashH64;
}
- /** @name EthereumTypesHashH64 (400) */
+ /** @name EthereumTypesHashH64 (398) */
export interface EthereumTypesHashH64 extends U8aFixed {}
- /** @name PalletEthereumError (405) */
+ /** @name PalletEthereumError (403) */
export interface PalletEthereumError extends Enum {
readonly isInvalidSignature: boolean;
readonly isPreLogExists: boolean;
readonly type: 'InvalidSignature' | 'PreLogExists';
}
- /** @name PalletEvmCoderSubstrateError (406) */
+ /** @name PalletEvmCoderSubstrateError (404) */
export interface PalletEvmCoderSubstrateError extends Enum {
readonly isOutOfGas: boolean;
readonly isOutOfFund: boolean;
readonly type: 'OutOfGas' | 'OutOfFund';
}
- /** @name PalletEvmContractHelpersSponsoringModeT (407) */
+ /** @name PalletEvmContractHelpersSponsoringModeT (405) */
export interface PalletEvmContractHelpersSponsoringModeT extends Enum {
readonly isDisabled: boolean;
readonly isAllowlisted: boolean;
@@ -2883,20 +2854,20 @@
readonly type: 'Disabled' | 'Allowlisted' | 'Generous';
}
- /** @name PalletEvmContractHelpersError (409) */
+ /** @name PalletEvmContractHelpersError (407) */
export interface PalletEvmContractHelpersError extends Enum {
readonly isNoPermission: boolean;
readonly type: 'NoPermission';
}
- /** @name PalletEvmMigrationError (410) */
+ /** @name PalletEvmMigrationError (408) */
export interface PalletEvmMigrationError extends Enum {
readonly isAccountNotEmpty: boolean;
readonly isAccountIsNotMigrating: boolean;
readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';
}
- /** @name SpRuntimeMultiSignature (412) */
+ /** @name SpRuntimeMultiSignature (410) */
export interface SpRuntimeMultiSignature extends Enum {
readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Signature;
@@ -2907,34 +2878,34 @@
readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
}
- /** @name SpCoreEd25519Signature (413) */
+ /** @name SpCoreEd25519Signature (411) */
export interface SpCoreEd25519Signature extends U8aFixed {}
- /** @name SpCoreSr25519Signature (415) */
+ /** @name SpCoreSr25519Signature (413) */
export interface SpCoreSr25519Signature extends U8aFixed {}
- /** @name SpCoreEcdsaSignature (416) */
+ /** @name SpCoreEcdsaSignature (414) */
export interface SpCoreEcdsaSignature extends U8aFixed {}
- /** @name FrameSystemExtensionsCheckSpecVersion (419) */
+ /** @name FrameSystemExtensionsCheckSpecVersion (417) */
export type FrameSystemExtensionsCheckSpecVersion = Null;
- /** @name FrameSystemExtensionsCheckGenesis (420) */
+ /** @name FrameSystemExtensionsCheckGenesis (418) */
export type FrameSystemExtensionsCheckGenesis = Null;
- /** @name FrameSystemExtensionsCheckNonce (423) */
+ /** @name FrameSystemExtensionsCheckNonce (421) */
export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
- /** @name FrameSystemExtensionsCheckWeight (424) */
+ /** @name FrameSystemExtensionsCheckWeight (422) */
export type FrameSystemExtensionsCheckWeight = Null;
- /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (425) */
+ /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (423) */
export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
- /** @name OpalRuntimeRuntime (426) */
+ /** @name OpalRuntimeRuntime (424) */
export type OpalRuntimeRuntime = Null;
- /** @name PalletEthereumFakeTransactionFinalizer (427) */
+ /** @name PalletEthereumFakeTransactionFinalizer (425) */
export type PalletEthereumFakeTransactionFinalizer = Null;
} // declare module
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -26,7 +26,7 @@
const collectionParam = {name: 'collection', type: 'u32'};
const tokenParam = {name: 'tokenId', type: 'u32'};
-const propertyKeysParam = {name: 'propertyKeys', type: 'Vec<String>'};
+const propertyKeysParam = {name: 'propertyKeys', type: 'Vec<String>', isOptional: true};
const crossAccountParam = (name = 'account') => ({name, type: CROSS_ACCOUNT_ID_TYPE});
const atParam = {name: 'at', type: 'Hash', isOptional: true};
tests/src/interfaces/unique/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/types.ts
+++ b/tests/src/interfaces/unique/types.ts
@@ -446,9 +446,6 @@
/** @name FrameSupportPalletId */
export interface FrameSupportPalletId extends U8aFixed {}
-/** @name FrameSupportStorageBoundedBTreeSet */
-export interface FrameSupportStorageBoundedBTreeSet extends BTreeSet<u32> {}
-
/** @name FrameSupportTokensMiscBalanceStatus */
export interface FrameSupportTokensMiscBalanceStatus extends Enum {
readonly isFree: boolean;
@@ -875,7 +872,6 @@
readonly isCollectionDescriptionLimitExceeded: boolean;
readonly isCollectionTokenPrefixLimitExceeded: boolean;
readonly isTotalCollectionsLimitExceeded: boolean;
- readonly isTokenVariableDataLimitExceeded: boolean;
readonly isCollectionAdminCountExceeded: boolean;
readonly isCollectionLimitBoundsExceeded: boolean;
readonly isOwnerPermissionsCantBeReverted: boolean;
@@ -896,10 +892,10 @@
readonly isCollectionFieldSizeExceeded: boolean;
readonly isNoSpaceForProperty: boolean;
readonly isPropertyLimitReached: boolean;
- readonly isUnableToReadUnboundedKeys: boolean;
+ readonly isPropertyKeyIsTooLong: boolean;
readonly isInvalidCharacterInPropertyKey: boolean;
readonly isEmptyPropertyKey: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'UnableToReadUnboundedKeys' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey';
}
/** @name PalletCommonEvent */
@@ -1115,7 +1111,6 @@
/** @name PalletNonfungibleItemData */
export interface PalletNonfungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
@@ -1131,7 +1126,6 @@
/** @name PalletRefungibleItemData */
export interface PalletRefungibleItemData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
}
/** @name PalletStructureCall */
@@ -1438,17 +1432,6 @@
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
- } & Struct;
- readonly isSetVariableMetaData: boolean;
- readonly asSetVariableMetaData: {
- readonly collectionId: u32;
- readonly itemId: u32;
- readonly data: Bytes;
- } & Struct;
- readonly isSetMetaUpdatePermissionFlag: boolean;
- readonly asSetMetaUpdatePermissionFlag: {
- readonly collectionId: u32;
- readonly value: UpDataStructsMetaUpdatePermission;
} & Struct;
readonly isSetSchemaVersion: boolean;
readonly asSetSchemaVersion: {
@@ -1470,7 +1453,7 @@
readonly collectionId: u32;
readonly newLimit: UpDataStructsCollectionLimits;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetVariableMetaData' | 'SetMetaUpdatePermissionFlag' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'SetPublicAccessMode' | 'SetMintPermission' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetSchemaVersion' | 'SetOffchainSchema' | 'SetConstOnChainSchema' | 'SetCollectionLimits';
}
/** @name PalletUniqueError */
@@ -1632,34 +1615,34 @@
}
/** @name PhantomTypeUpDataStructsBaseInfo */
-export interface PhantomTypeUpDataStructsBaseInfo extends Vec<Lookup359> {}
+export interface PhantomTypeUpDataStructsBaseInfo extends Vec<Lookup357> {}
/** @name PhantomTypeUpDataStructsCollectionInfo */
-export interface PhantomTypeUpDataStructsCollectionInfo extends Vec<Lookup336> {}
+export interface PhantomTypeUpDataStructsCollectionInfo extends Vec<Lookup334> {}
/** @name PhantomTypeUpDataStructsNftChild */
-export interface PhantomTypeUpDataStructsNftChild extends Vec<Lookup374> {}
+export interface PhantomTypeUpDataStructsNftChild extends Vec<Lookup372> {}
/** @name PhantomTypeUpDataStructsNftInfo */
-export interface PhantomTypeUpDataStructsNftInfo extends Vec<Lookup341> {}
+export interface PhantomTypeUpDataStructsNftInfo extends Vec<Lookup339> {}
/** @name PhantomTypeUpDataStructsPartType */
-export interface PhantomTypeUpDataStructsPartType extends Vec<Lookup362> {}
+export interface PhantomTypeUpDataStructsPartType extends Vec<Lookup360> {}
/** @name PhantomTypeUpDataStructsPropertyInfo */
-export interface PhantomTypeUpDataStructsPropertyInfo extends Vec<Lookup354> {}
+export interface PhantomTypeUpDataStructsPropertyInfo extends Vec<Lookup352> {}
/** @name PhantomTypeUpDataStructsResourceInfo */
-export interface PhantomTypeUpDataStructsResourceInfo extends Vec<Lookup347> {}
+export interface PhantomTypeUpDataStructsResourceInfo extends Vec<Lookup345> {}
/** @name PhantomTypeUpDataStructsRpcCollection */
-export interface PhantomTypeUpDataStructsRpcCollection extends Vec<Lookup333> {}
+export interface PhantomTypeUpDataStructsRpcCollection extends Vec<Lookup331> {}
/** @name PhantomTypeUpDataStructsTheme */
-export interface PhantomTypeUpDataStructsTheme extends Vec<Lookup369> {}
+export interface PhantomTypeUpDataStructsTheme extends Vec<Lookup367> {}
/** @name PhantomTypeUpDataStructsTokenData */
-export interface PhantomTypeUpDataStructsTokenData extends Vec<Lookup329> {}
+export interface PhantomTypeUpDataStructsTokenData extends Vec<Lookup327> {}
/** @name PolkadotCorePrimitivesInboundDownwardMessage */
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
@@ -1963,7 +1946,6 @@
readonly schemaVersion: UpDataStructsSchemaVersion;
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
}
/** @name UpDataStructsCollectionField */
@@ -2015,7 +1997,6 @@
readonly pendingSponsor: Option<AccountId32>;
readonly limits: Option<UpDataStructsCollectionLimits>;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: Option<UpDataStructsMetaUpdatePermission>;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
@@ -2052,14 +2033,12 @@
/** @name UpDataStructsCreateNftData */
export interface UpDataStructsCreateNftData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
}
/** @name UpDataStructsCreateNftExData */
export interface UpDataStructsCreateNftExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
@@ -2067,31 +2046,21 @@
/** @name UpDataStructsCreateReFungibleData */
export interface UpDataStructsCreateReFungibleData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly pieces: u128;
}
/** @name UpDataStructsCreateRefungibleExData */
export interface UpDataStructsCreateRefungibleExData extends Struct {
readonly constData: Bytes;
- readonly variableData: Bytes;
readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
}
-/** @name UpDataStructsMetaUpdatePermission */
-export interface UpDataStructsMetaUpdatePermission extends Enum {
- readonly isItemOwner: boolean;
- readonly isAdmin: boolean;
- readonly isNone: boolean;
- readonly type: 'ItemOwner' | 'Admin' | 'None';
-}
-
/** @name UpDataStructsNestingRule */
export interface UpDataStructsNestingRule extends Enum {
readonly isDisabled: boolean;
readonly isOwner: boolean;
readonly isOwnerRestricted: boolean;
- readonly asOwnerRestricted: FrameSupportStorageBoundedBTreeSet;
+ readonly asOwnerRestricted: BTreeSet<u32>;
readonly type: 'Disabled' | 'Owner' | 'OwnerRestricted';
}
@@ -2141,7 +2110,6 @@
readonly sponsorship: UpDataStructsSponsorshipState;
readonly limits: UpDataStructsCollectionLimits;
readonly constOnChainSchema: Bytes;
- readonly metaUpdatePermission: UpDataStructsMetaUpdatePermission;
readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
readonly properties: Vec<UpDataStructsProperty>;
}
tests/src/metadataUpdate.test.tsdiffbeforeafterboth--- a/tests/src/metadataUpdate.test.ts
+++ /dev/null
@@ -1,214 +0,0 @@
-// 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 chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import privateKey from './substrate/privateKey';
-import usingApi from './substrate/substrate-api';
-import {
- createItemExpectSuccess,
- createCollectionExpectSuccess,
- enablePublicMintingExpectSuccess,
- enableAllowListExpectSuccess,
- setMetadataUpdatePermissionFlagExpectSuccess,
- setVariableMetaDataExpectSuccess,
- setMintPermissionExpectSuccess,
- addToAllowListExpectSuccess,
- addCollectionAdminExpectSuccess,
- setVariableMetaDataExpectFailure,
- setMetadataUpdatePermissionFlagExpectFailure,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-
-describe('Metadata update permissions with ItemOwner flag', () => {
- it('ItemOwner can set variable metadata with ItemOwner permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'ItemOwner');
-
- await setVariableMetaDataExpectSuccess(alice, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('Admin can\'n set variable metadata with ItemOwner permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'ItemOwner');
-
- await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
- await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
- await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
-
- await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('User can\'n set variable metadata with ItemOwner permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'ItemOwner');
-
- await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
- await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-});
-
-describe('Metadata update permissions with Admin flag', () => {
- it('Admin can set variable metadata with Admin permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
-
- await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
- await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
- await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
-
- await setVariableMetaDataExpectSuccess(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('User can\'n can set variable metadata with Admin permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
-
- await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
- await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
- await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
-
- await setVariableMetaDataExpectSuccess(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('ItemOwner can\'n can set variable metadata with Admin permission flag', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- await enablePublicMintingExpectSuccess(alice, nftCollectionId);
- await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
- await enableAllowListExpectSuccess(alice, nftCollectionId);
- const newNftTokenId = await createItemExpectSuccess(bob, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
-
- await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-});
-
-describe('Metadata update permissions with None flag', () => {
- it('Nobody can set variable metadata with None flag (Regular)', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'None');
-
- await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('Nobody can set variable metadata with None flag (Admin)', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'None');
-
- await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
- await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
- await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
-
- await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('Nobody can set variable metadata with None flag (ItemOwner)', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
-
- const data = [1, 2, 254, 255];
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'None');
-
- await setVariableMetaDataExpectFailure(alice, nftCollectionId, newNftTokenId, data);
- });
- });
-
- it('Nobody can set variable metadata flag after freeze', async () => {
- await usingApi(async () => {
- const alice = privateKey('//Alice');
-
- // nft
- const nftCollectionId = await createCollectionExpectSuccess();
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'None');
- await setMetadataUpdatePermissionFlagExpectFailure(alice, nftCollectionId, 'Admin');
- });
- });
-});
tests/src/nesting/migration-check.test.tsdiffbeforeafterboth--- a/tests/src/nesting/migration-check.test.ts
+++ b/tests/src/nesting/migration-check.test.ts
@@ -37,7 +37,6 @@
accountTokenOwnershipLimit: 3,
},
constOnChainSchema: '0x333333',
- metaUpdatePermission: 'Admin',
});
const events = await submitTransactionAsync(alice, tx);
const result = getCreateCollectionResult(events);
tests/src/nesting/rules-smoke.test.tsdiffbeforeafterboth--- a/tests/src/nesting/rules-smoke.test.ts
+++ b/tests/src/nesting/rules-smoke.test.ts
@@ -23,7 +23,7 @@
nestTarget = {Ethereum: tokenIdToAddress(collection, token)};
});
});
-
+
it('called for fungible', async () => {
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'Fungible',decimalPoints:0}});
@@ -39,7 +39,7 @@
it('called for nonfungible', async () => {
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {NFT: {ConstData: [], VariableData: {}}})))
+ await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {NFT: {ConstData: []}})))
.to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
const token = await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});
@@ -51,7 +51,7 @@
it('called for refungible', async () => {
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
- await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {ReFungible: {ConstData: [], VariableData: {}}})))
+ await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {ReFungible: {ConstData: []}})))
.to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
const token = await createItemExpectSuccess(alice, collection, 'ReFungible', {Substrate: alice.address});
@@ -60,4 +60,3 @@
});
});
});
-
\ No newline at end of file
tests/src/setVariableMetaData.test.tsdiffbeforeafterboth--- a/tests/src/setVariableMetaData.test.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-// 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 chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import privateKey from './substrate/privateKey';
-import usingApi from './substrate/substrate-api';
-import {
- burnItemExpectSuccess,
- createCollectionExpectSuccess,
- createItemExpectSuccess,
- destroyCollectionExpectSuccess,
- findNotExistingCollection,
- setVariableMetaDataExpectFailure,
- setVariableMetaDataExpectSuccess,
- addCollectionAdminExpectSuccess,
- setMetadataUpdatePermissionFlagExpectSuccess,
- getVariableMetadata,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-describe('Integration Test setVariableMetaData', () => {
- const data = [1, 2, 254, 255];
-
- let alice: IKeyringPair;
- let collectionId: number;
- let tokenId: number;
- before(async () => {
- await usingApi(async () => {
- alice = privateKey('//Alice');
- collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');
- });
- });
-
- it('execute setVariableMetaData', async () => {
- await setVariableMetaDataExpectSuccess(alice, collectionId, tokenId, data);
- });
-
- it('verify data was set', async () => {
- await usingApi(async api => {
- expect(await getVariableMetadata(api, collectionId, tokenId)).to.deep.equal(data);
- });
- });
-});
-
-describe('Integration Test collection admin setVariableMetaData', () => {
- const data = [1, 2, 254, 255];
-
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let collectionId: number;
- let tokenId: number;
- before(async () => {
- await usingApi(async () => {
- alice = privateKey('//Alice');
- bob = privateKey('//Bob');
- collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');
- await setMetadataUpdatePermissionFlagExpectSuccess(alice, collectionId, 'Admin');
- await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
- });
- });
-
- it('execute setVariableMetaData', async () => {
- await setVariableMetaDataExpectSuccess(bob, collectionId, tokenId, data);
- });
-
- it('verify data was set', async () => {
- await usingApi(async api => {
- expect(await getVariableMetadata(api, collectionId, tokenId)).to.deep.equal(data);
- });
- });
-});
-
-describe('Negative Integration Test setVariableMetaData', () => {
- const data = [1];
-
- let alice: IKeyringPair;
- let bob: IKeyringPair;
-
- let validCollectionId: number;
- let validTokenId: number;
-
- before(async () => {
- await usingApi(async () => {
- alice = privateKey('//Alice');
- bob = privateKey('//Bob');
-
- validCollectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- validTokenId = await createItemExpectSuccess(alice, validCollectionId, 'NFT');
- });
- });
-
- it('fails on not existing collection id', async () => {
- await usingApi(async api => {
- const nonExistingCollectionId = await findNotExistingCollection(api);
- await setVariableMetaDataExpectFailure(alice, nonExistingCollectionId, 1, data);
- });
- });
- it('fails on removed collection id', async () => {
- const removedCollectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- const removedCollectionTokenId = await createItemExpectSuccess(alice, removedCollectionId, 'NFT');
-
- await destroyCollectionExpectSuccess(removedCollectionId);
- await setVariableMetaDataExpectFailure(alice, removedCollectionId, removedCollectionTokenId, data);
- });
- it('fails on removed token', async () => {
- const removedTokenCollectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
- const removedTokenId = await createItemExpectSuccess(alice, removedTokenCollectionId, 'NFT');
- await burnItemExpectSuccess(alice, removedTokenCollectionId, removedTokenId);
-
- await setVariableMetaDataExpectFailure(alice, removedTokenCollectionId, removedTokenId, data);
- });
- it('fails on not existing token', async () => {
- const nonExistingTokenId = validTokenId + 1;
-
- await setVariableMetaDataExpectFailure(alice, validCollectionId, nonExistingTokenId, data);
- });
- it('fails on too long data', async () => {
- const tooLongData = new Array(4097).fill(0xff);
-
- await setVariableMetaDataExpectFailure(alice, validCollectionId, validTokenId, tooLongData);
- });
- it('fails on fungible token', async () => {
- const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
- const fungibleTokenId = await createItemExpectSuccess(alice, fungibleCollectionId, 'Fungible');
-
- await setVariableMetaDataExpectFailure(alice, fungibleCollectionId, fungibleTokenId, data);
- });
- it('fails on bad sender', async () => {
- await setVariableMetaDataExpectFailure(bob, validCollectionId, validTokenId, data);
- });
-});
tests/src/setVariableMetadataSponsoringRateLimit.test.tsdiffbeforeafterboth--- a/tests/src/setVariableMetadataSponsoringRateLimit.test.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-// 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 {expect} from 'chai';
-import privateKey from './substrate/privateKey';
-import usingApi from './substrate/substrate-api';
-import {
- confirmSponsorshipExpectSuccess,
- createCollectionExpectSuccess,
- createItemExpectSuccess,
- findUnusedAddress,
- getDetailedCollectionInfo,
- setCollectionLimitsExpectSuccess,
- setCollectionSponsorExpectSuccess,
- setVariableMetaDataExpectFailure,
- setVariableMetaDataExpectSuccess,
-} from './util/helpers';
-
-describe('Integration Test setVariableMetadataSponsoringRateLimit', () => {
- let alice: IKeyringPair;
- let userWithNoBalance: IKeyringPair;
-
- before(async () => {
- await usingApi(async (api) => {
- alice = privateKey('//Alice');
- userWithNoBalance = await findUnusedAddress(api);
- });
- });
-
- it('sponsored setVariableMetaData can be called twice with pause for free', async () => {
- const collectionId = await createCollectionExpectSuccess();
- await setCollectionSponsorExpectSuccess(collectionId, alice.address);
- await confirmSponsorshipExpectSuccess(collectionId);
- await setCollectionLimitsExpectSuccess(alice, collectionId, {
- sponsoredDataRateLimit: {Blocks: 0},
- });
-
- const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', userWithNoBalance.address);
- await setVariableMetaDataExpectSuccess(userWithNoBalance, collectionId, itemId, [1, 2, 3]);
- await setVariableMetaDataExpectSuccess(userWithNoBalance, collectionId, itemId, [1, 2, 3]);
- });
-
- it('sponsored setVariableMetaData can\'t be called twice without pause for free', async () => {
- const collectionId = await createCollectionExpectSuccess();
- await setCollectionSponsorExpectSuccess(collectionId, alice.address);
- await confirmSponsorshipExpectSuccess(collectionId);
- await setCollectionLimitsExpectSuccess(alice, collectionId, {
- sponsoredDataRateLimit: {Blocks: 10},
- });
-
- const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', userWithNoBalance.address);
- await setVariableMetaDataExpectSuccess(userWithNoBalance, collectionId, itemId, [1, 2, 3]);
- await setVariableMetaDataExpectFailure(userWithNoBalance, collectionId, itemId, [1, 2, 3]);
- });
-
- it('sponsored setVariableMetaData can\'t be called for free with variable metadata above collection limits', async () => {
- const collectionId = await createCollectionExpectSuccess();
- await setCollectionSponsorExpectSuccess(collectionId, alice.address);
- await confirmSponsorshipExpectSuccess(collectionId);
- await setCollectionLimitsExpectSuccess(alice, collectionId, {
- sponsoredDataRateLimit: {Blocks: 0},
- sponsoredDataSize: 1,
- });
- const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', userWithNoBalance.address);
-
- await setVariableMetaDataExpectSuccess(userWithNoBalance, collectionId, itemId, [1]);
- await setVariableMetaDataExpectFailure(userWithNoBalance, collectionId, itemId, [1, 2]);
- });
-
- it('Default value of rate limit does not sponsor setting variable metadata', async () => {
- const collectionId = await createCollectionExpectSuccess();
- await setCollectionSponsorExpectSuccess(collectionId, alice.address);
- await confirmSponsorshipExpectSuccess(collectionId);
-
- const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', userWithNoBalance.address);
- await setVariableMetaDataExpectFailure(userWithNoBalance, collectionId, itemId, [1]);
- });
-
- it('sponsoring of data is disabled by default', async () => {
- await usingApi(async api => {
- const collectionId = await createCollectionExpectSuccess();
-
- const collection = (await getDetailedCollectionInfo(api, collectionId))!;
- // limit is none = default is used
- expect(collection?.limits.sponsoredDataRateLimit.isNone);
- });
- });
-
- it('sponsoring can be disabled explicitly', async () => {
- await usingApi(async api => {
- const collectionId = await createCollectionExpectSuccess();
-
- await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsoredDataRateLimit: {Blocks: 6}});
- {
- const collection = (await getDetailedCollectionInfo(api, collectionId))!;
- expect(collection?.limits.sponsoredDataRateLimit.unwrap().asBlocks.toNumber()).to.equal(6);
- }
-
- await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsoredDataRateLimit: 'SponsoringDisabled'});
- {
- const collection = (await getDetailedCollectionInfo(api, collectionId))!;
- // disabled sponsoring = default value
- expect(collection?.limits.sponsoredDataRateLimit.unwrap().isNone).to.true;
- }
- });
- });
-});
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -142,7 +142,6 @@
export interface IReFungibleTokenDataType {
owner: IReFungibleOwner[];
constData: number[];
- variableData: number[];
}
export function uniqueEventMessage(events: EventRecord[]): IGetMessage {
@@ -648,28 +647,6 @@
const sender = privateKey(senderSeed);
const tx = api.tx.unique.confirmSponsorship(collectionId);
await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
- });
-}
-
-export async function setMetadataUpdatePermissionFlagExpectSuccess(sender: IKeyringPair, collectionId: number, flag: string) {
-
- await usingApi(async (api) => {
- const tx = api.tx.unique.setMetaUpdatePermissionFlag(collectionId, flag as any);
- const events = await submitTransactionAsync(sender, tx);
- const result = getGenericResult(events);
-
- expect(result.success).to.be.true;
- });
-}
-
-export async function setMetadataUpdatePermissionFlagExpectFailure(sender: IKeyringPair, collectionId: number, flag: string) {
-
- await usingApi(async (api) => {
- const tx = api.tx.unique.setMetaUpdatePermissionFlag(collectionId, flag as any);
- const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
- const result = getGenericResult(events);
-
- expect(result.success).to.be.false;
});
}
@@ -794,23 +771,6 @@
});
}
-export async function setVariableMetaDataExpectSuccess(sender: IKeyringPair, collectionId: number, itemId: number, data: number[]) {
- await usingApi(async (api) => {
- const tx = api.tx.unique.setVariableMetaData(collectionId, itemId, '0x' + Buffer.from(data).toString('hex'));
- const events = await submitTransactionAsync(sender, tx);
- const result = getGenericResult(events);
-
- expect(result.success).to.be.true;
- });
-}
-
-export async function setVariableMetaDataExpectFailure(sender: IKeyringPair, collectionId: number, itemId: number, data: number[]) {
- await usingApi(async (api) => {
- const tx = api.tx.unique.setVariableMetaData(collectionId, itemId, '0x' + Buffer.from(data).toString('hex'));
- await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
- });
-}
-
export async function setOffchainSchemaExpectSuccess(sender: IKeyringPair, collectionId: number, data: number[]) {
await usingApi(async (api) => {
const tx = api.tx.unique.setOffchainSchema(collectionId, '0x' + Buffer.from(data).toString('hex'));
@@ -1137,13 +1097,6 @@
collectionId: number,
): Promise<string[]> {
return (await api.rpc.unique.adminlist(collectionId)).toHuman() as any;
-}
-export async function getVariableMetadata(
- api: ApiPromise,
- collectionId: number,
- tokenId: number,
-): Promise<number[]> {
- return [...(await api.rpc.unique.variableMetadata(collectionId, tokenId))];
}
export async function getConstMetadata(
api: ApiPromise,
@@ -1182,10 +1135,10 @@
const createData = {fungible: {value: 10}};
tx = api.tx.unique.createItem(collectionId, to, createData as any);
} else if (createMode === 'ReFungible') {
- const createData = {refungible: {const_data: [], variable_data: [], pieces: 100}};
+ const createData = {refungible: {const_data: [], pieces: 100}};
tx = api.tx.unique.createItem(collectionId, to, createData as any);
} else {
- const createData = {nft: {const_data: [], variable_data: []}};
+ const createData = {nft: {const_data: []}};
tx = api.tx.unique.createItem(collectionId, to, createData as any);
}