difftreelog
Merge pull request #447 from UniqueNetwork/fix/CORE-426
in: master
fix(stubs): fixed code of erc module of pallet-common
16 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5731,7 +5731,7 @@
[[package]]
name = "pallet-common"
-version = "0.1.0"
+version = "0.1.2"
dependencies = [
"ethereum",
"evm-coder",
pallets/common/CHANGELOG.MDdiffbeforeafterboth--- /dev/null
+++ b/pallets/common/CHANGELOG.MD
@@ -0,0 +1,10 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+
+## [0.1.2] - 2022-07-20
+
+### Fixed
+
+- Some methods in `#[solidity_interface]` for `CollectionHandle` had invalid
+ mutability modifiers, causing invalid stub/abi generation.
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "pallet-common"
-version = "0.1.0"
+version = "0.1.2"
license = "GPLv3"
edition = "2021"
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -225,7 +225,11 @@
/// Add collection admin by substrate address.
/// @param new_admin Substrate administrator address.
- fn add_collection_admin_substrate(&self, caller: caller, new_admin: uint256) -> Result<void> {
+ fn add_collection_admin_substrate(
+ &mut self,
+ caller: caller,
+ new_admin: uint256,
+ ) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let mut new_admin_arr: [u8; 32] = Default::default();
new_admin.to_big_endian(&mut new_admin_arr);
@@ -237,7 +241,11 @@
/// Remove collection admin by substrate address.
/// @param admin Substrate administrator address.
- fn remove_collection_admin_substrate(&self, caller: caller, admin: uint256) -> Result<void> {
+ fn remove_collection_admin_substrate(
+ &mut self,
+ caller: caller,
+ admin: uint256,
+ ) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let mut admin_arr: [u8; 32] = Default::default();
admin.to_big_endian(&mut admin_arr);
@@ -249,7 +257,7 @@
/// Add collection admin.
/// @param new_admin Address of the added administrator.
- fn add_collection_admin(&self, caller: caller, new_admin: address) -> Result<void> {
+ fn add_collection_admin(&mut self, caller: caller, new_admin: address) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let new_admin = T::CrossAccountId::from_eth(new_admin);
<Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;
@@ -259,7 +267,7 @@
/// Remove collection admin.
///
/// @param new_admin Address of the removed administrator.
- fn remove_collection_admin(&self, caller: caller, admin: address) -> Result<void> {
+ fn remove_collection_admin(&mut self, caller: caller, admin: address) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let admin = T::CrossAccountId::from_eth(admin);
<Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
@@ -365,7 +373,7 @@
/// Add the user to the allowed list.
///
/// @param user Address of a trusted user.
- fn add_to_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {
+ fn add_to_collection_allow_list(&mut self, caller: caller, user: address) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let user = T::CrossAccountId::from_eth(user);
<Pallet<T>>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;
@@ -375,7 +383,7 @@
/// Remove the user from the allowed list.
///
/// @param user Address of a removed user.
- fn remove_from_collection_allow_list(&self, caller: caller, user: address) -> Result<void> {
+ fn remove_from_collection_allow_list(&mut self, caller: caller, user: address) -> Result<void> {
let caller = T::CrossAccountId::from_eth(caller);
let user = T::CrossAccountId::from_eth(user);
<Pallet<T>>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -43,6 +43,233 @@
}
}
+// Selector: 7d9262e6
+contract Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ public
+ {
+ require(false, stub_error);
+ key;
+ value;
+ dummy = 0;
+ }
+
+ // Delete collection property.
+ //
+ // @param key Property key.
+ //
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) public {
+ require(false, stub_error);
+ key;
+ dummy = 0;
+ }
+
+ // Get collection property.
+ //
+ // @dev Throws error if key not found.
+ //
+ // @param key Property key.
+ // @return bytes The property corresponding to the key.
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ public
+ view
+ returns (bytes memory)
+ {
+ require(false, stub_error);
+ key;
+ dummy;
+ return hex"";
+ }
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) public {
+ require(false, stub_error);
+ sponsor;
+ dummy = 0;
+ }
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() public {
+ require(false, stub_error);
+ dummy = 0;
+ }
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) public {
+ require(false, stub_error);
+ limit;
+ value;
+ dummy = 0;
+ }
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,bool) 993b7fba
+ function setCollectionLimit(string memory limit, bool value) public {
+ require(false, stub_error);
+ limit;
+ value;
+ dummy = 0;
+ }
+
+ // Get contract address.
+ //
+ // Selector: contractAddress() f6b4dfb4
+ function contractAddress() public view returns (address) {
+ require(false, stub_error);
+ dummy;
+ return 0x0000000000000000000000000000000000000000;
+ }
+
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
+ // Selector: addCollectionAdminSubstrate(uint256) 5730062b
+ function addCollectionAdminSubstrate(uint256 newAdmin) public {
+ require(false, stub_error);
+ newAdmin;
+ dummy = 0;
+ }
+
+ // Remove collection admin by substrate address.
+ // @param admin Substrate administrator address.
+ //
+ // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+ function removeCollectionAdminSubstrate(uint256 admin) public {
+ require(false, stub_error);
+ admin;
+ dummy = 0;
+ }
+
+ // Add collection admin.
+ // @param new_admin Address of the added administrator.
+ //
+ // Selector: addCollectionAdmin(address) 92e462c7
+ function addCollectionAdmin(address newAdmin) public {
+ require(false, stub_error);
+ newAdmin;
+ dummy = 0;
+ }
+
+ // Remove collection admin.
+ //
+ // @param new_admin Address of the removed administrator.
+ //
+ // Selector: removeCollectionAdmin(address) fafd7b42
+ function removeCollectionAdmin(address admin) public {
+ require(false, stub_error);
+ admin;
+ dummy = 0;
+ }
+
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ //
+ // Selector: setCollectionNesting(bool) 112d4586
+ function setCollectionNesting(bool enable) public {
+ require(false, stub_error);
+ enable;
+ dummy = 0;
+ }
+
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // @param collections Addresses of collections that will be available for nesting.
+ //
+ // Selector: setCollectionNesting(bool,address[]) 64872396
+ function setCollectionNesting(bool enable, address[] memory collections)
+ public
+ {
+ require(false, stub_error);
+ enable;
+ collections;
+ dummy = 0;
+ }
+
+ // Set the collection access method.
+ // @param mode Access mode
+ // 0 for Normal
+ // 1 for AllowList
+ //
+ // Selector: setCollectionAccess(uint8) 41835d4c
+ function setCollectionAccess(uint8 mode) public {
+ require(false, stub_error);
+ mode;
+ dummy = 0;
+ }
+
+ // Add the user to the allowed list.
+ //
+ // @param user Address of a trusted user.
+ //
+ // Selector: addToCollectionAllowList(address) 67844fe6
+ function addToCollectionAllowList(address user) public {
+ require(false, stub_error);
+ user;
+ dummy = 0;
+ }
+
+ // Remove the user from the allowed list.
+ //
+ // @param user Address of a removed user.
+ //
+ // Selector: removeFromCollectionAllowList(address) 85c51acb
+ function removeFromCollectionAllowList(address user) public {
+ require(false, stub_error);
+ user;
+ dummy = 0;
+ }
+
+ // Switch permission for minting.
+ //
+ // @param mode Enable if "true".
+ //
+ // Selector: setCollectionMintMode(bool) 00018e84
+ function setCollectionMintMode(bool mode) public {
+ require(false, stub_error);
+ mode;
+ dummy = 0;
+ }
+}
+
// Selector: 942e8b22
contract ERC20 is Dummy, ERC165, ERC20Events {
// Selector: name() 06fdde03
@@ -124,76 +351,6 @@
spender;
dummy;
return 0;
- }
-}
-
-// Selector: c894dc35
-contract Collection is Dummy, ERC165 {
- // Selector: setCollectionProperty(string,bytes) 2f073f66
- function setCollectionProperty(string memory key, bytes memory value)
- public
- {
- require(false, stub_error);
- key;
- value;
- dummy = 0;
- }
-
- // Selector: deleteCollectionProperty(string) 7b7debce
- function deleteCollectionProperty(string memory key) public {
- require(false, stub_error);
- key;
- dummy = 0;
- }
-
- // Throws error if key not found
- //
- // Selector: collectionProperty(string) cf24fd6d
- function collectionProperty(string memory key)
- public
- view
- returns (bytes memory)
- {
- require(false, stub_error);
- key;
- dummy;
- return hex"";
- }
-
- // Selector: ethSetSponsor(address) 8f9af356
- function ethSetSponsor(address sponsor) public {
- require(false, stub_error);
- sponsor;
- dummy = 0;
- }
-
- // Selector: ethConfirmSponsorship() a8580d1a
- function ethConfirmSponsorship() public {
- require(false, stub_error);
- dummy = 0;
- }
-
- // Selector: setLimit(string,uint32) 68db30ca
- function setLimit(string memory limit, uint32 value) public {
- require(false, stub_error);
- limit;
- value;
- dummy = 0;
- }
-
- // Selector: setLimit(string,bool) ea67e4c2
- function setLimit(string memory limit, bool value) public {
- require(false, stub_error);
- limit;
- value;
- dummy = 0;
- }
-
- // Selector: contractAddress() f6b4dfb4
- function contractAddress() public view returns (address) {
- require(false, stub_error);
- dummy;
- return 0x0000000000000000000000000000000000000000;
}
}
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
@@ -77,7 +77,7 @@
// @notice Set token property value.
// @dev Throws error if `msg.sender` has no permission to edit the property.
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
// @param value Property value.
//
@@ -96,7 +96,7 @@
// @notice Delete token property value.
// @dev Throws error if `msg.sender` has no permission to edit the property.
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
//
// Selector: deleteProperty(uint256,string) 066111d1
@@ -109,8 +109,9 @@
// @notice Get token property value.
// @dev Throws error if key not found
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
+ // @return Property value bytes
//
// Selector: property(uint256,string) 7228c327
function property(uint256 tokenId, string memory key)
@@ -146,8 +147,8 @@
// @notice Count all NFTs assigned to an owner
// @dev NFTs assigned to the zero address are considered invalid, and this
// function throws for queries about the zero address.
- // @param _owner An address for whom to query the balance
- // @return The number of NFTs owned by `_owner`, possibly zero
+ // @param owner An address for whom to query the balance
+ // @return The number of NFTs owned by `owner`, possibly zero
//
// Selector: balanceOf(address) 70a08231
function balanceOf(address owner) public view returns (uint256) {
@@ -160,7 +161,7 @@
// @notice Find the owner of an NFT
// @dev NFTs assigned to zero address are considered invalid, and queries
// about them do throw.
- // @param _tokenId The identifier for an NFT
+ // @param tokenId The identifier for an NFT
// @return The address of the owner of the NFT
//
// Selector: ownerOf(uint256) 6352211e
@@ -371,7 +372,6 @@
// Selector: 780e9d63
contract ERC721Enumerable is Dummy, ERC165 {
// @notice Enumerate valid NFTs
- // @dev Throws if `index` >= `totalSupply()`.
// @param index A counter less than `totalSupply()`
// @return The token identifier for the `index`th NFT,
// (sort order not specified)
@@ -413,6 +413,11 @@
// Selector: 7d9262e6
contract Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
// Selector: setCollectionProperty(string,bytes) 2f073f66
function setCollectionProperty(string memory key, bytes memory value)
public
@@ -423,6 +428,10 @@
dummy = 0;
}
+ // Delete collection property.
+ //
+ // @param key Property key.
+ //
// Selector: deleteCollectionProperty(string) 7b7debce
function deleteCollectionProperty(string memory key) public {
require(false, stub_error);
@@ -430,7 +439,12 @@
dummy = 0;
}
- // Throws error if key not found
+ // Get collection property.
+ //
+ // @dev Throws error if key not found.
+ //
+ // @param key Property key.
+ // @return bytes The property corresponding to the key.
//
// Selector: collectionProperty(string) cf24fd6d
function collectionProperty(string memory key)
@@ -444,6 +458,12 @@
return hex"";
}
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
// Selector: setCollectionSponsor(address) 7623402e
function setCollectionSponsor(address sponsor) public {
require(false, stub_error);
@@ -451,12 +471,27 @@
dummy = 0;
}
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
// Selector: confirmCollectionSponsorship() 3c50e97a
function confirmCollectionSponsorship() public {
require(false, stub_error);
dummy = 0;
}
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
// Selector: setCollectionLimit(string,uint32) 6a3841db
function setCollectionLimit(string memory limit, uint32 value) public {
require(false, stub_error);
@@ -465,6 +500,14 @@
dummy = 0;
}
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
// Selector: setCollectionLimit(string,bool) 993b7fba
function setCollectionLimit(string memory limit, bool value) public {
require(false, stub_error);
@@ -473,6 +516,8 @@
dummy = 0;
}
+ // Get contract address.
+ //
// Selector: contractAddress() f6b4dfb4
function contractAddress() public view returns (address) {
require(false, stub_error);
@@ -480,34 +525,51 @@
return 0x0000000000000000000000000000000000000000;
}
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
// Selector: addCollectionAdminSubstrate(uint256) 5730062b
- function addCollectionAdminSubstrate(uint256 newAdmin) public view {
+ function addCollectionAdminSubstrate(uint256 newAdmin) public {
require(false, stub_error);
newAdmin;
- dummy;
+ dummy = 0;
}
+ // Remove collection admin by substrate address.
+ // @param admin Substrate administrator address.
+ //
// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
- function removeCollectionAdminSubstrate(uint256 newAdmin) public view {
+ function removeCollectionAdminSubstrate(uint256 admin) public {
require(false, stub_error);
- newAdmin;
- dummy;
+ admin;
+ dummy = 0;
}
+ // Add collection admin.
+ // @param new_admin Address of the added administrator.
+ //
// Selector: addCollectionAdmin(address) 92e462c7
- function addCollectionAdmin(address newAdmin) public view {
+ function addCollectionAdmin(address newAdmin) public {
require(false, stub_error);
newAdmin;
- dummy;
+ dummy = 0;
}
+ // Remove collection admin.
+ //
+ // @param new_admin Address of the removed administrator.
+ //
// Selector: removeCollectionAdmin(address) fafd7b42
- function removeCollectionAdmin(address admin) public view {
+ function removeCollectionAdmin(address admin) public {
require(false, stub_error);
admin;
- dummy;
+ dummy = 0;
}
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ //
// Selector: setCollectionNesting(bool) 112d4586
function setCollectionNesting(bool enable) public {
require(false, stub_error);
@@ -515,6 +577,11 @@
dummy = 0;
}
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // @param collections Addresses of collections that will be available for nesting.
+ //
// Selector: setCollectionNesting(bool,address[]) 64872396
function setCollectionNesting(bool enable, address[] memory collections)
public
@@ -525,6 +592,11 @@
dummy = 0;
}
+ // Set the collection access method.
+ // @param mode Access mode
+ // 0 for Normal
+ // 1 for AllowList
+ //
// Selector: setCollectionAccess(uint8) 41835d4c
function setCollectionAccess(uint8 mode) public {
require(false, stub_error);
@@ -532,20 +604,32 @@
dummy = 0;
}
+ // Add the user to the allowed list.
+ //
+ // @param user Address of a trusted user.
+ //
// Selector: addToCollectionAllowList(address) 67844fe6
- function addToCollectionAllowList(address user) public view {
+ function addToCollectionAllowList(address user) public {
require(false, stub_error);
user;
- dummy;
+ dummy = 0;
}
+ // Remove the user from the allowed list.
+ //
+ // @param user Address of a removed user.
+ //
// Selector: removeFromCollectionAllowList(address) 85c51acb
- function removeFromCollectionAllowList(address user) public view {
+ function removeFromCollectionAllowList(address user) public {
require(false, stub_error);
user;
- dummy;
+ dummy = 0;
}
+ // Switch permission for minting.
+ //
+ // @param mode Enable if "true".
+ //
// Selector: setCollectionMintMode(bool) 00018e84
function setCollectionMintMode(bool mode) public {
require(false, stub_error);
@@ -556,9 +640,7 @@
// Selector: d74d154f
contract ERC721UniqueExtensions is Dummy, ERC165 {
- // @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
- // TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
- // THEY MAY BE PERMANENTLY LOST
+ // @notice Transfer ownership of an NFT
// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
// is the zero address. Throws if `tokenId` is not a valid NFT.
// @param to The new owner
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -28,6 +28,154 @@
function burnFrom(address from, uint256 amount) external returns (bool);
}
+// Selector: 7d9262e6
+interface Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ external;
+
+ // Delete collection property.
+ //
+ // @param key Property key.
+ //
+ // Selector: deleteCollectionProperty(string) 7b7debce
+ function deleteCollectionProperty(string memory key) external;
+
+ // Get collection property.
+ //
+ // @dev Throws error if key not found.
+ //
+ // @param key Property key.
+ // @return bytes The property corresponding to the key.
+ //
+ // Selector: collectionProperty(string) cf24fd6d
+ function collectionProperty(string memory key)
+ external
+ view
+ returns (bytes memory);
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) external;
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() external;
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) external;
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,bool) 993b7fba
+ function setCollectionLimit(string memory limit, bool value) external;
+
+ // Get contract address.
+ //
+ // Selector: contractAddress() f6b4dfb4
+ function contractAddress() external view returns (address);
+
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
+ // Selector: addCollectionAdminSubstrate(uint256) 5730062b
+ function addCollectionAdminSubstrate(uint256 newAdmin) external;
+
+ // Remove collection admin by substrate address.
+ // @param admin Substrate administrator address.
+ //
+ // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+ function removeCollectionAdminSubstrate(uint256 admin) external;
+
+ // Add collection admin.
+ // @param new_admin Address of the added administrator.
+ //
+ // Selector: addCollectionAdmin(address) 92e462c7
+ function addCollectionAdmin(address newAdmin) external;
+
+ // Remove collection admin.
+ //
+ // @param new_admin Address of the removed administrator.
+ //
+ // Selector: removeCollectionAdmin(address) fafd7b42
+ function removeCollectionAdmin(address admin) external;
+
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ //
+ // Selector: setCollectionNesting(bool) 112d4586
+ function setCollectionNesting(bool enable) external;
+
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // @param collections Addresses of collections that will be available for nesting.
+ //
+ // Selector: setCollectionNesting(bool,address[]) 64872396
+ function setCollectionNesting(bool enable, address[] memory collections)
+ external;
+
+ // Set the collection access method.
+ // @param mode Access mode
+ // 0 for Normal
+ // 1 for AllowList
+ //
+ // Selector: setCollectionAccess(uint8) 41835d4c
+ function setCollectionAccess(uint8 mode) external;
+
+ // Add the user to the allowed list.
+ //
+ // @param user Address of a trusted user.
+ //
+ // Selector: addToCollectionAllowList(address) 67844fe6
+ function addToCollectionAllowList(address user) external;
+
+ // Remove the user from the allowed list.
+ //
+ // @param user Address of a removed user.
+ //
+ // Selector: removeFromCollectionAllowList(address) 85c51acb
+ function removeFromCollectionAllowList(address user) external;
+
+ // Switch permission for minting.
+ //
+ // @param mode Enable if "true".
+ //
+ // Selector: setCollectionMintMode(bool) 00018e84
+ function setCollectionMintMode(bool mode) external;
+}
+
// Selector: 942e8b22
interface ERC20 is Dummy, ERC165, ERC20Events {
// Selector: name() 06fdde03
@@ -63,39 +211,6 @@
external
view
returns (uint256);
-}
-
-// Selector: c894dc35
-interface Collection is Dummy, ERC165 {
- // Selector: setCollectionProperty(string,bytes) 2f073f66
- function setCollectionProperty(string memory key, bytes memory value)
- external;
-
- // Selector: deleteCollectionProperty(string) 7b7debce
- function deleteCollectionProperty(string memory key) external;
-
- // Throws error if key not found
- //
- // Selector: collectionProperty(string) cf24fd6d
- function collectionProperty(string memory key)
- external
- view
- returns (bytes memory);
-
- // Selector: ethSetSponsor(address) 8f9af356
- function ethSetSponsor(address sponsor) external;
-
- // Selector: ethConfirmSponsorship() a8580d1a
- function ethConfirmSponsorship() external;
-
- // Selector: setLimit(string,uint32) 68db30ca
- function setLimit(string memory limit, uint32 value) external;
-
- // Selector: setLimit(string,bool) ea67e4c2
- function setLimit(string memory limit, bool value) external;
-
- // Selector: contractAddress() f6b4dfb4
- function contractAddress() external view returns (address);
}
interface UniqueFungible is
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -61,7 +61,7 @@
// @notice Set token property value.
// @dev Throws error if `msg.sender` has no permission to edit the property.
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
// @param value Property value.
//
@@ -74,7 +74,7 @@
// @notice Delete token property value.
// @dev Throws error if `msg.sender` has no permission to edit the property.
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
//
// Selector: deleteProperty(uint256,string) 066111d1
@@ -82,8 +82,9 @@
// @notice Get token property value.
// @dev Throws error if key not found
- // @param token_id ID of the token.
+ // @param tokenId ID of the token.
// @param key Property key.
+ // @return Property value bytes
//
// Selector: property(uint256,string) 7228c327
function property(uint256 tokenId, string memory key)
@@ -108,8 +109,8 @@
// @notice Count all NFTs assigned to an owner
// @dev NFTs assigned to the zero address are considered invalid, and this
// function throws for queries about the zero address.
- // @param _owner An address for whom to query the balance
- // @return The number of NFTs owned by `_owner`, possibly zero
+ // @param owner An address for whom to query the balance
+ // @return The number of NFTs owned by `owner`, possibly zero
//
// Selector: balanceOf(address) 70a08231
function balanceOf(address owner) external view returns (uint256);
@@ -117,7 +118,7 @@
// @notice Find the owner of an NFT
// @dev NFTs assigned to zero address are considered invalid, and queries
// about them do throw.
- // @param _tokenId The identifier for an NFT
+ // @param tokenId The identifier for an NFT
// @return The address of the owner of the NFT
//
// Selector: ownerOf(uint256) 6352211e
@@ -248,7 +249,6 @@
// Selector: 780e9d63
interface ERC721Enumerable is Dummy, ERC165 {
// @notice Enumerate valid NFTs
- // @dev Throws if `index` >= `totalSupply()`.
// @param index A counter less than `totalSupply()`
// @return The token identifier for the `index`th NFT,
// (sort order not specified)
@@ -274,14 +274,28 @@
// Selector: 7d9262e6
interface Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
// Selector: setCollectionProperty(string,bytes) 2f073f66
function setCollectionProperty(string memory key, bytes memory value)
external;
+ // Delete collection property.
+ //
+ // @param key Property key.
+ //
// Selector: deleteCollectionProperty(string) 7b7debce
function deleteCollectionProperty(string memory key) external;
- // Throws error if key not found
+ // Get collection property.
+ //
+ // @dev Throws error if key not found.
+ //
+ // @param key Property key.
+ // @return bytes The property corresponding to the key.
//
// Selector: collectionProperty(string) cf24fd6d
function collectionProperty(string memory key)
@@ -289,58 +303,126 @@
view
returns (bytes memory);
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
// Selector: setCollectionSponsor(address) 7623402e
function setCollectionSponsor(address sponsor) external;
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
// Selector: confirmCollectionSponsorship() 3c50e97a
function confirmCollectionSponsorship() external;
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
// Selector: setCollectionLimit(string,uint32) 6a3841db
function setCollectionLimit(string memory limit, uint32 value) external;
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
// Selector: setCollectionLimit(string,bool) 993b7fba
function setCollectionLimit(string memory limit, bool value) external;
+ // Get contract address.
+ //
// Selector: contractAddress() f6b4dfb4
function contractAddress() external view returns (address);
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
// Selector: addCollectionAdminSubstrate(uint256) 5730062b
- function addCollectionAdminSubstrate(uint256 newAdmin) external view;
+ function addCollectionAdminSubstrate(uint256 newAdmin) external;
+ // Remove collection admin by substrate address.
+ // @param admin Substrate administrator address.
+ //
// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
- function removeCollectionAdminSubstrate(uint256 newAdmin) external view;
+ function removeCollectionAdminSubstrate(uint256 admin) external;
+ // Add collection admin.
+ // @param new_admin Address of the added administrator.
+ //
// Selector: addCollectionAdmin(address) 92e462c7
- function addCollectionAdmin(address newAdmin) external view;
+ function addCollectionAdmin(address newAdmin) external;
+ // Remove collection admin.
+ //
+ // @param new_admin Address of the removed administrator.
+ //
// Selector: removeCollectionAdmin(address) fafd7b42
- function removeCollectionAdmin(address admin) external view;
+ function removeCollectionAdmin(address admin) external;
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+ //
// Selector: setCollectionNesting(bool) 112d4586
function setCollectionNesting(bool enable) external;
+ // Toggle accessibility of collection nesting.
+ //
+ // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+ // @param collections Addresses of collections that will be available for nesting.
+ //
// Selector: setCollectionNesting(bool,address[]) 64872396
function setCollectionNesting(bool enable, address[] memory collections)
external;
+ // Set the collection access method.
+ // @param mode Access mode
+ // 0 for Normal
+ // 1 for AllowList
+ //
// Selector: setCollectionAccess(uint8) 41835d4c
function setCollectionAccess(uint8 mode) external;
+ // Add the user to the allowed list.
+ //
+ // @param user Address of a trusted user.
+ //
// Selector: addToCollectionAllowList(address) 67844fe6
- function addToCollectionAllowList(address user) external view;
+ function addToCollectionAllowList(address user) external;
+ // Remove the user from the allowed list.
+ //
+ // @param user Address of a removed user.
+ //
// Selector: removeFromCollectionAllowList(address) 85c51acb
- function removeFromCollectionAllowList(address user) external view;
+ function removeFromCollectionAllowList(address user) external;
+ // Switch permission for minting.
+ //
+ // @param mode Enable if "true".
+ //
// Selector: setCollectionMintMode(bool) 00018e84
function setCollectionMintMode(bool mode) external;
}
// Selector: d74d154f
interface ERC721UniqueExtensions is Dummy, ERC165 {
- // @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
- // TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
- // THEY MAY BE PERMANENTLY LOST
+ // @notice Transfer ownership of an NFT
// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
// is the zero address. Throws if `tokenId` is not a valid NFT.
// @param to The new owner
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -51,6 +51,33 @@
},
{
"inputs": [
+ { "internalType": "address", "name": "newAdmin", "type": "address" }
+ ],
+ "name": "addCollectionAdmin",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
+ ],
+ "name": "addCollectionAdminSubstrate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "address", "name": "user", "type": "address" }
+ ],
+ "name": "addToCollectionAllowList",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
{ "internalType": "address", "name": "owner", "type": "address" },
{ "internalType": "address", "name": "spender", "type": "address" }
],
@@ -97,6 +124,13 @@
},
{
"inputs": [],
+ "name": "confirmCollectionSponsorship",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "contractAddress",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
@@ -118,43 +152,51 @@
},
{
"inputs": [],
- "name": "ethConfirmSponsorship",
- "outputs": [],
- "stateMutability": "nonpayable",
+ "name": "name",
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
+ "stateMutability": "view",
"type": "function"
},
{
"inputs": [
- { "internalType": "address", "name": "sponsor", "type": "address" }
+ { "internalType": "address", "name": "admin", "type": "address" }
],
- "name": "ethSetSponsor",
+ "name": "removeCollectionAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
- "inputs": [],
- "name": "name",
- "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
- "stateMutability": "view",
+ "inputs": [
+ { "internalType": "uint256", "name": "admin", "type": "uint256" }
+ ],
+ "name": "removeCollectionAdminSubstrate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
- { "internalType": "string", "name": "key", "type": "string" },
- { "internalType": "bytes", "name": "value", "type": "bytes" }
+ { "internalType": "address", "name": "user", "type": "address" }
],
- "name": "setCollectionProperty",
+ "name": "removeFromCollectionAllowList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
+ "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],
+ "name": "setCollectionAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "string", "name": "limit", "type": "string" },
{ "internalType": "uint32", "name": "value", "type": "uint32" }
],
- "name": "setLimit",
+ "name": "setCollectionLimit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -164,7 +206,54 @@
{ "internalType": "string", "name": "limit", "type": "string" },
{ "internalType": "bool", "name": "value", "type": "bool" }
],
- "name": "setLimit",
+ "name": "setCollectionLimit",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],
+ "name": "setCollectionMintMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "bool", "name": "enable", "type": "bool" },
+ {
+ "internalType": "address[]",
+ "name": "collections",
+ "type": "address[]"
+ }
+ ],
+ "name": "setCollectionNesting",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "string", "name": "key", "type": "string" },
+ { "internalType": "bytes", "name": "value", "type": "bytes" }
+ ],
+ "name": "setCollectionProperty",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "address", "name": "sponsor", "type": "address" }
+ ],
+ "name": "setCollectionSponsor",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -86,7 +86,7 @@
],
"name": "addCollectionAdmin",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -95,7 +95,7 @@
],
"name": "addCollectionAdminSubstrate",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -104,7 +104,7 @@
],
"name": "addToCollectionAllowList",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -304,16 +304,16 @@
],
"name": "removeCollectionAdmin",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
- { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
+ { "internalType": "uint256", "name": "admin", "type": "uint256" }
],
"name": "removeCollectionAdminSubstrate",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
@@ -322,7 +322,7 @@
],
"name": "removeFromCollectionAllowList",
"outputs": [],
- "stateMutability": "view",
+ "stateMutability": "nonpayable",
"type": "function"
},
{
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { ApiTypes } from '@polkadot/api-base/types';56declare module '@polkadot/api-base/types/errors' {7 export interface AugmentedErrors<ApiType extends ApiTypes> {8 balances: {9 /**10 * Beneficiary account must pre-exist11 **/12 DeadAccount: AugmentedError<ApiType>;13 /**14 * Value too low to create account due to existential deposit15 **/16 ExistentialDeposit: AugmentedError<ApiType>;17 /**18 * A vesting schedule already exists for this account19 **/20 ExistingVestingSchedule: AugmentedError<ApiType>;21 /**22 * Balance too low to send value23 **/24 InsufficientBalance: AugmentedError<ApiType>;25 /**26 * Transfer/payment would kill account27 **/28 KeepAlive: AugmentedError<ApiType>;29 /**30 * Account liquidity restrictions prevent withdrawal31 **/32 LiquidityRestrictions: AugmentedError<ApiType>;33 /**34 * Number of named reserves exceed MaxReserves35 **/36 TooManyReserves: AugmentedError<ApiType>;37 /**38 * Vesting balance too high to send value39 **/40 VestingBalance: AugmentedError<ApiType>;41 /**42 * Generic error43 **/44 [key: string]: AugmentedError<ApiType>;45 };46 common: {47 /**48 * Account token limit exceeded per collection49 **/50 AccountTokenLimitExceeded: AugmentedError<ApiType>;51 /**52 * Can't transfer tokens to ethereum zero address53 **/54 AddressIsZero: AugmentedError<ApiType>;55 /**56 * Address is not in allow list.57 **/58 AddressNotInAllowlist: AugmentedError<ApiType>;59 /**60 * Requested value more than approved.61 **/62 ApprovedValueTooLow: AugmentedError<ApiType>;63 /**64 * Tried to approve more than owned65 **/66 CantApproveMoreThanOwned: AugmentedError<ApiType>;67 /**68 * Destroying only empty collections is allowed69 **/70 CantDestroyNotEmptyCollection: AugmentedError<ApiType>;71 /**72 * Exceeded max admin count73 **/74 CollectionAdminCountExceeded: AugmentedError<ApiType>;75 /**76 * Collection description can not be longer than 255 char.77 **/78 CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;79 /**80 * Tried to store more data than allowed in collection field81 **/82 CollectionFieldSizeExceeded: AugmentedError<ApiType>;83 /**84 * Tried to access an external collection with an internal API85 **/86 CollectionIsExternal: AugmentedError<ApiType>;87 /**88 * Tried to access an internal collection with an external API89 **/90 CollectionIsInternal: AugmentedError<ApiType>;91 /**92 * Collection limit bounds per collection exceeded93 **/94 CollectionLimitBoundsExceeded: AugmentedError<ApiType>;95 /**96 * Collection name can not be longer than 63 char.97 **/98 CollectionNameLimitExceeded: AugmentedError<ApiType>;99 /**100 * This collection does not exist.101 **/102 CollectionNotFound: AugmentedError<ApiType>;103 /**104 * Collection token limit exceeded105 **/106 CollectionTokenLimitExceeded: AugmentedError<ApiType>;107 /**108 * Token prefix can not be longer than 15 char.109 **/110 CollectionTokenPrefixLimitExceeded: AugmentedError<ApiType>;111 /**112 * Empty property keys are forbidden113 **/114 EmptyPropertyKey: AugmentedError<ApiType>;115 /**116 * Only ASCII letters, digits, and '_', '-' are allowed117 **/118 InvalidCharacterInPropertyKey: AugmentedError<ApiType>;119 /**120 * Metadata flag frozen121 **/122 MetadataFlagFrozen: AugmentedError<ApiType>;123 /**124 * Sender parameter and item owner must be equal.125 **/126 MustBeTokenOwner: AugmentedError<ApiType>;127 /**128 * No permission to perform action129 **/130 NoPermission: AugmentedError<ApiType>;131 /**132 * Tried to store more property data than allowed133 **/134 NoSpaceForProperty: AugmentedError<ApiType>;135 /**136 * Not sufficient funds to perform action137 **/138 NotSufficientFounds: AugmentedError<ApiType>;139 /**140 * Tried to enable permissions which are only permitted to be disabled141 **/142 OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;143 /**144 * Property key is too long145 **/146 PropertyKeyIsTooLong: AugmentedError<ApiType>;147 /**148 * Tried to store more property keys than allowed149 **/150 PropertyLimitReached: AugmentedError<ApiType>;151 /**152 * Collection is not in mint mode.153 **/154 PublicMintingNotAllowed: AugmentedError<ApiType>;155 /**156 * Only tokens from specific collections may nest tokens under this157 **/158 SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;159 /**160 * Item not exists.161 **/162 TokenNotFound: AugmentedError<ApiType>;163 /**164 * Item balance not enough.165 **/166 TokenValueTooLow: AugmentedError<ApiType>;167 /**168 * Total collections bound exceeded.169 **/170 TotalCollectionsLimitExceeded: AugmentedError<ApiType>;171 /**172 * Collection settings not allowing items transferring173 **/174 TransferNotAllowed: AugmentedError<ApiType>;175 /**176 * Target collection doesn't supports this operation177 **/178 UnsupportedOperation: AugmentedError<ApiType>;179 /**180 * User not passed nesting rule181 **/182 UserIsNotAllowedToNest: AugmentedError<ApiType>;183 /**184 * Generic error185 **/186 [key: string]: AugmentedError<ApiType>;187 };188 cumulusXcm: {189 /**190 * Generic error191 **/192 [key: string]: AugmentedError<ApiType>;193 };194 dmpQueue: {195 /**196 * The amount of weight given is possibly not enough for executing the message.197 **/198 OverLimit: AugmentedError<ApiType>;199 /**200 * The message index given is unknown.201 **/202 Unknown: AugmentedError<ApiType>;203 /**204 * Generic error205 **/206 [key: string]: AugmentedError<ApiType>;207 };208 ethereum: {209 /**210 * Signature is invalid.211 **/212 InvalidSignature: AugmentedError<ApiType>;213 /**214 * Pre-log is present, therefore transact is not allowed.215 **/216 PreLogExists: AugmentedError<ApiType>;217 /**218 * Generic error219 **/220 [key: string]: AugmentedError<ApiType>;221 };222 evm: {223 /**224 * Not enough balance to perform action225 **/226 BalanceLow: AugmentedError<ApiType>;227 /**228 * Calculating total fee overflowed229 **/230 FeeOverflow: AugmentedError<ApiType>;231 /**232 * Gas price is too low.233 **/234 GasPriceTooLow: AugmentedError<ApiType>;235 /**236 * Nonce is invalid237 **/238 InvalidNonce: AugmentedError<ApiType>;239 /**240 * Calculating total payment overflowed241 **/242 PaymentOverflow: AugmentedError<ApiType>;243 /**244 * Withdraw fee failed245 **/246 WithdrawFailed: AugmentedError<ApiType>;247 /**248 * Generic error249 **/250 [key: string]: AugmentedError<ApiType>;251 };252 evmCoderSubstrate: {253 OutOfFund: AugmentedError<ApiType>;254 OutOfGas: AugmentedError<ApiType>;255 /**256 * Generic error257 **/258 [key: string]: AugmentedError<ApiType>;259 };260 evmContractHelpers: {261 /**262 * This method is only executable by owner263 **/264 NoPermission: AugmentedError<ApiType>;265 /**266 * Generic error267 **/268 [key: string]: AugmentedError<ApiType>;269 };270 evmMigration: {271 AccountIsNotMigrating: AugmentedError<ApiType>;272 AccountNotEmpty: AugmentedError<ApiType>;273 /**274 * Generic error275 **/276 [key: string]: AugmentedError<ApiType>;277 };278 fungible: {279 /**280 * Fungible token does not support nested281 **/282 FungibleDisallowsNesting: AugmentedError<ApiType>;283 /**284 * Tried to set data for fungible item285 **/286 FungibleItemsDontHaveData: AugmentedError<ApiType>;287 /**288 * Not default id passed as TokenId argument289 **/290 FungibleItemsHaveNoId: AugmentedError<ApiType>;291 /**292 * Not Fungible item data used to mint in Fungible collection.293 **/294 NotFungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;295 /**296 * Setting item properties is not allowed297 **/298 SettingPropertiesNotAllowed: AugmentedError<ApiType>;299 /**300 * Generic error301 **/302 [key: string]: AugmentedError<ApiType>;303 };304 nonfungible: {305 /**306 * Unable to burn NFT with children307 **/308 CantBurnNftWithChildren: AugmentedError<ApiType>;309 /**310 * Used amount > 1 with NFT311 **/312 NonfungibleItemsHaveNoAmount: AugmentedError<ApiType>;313 /**314 * Not Nonfungible item data used to mint in Nonfungible collection.315 **/316 NotNonfungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;317 /**318 * Generic error319 **/320 [key: string]: AugmentedError<ApiType>;321 };322 parachainSystem: {323 /**324 * The inherent which supplies the host configuration did not run this block325 **/326 HostConfigurationNotAvailable: AugmentedError<ApiType>;327 /**328 * No code upgrade has been authorized.329 **/330 NothingAuthorized: AugmentedError<ApiType>;331 /**332 * No validation function upgrade is currently scheduled.333 **/334 NotScheduled: AugmentedError<ApiType>;335 /**336 * Attempt to upgrade validation function while existing upgrade pending337 **/338 OverlappingUpgrades: AugmentedError<ApiType>;339 /**340 * Polkadot currently prohibits this parachain from upgrading its validation function341 **/342 ProhibitedByPolkadot: AugmentedError<ApiType>;343 /**344 * The supplied validation function has compiled into a blob larger than Polkadot is345 * willing to run346 **/347 TooBig: AugmentedError<ApiType>;348 /**349 * The given code upgrade has not been authorized.350 **/351 Unauthorized: AugmentedError<ApiType>;352 /**353 * The inherent which supplies the validation data did not run this block354 **/355 ValidationDataNotAvailable: AugmentedError<ApiType>;356 /**357 * Generic error358 **/359 [key: string]: AugmentedError<ApiType>;360 };361 polkadotXcm: {362 /**363 * The location is invalid since it already has a subscription from us.364 **/365 AlreadySubscribed: AugmentedError<ApiType>;366 /**367 * The given location could not be used (e.g. because it cannot be expressed in the368 * desired version of XCM).369 **/370 BadLocation: AugmentedError<ApiType>;371 /**372 * The version of the `Versioned` value used is not able to be interpreted.373 **/374 BadVersion: AugmentedError<ApiType>;375 /**376 * Could not re-anchor the assets to declare the fees for the destination chain.377 **/378 CannotReanchor: AugmentedError<ApiType>;379 /**380 * The destination `MultiLocation` provided cannot be inverted.381 **/382 DestinationNotInvertible: AugmentedError<ApiType>;383 /**384 * The assets to be sent are empty.385 **/386 Empty: AugmentedError<ApiType>;387 /**388 * The message execution fails the filter.389 **/390 Filtered: AugmentedError<ApiType>;391 /**392 * Origin is invalid for sending.393 **/394 InvalidOrigin: AugmentedError<ApiType>;395 /**396 * The referenced subscription could not be found.397 **/398 NoSubscription: AugmentedError<ApiType>;399 /**400 * There was some other issue (i.e. not to do with routing) in sending the message. Perhaps401 * a lack of space for buffering the message.402 **/403 SendFailure: AugmentedError<ApiType>;404 /**405 * Too many assets have been attempted for transfer.406 **/407 TooManyAssets: AugmentedError<ApiType>;408 /**409 * The desired destination was unreachable, generally because there is a no way of routing410 * to it.411 **/412 Unreachable: AugmentedError<ApiType>;413 /**414 * The message's weight could not be determined.415 **/416 UnweighableMessage: AugmentedError<ApiType>;417 /**418 * Generic error419 **/420 [key: string]: AugmentedError<ApiType>;421 };422 refungible: {423 /**424 * Not Refungible item data used to mint in Refungible collection.425 **/426 NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;427 /**428 * Refungible token can't nest other tokens429 **/430 RefungibleDisallowsNesting: AugmentedError<ApiType>;431 /**432 * Refungible token can't be repartitioned by user who isn't owns all pieces433 **/434 RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;435 /**436 * Setting item properties is not allowed437 **/438 SettingPropertiesNotAllowed: AugmentedError<ApiType>;439 /**440 * Maximum refungibility exceeded441 **/442 WrongRefungiblePieces: AugmentedError<ApiType>;443 /**444 * Generic error445 **/446 [key: string]: AugmentedError<ApiType>;447 };448 rmrkCore: {449 CannotAcceptNonOwnedNft: AugmentedError<ApiType>;450 CannotRejectNonOwnedNft: AugmentedError<ApiType>;451 CannotRejectNonPendingNft: AugmentedError<ApiType>;452 CannotSendToDescendentOrSelf: AugmentedError<ApiType>;453 CollectionFullOrLocked: AugmentedError<ApiType>;454 CollectionNotEmpty: AugmentedError<ApiType>;455 CollectionUnknown: AugmentedError<ApiType>;456 CorruptedCollectionType: AugmentedError<ApiType>;457 NftTypeEncodeError: AugmentedError<ApiType>;458 NoAvailableCollectionId: AugmentedError<ApiType>;459 NoAvailableNftId: AugmentedError<ApiType>;460 NoAvailableResourceId: AugmentedError<ApiType>;461 NonTransferable: AugmentedError<ApiType>;462 NoPermission: AugmentedError<ApiType>;463 ResourceDoesntExist: AugmentedError<ApiType>;464 ResourceNotPending: AugmentedError<ApiType>;465 RmrkPropertyIsNotFound: AugmentedError<ApiType>;466 RmrkPropertyKeyIsTooLong: AugmentedError<ApiType>;467 RmrkPropertyValueIsTooLong: AugmentedError<ApiType>;468 UnableToDecodeRmrkData: AugmentedError<ApiType>;469 /**470 * Generic error471 **/472 [key: string]: AugmentedError<ApiType>;473 };474 rmrkEquip: {475 BaseDoesntExist: AugmentedError<ApiType>;476 NeedsDefaultThemeFirst: AugmentedError<ApiType>;477 NoAvailableBaseId: AugmentedError<ApiType>;478 NoAvailablePartId: AugmentedError<ApiType>;479 NoEquippableOnFixedPart: AugmentedError<ApiType>;480 PartDoesntExist: AugmentedError<ApiType>;481 PermissionError: AugmentedError<ApiType>;482 /**483 * Generic error484 **/485 [key: string]: AugmentedError<ApiType>;486 };487 scheduler: {488 /**489 * Failed to schedule a call490 **/491 FailedToSchedule: AugmentedError<ApiType>;492 /**493 * Cannot find the scheduled call.494 **/495 NotFound: AugmentedError<ApiType>;496 /**497 * Reschedule failed because it does not change scheduled time.498 **/499 RescheduleNoChange: AugmentedError<ApiType>;500 /**501 * Given target block number is in the past.502 **/503 TargetBlockNumberInPast: AugmentedError<ApiType>;504 /**505 * Generic error506 **/507 [key: string]: AugmentedError<ApiType>;508 };509 structure: {510 /**511 * While iterating over children, encountered breadth limit512 **/513 BreadthLimit: AugmentedError<ApiType>;514 /**515 * While searched for owner, encountered depth limit516 **/517 DepthLimit: AugmentedError<ApiType>;518 /**519 * While searched for owner, got already checked account520 **/521 OuroborosDetected: AugmentedError<ApiType>;522 /**523 * While searched for owner, found token owner by not-yet-existing token524 **/525 TokenNotFound: AugmentedError<ApiType>;526 /**527 * Generic error528 **/529 [key: string]: AugmentedError<ApiType>;530 };531 sudo: {532 /**533 * Sender must be the Sudo account534 **/535 RequireSudo: AugmentedError<ApiType>;536 /**537 * Generic error538 **/539 [key: string]: AugmentedError<ApiType>;540 };541 system: {542 /**543 * The origin filter prevent the call to be dispatched.544 **/545 CallFiltered: AugmentedError<ApiType>;546 /**547 * Failed to extract the runtime version from the new runtime.548 * 549 * Either calling `Core_version` or decoding `RuntimeVersion` failed.550 **/551 FailedToExtractRuntimeVersion: AugmentedError<ApiType>;552 /**553 * The name of specification does not match between the current runtime554 * and the new runtime.555 **/556 InvalidSpecName: AugmentedError<ApiType>;557 /**558 * Suicide called when the account has non-default composite data.559 **/560 NonDefaultComposite: AugmentedError<ApiType>;561 /**562 * There is a non-zero reference count preventing the account from being purged.563 **/564 NonZeroRefCount: AugmentedError<ApiType>;565 /**566 * The specification version is not allowed to decrease between the current runtime567 * and the new runtime.568 **/569 SpecVersionNeedsToIncrease: AugmentedError<ApiType>;570 /**571 * Generic error572 **/573 [key: string]: AugmentedError<ApiType>;574 };575 treasury: {576 /**577 * Proposer's balance is too low.578 **/579 InsufficientProposersBalance: AugmentedError<ApiType>;580 /**581 * No proposal or bounty at that index.582 **/583 InvalidIndex: AugmentedError<ApiType>;584 /**585 * Proposal has not been approved.586 **/587 ProposalNotApproved: AugmentedError<ApiType>;588 /**589 * Too many approvals in the queue.590 **/591 TooManyApprovals: AugmentedError<ApiType>;592 /**593 * Generic error594 **/595 [key: string]: AugmentedError<ApiType>;596 };597 unique: {598 /**599 * Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.600 **/601 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;602 /**603 * This address is not set as sponsor, use setCollectionSponsor first.604 **/605 ConfirmUnsetSponsorFail: AugmentedError<ApiType>;606 /**607 * Length of items properties must be greater than 0.608 **/609 EmptyArgument: AugmentedError<ApiType>;610 /**611 * Repertition is only supported by refungible collection612 **/613 RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;614 /**615 * Generic error616 **/617 [key: string]: AugmentedError<ApiType>;618 };619 vesting: {620 /**621 * The vested transfer amount is too low622 **/623 AmountLow: AugmentedError<ApiType>;624 /**625 * Insufficient amount of balance to lock626 **/627 InsufficientBalanceToLock: AugmentedError<ApiType>;628 /**629 * Failed because the maximum vesting schedules was exceeded630 **/631 MaxVestingSchedulesExceeded: AugmentedError<ApiType>;632 /**633 * This account have too many vesting schedules634 **/635 TooManyVestingSchedules: AugmentedError<ApiType>;636 /**637 * Vesting period is zero638 **/639 ZeroVestingPeriod: AugmentedError<ApiType>;640 /**641 * Number of vests is zero642 **/643 ZeroVestingPeriodCount: AugmentedError<ApiType>;644 /**645 * Generic error646 **/647 [key: string]: AugmentedError<ApiType>;648 };649 xcmpQueue: {650 /**651 * Bad overweight index.652 **/653 BadOverweightIndex: AugmentedError<ApiType>;654 /**655 * Bad XCM data.656 **/657 BadXcm: AugmentedError<ApiType>;658 /**659 * Bad XCM origin.660 **/661 BadXcmOrigin: AugmentedError<ApiType>;662 /**663 * Failed to send XCM message.664 **/665 FailedToSend: AugmentedError<ApiType>;666 /**667 * Provided weight is possibly not enough to execute the message.668 **/669 WeightOverLimit: AugmentedError<ApiType>;670 /**671 * Generic error672 **/673 [key: string]: AugmentedError<ApiType>;674 };675 } // AugmentedErrors676} // declare module1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { ApiTypes } from '@polkadot/api-base/types';56declare module '@polkadot/api-base/types/errors' {7 export interface AugmentedErrors<ApiType extends ApiTypes> {8 balances: {9 /**10 * Beneficiary account must pre-exist11 **/12 DeadAccount: AugmentedError<ApiType>;13 /**14 * Value too low to create account due to existential deposit15 **/16 ExistentialDeposit: AugmentedError<ApiType>;17 /**18 * A vesting schedule already exists for this account19 **/20 ExistingVestingSchedule: AugmentedError<ApiType>;21 /**22 * Balance too low to send value23 **/24 InsufficientBalance: AugmentedError<ApiType>;25 /**26 * Transfer/payment would kill account27 **/28 KeepAlive: AugmentedError<ApiType>;29 /**30 * Account liquidity restrictions prevent withdrawal31 **/32 LiquidityRestrictions: AugmentedError<ApiType>;33 /**34 * Number of named reserves exceed MaxReserves35 **/36 TooManyReserves: AugmentedError<ApiType>;37 /**38 * Vesting balance too high to send value39 **/40 VestingBalance: AugmentedError<ApiType>;41 /**42 * Generic error43 **/44 [key: string]: AugmentedError<ApiType>;45 };46 common: {47 /**48 * Account token limit exceeded per collection49 **/50 AccountTokenLimitExceeded: AugmentedError<ApiType>;51 /**52 * Can't transfer tokens to ethereum zero address53 **/54 AddressIsZero: AugmentedError<ApiType>;55 /**56 * Address is not in allow list.57 **/58 AddressNotInAllowlist: AugmentedError<ApiType>;59 /**60 * Requested value more than approved.61 **/62 ApprovedValueTooLow: AugmentedError<ApiType>;63 /**64 * Tried to approve more than owned65 **/66 CantApproveMoreThanOwned: AugmentedError<ApiType>;67 /**68 * Destroying only empty collections is allowed69 **/70 CantDestroyNotEmptyCollection: AugmentedError<ApiType>;71 /**72 * Exceeded max admin count73 **/74 CollectionAdminCountExceeded: AugmentedError<ApiType>;75 /**76 * Collection description can not be longer than 255 char.77 **/78 CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;79 /**80 * Tried to store more data than allowed in collection field81 **/82 CollectionFieldSizeExceeded: AugmentedError<ApiType>;83 /**84 * Tried to access an external collection with an internal API85 **/86 CollectionIsExternal: AugmentedError<ApiType>;87 /**88 * Tried to access an internal collection with an external API89 **/90 CollectionIsInternal: AugmentedError<ApiType>;91 /**92 * Collection limit bounds per collection exceeded93 **/94 CollectionLimitBoundsExceeded: AugmentedError<ApiType>;95 /**96 * Collection name can not be longer than 63 char.97 **/98 CollectionNameLimitExceeded: AugmentedError<ApiType>;99 /**100 * This collection does not exist.101 **/102 CollectionNotFound: AugmentedError<ApiType>;103 /**104 * Collection token limit exceeded105 **/106 CollectionTokenLimitExceeded: AugmentedError<ApiType>;107 /**108 * Token prefix can not be longer than 15 char.109 **/110 CollectionTokenPrefixLimitExceeded: AugmentedError<ApiType>;111 /**112 * Empty property keys are forbidden113 **/114 EmptyPropertyKey: AugmentedError<ApiType>;115 /**116 * Only ASCII letters, digits, and '_', '-' are allowed117 **/118 InvalidCharacterInPropertyKey: AugmentedError<ApiType>;119 /**120 * Metadata flag frozen121 **/122 MetadataFlagFrozen: AugmentedError<ApiType>;123 /**124 * Sender parameter and item owner must be equal.125 **/126 MustBeTokenOwner: AugmentedError<ApiType>;127 /**128 * No permission to perform action129 **/130 NoPermission: AugmentedError<ApiType>;131 /**132 * Tried to store more property data than allowed133 **/134 NoSpaceForProperty: AugmentedError<ApiType>;135 /**136 * Not sufficient funds to perform action137 **/138 NotSufficientFounds: AugmentedError<ApiType>;139 /**140 * Tried to enable permissions which are only permitted to be disabled141 **/142 OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;143 /**144 * Property key is too long145 **/146 PropertyKeyIsTooLong: AugmentedError<ApiType>;147 /**148 * Tried to store more property keys than allowed149 **/150 PropertyLimitReached: AugmentedError<ApiType>;151 /**152 * Collection is not in mint mode.153 **/154 PublicMintingNotAllowed: AugmentedError<ApiType>;155 /**156 * Only tokens from specific collections may nest tokens under this157 **/158 SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;159 /**160 * Item not exists.161 **/162 TokenNotFound: AugmentedError<ApiType>;163 /**164 * Item balance not enough.165 **/166 TokenValueTooLow: AugmentedError<ApiType>;167 /**168 * Total collections bound exceeded.169 **/170 TotalCollectionsLimitExceeded: AugmentedError<ApiType>;171 /**172 * Collection settings not allowing items transferring173 **/174 TransferNotAllowed: AugmentedError<ApiType>;175 /**176 * Target collection doesn't supports this operation177 **/178 UnsupportedOperation: AugmentedError<ApiType>;179 /**180 * User not passed nesting rule181 **/182 UserIsNotAllowedToNest: AugmentedError<ApiType>;183 /**184 * Generic error185 **/186 [key: string]: AugmentedError<ApiType>;187 };188 cumulusXcm: {189 /**190 * Generic error191 **/192 [key: string]: AugmentedError<ApiType>;193 };194 dmpQueue: {195 /**196 * The amount of weight given is possibly not enough for executing the message.197 **/198 OverLimit: AugmentedError<ApiType>;199 /**200 * The message index given is unknown.201 **/202 Unknown: AugmentedError<ApiType>;203 /**204 * Generic error205 **/206 [key: string]: AugmentedError<ApiType>;207 };208 ethereum: {209 /**210 * Signature is invalid.211 **/212 InvalidSignature: AugmentedError<ApiType>;213 /**214 * Pre-log is present, therefore transact is not allowed.215 **/216 PreLogExists: AugmentedError<ApiType>;217 /**218 * Generic error219 **/220 [key: string]: AugmentedError<ApiType>;221 };222 evm: {223 /**224 * Not enough balance to perform action225 **/226 BalanceLow: AugmentedError<ApiType>;227 /**228 * Calculating total fee overflowed229 **/230 FeeOverflow: AugmentedError<ApiType>;231 /**232 * Gas price is too low.233 **/234 GasPriceTooLow: AugmentedError<ApiType>;235 /**236 * Nonce is invalid237 **/238 InvalidNonce: AugmentedError<ApiType>;239 /**240 * Calculating total payment overflowed241 **/242 PaymentOverflow: AugmentedError<ApiType>;243 /**244 * Withdraw fee failed245 **/246 WithdrawFailed: AugmentedError<ApiType>;247 /**248 * Generic error249 **/250 [key: string]: AugmentedError<ApiType>;251 };252 evmCoderSubstrate: {253 OutOfFund: AugmentedError<ApiType>;254 OutOfGas: AugmentedError<ApiType>;255 /**256 * Generic error257 **/258 [key: string]: AugmentedError<ApiType>;259 };260 evmContractHelpers: {261 /**262 * This method is only executable by owner263 **/264 NoPermission: AugmentedError<ApiType>;265 /**266 * Generic error267 **/268 [key: string]: AugmentedError<ApiType>;269 };270 evmMigration: {271 AccountIsNotMigrating: AugmentedError<ApiType>;272 AccountNotEmpty: AugmentedError<ApiType>;273 /**274 * Generic error275 **/276 [key: string]: AugmentedError<ApiType>;277 };278 fungible: {279 /**280 * Fungible token does not support nesting.281 **/282 FungibleDisallowsNesting: AugmentedError<ApiType>;283 /**284 * Tried to set data for fungible item.285 **/286 FungibleItemsDontHaveData: AugmentedError<ApiType>;287 /**288 * Not default id passed as TokenId argument.289 * The default value of TokenId for Fungible collection is 0.290 **/291 FungibleItemsHaveNoId: AugmentedError<ApiType>;292 /**293 * Not Fungible item data used to mint in Fungible collection.294 **/295 NotFungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;296 /**297 * Setting item properties is not allowed.298 **/299 SettingPropertiesNotAllowed: AugmentedError<ApiType>;300 /**301 * Generic error302 **/303 [key: string]: AugmentedError<ApiType>;304 };305 nonfungible: {306 /**307 * Unable to burn NFT with children308 **/309 CantBurnNftWithChildren: AugmentedError<ApiType>;310 /**311 * Used amount > 1 with NFT312 **/313 NonfungibleItemsHaveNoAmount: AugmentedError<ApiType>;314 /**315 * Not Nonfungible item data used to mint in Nonfungible collection.316 **/317 NotNonfungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;318 /**319 * Generic error320 **/321 [key: string]: AugmentedError<ApiType>;322 };323 parachainSystem: {324 /**325 * The inherent which supplies the host configuration did not run this block326 **/327 HostConfigurationNotAvailable: AugmentedError<ApiType>;328 /**329 * No code upgrade has been authorized.330 **/331 NothingAuthorized: AugmentedError<ApiType>;332 /**333 * No validation function upgrade is currently scheduled.334 **/335 NotScheduled: AugmentedError<ApiType>;336 /**337 * Attempt to upgrade validation function while existing upgrade pending338 **/339 OverlappingUpgrades: AugmentedError<ApiType>;340 /**341 * Polkadot currently prohibits this parachain from upgrading its validation function342 **/343 ProhibitedByPolkadot: AugmentedError<ApiType>;344 /**345 * The supplied validation function has compiled into a blob larger than Polkadot is346 * willing to run347 **/348 TooBig: AugmentedError<ApiType>;349 /**350 * The given code upgrade has not been authorized.351 **/352 Unauthorized: AugmentedError<ApiType>;353 /**354 * The inherent which supplies the validation data did not run this block355 **/356 ValidationDataNotAvailable: AugmentedError<ApiType>;357 /**358 * Generic error359 **/360 [key: string]: AugmentedError<ApiType>;361 };362 polkadotXcm: {363 /**364 * The location is invalid since it already has a subscription from us.365 **/366 AlreadySubscribed: AugmentedError<ApiType>;367 /**368 * The given location could not be used (e.g. because it cannot be expressed in the369 * desired version of XCM).370 **/371 BadLocation: AugmentedError<ApiType>;372 /**373 * The version of the `Versioned` value used is not able to be interpreted.374 **/375 BadVersion: AugmentedError<ApiType>;376 /**377 * Could not re-anchor the assets to declare the fees for the destination chain.378 **/379 CannotReanchor: AugmentedError<ApiType>;380 /**381 * The destination `MultiLocation` provided cannot be inverted.382 **/383 DestinationNotInvertible: AugmentedError<ApiType>;384 /**385 * The assets to be sent are empty.386 **/387 Empty: AugmentedError<ApiType>;388 /**389 * The message execution fails the filter.390 **/391 Filtered: AugmentedError<ApiType>;392 /**393 * Origin is invalid for sending.394 **/395 InvalidOrigin: AugmentedError<ApiType>;396 /**397 * The referenced subscription could not be found.398 **/399 NoSubscription: AugmentedError<ApiType>;400 /**401 * There was some other issue (i.e. not to do with routing) in sending the message. Perhaps402 * a lack of space for buffering the message.403 **/404 SendFailure: AugmentedError<ApiType>;405 /**406 * Too many assets have been attempted for transfer.407 **/408 TooManyAssets: AugmentedError<ApiType>;409 /**410 * The desired destination was unreachable, generally because there is a no way of routing411 * to it.412 **/413 Unreachable: AugmentedError<ApiType>;414 /**415 * The message's weight could not be determined.416 **/417 UnweighableMessage: AugmentedError<ApiType>;418 /**419 * Generic error420 **/421 [key: string]: AugmentedError<ApiType>;422 };423 refungible: {424 /**425 * Not Refungible item data used to mint in Refungible collection.426 **/427 NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;428 /**429 * Refungible token can't nest other tokens430 **/431 RefungibleDisallowsNesting: AugmentedError<ApiType>;432 /**433 * Refungible token can't be repartitioned by user who isn't owns all pieces434 **/435 RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;436 /**437 * Setting item properties is not allowed438 **/439 SettingPropertiesNotAllowed: AugmentedError<ApiType>;440 /**441 * Maximum refungibility exceeded442 **/443 WrongRefungiblePieces: AugmentedError<ApiType>;444 /**445 * Generic error446 **/447 [key: string]: AugmentedError<ApiType>;448 };449 rmrkCore: {450 CannotAcceptNonOwnedNft: AugmentedError<ApiType>;451 CannotRejectNonOwnedNft: AugmentedError<ApiType>;452 CannotRejectNonPendingNft: AugmentedError<ApiType>;453 CannotSendToDescendentOrSelf: AugmentedError<ApiType>;454 CollectionFullOrLocked: AugmentedError<ApiType>;455 CollectionNotEmpty: AugmentedError<ApiType>;456 CollectionUnknown: AugmentedError<ApiType>;457 CorruptedCollectionType: AugmentedError<ApiType>;458 NftTypeEncodeError: AugmentedError<ApiType>;459 NoAvailableCollectionId: AugmentedError<ApiType>;460 NoAvailableNftId: AugmentedError<ApiType>;461 NoAvailableResourceId: AugmentedError<ApiType>;462 NonTransferable: AugmentedError<ApiType>;463 NoPermission: AugmentedError<ApiType>;464 ResourceDoesntExist: AugmentedError<ApiType>;465 ResourceNotPending: AugmentedError<ApiType>;466 RmrkPropertyIsNotFound: AugmentedError<ApiType>;467 RmrkPropertyKeyIsTooLong: AugmentedError<ApiType>;468 RmrkPropertyValueIsTooLong: AugmentedError<ApiType>;469 UnableToDecodeRmrkData: AugmentedError<ApiType>;470 /**471 * Generic error472 **/473 [key: string]: AugmentedError<ApiType>;474 };475 rmrkEquip: {476 BaseDoesntExist: AugmentedError<ApiType>;477 NeedsDefaultThemeFirst: AugmentedError<ApiType>;478 NoAvailableBaseId: AugmentedError<ApiType>;479 NoAvailablePartId: AugmentedError<ApiType>;480 NoEquippableOnFixedPart: AugmentedError<ApiType>;481 PartDoesntExist: AugmentedError<ApiType>;482 PermissionError: AugmentedError<ApiType>;483 /**484 * Generic error485 **/486 [key: string]: AugmentedError<ApiType>;487 };488 scheduler: {489 /**490 * Failed to schedule a call491 **/492 FailedToSchedule: AugmentedError<ApiType>;493 /**494 * Cannot find the scheduled call.495 **/496 NotFound: AugmentedError<ApiType>;497 /**498 * Reschedule failed because it does not change scheduled time.499 **/500 RescheduleNoChange: AugmentedError<ApiType>;501 /**502 * Given target block number is in the past.503 **/504 TargetBlockNumberInPast: AugmentedError<ApiType>;505 /**506 * Generic error507 **/508 [key: string]: AugmentedError<ApiType>;509 };510 structure: {511 /**512 * While iterating over children, encountered breadth limit513 **/514 BreadthLimit: AugmentedError<ApiType>;515 /**516 * While searched for owner, encountered depth limit517 **/518 DepthLimit: AugmentedError<ApiType>;519 /**520 * While searched for owner, got already checked account521 **/522 OuroborosDetected: AugmentedError<ApiType>;523 /**524 * While searched for owner, found token owner by not-yet-existing token525 **/526 TokenNotFound: AugmentedError<ApiType>;527 /**528 * Generic error529 **/530 [key: string]: AugmentedError<ApiType>;531 };532 sudo: {533 /**534 * Sender must be the Sudo account535 **/536 RequireSudo: AugmentedError<ApiType>;537 /**538 * Generic error539 **/540 [key: string]: AugmentedError<ApiType>;541 };542 system: {543 /**544 * The origin filter prevent the call to be dispatched.545 **/546 CallFiltered: AugmentedError<ApiType>;547 /**548 * Failed to extract the runtime version from the new runtime.549 * 550 * Either calling `Core_version` or decoding `RuntimeVersion` failed.551 **/552 FailedToExtractRuntimeVersion: AugmentedError<ApiType>;553 /**554 * The name of specification does not match between the current runtime555 * and the new runtime.556 **/557 InvalidSpecName: AugmentedError<ApiType>;558 /**559 * Suicide called when the account has non-default composite data.560 **/561 NonDefaultComposite: AugmentedError<ApiType>;562 /**563 * There is a non-zero reference count preventing the account from being purged.564 **/565 NonZeroRefCount: AugmentedError<ApiType>;566 /**567 * The specification version is not allowed to decrease between the current runtime568 * and the new runtime.569 **/570 SpecVersionNeedsToIncrease: AugmentedError<ApiType>;571 /**572 * Generic error573 **/574 [key: string]: AugmentedError<ApiType>;575 };576 treasury: {577 /**578 * Proposer's balance is too low.579 **/580 InsufficientProposersBalance: AugmentedError<ApiType>;581 /**582 * No proposal or bounty at that index.583 **/584 InvalidIndex: AugmentedError<ApiType>;585 /**586 * Proposal has not been approved.587 **/588 ProposalNotApproved: AugmentedError<ApiType>;589 /**590 * Too many approvals in the queue.591 **/592 TooManyApprovals: AugmentedError<ApiType>;593 /**594 * Generic error595 **/596 [key: string]: AugmentedError<ApiType>;597 };598 unique: {599 /**600 * Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.601 **/602 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;603 /**604 * This address is not set as sponsor, use setCollectionSponsor first.605 **/606 ConfirmUnsetSponsorFail: AugmentedError<ApiType>;607 /**608 * Length of items properties must be greater than 0.609 **/610 EmptyArgument: AugmentedError<ApiType>;611 /**612 * Repertition is only supported by refungible collection613 **/614 RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;615 /**616 * Generic error617 **/618 [key: string]: AugmentedError<ApiType>;619 };620 vesting: {621 /**622 * The vested transfer amount is too low623 **/624 AmountLow: AugmentedError<ApiType>;625 /**626 * Insufficient amount of balance to lock627 **/628 InsufficientBalanceToLock: AugmentedError<ApiType>;629 /**630 * Failed because the maximum vesting schedules was exceeded631 **/632 MaxVestingSchedulesExceeded: AugmentedError<ApiType>;633 /**634 * This account have too many vesting schedules635 **/636 TooManyVestingSchedules: AugmentedError<ApiType>;637 /**638 * Vesting period is zero639 **/640 ZeroVestingPeriod: AugmentedError<ApiType>;641 /**642 * Number of vests is zero643 **/644 ZeroVestingPeriodCount: AugmentedError<ApiType>;645 /**646 * Generic error647 **/648 [key: string]: AugmentedError<ApiType>;649 };650 xcmpQueue: {651 /**652 * Bad overweight index.653 **/654 BadOverweightIndex: AugmentedError<ApiType>;655 /**656 * Bad XCM data.657 **/658 BadXcm: AugmentedError<ApiType>;659 /**660 * Bad XCM origin.661 **/662 BadXcmOrigin: AugmentedError<ApiType>;663 /**664 * Failed to send XCM message.665 **/666 FailedToSend: AugmentedError<ApiType>;667 /**668 * Provided weight is possibly not enough to execute the message.669 **/670 WeightOverLimit: AugmentedError<ApiType>;671 /**672 * Generic error673 **/674 [key: string]: AugmentedError<ApiType>;675 };676 } // AugmentedErrors677} // declare moduletests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -187,8 +187,17 @@
[key: string]: QueryableStorageEntry<ApiType>;
};
fungible: {
+ /**
+ * Storage for delegated assets.
+ **/
allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Amount of tokens owned by an account inside a collection.
+ **/
balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Total amount of fungible tokens inside a collection.
+ **/
totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
@@ -400,17 +409,35 @@
[key: string]: QueryableStorageEntry<ApiType>;
};
refungible: {
+ /**
+ * Amount of tokens owned by account
+ **/
accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Allowance set by an owner for a spender for a token
+ **/
allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Amount of token pieces owned by account
+ **/
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]>;
/**
* 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]>;
+ /**
+ * Custom data serialized to bytes for token
+ **/
tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
+ /**
+ * Amount of tokens minted for collection
+ **/
tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
+ /**
+ * 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]>;
/**
* Generic query