difftreelog
chore fix code review requests
in: master
36 files changed
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -248,8 +248,8 @@
) -> Result<Option<String>>;
/// Get whether an operator is approved by a given owner.
- #[method(name = "unique_isApprovedForAll")]
- fn is_approved_for_all(
+ #[method(name = "unique_allowanceForAll")]
+ fn allowance_for_all(
&self,
collection: CollectionId,
owner: CrossAccountId,
@@ -579,7 +579,7 @@
pass_method!(effective_collection_limits(collection_id: CollectionId) -> Option<CollectionLimits>, unique_api);
pass_method!(total_pieces(collection_id: CollectionId, token_id: TokenId) -> Option<String> => |o| o.map(|number| number.to_string()) , unique_api);
pass_method!(token_owners(collection: CollectionId, token: TokenId) -> Vec<CrossAccountId>, unique_api);
- pass_method!(is_approved_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> bool, unique_api);
+ pass_method!(allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> bool, unique_api);
}
impl<C, Block, BlockNumber, CrossAccountId, AccountId>
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -1535,7 +1535,7 @@
fn token_owner() -> Weight;
/// The price of setting approval for all
- fn set_approval_for_all() -> Weight;
+ fn set_allowance_for_all() -> Weight;
}
/// Weight info extension trait for refungible pallet.
@@ -1844,11 +1844,11 @@
/// Get extension for RFT collection.
fn refungible_extensions(&self) -> Option<&dyn RefungibleExtensions<T>>;
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all tokens of the `owner` on their behalf.
/// * `owner` - Token owner
/// * `operator` - Operator
/// * `approve` - Should operator status be granted or revoked?
- fn set_approval_for_all(
+ fn set_allowance_for_all(
&self,
owner: T::CrossAccountId,
operator: T::CrossAccountId,
@@ -1856,7 +1856,7 @@
) -> DispatchResultWithPostInfo;
/// Tells whether the given `owner` approves the `operator`.
- fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;
+ fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;
}
/// Extension for RFT collection.
pallets/fungible/src/common.rsdiffbeforeafterboth--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -108,7 +108,7 @@
Weight::zero()
}
- fn set_approval_for_all() -> Weight {
+ fn set_allowance_for_all() -> Weight {
Weight::zero()
}
}
@@ -429,7 +429,7 @@
<TotalSupply<T>>::try_get(self.id).ok()
}
- fn set_approval_for_all(
+ fn set_allowance_for_all(
&self,
_owner: T::CrossAccountId,
_operator: T::CrossAccountId,
@@ -438,7 +438,7 @@
fail!(<Error<T>>::SettingApprovalForAllNotAllowed)
}
- fn is_approved_for_all(&self, _owner: T::CrossAccountId, _operator: T::CrossAccountId) -> bool {
+ fn allowance_for_all(&self, _owner: T::CrossAccountId, _operator: T::CrossAccountId) -> bool {
false
}
}
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -223,17 +223,17 @@
}: {collection.token_owner(item)}
- set_approval_for_all {
+ set_allowance_for_all {
bench_init!{
owner: sub; collection: collection(owner);
operator: cross_from_sub(owner); owner: cross_sub;
};
- }: {<Pallet<T>>::set_approval_for_all(&collection, &owner, &operator, true)}
+ }: {<Pallet<T>>::set_allowance_for_all(&collection, &owner, &operator, true)}
- is_approved_for_all {
+ allowance_for_all {
bench_init!{
owner: sub; collection: collection(owner);
operator: cross_from_sub(owner); owner: cross_sub;
};
- }: {<Pallet<T>>::is_approved_for_all(&collection, &owner, &operator)}
+ }: {<Pallet<T>>::allowance_for_all(&collection, &owner, &operator)}
}
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -123,8 +123,8 @@
<SelfWeightOf<T>>::token_owner()
}
- fn set_approval_for_all() -> Weight {
- <SelfWeightOf<T>>::set_approval_for_all()
+ fn set_allowance_for_all() -> Weight {
+ <SelfWeightOf<T>>::set_allowance_for_all()
}
}
@@ -517,19 +517,19 @@
}
}
- fn set_approval_for_all(
+ fn set_allowance_for_all(
&self,
owner: T::CrossAccountId,
operator: T::CrossAccountId,
approve: bool,
) -> DispatchResultWithPostInfo {
with_weight(
- <Pallet<T>>::set_approval_for_all(self, &owner, &operator, approve),
- <CommonWeights<T>>::set_approval_for_all(),
+ <Pallet<T>>::set_allowance_for_all(self, &owner, &operator, approve),
+ <CommonWeights<T>>::set_allowance_for_all(),
)
}
- fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool {
- <Pallet<T>>::is_approved_for_all(self, &owner, &operator)
+ fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool {
+ <Pallet<T>>::allowance_for_all(self, &owner, &operator)
}
}
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -472,8 +472,8 @@
/// @notice Sets or unsets the approval of a given operator.
/// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
- #[weight(<SelfWeightOf<T>>::set_approval_for_all())]
+ /// @param approved Should operator status be granted or revoked?
+ #[weight(<SelfWeightOf<T>>::set_allowance_for_all())]
fn set_approval_for_all(
&mut self,
caller: caller,
@@ -483,7 +483,7 @@
let caller = T::CrossAccountId::from_eth(caller);
let operator = T::CrossAccountId::from_eth(operator);
- <Pallet<T>>::set_approval_for_all(self, &caller, &operator, approved)
+ <Pallet<T>>::set_allowance_for_all(self, &caller, &operator, approved)
.map_err(dispatch_to_evm::<T>)?;
Ok(())
}
@@ -494,13 +494,13 @@
Err("not implemented".into())
}
- /// @notice Tells whether an operator is approved by a given owner.
- #[weight(<SelfWeightOf<T>>::is_approved_for_all())]
+ /// @notice Tells whether the given `owner` approves the `operator`.
+ #[weight(<SelfWeightOf<T>>::allowance_for_all())]
fn is_approved_for_all(&self, owner: address, operator: address) -> Result<bool> {
let owner = T::CrossAccountId::from_eth(owner);
let operator = T::CrossAccountId::from_eth(operator);
- Ok(<Pallet<T>>::is_approved_for_all(self, &owner, &operator))
+ Ok(<Pallet<T>>::allowance_for_all(self, &owner, &operator))
}
/// @notice Returns collection helper contract address
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -274,7 +274,7 @@
/// Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
#[pallet::storage]
- pub type WalletOperator<T: Config> = StorageNMap<
+ pub type CollectionAllowance<T: Config> = StorageNMap<
Key = (
Key<Twox64Concat, CollectionId>,
Key<Blake2_128Concat, T::CrossAccountId>,
@@ -450,7 +450,7 @@
<TokensBurnt<T>>::remove(id);
let _ = <Allowance<T>>::clear_prefix((id,), u32::MAX, None);
let _ = <AccountBalance<T>>::clear_prefix((id,), u32::MAX, None);
- let _ = <WalletOperator<T>>::clear_prefix((id,), u32::MAX, None);
+ let _ = <CollectionAllowance<T>>::clear_prefix((id,), u32::MAX, None);
Ok(())
}
@@ -1206,7 +1206,7 @@
if <Allowance<T>>::get((collection.id, token)).as_ref() == Some(spender) {
return Ok(());
}
- if <WalletOperator<T>>::get((collection.id, from, spender)) == Some(true) {
+ if <CollectionAllowance<T>>::get((collection.id, from, spender)) {
return Ok(());
}
ensure!(
@@ -1345,11 +1345,11 @@
/// Sets or unsets the approval of a given operator.
///
- /// An operator is allowed to transfer all token pieces of the sender on their behalf.
+ /// The `operator` is allowed to transfer all token pieces of the `owner` on their behalf.
/// - `owner`: Token owner
/// - `operator`: Operator
- /// - `approve`: Is operator enabled or disabled
- pub fn set_approval_for_all(
+ /// - `approve`: Should operator status be granted or revoked?
+ pub fn set_allowance_for_all(
collection: &NonfungibleHandle<T>,
owner: &T::CrossAccountId,
operator: &T::CrossAccountId,
@@ -1364,7 +1364,7 @@
// =========
- <WalletOperator<T>>::insert((collection.id, owner, operator), approve);
+ <CollectionAllowance<T>>::insert((collection.id, owner, operator), approve);
<PalletEvm<T>>::deposit_log(
ERC721Events::ApprovalForAll {
owner: *owner.as_eth(),
@@ -1382,12 +1382,12 @@
Ok(())
}
- /// Tells whether an operator is approved by a given owner.
- pub fn is_approved_for_all(
+ /// Tells whether the given `owner` approves the `operator`.
+ pub fn allowance_for_all(
collection: &NonfungibleHandle<T>,
owner: &T::CrossAccountId,
operator: &T::CrossAccountId,
) -> bool {
- <WalletOperator<T>>::get((collection.id, owner, operator)).unwrap_or(false)
+ <CollectionAllowance<T>>::get((collection.id, owner, operator))
}
}
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
@@ -1021,9 +1021,9 @@
}
/// @notice Sets or unsets the approval of a given operator.
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
+ /// @param approved Should operator status be granted or revoked?
/// @dev EVM selector for this function is: 0xa22cb465,
/// or in textual repr: setApprovalForAll(address,bool)
function setApprovalForAll(address operator, bool approved) public {
@@ -1043,7 +1043,7 @@
return 0x0000000000000000000000000000000000000000;
}
- /// @notice Tells whether an operator is approved by a given owner.
+ /// @notice Tells whether the given `owner` approves the `operator`.
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) public view returns (bool) {
pallets/nonfungible/src/weights.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -48,8 +48,8 @@
fn set_token_properties(b: u32, ) -> Weight;
fn delete_token_properties(b: u32, ) -> Weight;
fn token_owner() -> Weight;
- fn set_approval_for_all() -> Weight;
- fn is_approved_for_all() -> Weight;
+ fn set_allowance_for_all() -> Weight;
+ fn allowance_for_all() -> Weight;
}
/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.
@@ -199,12 +199,12 @@
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible WalletOperator (r:0 w:1)
- fn set_approval_for_all() -> Weight {
+ fn set_allowance_for_all() -> Weight {
Weight::from_ref_time(16_231_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible WalletOperator (r:1 w:0)
- fn is_approved_for_all() -> Weight {
+ fn allowance_for_all() -> Weight {
Weight::from_ref_time(6_161_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
@@ -356,12 +356,12 @@
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible WalletOperator (r:0 w:1)
- fn set_approval_for_all() -> Weight {
+ fn set_allowance_for_all() -> Weight {
Weight::from_ref_time(16_231_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible WalletOperator (r:1 w:0)
- fn is_approved_for_all() -> Weight {
+ fn allowance_for_all() -> Weight {
Weight::from_ref_time(6_161_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -291,17 +291,17 @@
let item = create_max_item(&collection, &sender, [(owner.clone(), 100)])?;
}: {<Pallet<T>>::token_owner(collection.id, item)}
- set_approval_for_all {
+ set_allowance_for_all {
bench_init!{
owner: sub; collection: collection(owner);
operator: cross_from_sub(owner); owner: cross_sub;
};
- }: {<Pallet<T>>::set_approval_for_all(&collection, &owner, &operator, true)}
+ }: {<Pallet<T>>::set_allowance_for_all(&collection, &owner, &operator, true)}
- is_approved_for_all {
+ allowance_for_all {
bench_init!{
owner: sub; collection: collection(owner);
operator: cross_from_sub(owner); owner: cross_sub;
};
- }: {<Pallet<T>>::is_approved_for_all(&collection, &owner, &operator)}
+ }: {<Pallet<T>>::allowance_for_all(&collection, &owner, &operator)}
}
pallets/refungible/src/common.rsdiffbeforeafterboth--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -153,8 +153,8 @@
<SelfWeightOf<T>>::token_owner()
}
- fn set_approval_for_all() -> Weight {
- <SelfWeightOf<T>>::set_approval_for_all()
+ fn set_allowance_for_all() -> Weight {
+ <SelfWeightOf<T>>::set_allowance_for_all()
}
}
@@ -521,20 +521,20 @@
<Pallet<T>>::total_pieces(self.id, token)
}
- fn set_approval_for_all(
+ fn set_allowance_for_all(
&self,
owner: T::CrossAccountId,
operator: T::CrossAccountId,
approve: bool,
) -> DispatchResultWithPostInfo {
with_weight(
- <Pallet<T>>::set_approval_for_all(self, &owner, &operator, approve),
- <CommonWeights<T>>::set_approval_for_all(),
+ <Pallet<T>>::set_allowance_for_all(self, &owner, &operator, approve),
+ <CommonWeights<T>>::set_allowance_for_all(),
)
}
- fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool {
- <Pallet<T>>::is_approved_for_all(self, &owner, &operator)
+ fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool {
+ <Pallet<T>>::allowance_for_all(self, &owner, &operator)
}
}
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -462,10 +462,10 @@
}
/// @notice Sets or unsets the approval of a given operator.
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all token pieces of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
- #[weight(<SelfWeightOf<T>>::set_approval_for_all())]
+ /// @param approved Should operator status be granted or revoked?
+ #[weight(<SelfWeightOf<T>>::set_allowance_for_all())]
fn set_approval_for_all(
&mut self,
caller: caller,
@@ -475,7 +475,7 @@
let caller = T::CrossAccountId::from_eth(caller);
let operator = T::CrossAccountId::from_eth(operator);
- <Pallet<T>>::set_approval_for_all(self, &caller, &operator, approved)
+ <Pallet<T>>::set_allowance_for_all(self, &caller, &operator, approved)
.map_err(dispatch_to_evm::<T>)?;
Ok(())
}
@@ -486,13 +486,13 @@
Err("not implemented".into())
}
- /// @notice Tells whether an operator is approved by a given owner.
- #[weight(<SelfWeightOf<T>>::is_approved_for_all())]
+ /// @notice Tells whether the given `owner` approves the `operator`.
+ #[weight(<SelfWeightOf<T>>::allowance_for_all())]
fn is_approved_for_all(&self, owner: address, operator: address) -> Result<bool> {
let owner = T::CrossAccountId::from_eth(owner);
let operator = T::CrossAccountId::from_eth(operator);
- Ok(<Pallet<T>>::is_approved_for_all(self, &owner, &operator))
+ Ok(<Pallet<T>>::allowance_for_all(self, &owner, &operator))
}
/// @notice Returns collection helper contract address
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -275,14 +275,14 @@
/// Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
#[pallet::storage]
- pub type WalletOperator<T: Config> = StorageNMap<
+ pub type CollectionAllowance<T: Config> = StorageNMap<
Key = (
Key<Twox64Concat, CollectionId>,
Key<Blake2_128Concat, T::CrossAccountId>,
Key<Blake2_128Concat, T::CrossAccountId>,
),
Value = bool,
- QueryKind = OptionQuery,
+ QueryKind = ValueQuery,
>;
#[pallet::hooks]
@@ -1174,8 +1174,8 @@
let allowance =
<Allowance<T>>::get((collection.id, token, from, &spender)).checked_sub(amount);
- // Allowance if any would be reduced if spender is also wallet operator
- if <WalletOperator<T>>::get((collection.id, from, spender)) == Some(true) {
+ // Allowance (if any) would be reduced if spender is also wallet operator
+ if <CollectionAllowance<T>>::get((collection.id, from, spender)) {
return Ok(allowance);
}
@@ -1408,11 +1408,11 @@
/// Sets or unsets the approval of a given operator.
///
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all token pieces of the `owner` on their behalf.
/// - `owner`: Token owner
/// - `operator`: Operator
- /// - `approve`: Is operator enabled or disabled
- pub fn set_approval_for_all(
+ /// - `approve`: Should operator status be granted or revoked?
+ pub fn set_allowance_for_all(
collection: &RefungibleHandle<T>,
owner: &T::CrossAccountId,
operator: &T::CrossAccountId,
@@ -1427,7 +1427,7 @@
// =========
- <WalletOperator<T>>::insert((collection.id, owner, operator), approve);
+ <CollectionAllowance<T>>::insert((collection.id, owner, operator), approve);
<PalletEvm<T>>::deposit_log(
ERC721Events::ApprovalForAll {
owner: *owner.as_eth(),
@@ -1445,12 +1445,12 @@
Ok(())
}
- /// Tells whether an operator is approved by a given owner.
- pub fn is_approved_for_all(
+ /// Tells whether the given `owner` approves the `operator`.
+ pub fn allowance_for_all(
collection: &RefungibleHandle<T>,
owner: &T::CrossAccountId,
operator: &T::CrossAccountId,
) -> bool {
- <WalletOperator<T>>::get((collection.id, owner, operator)).unwrap_or(false)
+ <CollectionAllowance<T>>::get((collection.id, owner, operator))
}
}
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -1018,9 +1018,9 @@
}
/// @notice Sets or unsets the approval of a given operator.
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all token pieces of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
+ /// @param approved Should operator status be granted or revoked?
/// @dev EVM selector for this function is: 0xa22cb465,
/// or in textual repr: setApprovalForAll(address,bool)
function setApprovalForAll(address operator, bool approved) public {
@@ -1040,7 +1040,7 @@
return 0x0000000000000000000000000000000000000000;
}
- /// @notice Tells whether an operator is approved by a given owner.
+ /// @notice Tells whether the given `owner` approves the `operator`.
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) public view returns (bool) {
pallets/refungible/src/weights.rsdiffbeforeafterboth--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/src/weights.rs
@@ -55,8 +55,8 @@
fn delete_token_properties(b: u32, ) -> Weight;
fn repartition_item() -> Weight;
fn token_owner() -> Weight;
- fn set_approval_for_all() -> Weight;
- fn is_approved_for_all() -> Weight;
+ fn set_allowance_for_all() -> Weight;
+ fn allowance_for_all() -> Weight;
}
/// Weights for pallet_refungible using the Substrate node and recommended hardware.
@@ -263,12 +263,12 @@
.saturating_add(T::DbWeight::get().reads(2 as u64))
}
// Storage: Refungible WalletOperator (r:0 w:1)
- fn set_approval_for_all() -> Weight {
+ fn set_allowance_for_all() -> Weight {
Weight::from_ref_time(16_150_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible WalletOperator (r:1 w:0)
- fn is_approved_for_all() -> Weight {
+ fn allowance_for_all() -> Weight {
Weight::from_ref_time(5_901_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
@@ -477,12 +477,12 @@
.saturating_add(RocksDbWeight::get().reads(2 as u64))
}
// Storage: Refungible WalletOperator (r:0 w:1)
- fn set_approval_for_all() -> Weight {
+ fn set_allowance_for_all() -> Weight {
Weight::from_ref_time(16_150_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible WalletOperator (r:1 w:0)
- fn is_approved_for_all() -> Weight {
+ fn allowance_for_all() -> Weight {
Weight::from_ref_time(5_901_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
pallets/unique/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -36,7 +36,7 @@
use sp_std::vec;
use up_data_structs::{
CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,
- CreateCollectionData, CollectionId,
+ CreateCollectionData,
};
use crate::{weights::WeightInfo, Config, SelfWeightOf};
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -1129,15 +1129,15 @@
/// Sets or unsets the approval of a given operator.
///
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all tokens of the `owner` on their behalf.
///
/// # Arguments
///
/// * `owner`: Token owner
/// * `operator`: Operator
- /// * `approve`: Is operator enabled or disabled
- #[weight = T::CommonWeightInfo::set_approval_for_all()]
- pub fn set_approval_for_all(
+ /// * `approve`: Should operator status be granted or revoked?
+ #[weight = T::CommonWeightInfo::set_allowance_for_all()]
+ pub fn set_allowance_for_all(
origin,
collection_id: CollectionId,
operator: T::CrossAccountId,
@@ -1145,7 +1145,7 @@
) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
dispatch_tx::<T, _>(collection_id, |d| {
- d.set_approval_for_all(sender, operator, approve)
+ d.set_allowance_for_all(sender, operator, approve)
})
}
}
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -134,6 +134,6 @@
fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec<CrossAccountId>>;
/// Get whether an operator is approved by a given owner.
- fn is_approved_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool>;
+ fn allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool>;
}
}
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -188,8 +188,8 @@
dispatch_unique_runtime!(collection.total_pieces(token_id))
}
- fn is_approved_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool, DispatchError> {
- dispatch_unique_runtime!(collection.is_approved_for_all(owner, operator))
+ fn allowance_for_all(collection: CollectionId, owner: CrossAccountId, operator: CrossAccountId) -> Result<bool, DispatchError> {
+ dispatch_unique_runtime!(collection.allowance_for_all(owner, operator))
}
}
runtime/common/weights.rsdiffbeforeafterboth--- a/runtime/common/weights.rs
+++ b/runtime/common/weights.rs
@@ -121,8 +121,8 @@
max_weight_of!(token_owner())
}
- fn set_approval_for_all() -> Weight {
- max_weight_of!(set_approval_for_all())
+ fn set_allowance_for_all() -> Weight {
+ max_weight_of!(set_allowance_for_all())
}
}
tests/src/approve.test.tsdiffbeforeafterboth--- a/tests/src/approve.test.ts
+++ b/tests/src/approve.test.ts
@@ -617,26 +617,31 @@
itSub('[nft] Enable and disable approval', async ({helper}) => {
const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- const checkBeforeApproval = await helper.nft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ const checkBeforeApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkBeforeApproval).to.be.false;
- await helper.nft.setApprovalForAll(alice, collectionId, {Substrate: bob.address}, true);
- const checkAfterApproval = await helper.nft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
+ const checkAfterApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkAfterApproval).to.be.true;
- await helper.nft.setApprovalForAll(alice, collectionId, {Substrate: bob.address}, false);
- const checkAfterDisapproval = await helper.nft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
+ const checkAfterDisapproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkAfterDisapproval).to.be.false;
});
itSub.ifWithPallets('[rft] Enable and disable approval', [Pallets.ReFungible], async ({helper}) => {
const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const checkBeforeApproval = await helper.rft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ const checkBeforeApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkBeforeApproval).to.be.false;
- await helper.rft.setApprovalForAll(alice, collectionId, {Substrate: bob.address}, true);
- const checkAfterApproval = await helper.rft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
+ const checkAfterApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkAfterApproval).to.be.true;
- await helper.rft.setApprovalForAll(alice, collectionId, {Substrate: bob.address}, false);
- const checkAfterDisapproval = await helper.rft.isApprovedForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+
+ await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
+ const checkAfterDisapproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
expect(checkAfterDisapproval).to.be.false;
});
});
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -672,9 +672,9 @@
function approve(address approved, uint256 tokenId) external;
/// @notice Sets or unsets the approval of a given operator.
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
+ /// @param approved Should operator status be granted or revoked?
/// @dev EVM selector for this function is: 0xa22cb465,
/// or in textual repr: setApprovalForAll(address,bool)
function setApprovalForAll(address operator, bool approved) external;
@@ -684,7 +684,7 @@
/// or in textual repr: getApproved(uint256)
function getApproved(uint256 tokenId) external view returns (address);
- /// @notice Tells whether an operator is approved by a given owner.
+ /// @notice Tells whether the given `owner` approves the `operator`.
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (bool);
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -669,9 +669,9 @@
function approve(address approved, uint256 tokenId) external;
/// @notice Sets or unsets the approval of a given operator.
- /// An operator is allowed to transfer all tokens of the sender on their behalf.
+ /// The `operator` is allowed to transfer all token pieces of the `caller` on their behalf.
/// @param operator Operator
- /// @param approved Is operator enabled or disabled
+ /// @param approved Should operator status be granted or revoked?
/// @dev EVM selector for this function is: 0xa22cb465,
/// or in textual repr: setApprovalForAll(address,bool)
function setApprovalForAll(address operator, bool approved) external;
@@ -681,7 +681,7 @@
/// or in textual repr: getApproved(uint256)
function getApproved(uint256 tokenId) external view returns (address);
- /// @notice Tells whether an operator is approved by a given owner.
+ /// @notice Tells whether the given `owner` approves the `operator`.
/// @dev EVM selector for this function is: 0xe985e9c5,
/// or in textual repr: isApprovedForAll(address,address)
function isApprovedForAll(address owner, address operator) external view returns (bool);
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -935,48 +935,54 @@
let donor: IKeyringPair;
let minter: IKeyringPair;
let alice: IKeyringPair;
- let bob: IKeyringPair;
before(async function() {
await usingEthPlaygrounds(async (helper, privateKey) => {
donor = await privateKey({filename: __filename});
- [minter, alice, bob] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ [minter, alice] = await helper.arrange.createAccounts([100n, 100n], donor);
});
});
itEth('[negative] Cant perform burn without approval', async ({helper}) => {
const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
- const owner = bob;
+ const owner = await helper.eth.createAccountWithBalance(donor, 100n);
const spender = await helper.eth.createAccountWithBalance(donor, 100n);
- const token = await collection.mintToken(minter, {Substrate: owner.address});
+ const token = await collection.mintToken(minter, {Ethereum: owner});
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, 'nft');
- {
- const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner);
- await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
- }
+ const ownerCross = helper.ethCrossAccount.fromAddress(owner);
+ await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
+
+ await contract.methods.setApprovalForAll(spender, true).send({from: owner});
+ await contract.methods.setApprovalForAll(spender, false).send({from: owner});
+
+ await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
});
itEth('[negative] Cant perform transfer without approval', async ({helper}) => {
const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'});
- const owner = bob;
const receiver = alice;
+ const owner = await helper.eth.createAccountWithBalance(donor, 100n);
const spender = await helper.eth.createAccountWithBalance(donor, 100n);
- const token = await collection.mintToken(minter, {Substrate: owner.address});
+ const token = await collection.mintToken(minter, {Ethereum: owner});
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, 'nft');
- {
- const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner);
- const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);
- await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
- }
+ const ownerCross = helper.ethCrossAccount.fromAddress(owner);
+ const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);
+
+ await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
+
+ await contract.methods.setApprovalForAll(spender, true).send({from: owner});
+ await contract.methods.setApprovalForAll(spender, false).send({from: owner});
+
+ await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
});
});
tests/src/eth/reFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungible.test.ts
+++ b/tests/src/eth/reFungible.test.ts
@@ -750,10 +750,14 @@
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, 'rft');
- {
- const ownerCross = helper.ethCrossAccount.fromAddress(owner);
- await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
- }
+ const ownerCross = helper.ethCrossAccount.fromAddress(owner);
+
+ await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
+
+ await contract.methods.setApprovalForAll(spender, true).send({from: owner});
+ await contract.methods.setApprovalForAll(spender, false).send({from: owner});
+
+ await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected;
});
itEth('[negative] Cant perform transfer without approval', async ({helper}) => {
@@ -768,10 +772,14 @@
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, 'rft');
- {
- const ownerCross = helper.ethCrossAccount.fromAddress(owner);
- const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);
- await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
- }
+ const ownerCross = helper.ethCrossAccount.fromAddress(owner);
+ const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver);
+
+ await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
+
+ await contract.methods.setApprovalForAll(spender, true).send({from: owner});
+ await contract.methods.setApprovalForAll(spender, false).send({from: owner});
+
+ await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected;
});
});
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/api-base/types/events';78import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';9import type { Bytes, Null, Option, Result, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';10import type { ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256, Weight } from '@polkadot/types/interfaces/runtime';12import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetMultiAssets, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';1314export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;1516declare module '@polkadot/api-base/types/events' {17 interface AugmentedEvents<ApiType extends ApiTypes> {18 appPromotion: {19 /**20 * The admin was set21 * 22 * # Arguments23 * * AccountId: account address of the admin24 **/25 SetAdmin: AugmentedEvent<ApiType, [AccountId32]>;26 /**27 * Staking was performed28 * 29 * # Arguments30 * * AccountId: account of the staker31 * * Balance : staking amount32 **/33 Stake: AugmentedEvent<ApiType, [AccountId32, u128]>;34 /**35 * Staking recalculation was performed36 * 37 * # Arguments38 * * AccountId: account of the staker.39 * * Balance : recalculation base40 * * Balance : total income41 **/42 StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;43 /**44 * Unstaking was performed45 * 46 * # Arguments47 * * AccountId: account of the staker48 * * Balance : unstaking amount49 **/50 Unstake: AugmentedEvent<ApiType, [AccountId32, u128]>;51 /**52 * Generic event53 **/54 [key: string]: AugmentedEvent<ApiType>;55 };56 balances: {57 /**58 * A balance was set by root.59 **/60 BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;61 /**62 * Some amount was deposited (e.g. for transaction fees).63 **/64 Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;65 /**66 * An account was removed whose balance was non-zero but below ExistentialDeposit,67 * resulting in an outright loss.68 **/69 DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;70 /**71 * An account was created with some free balance.72 **/73 Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;74 /**75 * Some balance was reserved (moved from free to reserved).76 **/77 Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;78 /**79 * Some balance was moved from the reserve of the first account to the second account.80 * Final argument indicates the destination balance type.81 **/82 ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;83 /**84 * Some amount was removed from the account (e.g. for misbehavior).85 **/86 Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;87 /**88 * Transfer succeeded.89 **/90 Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;91 /**92 * Some balance was unreserved (moved from reserved to free).93 **/94 Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;95 /**96 * Some amount was withdrawn from the account (e.g. for transaction fees).97 **/98 Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;99 /**100 * Generic event101 **/102 [key: string]: AugmentedEvent<ApiType>;103 };104 common: {105 /**106 * Amount pieces of token owned by `sender` was approved for `spender`.107 **/108 Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;109 /**110 * Amount pieces of token owned by `sender` was approved for `spender`.111 **/112 ApprovedForAll: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, bool]>;113 /**114 * New collection was created115 **/116 CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;117 /**118 * New collection was destroyed119 **/120 CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;121 /**122 * The property has been deleted.123 **/124 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;125 /**126 * The colletion property has been added or edited.127 **/128 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;129 /**130 * New item was created.131 **/132 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;133 /**134 * Collection item was burned.135 **/136 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;137 /**138 * The token property permission of a collection has been set.139 **/140 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;141 /**142 * The token property has been deleted.143 **/144 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;145 /**146 * The token property has been added or edited.147 **/148 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;149 /**150 * Item was transferred151 **/152 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;153 /**154 * Generic event155 **/156 [key: string]: AugmentedEvent<ApiType>;157 };158 cumulusXcm: {159 /**160 * Downward message executed with the given outcome.161 * \[ id, outcome \]162 **/163 ExecutedDownward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;164 /**165 * Downward message is invalid XCM.166 * \[ id \]167 **/168 InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;169 /**170 * Downward message is unsupported version of XCM.171 * \[ id \]172 **/173 UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;174 /**175 * Generic event176 **/177 [key: string]: AugmentedEvent<ApiType>;178 };179 dmpQueue: {180 /**181 * Downward message executed with the given outcome.182 **/183 ExecutedDownward: AugmentedEvent<ApiType, [messageId: U8aFixed, outcome: XcmV2TraitsOutcome], { messageId: U8aFixed, outcome: XcmV2TraitsOutcome }>;184 /**185 * Downward message is invalid XCM.186 **/187 InvalidFormat: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;188 /**189 * Downward message is overweight and was placed in the overweight queue.190 **/191 OverweightEnqueued: AugmentedEvent<ApiType, [messageId: U8aFixed, overweightIndex: u64, requiredWeight: Weight], { messageId: U8aFixed, overweightIndex: u64, requiredWeight: Weight }>;192 /**193 * Downward message from the overweight queue was executed.194 **/195 OverweightServiced: AugmentedEvent<ApiType, [overweightIndex: u64, weightUsed: Weight], { overweightIndex: u64, weightUsed: Weight }>;196 /**197 * Downward message is unsupported version of XCM.198 **/199 UnsupportedVersion: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;200 /**201 * The weight limit for handling downward messages was reached.202 **/203 WeightExhausted: AugmentedEvent<ApiType, [messageId: U8aFixed, remainingWeight: Weight, requiredWeight: Weight], { messageId: U8aFixed, remainingWeight: Weight, requiredWeight: Weight }>;204 /**205 * Generic event206 **/207 [key: string]: AugmentedEvent<ApiType>;208 };209 ethereum: {210 /**211 * An ethereum transaction was successfully executed.212 **/213 Executed: AugmentedEvent<ApiType, [from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason], { from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason }>;214 /**215 * Generic event216 **/217 [key: string]: AugmentedEvent<ApiType>;218 };219 evm: {220 /**221 * A contract has been created at given address.222 **/223 Created: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;224 /**225 * A contract was attempted to be created, but the execution failed.226 **/227 CreatedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;228 /**229 * A contract has been executed successfully with states applied.230 **/231 Executed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;232 /**233 * A contract has been executed with errors. States are reverted with only gas fees applied.234 **/235 ExecutedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;236 /**237 * Ethereum events from contracts.238 **/239 Log: AugmentedEvent<ApiType, [log: EthereumLog], { log: EthereumLog }>;240 /**241 * Generic event242 **/243 [key: string]: AugmentedEvent<ApiType>;244 };245 evmContractHelpers: {246 /**247 * Collection sponsor was removed.248 **/249 ContractSponsorRemoved: AugmentedEvent<ApiType, [H160]>;250 /**251 * Contract sponsor was set.252 **/253 ContractSponsorSet: AugmentedEvent<ApiType, [H160, AccountId32]>;254 /**255 * New sponsor was confirm.256 **/257 ContractSponsorshipConfirmed: AugmentedEvent<ApiType, [H160, AccountId32]>;258 /**259 * Generic event260 **/261 [key: string]: AugmentedEvent<ApiType>;262 };263 evmMigration: {264 /**265 * This event is used in benchmarking and can be used for tests266 **/267 TestEvent: AugmentedEvent<ApiType, []>;268 /**269 * Generic event270 **/271 [key: string]: AugmentedEvent<ApiType>;272 };273 foreignAssets: {274 /**275 * The asset registered.276 **/277 AssetRegistered: AugmentedEvent<ApiType, [assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata }>;278 /**279 * The asset updated.280 **/281 AssetUpdated: AugmentedEvent<ApiType, [assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata }>;282 /**283 * The foreign asset registered.284 **/285 ForeignAssetRegistered: AugmentedEvent<ApiType, [assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata }>;286 /**287 * The foreign asset updated.288 **/289 ForeignAssetUpdated: AugmentedEvent<ApiType, [assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata }>;290 /**291 * Generic event292 **/293 [key: string]: AugmentedEvent<ApiType>;294 };295 maintenance: {296 MaintenanceDisabled: AugmentedEvent<ApiType, []>;297 MaintenanceEnabled: AugmentedEvent<ApiType, []>;298 /**299 * Generic event300 **/301 [key: string]: AugmentedEvent<ApiType>;302 };303 parachainSystem: {304 /**305 * Downward messages were processed using the given weight.306 **/307 DownwardMessagesProcessed: AugmentedEvent<ApiType, [weightUsed: Weight, dmqHead: H256], { weightUsed: Weight, dmqHead: H256 }>;308 /**309 * Some downward messages have been received and will be processed.310 **/311 DownwardMessagesReceived: AugmentedEvent<ApiType, [count: u32], { count: u32 }>;312 /**313 * An upgrade has been authorized.314 **/315 UpgradeAuthorized: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>;316 /**317 * The validation function was applied as of the contained relay chain block number.318 **/319 ValidationFunctionApplied: AugmentedEvent<ApiType, [relayChainBlockNum: u32], { relayChainBlockNum: u32 }>;320 /**321 * The relay-chain aborted the upgrade process.322 **/323 ValidationFunctionDiscarded: AugmentedEvent<ApiType, []>;324 /**325 * The validation function has been scheduled to apply.326 **/327 ValidationFunctionStored: AugmentedEvent<ApiType, []>;328 /**329 * Generic event330 **/331 [key: string]: AugmentedEvent<ApiType>;332 };333 polkadotXcm: {334 /**335 * Some assets have been placed in an asset trap.336 * 337 * \[ hash, origin, assets \]338 **/339 AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;340 /**341 * Execution of an XCM message was attempted.342 * 343 * \[ outcome \]344 **/345 Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;346 /**347 * Expected query response has been received but the origin location of the response does348 * not match that expected. The query remains registered for a later, valid, response to349 * be received and acted upon.350 * 351 * \[ origin location, id, expected location \]352 **/353 InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;354 /**355 * Expected query response has been received but the expected origin location placed in356 * storage by this runtime previously cannot be decoded. The query remains registered.357 * 358 * This is unexpected (since a location placed in storage in a previously executing359 * runtime should be readable prior to query timeout) and dangerous since the possibly360 * valid response will be dropped. Manual governance intervention is probably going to be361 * needed.362 * 363 * \[ origin location, id \]364 **/365 InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;366 /**367 * Query response has been received and query is removed. The registered notification has368 * been dispatched and executed successfully.369 * 370 * \[ id, pallet index, call index \]371 **/372 Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;373 /**374 * Query response has been received and query is removed. The dispatch was unable to be375 * decoded into a `Call`; this might be due to dispatch function having a signature which376 * is not `(origin, QueryId, Response)`.377 * 378 * \[ id, pallet index, call index \]379 **/380 NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;381 /**382 * Query response has been received and query is removed. There was a general error with383 * dispatching the notification call.384 * 385 * \[ id, pallet index, call index \]386 **/387 NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;388 /**389 * Query response has been received and query is removed. The registered notification could390 * not be dispatched because the dispatch weight is greater than the maximum weight391 * originally budgeted by this runtime for the query result.392 * 393 * \[ id, pallet index, call index, actual weight, max budgeted weight \]394 **/395 NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;396 /**397 * A given location which had a version change subscription was dropped owing to an error398 * migrating the location to our new XCM format.399 * 400 * \[ location, query ID \]401 **/402 NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;403 /**404 * A given location which had a version change subscription was dropped owing to an error405 * sending the notification to it.406 * 407 * \[ location, query ID, error \]408 **/409 NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;410 /**411 * Query response has been received and is ready for taking with `take_response`. There is412 * no registered notification call.413 * 414 * \[ id, response \]415 **/416 ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;417 /**418 * Received query response has been read and removed.419 * 420 * \[ id \]421 **/422 ResponseTaken: AugmentedEvent<ApiType, [u64]>;423 /**424 * A XCM message was sent.425 * 426 * \[ origin, destination, message \]427 **/428 Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;429 /**430 * The supported version of a location has been changed. This might be through an431 * automatic notification or a manual intervention.432 * 433 * \[ location, XCM version \]434 **/435 SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;436 /**437 * Query response received which does not match a registered query. This may be because a438 * matching query was never registered, it may be because it is a duplicate response, or439 * because the query timed out.440 * 441 * \[ origin location, id \]442 **/443 UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;444 /**445 * An XCM version change notification message has been attempted to be sent.446 * 447 * \[ destination, result \]448 **/449 VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;450 /**451 * Generic event452 **/453 [key: string]: AugmentedEvent<ApiType>;454 };455 rmrkCore: {456 CollectionCreated: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;457 CollectionDestroyed: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;458 CollectionLocked: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;459 IssuerChanged: AugmentedEvent<ApiType, [oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32], { oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32 }>;460 NFTAccepted: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32 }>;461 NFTBurned: AugmentedEvent<ApiType, [owner: AccountId32, nftId: u32], { owner: AccountId32, nftId: u32 }>;462 NftMinted: AugmentedEvent<ApiType, [owner: AccountId32, collectionId: u32, nftId: u32], { owner: AccountId32, collectionId: u32, nftId: u32 }>;463 NFTRejected: AugmentedEvent<ApiType, [sender: AccountId32, collectionId: u32, nftId: u32], { sender: AccountId32, collectionId: u32, nftId: u32 }>;464 NFTSent: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool }>;465 PrioritySet: AugmentedEvent<ApiType, [collectionId: u32, nftId: u32], { collectionId: u32, nftId: u32 }>;466 PropertySet: AugmentedEvent<ApiType, [collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes], { collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes }>;467 ResourceAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;468 ResourceAdded: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;469 ResourceRemoval: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;470 ResourceRemovalAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;471 /**472 * Generic event473 **/474 [key: string]: AugmentedEvent<ApiType>;475 };476 rmrkEquip: {477 BaseCreated: AugmentedEvent<ApiType, [issuer: AccountId32, baseId: u32], { issuer: AccountId32, baseId: u32 }>;478 EquippablesUpdated: AugmentedEvent<ApiType, [baseId: u32, slotId: u32], { baseId: u32, slotId: u32 }>;479 /**480 * Generic event481 **/482 [key: string]: AugmentedEvent<ApiType>;483 };484 scheduler: {485 /**486 * The call for the provided hash was not found so the task has been aborted.487 **/488 CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;489 /**490 * Canceled some task.491 **/492 Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;493 /**494 * Dispatched some task.495 **/496 Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;497 /**498 * The given task can never be executed since it is overweight.499 **/500 PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;501 /**502 * Scheduled task's priority has changed503 **/504 PriorityChanged: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, priority: u8], { task: ITuple<[u32, u32]>, priority: u8 }>;505 /**506 * Scheduled some task.507 **/508 Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;509 /**510 * Generic event511 **/512 [key: string]: AugmentedEvent<ApiType>;513 };514 structure: {515 /**516 * Executed call on behalf of the token.517 **/518 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;519 /**520 * Generic event521 **/522 [key: string]: AugmentedEvent<ApiType>;523 };524 sudo: {525 /**526 * The \[sudoer\] just switched identity; the old key is supplied if one existed.527 **/528 KeyChanged: AugmentedEvent<ApiType, [oldSudoer: Option<AccountId32>], { oldSudoer: Option<AccountId32> }>;529 /**530 * A sudo just took place. \[result\]531 **/532 Sudid: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;533 /**534 * A sudo just took place. \[result\]535 **/536 SudoAsDone: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;537 /**538 * Generic event539 **/540 [key: string]: AugmentedEvent<ApiType>;541 };542 system: {543 /**544 * `:code` was updated.545 **/546 CodeUpdated: AugmentedEvent<ApiType, []>;547 /**548 * An extrinsic failed.549 **/550 ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;551 /**552 * An extrinsic completed successfully.553 **/554 ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;555 /**556 * An account was reaped.557 **/558 KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;559 /**560 * A new account was created.561 **/562 NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;563 /**564 * On on-chain remark happened.565 **/566 Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;567 /**568 * Generic event569 **/570 [key: string]: AugmentedEvent<ApiType>;571 };572 testUtils: {573 BatchCompleted: AugmentedEvent<ApiType, []>;574 ShouldRollback: AugmentedEvent<ApiType, []>;575 ValueIsSet: AugmentedEvent<ApiType, []>;576 /**577 * Generic event578 **/579 [key: string]: AugmentedEvent<ApiType>;580 };581 tokens: {582 /**583 * A balance was set by root.584 **/585 BalanceSet: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, free: u128, reserved: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, free: u128, reserved: u128 }>;586 /**587 * Deposited some balance into an account588 **/589 Deposited: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;590 /**591 * An account was removed whose balance was non-zero but below592 * ExistentialDeposit, resulting in an outright loss.593 **/594 DustLost: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;595 /**596 * An account was created with some free balance.597 **/598 Endowed: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;599 /**600 * Some locked funds were unlocked601 **/602 LockRemoved: AugmentedEvent<ApiType, [lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32], { lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32 }>;603 /**604 * Some funds are locked605 **/606 LockSet: AugmentedEvent<ApiType, [lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;607 /**608 * Some balance was reserved (moved from free to reserved).609 **/610 Reserved: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;611 /**612 * Some reserved balance was repatriated (moved from reserved to613 * another account).614 **/615 ReserveRepatriated: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128, status: FrameSupportTokensMiscBalanceStatus], { currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128, status: FrameSupportTokensMiscBalanceStatus }>;616 /**617 * Some balances were slashed (e.g. due to mis-behavior)618 **/619 Slashed: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, freeAmount: u128, reservedAmount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, freeAmount: u128, reservedAmount: u128 }>;620 /**621 * The total issuance of an currency has been set622 **/623 TotalIssuanceSet: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, amount: u128], { currencyId: PalletForeignAssetsAssetIds, amount: u128 }>;624 /**625 * Transfer succeeded.626 **/627 Transfer: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128 }>;628 /**629 * Some balance was unreserved (moved from reserved to free).630 **/631 Unreserved: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;632 /**633 * Some balances were withdrawn (e.g. pay for transaction fee)634 **/635 Withdrawn: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;636 /**637 * Generic event638 **/639 [key: string]: AugmentedEvent<ApiType>;640 };641 transactionPayment: {642 /**643 * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,644 * has been paid by `who`.645 **/646 TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], { who: AccountId32, actualFee: u128, tip: u128 }>;647 /**648 * Generic event649 **/650 [key: string]: AugmentedEvent<ApiType>;651 };652 treasury: {653 /**654 * Some funds have been allocated.655 **/656 Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;657 /**658 * Some of our funds have been burnt.659 **/660 Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;661 /**662 * Some funds have been deposited.663 **/664 Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;665 /**666 * New proposal.667 **/668 Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;669 /**670 * A proposal was rejected; funds were slashed.671 **/672 Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;673 /**674 * Spending has finished; this is the amount that rolls over until next spend.675 **/676 Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;677 /**678 * A new spend proposal has been approved.679 **/680 SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], { proposalIndex: u32, amount: u128, beneficiary: AccountId32 }>;681 /**682 * We have ended a spend period and will now allocate funds.683 **/684 Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;685 /**686 * Generic event687 **/688 [key: string]: AugmentedEvent<ApiType>;689 };690 unique: {691 /**692 * Address was added to the allow list693 * 694 * # Arguments695 * * collection_id: ID of the affected collection.696 * * user: Address of the added account.697 **/698 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;699 /**700 * Address was removed from the allow list701 * 702 * # Arguments703 * * collection_id: ID of the affected collection.704 * * user: Address of the removed account.705 **/706 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;707 /**708 * Collection admin was added709 * 710 * # Arguments711 * * collection_id: ID of the affected collection.712 * * admin: Admin address.713 **/714 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;715 /**716 * Collection admin was removed717 * 718 * # Arguments719 * * collection_id: ID of the affected collection.720 * * admin: Removed admin address.721 **/722 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;723 /**724 * Collection limits were set725 * 726 * # Arguments727 * * collection_id: ID of the affected collection.728 **/729 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;730 /**731 * Collection owned was changed732 * 733 * # Arguments734 * * collection_id: ID of the affected collection.735 * * owner: New owner address.736 **/737 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;738 /**739 * Collection permissions were set740 * 741 * # Arguments742 * * collection_id: ID of the affected collection.743 **/744 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;745 /**746 * Collection sponsor was removed747 * 748 * # Arguments749 * * collection_id: ID of the affected collection.750 **/751 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;752 /**753 * Collection sponsor was set754 * 755 * # Arguments756 * * collection_id: ID of the affected collection.757 * * owner: New sponsor address.758 **/759 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;760 /**761 * New sponsor was confirm762 * 763 * # Arguments764 * * collection_id: ID of the affected collection.765 * * sponsor: New sponsor address.766 **/767 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;768 /**769 * Generic event770 **/771 [key: string]: AugmentedEvent<ApiType>;772 };773 vesting: {774 /**775 * Claimed vesting.776 **/777 Claimed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;778 /**779 * Added new vesting schedule.780 **/781 VestingScheduleAdded: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule], { from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule }>;782 /**783 * Updated vesting schedules.784 **/785 VestingSchedulesUpdated: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;786 /**787 * Generic event788 **/789 [key: string]: AugmentedEvent<ApiType>;790 };791 xcmpQueue: {792 /**793 * Bad XCM format used.794 **/795 BadFormat: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;796 /**797 * Bad XCM version used.798 **/799 BadVersion: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;800 /**801 * Some XCM failed.802 **/803 Fail: AugmentedEvent<ApiType, [messageHash: Option<H256>, error: XcmV2TraitsError, weight: Weight], { messageHash: Option<H256>, error: XcmV2TraitsError, weight: Weight }>;804 /**805 * An XCM exceeded the individual message weight budget.806 **/807 OverweightEnqueued: AugmentedEvent<ApiType, [sender: u32, sentAt: u32, index: u64, required: Weight], { sender: u32, sentAt: u32, index: u64, required: Weight }>;808 /**809 * An XCM from the overweight queue was executed with the given actual weight used.810 **/811 OverweightServiced: AugmentedEvent<ApiType, [index: u64, used: Weight], { index: u64, used: Weight }>;812 /**813 * Some XCM was executed ok.814 **/815 Success: AugmentedEvent<ApiType, [messageHash: Option<H256>, weight: Weight], { messageHash: Option<H256>, weight: Weight }>;816 /**817 * An upward message was sent to the relay chain.818 **/819 UpwardMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;820 /**821 * An HRMP message was sent to a sibling parachain.822 **/823 XcmpMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;824 /**825 * Generic event826 **/827 [key: string]: AugmentedEvent<ApiType>;828 };829 xTokens: {830 /**831 * Transferred `MultiAsset` with fee.832 **/833 TransferredMultiAssets: AugmentedEvent<ApiType, [sender: AccountId32, assets: XcmV1MultiassetMultiAssets, fee: XcmV1MultiAsset, dest: XcmV1MultiLocation], { sender: AccountId32, assets: XcmV1MultiassetMultiAssets, fee: XcmV1MultiAsset, dest: XcmV1MultiLocation }>;834 /**835 * Generic event836 **/837 [key: string]: AugmentedEvent<ApiType>;838 };839 } // AugmentedEvents840} // declare module1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/api-base/types/events';78import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';9import type { Bytes, Null, Option, Result, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';10import type { ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256, Weight } from '@polkadot/types/interfaces/runtime';12import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetMultiAssets, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';1314export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;1516declare module '@polkadot/api-base/types/events' {17 interface AugmentedEvents<ApiType extends ApiTypes> {18 appPromotion: {19 /**20 * The admin was set21 * 22 * # Arguments23 * * AccountId: account address of the admin24 **/25 SetAdmin: AugmentedEvent<ApiType, [AccountId32]>;26 /**27 * Staking was performed28 * 29 * # Arguments30 * * AccountId: account of the staker31 * * Balance : staking amount32 **/33 Stake: AugmentedEvent<ApiType, [AccountId32, u128]>;34 /**35 * Staking recalculation was performed36 * 37 * # Arguments38 * * AccountId: account of the staker.39 * * Balance : recalculation base40 * * Balance : total income41 **/42 StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;43 /**44 * Unstaking was performed45 * 46 * # Arguments47 * * AccountId: account of the staker48 * * Balance : unstaking amount49 **/50 Unstake: AugmentedEvent<ApiType, [AccountId32, u128]>;51 /**52 * Generic event53 **/54 [key: string]: AugmentedEvent<ApiType>;55 };56 balances: {57 /**58 * A balance was set by root.59 **/60 BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;61 /**62 * Some amount was deposited (e.g. for transaction fees).63 **/64 Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;65 /**66 * An account was removed whose balance was non-zero but below ExistentialDeposit,67 * resulting in an outright loss.68 **/69 DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;70 /**71 * An account was created with some free balance.72 **/73 Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;74 /**75 * Some balance was reserved (moved from free to reserved).76 **/77 Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;78 /**79 * Some balance was moved from the reserve of the first account to the second account.80 * Final argument indicates the destination balance type.81 **/82 ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;83 /**84 * Some amount was removed from the account (e.g. for misbehavior).85 **/86 Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;87 /**88 * Transfer succeeded.89 **/90 Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;91 /**92 * Some balance was unreserved (moved from reserved to free).93 **/94 Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;95 /**96 * Some amount was withdrawn from the account (e.g. for transaction fees).97 **/98 Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;99 /**100 * Generic event101 **/102 [key: string]: AugmentedEvent<ApiType>;103 };104 common: {105 /**106 * Amount pieces of token owned by `sender` was approved for `spender`.107 **/108 Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;109 /**110 * A `sender` approves operations on all owned tokens for `spender`.111 **/112 ApprovedForAll: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, bool]>;113 /**114 * New collection was created115 **/116 CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;117 /**118 * New collection was destroyed119 **/120 CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;121 /**122 * The property has been deleted.123 **/124 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;125 /**126 * The colletion property has been added or edited.127 **/128 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;129 /**130 * New item was created.131 **/132 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;133 /**134 * Collection item was burned.135 **/136 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;137 /**138 * The token property permission of a collection has been set.139 **/140 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;141 /**142 * The token property has been deleted.143 **/144 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;145 /**146 * The token property has been added or edited.147 **/148 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;149 /**150 * Item was transferred151 **/152 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;153 /**154 * Generic event155 **/156 [key: string]: AugmentedEvent<ApiType>;157 };158 cumulusXcm: {159 /**160 * Downward message executed with the given outcome.161 * \[ id, outcome \]162 **/163 ExecutedDownward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;164 /**165 * Downward message is invalid XCM.166 * \[ id \]167 **/168 InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;169 /**170 * Downward message is unsupported version of XCM.171 * \[ id \]172 **/173 UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;174 /**175 * Generic event176 **/177 [key: string]: AugmentedEvent<ApiType>;178 };179 dmpQueue: {180 /**181 * Downward message executed with the given outcome.182 **/183 ExecutedDownward: AugmentedEvent<ApiType, [messageId: U8aFixed, outcome: XcmV2TraitsOutcome], { messageId: U8aFixed, outcome: XcmV2TraitsOutcome }>;184 /**185 * Downward message is invalid XCM.186 **/187 InvalidFormat: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;188 /**189 * Downward message is overweight and was placed in the overweight queue.190 **/191 OverweightEnqueued: AugmentedEvent<ApiType, [messageId: U8aFixed, overweightIndex: u64, requiredWeight: Weight], { messageId: U8aFixed, overweightIndex: u64, requiredWeight: Weight }>;192 /**193 * Downward message from the overweight queue was executed.194 **/195 OverweightServiced: AugmentedEvent<ApiType, [overweightIndex: u64, weightUsed: Weight], { overweightIndex: u64, weightUsed: Weight }>;196 /**197 * Downward message is unsupported version of XCM.198 **/199 UnsupportedVersion: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;200 /**201 * The weight limit for handling downward messages was reached.202 **/203 WeightExhausted: AugmentedEvent<ApiType, [messageId: U8aFixed, remainingWeight: Weight, requiredWeight: Weight], { messageId: U8aFixed, remainingWeight: Weight, requiredWeight: Weight }>;204 /**205 * Generic event206 **/207 [key: string]: AugmentedEvent<ApiType>;208 };209 ethereum: {210 /**211 * An ethereum transaction was successfully executed.212 **/213 Executed: AugmentedEvent<ApiType, [from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason], { from: H160, to: H160, transactionHash: H256, exitReason: EvmCoreErrorExitReason }>;214 /**215 * Generic event216 **/217 [key: string]: AugmentedEvent<ApiType>;218 };219 evm: {220 /**221 * A contract has been created at given address.222 **/223 Created: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;224 /**225 * A contract was attempted to be created, but the execution failed.226 **/227 CreatedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;228 /**229 * A contract has been executed successfully with states applied.230 **/231 Executed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;232 /**233 * A contract has been executed with errors. States are reverted with only gas fees applied.234 **/235 ExecutedFailed: AugmentedEvent<ApiType, [address: H160], { address: H160 }>;236 /**237 * Ethereum events from contracts.238 **/239 Log: AugmentedEvent<ApiType, [log: EthereumLog], { log: EthereumLog }>;240 /**241 * Generic event242 **/243 [key: string]: AugmentedEvent<ApiType>;244 };245 evmContractHelpers: {246 /**247 * Collection sponsor was removed.248 **/249 ContractSponsorRemoved: AugmentedEvent<ApiType, [H160]>;250 /**251 * Contract sponsor was set.252 **/253 ContractSponsorSet: AugmentedEvent<ApiType, [H160, AccountId32]>;254 /**255 * New sponsor was confirm.256 **/257 ContractSponsorshipConfirmed: AugmentedEvent<ApiType, [H160, AccountId32]>;258 /**259 * Generic event260 **/261 [key: string]: AugmentedEvent<ApiType>;262 };263 evmMigration: {264 /**265 * This event is used in benchmarking and can be used for tests266 **/267 TestEvent: AugmentedEvent<ApiType, []>;268 /**269 * Generic event270 **/271 [key: string]: AugmentedEvent<ApiType>;272 };273 foreignAssets: {274 /**275 * The asset registered.276 **/277 AssetRegistered: AugmentedEvent<ApiType, [assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata }>;278 /**279 * The asset updated.280 **/281 AssetUpdated: AugmentedEvent<ApiType, [assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: PalletForeignAssetsAssetIds, metadata: PalletForeignAssetsModuleAssetMetadata }>;282 /**283 * The foreign asset registered.284 **/285 ForeignAssetRegistered: AugmentedEvent<ApiType, [assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata }>;286 /**287 * The foreign asset updated.288 **/289 ForeignAssetUpdated: AugmentedEvent<ApiType, [assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata], { assetId: u32, assetAddress: XcmV1MultiLocation, metadata: PalletForeignAssetsModuleAssetMetadata }>;290 /**291 * Generic event292 **/293 [key: string]: AugmentedEvent<ApiType>;294 };295 maintenance: {296 MaintenanceDisabled: AugmentedEvent<ApiType, []>;297 MaintenanceEnabled: AugmentedEvent<ApiType, []>;298 /**299 * Generic event300 **/301 [key: string]: AugmentedEvent<ApiType>;302 };303 parachainSystem: {304 /**305 * Downward messages were processed using the given weight.306 **/307 DownwardMessagesProcessed: AugmentedEvent<ApiType, [weightUsed: Weight, dmqHead: H256], { weightUsed: Weight, dmqHead: H256 }>;308 /**309 * Some downward messages have been received and will be processed.310 **/311 DownwardMessagesReceived: AugmentedEvent<ApiType, [count: u32], { count: u32 }>;312 /**313 * An upgrade has been authorized.314 **/315 UpgradeAuthorized: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>;316 /**317 * The validation function was applied as of the contained relay chain block number.318 **/319 ValidationFunctionApplied: AugmentedEvent<ApiType, [relayChainBlockNum: u32], { relayChainBlockNum: u32 }>;320 /**321 * The relay-chain aborted the upgrade process.322 **/323 ValidationFunctionDiscarded: AugmentedEvent<ApiType, []>;324 /**325 * The validation function has been scheduled to apply.326 **/327 ValidationFunctionStored: AugmentedEvent<ApiType, []>;328 /**329 * Generic event330 **/331 [key: string]: AugmentedEvent<ApiType>;332 };333 polkadotXcm: {334 /**335 * Some assets have been placed in an asset trap.336 * 337 * \[ hash, origin, assets \]338 **/339 AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;340 /**341 * Execution of an XCM message was attempted.342 * 343 * \[ outcome \]344 **/345 Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;346 /**347 * Expected query response has been received but the origin location of the response does348 * not match that expected. The query remains registered for a later, valid, response to349 * be received and acted upon.350 * 351 * \[ origin location, id, expected location \]352 **/353 InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;354 /**355 * Expected query response has been received but the expected origin location placed in356 * storage by this runtime previously cannot be decoded. The query remains registered.357 * 358 * This is unexpected (since a location placed in storage in a previously executing359 * runtime should be readable prior to query timeout) and dangerous since the possibly360 * valid response will be dropped. Manual governance intervention is probably going to be361 * needed.362 * 363 * \[ origin location, id \]364 **/365 InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;366 /**367 * Query response has been received and query is removed. The registered notification has368 * been dispatched and executed successfully.369 * 370 * \[ id, pallet index, call index \]371 **/372 Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;373 /**374 * Query response has been received and query is removed. The dispatch was unable to be375 * decoded into a `Call`; this might be due to dispatch function having a signature which376 * is not `(origin, QueryId, Response)`.377 * 378 * \[ id, pallet index, call index \]379 **/380 NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;381 /**382 * Query response has been received and query is removed. There was a general error with383 * dispatching the notification call.384 * 385 * \[ id, pallet index, call index \]386 **/387 NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;388 /**389 * Query response has been received and query is removed. The registered notification could390 * not be dispatched because the dispatch weight is greater than the maximum weight391 * originally budgeted by this runtime for the query result.392 * 393 * \[ id, pallet index, call index, actual weight, max budgeted weight \]394 **/395 NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;396 /**397 * A given location which had a version change subscription was dropped owing to an error398 * migrating the location to our new XCM format.399 * 400 * \[ location, query ID \]401 **/402 NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;403 /**404 * A given location which had a version change subscription was dropped owing to an error405 * sending the notification to it.406 * 407 * \[ location, query ID, error \]408 **/409 NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;410 /**411 * Query response has been received and is ready for taking with `take_response`. There is412 * no registered notification call.413 * 414 * \[ id, response \]415 **/416 ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;417 /**418 * Received query response has been read and removed.419 * 420 * \[ id \]421 **/422 ResponseTaken: AugmentedEvent<ApiType, [u64]>;423 /**424 * A XCM message was sent.425 * 426 * \[ origin, destination, message \]427 **/428 Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;429 /**430 * The supported version of a location has been changed. This might be through an431 * automatic notification or a manual intervention.432 * 433 * \[ location, XCM version \]434 **/435 SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;436 /**437 * Query response received which does not match a registered query. This may be because a438 * matching query was never registered, it may be because it is a duplicate response, or439 * because the query timed out.440 * 441 * \[ origin location, id \]442 **/443 UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;444 /**445 * An XCM version change notification message has been attempted to be sent.446 * 447 * \[ destination, result \]448 **/449 VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;450 /**451 * Generic event452 **/453 [key: string]: AugmentedEvent<ApiType>;454 };455 rmrkCore: {456 CollectionCreated: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;457 CollectionDestroyed: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;458 CollectionLocked: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;459 IssuerChanged: AugmentedEvent<ApiType, [oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32], { oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32 }>;460 NFTAccepted: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32 }>;461 NFTBurned: AugmentedEvent<ApiType, [owner: AccountId32, nftId: u32], { owner: AccountId32, nftId: u32 }>;462 NftMinted: AugmentedEvent<ApiType, [owner: AccountId32, collectionId: u32, nftId: u32], { owner: AccountId32, collectionId: u32, nftId: u32 }>;463 NFTRejected: AugmentedEvent<ApiType, [sender: AccountId32, collectionId: u32, nftId: u32], { sender: AccountId32, collectionId: u32, nftId: u32 }>;464 NFTSent: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool }>;465 PrioritySet: AugmentedEvent<ApiType, [collectionId: u32, nftId: u32], { collectionId: u32, nftId: u32 }>;466 PropertySet: AugmentedEvent<ApiType, [collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes], { collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes }>;467 ResourceAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;468 ResourceAdded: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;469 ResourceRemoval: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;470 ResourceRemovalAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;471 /**472 * Generic event473 **/474 [key: string]: AugmentedEvent<ApiType>;475 };476 rmrkEquip: {477 BaseCreated: AugmentedEvent<ApiType, [issuer: AccountId32, baseId: u32], { issuer: AccountId32, baseId: u32 }>;478 EquippablesUpdated: AugmentedEvent<ApiType, [baseId: u32, slotId: u32], { baseId: u32, slotId: u32 }>;479 /**480 * Generic event481 **/482 [key: string]: AugmentedEvent<ApiType>;483 };484 scheduler: {485 /**486 * The call for the provided hash was not found so the task has been aborted.487 **/488 CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;489 /**490 * Canceled some task.491 **/492 Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;493 /**494 * Dispatched some task.495 **/496 Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;497 /**498 * The given task can never be executed since it is overweight.499 **/500 PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;501 /**502 * Scheduled task's priority has changed503 **/504 PriorityChanged: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, priority: u8], { task: ITuple<[u32, u32]>, priority: u8 }>;505 /**506 * Scheduled some task.507 **/508 Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;509 /**510 * Generic event511 **/512 [key: string]: AugmentedEvent<ApiType>;513 };514 structure: {515 /**516 * Executed call on behalf of the token.517 **/518 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;519 /**520 * Generic event521 **/522 [key: string]: AugmentedEvent<ApiType>;523 };524 sudo: {525 /**526 * The \[sudoer\] just switched identity; the old key is supplied if one existed.527 **/528 KeyChanged: AugmentedEvent<ApiType, [oldSudoer: Option<AccountId32>], { oldSudoer: Option<AccountId32> }>;529 /**530 * A sudo just took place. \[result\]531 **/532 Sudid: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;533 /**534 * A sudo just took place. \[result\]535 **/536 SudoAsDone: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;537 /**538 * Generic event539 **/540 [key: string]: AugmentedEvent<ApiType>;541 };542 system: {543 /**544 * `:code` was updated.545 **/546 CodeUpdated: AugmentedEvent<ApiType, []>;547 /**548 * An extrinsic failed.549 **/550 ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;551 /**552 * An extrinsic completed successfully.553 **/554 ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;555 /**556 * An account was reaped.557 **/558 KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;559 /**560 * A new account was created.561 **/562 NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;563 /**564 * On on-chain remark happened.565 **/566 Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;567 /**568 * Generic event569 **/570 [key: string]: AugmentedEvent<ApiType>;571 };572 testUtils: {573 BatchCompleted: AugmentedEvent<ApiType, []>;574 ShouldRollback: AugmentedEvent<ApiType, []>;575 ValueIsSet: AugmentedEvent<ApiType, []>;576 /**577 * Generic event578 **/579 [key: string]: AugmentedEvent<ApiType>;580 };581 tokens: {582 /**583 * A balance was set by root.584 **/585 BalanceSet: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, free: u128, reserved: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, free: u128, reserved: u128 }>;586 /**587 * Deposited some balance into an account588 **/589 Deposited: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;590 /**591 * An account was removed whose balance was non-zero but below592 * ExistentialDeposit, resulting in an outright loss.593 **/594 DustLost: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;595 /**596 * An account was created with some free balance.597 **/598 Endowed: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;599 /**600 * Some locked funds were unlocked601 **/602 LockRemoved: AugmentedEvent<ApiType, [lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32], { lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32 }>;603 /**604 * Some funds are locked605 **/606 LockSet: AugmentedEvent<ApiType, [lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { lockId: U8aFixed, currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;607 /**608 * Some balance was reserved (moved from free to reserved).609 **/610 Reserved: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;611 /**612 * Some reserved balance was repatriated (moved from reserved to613 * another account).614 **/615 ReserveRepatriated: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128, status: FrameSupportTokensMiscBalanceStatus], { currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128, status: FrameSupportTokensMiscBalanceStatus }>;616 /**617 * Some balances were slashed (e.g. due to mis-behavior)618 **/619 Slashed: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, freeAmount: u128, reservedAmount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, freeAmount: u128, reservedAmount: u128 }>;620 /**621 * The total issuance of an currency has been set622 **/623 TotalIssuanceSet: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, amount: u128], { currencyId: PalletForeignAssetsAssetIds, amount: u128 }>;624 /**625 * Transfer succeeded.626 **/627 Transfer: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, from: AccountId32, to: AccountId32, amount: u128 }>;628 /**629 * Some balance was unreserved (moved from reserved to free).630 **/631 Unreserved: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;632 /**633 * Some balances were withdrawn (e.g. pay for transaction fee)634 **/635 Withdrawn: AugmentedEvent<ApiType, [currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128], { currencyId: PalletForeignAssetsAssetIds, who: AccountId32, amount: u128 }>;636 /**637 * Generic event638 **/639 [key: string]: AugmentedEvent<ApiType>;640 };641 transactionPayment: {642 /**643 * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,644 * has been paid by `who`.645 **/646 TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], { who: AccountId32, actualFee: u128, tip: u128 }>;647 /**648 * Generic event649 **/650 [key: string]: AugmentedEvent<ApiType>;651 };652 treasury: {653 /**654 * Some funds have been allocated.655 **/656 Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;657 /**658 * Some of our funds have been burnt.659 **/660 Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;661 /**662 * Some funds have been deposited.663 **/664 Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;665 /**666 * New proposal.667 **/668 Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;669 /**670 * A proposal was rejected; funds were slashed.671 **/672 Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;673 /**674 * Spending has finished; this is the amount that rolls over until next spend.675 **/676 Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;677 /**678 * A new spend proposal has been approved.679 **/680 SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], { proposalIndex: u32, amount: u128, beneficiary: AccountId32 }>;681 /**682 * We have ended a spend period and will now allocate funds.683 **/684 Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;685 /**686 * Generic event687 **/688 [key: string]: AugmentedEvent<ApiType>;689 };690 unique: {691 /**692 * Address was added to the allow list693 * 694 * # Arguments695 * * collection_id: ID of the affected collection.696 * * user: Address of the added account.697 **/698 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;699 /**700 * Address was removed from the allow list701 * 702 * # Arguments703 * * collection_id: ID of the affected collection.704 * * user: Address of the removed account.705 **/706 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;707 /**708 * Collection admin was added709 * 710 * # Arguments711 * * collection_id: ID of the affected collection.712 * * admin: Admin address.713 **/714 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;715 /**716 * Collection admin was removed717 * 718 * # Arguments719 * * collection_id: ID of the affected collection.720 * * admin: Removed admin address.721 **/722 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;723 /**724 * Collection limits were set725 * 726 * # Arguments727 * * collection_id: ID of the affected collection.728 **/729 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;730 /**731 * Collection owned was changed732 * 733 * # Arguments734 * * collection_id: ID of the affected collection.735 * * owner: New owner address.736 **/737 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;738 /**739 * Collection permissions were set740 * 741 * # Arguments742 * * collection_id: ID of the affected collection.743 **/744 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;745 /**746 * Collection sponsor was removed747 * 748 * # Arguments749 * * collection_id: ID of the affected collection.750 **/751 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;752 /**753 * Collection sponsor was set754 * 755 * # Arguments756 * * collection_id: ID of the affected collection.757 * * owner: New sponsor address.758 **/759 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;760 /**761 * New sponsor was confirm762 * 763 * # Arguments764 * * collection_id: ID of the affected collection.765 * * sponsor: New sponsor address.766 **/767 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;768 /**769 * Generic event770 **/771 [key: string]: AugmentedEvent<ApiType>;772 };773 vesting: {774 /**775 * Claimed vesting.776 **/777 Claimed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;778 /**779 * Added new vesting schedule.780 **/781 VestingScheduleAdded: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule], { from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule }>;782 /**783 * Updated vesting schedules.784 **/785 VestingSchedulesUpdated: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;786 /**787 * Generic event788 **/789 [key: string]: AugmentedEvent<ApiType>;790 };791 xcmpQueue: {792 /**793 * Bad XCM format used.794 **/795 BadFormat: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;796 /**797 * Bad XCM version used.798 **/799 BadVersion: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;800 /**801 * Some XCM failed.802 **/803 Fail: AugmentedEvent<ApiType, [messageHash: Option<H256>, error: XcmV2TraitsError, weight: Weight], { messageHash: Option<H256>, error: XcmV2TraitsError, weight: Weight }>;804 /**805 * An XCM exceeded the individual message weight budget.806 **/807 OverweightEnqueued: AugmentedEvent<ApiType, [sender: u32, sentAt: u32, index: u64, required: Weight], { sender: u32, sentAt: u32, index: u64, required: Weight }>;808 /**809 * An XCM from the overweight queue was executed with the given actual weight used.810 **/811 OverweightServiced: AugmentedEvent<ApiType, [index: u64, used: Weight], { index: u64, used: Weight }>;812 /**813 * Some XCM was executed ok.814 **/815 Success: AugmentedEvent<ApiType, [messageHash: Option<H256>, weight: Weight], { messageHash: Option<H256>, weight: Weight }>;816 /**817 * An upward message was sent to the relay chain.818 **/819 UpwardMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;820 /**821 * An HRMP message was sent to a sibling parachain.822 **/823 XcmpMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;824 /**825 * Generic event826 **/827 [key: string]: AugmentedEvent<ApiType>;828 };829 xTokens: {830 /**831 * Transferred `MultiAsset` with fee.832 **/833 TransferredMultiAssets: AugmentedEvent<ApiType, [sender: AccountId32, assets: XcmV1MultiassetMultiAssets, fee: XcmV1MultiAsset, dest: XcmV1MultiLocation], { sender: AccountId32, assets: XcmV1MultiassetMultiAssets, fee: XcmV1MultiAsset, dest: XcmV1MultiLocation }>;834 /**835 * Generic event836 **/837 [key: string]: AugmentedEvent<ApiType>;838 };839 } // AugmentedEvents840} // declare moduletests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -406,6 +406,10 @@
**/
allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
+ * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
+ **/
+ collectionAllowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
* Used to enumerate tokens owned by account.
**/
owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;
@@ -441,10 +445,6 @@
* Total amount of minted tokens in a collection.
**/
tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
- /**
- * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
- **/
- walletOperator: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<Option<bool>>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Generic query
**/
@@ -625,6 +625,10 @@
**/
balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
+ * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
+ **/
+ collectionAllowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
* Used to enumerate tokens owned by account.
**/
owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;
@@ -648,10 +652,6 @@
* Total amount of pieces for token
**/
totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
- /**
- * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.
- **/
- walletOperator: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<Option<bool>>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Generic query
**/
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -684,6 +684,10 @@
**/
allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
/**
+ * Tells whether the given `owner` approves the `operator`.
+ **/
+ allowanceForAll: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, operator: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<bool>>>;
+ /**
* Check if a user is allowed to operate within a collection
**/
allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
@@ -719,10 +723,6 @@
* Get effective collection limits
**/
effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;
- /**
- * Tells whether an operator is approved by a given owner.
- **/
- isApprovedForAll: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, operator: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<bool>>>;
/**
* Get the last token ID created in a collection
**/
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -1547,15 +1547,15 @@
/**
* Sets or unsets the approval of a given operator.
*
- * An operator is allowed to transfer all tokens of the sender on their behalf.
+ * The `operator` is allowed to transfer all tokens of the `owner` on their behalf.
*
* # Arguments
*
* * `owner`: Token owner
* * `operator`: Operator
- * * `approve`: Is operator enabled or disabled
+ * * `approve`: Should operator status be granted or revoked?
**/
- setApprovalForAll: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, operator: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, bool]>;
+ setAllowanceForAll: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, operator: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, bool]>;
/**
* Set specific limits of a collection. Empty, or None fields mean chain default.
*
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -2312,13 +2312,13 @@
readonly tokenId: u32;
readonly amount: u128;
} & Struct;
- readonly isSetApprovalForAll: boolean;
- readonly asSetApprovalForAll: {
+ readonly isSetAllowanceForAll: boolean;
+ readonly asSetAllowanceForAll: {
readonly collectionId: u32;
readonly operator: PalletEvmAccountBasicCrossAccountIdRepr;
readonly approve: bool;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetApprovalForAll';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll';
}
/** @name PalletUniqueError */
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -2305,7 +2305,7 @@
tokenId: 'u32',
amount: 'u128',
},
- set_approval_for_all: {
+ set_allowance_for_all: {
collectionId: 'u32',
operator: 'PalletEvmAccountBasicCrossAccountIdRepr',
approve: 'bool'
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -2541,13 +2541,13 @@
readonly tokenId: u32;
readonly amount: u128;
} & Struct;
- readonly isSetApprovalForAll: boolean;
- readonly asSetApprovalForAll: {
+ readonly isSetAllowanceForAll: boolean;
+ readonly asSetAllowanceForAll: {
readonly collectionId: u32;
readonly operator: PalletEvmAccountBasicCrossAccountIdRepr;
readonly approve: bool;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetApprovalForAll';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll';
}
/** @name UpDataStructsCollectionMode (240) */
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -175,8 +175,8 @@
[collectionParam, tokenParam],
'Option<u128>',
),
- isApprovedForAll: fun(
- 'Tells whether an operator is approved by a given owner.',
+ allowanceForAll: fun(
+ 'Tells whether the given `owner` approves the `operator`.',
[collectionParam, crossAccountParam('owner'), crossAccountParam('operator')],
'Option<bool>',
),
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -1415,26 +1415,26 @@
}
/**
- * Tells whether an operator is approved by a given owner.
+ * Tells whether the given `owner` approves the `operator`.
* @param collectionId ID of collection
* @param owner owner address
- * @param operator operator addrees
+ * @param operator operator addrees
* @returns true if operator is enabled
*/
- async isApprovedForAll(collectionId: number, owner: ICrossAccountId, operator: ICrossAccountId): Promise<boolean> {
- return (await this.helper.callRpc('api.rpc.unique.isApprovedForAll', [collectionId, owner, operator])).toJSON();
+ async allowanceForAll(collectionId: number, owner: ICrossAccountId, operator: ICrossAccountId): Promise<boolean> {
+ return (await this.helper.callRpc('api.rpc.unique.allowanceForAll', [collectionId, owner, operator])).toJSON();
}
/** Sets or unsets the approval of a given operator.
- * An operator is allowed to transfer all tokens of the sender on their behalf.
- * @param operator Operator
- * @param approved Is operator enabled or disabled
+ * The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
+ * @param operator Operator
+ * @param approved Should operator status be granted or revoked?
* @returns ```true``` if extrinsic success, otherwise ```false```
*/
- async setApprovalForAll(signer: TSigner, collectionId: number, operator: ICrossAccountId, approved: boolean): Promise<boolean> {
+ async setAllowanceForAll(signer: TSigner, collectionId: number, operator: ICrossAccountId, approved: boolean): Promise<boolean> {
const result = await this.helper.executeExtrinsic(
signer,
- 'api.tx.unique.setApprovalForAll', [collectionId, operator, approved],
+ 'api.tx.unique.setAllowanceForAll', [collectionId, operator, approved],
true,
);
return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'ApprovedForAll');