difftreelog
misk: Turn off eth metods for substrate addresses.
in: master
16 files changed
pallets/common/src/erc.rsdiffbeforeafterboth--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -139,25 +139,26 @@
save(self)
}
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- fn set_collection_sponsor_substrate(
- &mut self,
- caller: caller,
- sponsor: uint256,
- ) -> Result<void> {
- self.consume_store_reads_and_writes(1, 1)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Set the substrate sponsor of the collection.
+ // ///
+ // /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ // ///
+ // /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ // fn set_collection_sponsor_substrate(
+ // &mut self,
+ // caller: caller,
+ // sponsor: uint256,
+ // ) -> Result<void> {
+ // self.consume_store_reads_and_writes(1, 1)?;
- check_is_owner_or_admin(caller, self)?;
+ // check_is_owner_or_admin(caller, self)?;
- let sponsor = convert_uint256_to_cross_account::<T>(sponsor);
- self.set_sponsor(sponsor.as_sub().clone())
- .map_err(dispatch_to_evm::<T>)?;
- save(self)
- }
+ // let sponsor = convert_uint256_to_cross_account::<T>(sponsor);
+ // self.set_sponsor(sponsor.as_sub().clone())
+ // .map_err(dispatch_to_evm::<T>)?;
+ // save(self)
+ // }
/// Whether there is a pending sponsor.
fn has_collection_pending_sponsor(&self) -> Result<bool> {
@@ -299,35 +300,37 @@
Ok(crate::eth::collection_id_to_address(self.id))
}
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- fn add_collection_admin_substrate(
- &mut self,
- caller: caller,
- new_admin: uint256,
- ) -> Result<void> {
- self.consume_store_writes(2)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Add collection admin by substrate address.
+ // /// @param newAdmin Substrate administrator address.
+ // fn add_collection_admin_substrate(
+ // &mut self,
+ // caller: caller,
+ // new_admin: uint256,
+ // ) -> Result<void> {
+ // self.consume_store_writes(2)?;
- let caller = T::CrossAccountId::from_eth(caller);
- let new_admin = convert_uint256_to_cross_account::<T>(new_admin);
- <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;
- Ok(())
- }
+ // let caller = T::CrossAccountId::from_eth(caller);
+ // let new_admin = convert_uint256_to_cross_account::<T>(new_admin);
+ // <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;
+ // Ok(())
+ // }
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- fn remove_collection_admin_substrate(
- &mut self,
- caller: caller,
- admin: uint256,
- ) -> Result<void> {
- self.consume_store_writes(2)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Remove collection admin by substrate address.
+ // /// @param admin Substrate administrator address.
+ // fn remove_collection_admin_substrate(
+ // &mut self,
+ // caller: caller,
+ // admin: uint256,
+ // ) -> Result<void> {
+ // self.consume_store_writes(2)?;
- let caller = T::CrossAccountId::from_eth(caller);
- let admin = convert_uint256_to_cross_account::<T>(admin);
- <Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
- Ok(())
- }
+ // let caller = T::CrossAccountId::from_eth(caller);
+ // let admin = convert_uint256_to_cross_account::<T>(admin);
+ // <Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
+ // Ok(())
+ // }
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
@@ -476,21 +479,22 @@
Ok(())
}
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- fn add_to_collection_allow_list_substrate(
- &mut self,
- caller: caller,
- user: uint256,
- ) -> Result<void> {
- self.consume_store_writes(1)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Add substrate user to allowed list.
+ // ///
+ // /// @param user User substrate address.
+ // fn add_to_collection_allow_list_substrate(
+ // &mut self,
+ // caller: caller,
+ // user: uint256,
+ // ) -> Result<void> {
+ // self.consume_store_writes(1)?;
- let caller = T::CrossAccountId::from_eth(caller);
- let user = convert_uint256_to_cross_account::<T>(user);
- Pallet::<T>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;
- Ok(())
- }
+ // let caller = T::CrossAccountId::from_eth(caller);
+ // let user = convert_uint256_to_cross_account::<T>(user);
+ // Pallet::<T>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;
+ // Ok(())
+ // }
/// Remove the user from the allowed list.
///
@@ -504,21 +508,22 @@
Ok(())
}
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- fn remove_from_collection_allow_list_substrate(
- &mut self,
- caller: caller,
- user: uint256,
- ) -> Result<void> {
- self.consume_store_writes(1)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Remove substrate user from allowed list.
+ // ///
+ // /// @param user User substrate address.
+ // fn remove_from_collection_allow_list_substrate(
+ // &mut self,
+ // caller: caller,
+ // user: uint256,
+ // ) -> Result<void> {
+ // self.consume_store_writes(1)?;
- let caller = T::CrossAccountId::from_eth(caller);
- let user = convert_uint256_to_cross_account::<T>(user);
- Pallet::<T>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;
- Ok(())
- }
+ // let caller = T::CrossAccountId::from_eth(caller);
+ // let user = convert_uint256_to_cross_account::<T>(user);
+ // Pallet::<T>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;
+ // Ok(())
+ // }
/// Switch permission for minting.
///
@@ -551,14 +556,15 @@
Ok(self.is_owner_or_admin(&user))
}
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {
- let user = convert_uint256_to_cross_account::<T>(user);
- Ok(self.is_owner_or_admin(&user))
- }
+ // TODO: Temprorary off. Need refactor
+ // /// Check that substrate account is the owner or admin of the collection
+ // ///
+ // /// @param user account to verify
+ // /// @return "true" if account is the owner or admin
+ // fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {
+ // let user = convert_uint256_to_cross_account::<T>(user);
+ // Ok(self.is_owner_or_admin(&user))
+ // }
/// Returns collection type
///
@@ -595,18 +601,19 @@
.map_err(dispatch_to_evm::<T>)
}
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {
- self.consume_store_writes(1)?;
+ // TODO: Temprorary off. Need refactor
+ // /// Changes collection owner to another substrate account
+ // ///
+ // /// @dev Owner can be changed only by current owner
+ // /// @param newOwner new owner substrate account
+ // fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {
+ // self.consume_store_writes(1)?;
- let caller = T::CrossAccountId::from_eth(caller);
- let new_owner = convert_uint256_to_cross_account::<T>(new_owner);
- self.set_owner_internal(caller, new_owner)
- .map_err(dispatch_to_evm::<T>)
- }
+ // let caller = T::CrossAccountId::from_eth(caller);
+ // let new_owner = convert_uint256_to_cross_account::<T>(new_owner);
+ // self.set_owner_internal(caller, new_owner)
+ // .map_err(dispatch_to_evm::<T>)
+ // }
// TODO: need implement AbiWriter for &Vec<T>
// fn collection_admins(&self) -> Result<Vec<(address, uint256)>> {
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -72,19 +72,6 @@
dummy = 0;
}
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) public {
- require(false, stub_error);
- sponsor;
- dummy = 0;
- }
-
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
@@ -167,26 +154,6 @@
return 0x0000000000000000000000000000000000000000;
}
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) public {
- require(false, stub_error);
- newAdmin;
- dummy = 0;
- }
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) public {
- require(false, stub_error);
- admin;
- dummy = 0;
- }
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -262,17 +229,6 @@
/// @dev EVM selector for this function is: 0x67844fe6,
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -289,17 +245,6 @@
dummy = 0;
}
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -324,19 +269,6 @@
return false;
}
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
- require(false, stub_error);
- user;
- dummy;
- return false;
- }
-
/// Returns collection type
///
/// @return `Fungible` or `NFT` or `ReFungible`
@@ -367,18 +299,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) public {
- require(false, stub_error);
- newOwner;
- dummy = 0;
- }
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
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
@@ -91,7 +91,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -145,19 +145,6 @@
dummy = 0;
}
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) public {
- require(false, stub_error);
- sponsor;
- dummy = 0;
- }
-
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
@@ -240,26 +227,6 @@
return 0x0000000000000000000000000000000000000000;
}
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) public {
- require(false, stub_error);
- newAdmin;
- dummy = 0;
- }
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) public {
- require(false, stub_error);
- admin;
- dummy = 0;
- }
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -335,17 +302,6 @@
/// @dev EVM selector for this function is: 0x67844fe6,
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -362,17 +318,6 @@
dummy = 0;
}
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -397,19 +342,6 @@
return false;
}
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
- require(false, stub_error);
- user;
- dummy;
- return false;
- }
-
/// Returns collection type
///
/// @return `Fungible` or `NFT` or `ReFungible`
@@ -440,18 +372,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) public {
- require(false, stub_error);
- newOwner;
- dummy = 0;
- }
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
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
@@ -91,7 +91,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -145,19 +145,6 @@
dummy = 0;
}
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) public {
- require(false, stub_error);
- sponsor;
- dummy = 0;
- }
-
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
/// or in textual repr: hasCollectionPendingSponsor()
@@ -240,26 +227,6 @@
return 0x0000000000000000000000000000000000000000;
}
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) public {
- require(false, stub_error);
- newAdmin;
- dummy = 0;
- }
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) public {
- require(false, stub_error);
- admin;
- dummy = 0;
- }
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -335,17 +302,6 @@
/// @dev EVM selector for this function is: 0x67844fe6,
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) public {
require(false, stub_error);
user;
dummy = 0;
@@ -362,17 +318,6 @@
dummy = 0;
}
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) public {
- require(false, stub_error);
- user;
- dummy = 0;
- }
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -397,19 +342,6 @@
return false;
}
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
- require(false, stub_error);
- user;
- dummy;
- return false;
- }
-
/// Returns collection type
///
/// @return `Fungible` or `NFT` or `ReFungible`
@@ -440,18 +372,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) public {
- require(false, stub_error);
- newOwner;
- dummy = 0;
- }
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) public {
require(false, stub_error);
newOwner;
dummy = 0;
tests/src/eth/allowlist.test.tsdiffbeforeafterboth--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -95,20 +95,21 @@
expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
});
- itEth('Collection allowlist can be added and removed by [sub] address', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const user = donor;
+ // TODO: Temprorary off. Need refactor
+ // itEth('Collection allowlist can be added and removed by [sub] address', async ({helper}) => {
+ // const owner = await helper.eth.createAccountWithBalance(donor);
+ // const user = donor;
- const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ // const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
+ // const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
- await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+ // await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
- await collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
- });
+ // await collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+ // });
itEth('Collection allowlist can not be add and remove [eth] address by not owner', async ({helper}) => {
const owner = await helper.eth.createAccountWithBalance(donor);
@@ -128,21 +129,22 @@
expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.true;
});
- itEth('Collection allowlist can not be add and remove [sub] address by not owner', async ({helper}) => {
- const owner = await helper.eth.createAccountWithBalance(donor);
- const notOwner = await helper.eth.createAccountWithBalance(donor);
- const user = donor;
+ // TODO: Temprorary off. Need refactor
+ // itEth('Collection allowlist can not be add and remove [sub] address by not owner', async ({helper}) => {
+ // const owner = await helper.eth.createAccountWithBalance(donor);
+ // const notOwner = await helper.eth.createAccountWithBalance(donor);
+ // const user = donor;
- const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
- const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+ // const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
+ // const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
- await expect(collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
- await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+ // await expect(collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+ // await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
- await expect(collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
- expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
- });
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+ // await expect(collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
+ // expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+ // });
});
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -48,15 +48,6 @@
/// @dev EVM selector for this function is: 0x7623402e,
/// or in textual repr: setCollectionSponsor(address)
function setCollectionSponsor(address sponsor) external;
-
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -112,18 +103,6 @@
/// or in textual repr: contractAddress()
function contractAddress() external view returns (address);
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) external;
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -174,13 +153,6 @@
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) external;
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) external;
-
/// Remove the user from the allowed list.
///
/// @param user Address of a removed user.
@@ -188,13 +160,6 @@
/// or in textual repr: removeFromCollectionAllowList(address)
function removeFromCollectionAllowList(address user) external;
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -209,14 +174,6 @@
/// @dev EVM selector for this function is: 0x9811b0c7,
/// or in textual repr: isOwnerOrAdmin(address)
function isOwnerOrAdmin(address user) external view returns (bool);
-
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
/// Returns collection type
///
@@ -240,14 +197,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) external;
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) external;
}
/// @dev the ERC-165 identifier for this interface is 0x63034ac5
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -62,7 +62,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -97,15 +97,6 @@
/// @dev EVM selector for this function is: 0x7623402e,
/// or in textual repr: setCollectionSponsor(address)
function setCollectionSponsor(address sponsor) external;
-
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -161,18 +152,6 @@
/// or in textual repr: contractAddress()
function contractAddress() external view returns (address);
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) external;
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -223,13 +202,6 @@
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) external;
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) external;
-
/// Remove the user from the allowed list.
///
/// @param user Address of a removed user.
@@ -237,13 +209,6 @@
/// or in textual repr: removeFromCollectionAllowList(address)
function removeFromCollectionAllowList(address user) external;
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -258,14 +223,6 @@
/// @dev EVM selector for this function is: 0x9811b0c7,
/// or in textual repr: isOwnerOrAdmin(address)
function isOwnerOrAdmin(address user) external view returns (bool);
-
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
/// Returns collection type
///
@@ -289,14 +246,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) external;
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) external;
}
/// @dev anonymous struct
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -62,7 +62,7 @@
}
/// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -97,15 +97,6 @@
/// @dev EVM selector for this function is: 0x7623402e,
/// or in textual repr: setCollectionSponsor(address)
function setCollectionSponsor(address sponsor) external;
-
- /// Set the substrate sponsor of the collection.
- ///
- /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
- ///
- /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
- /// @dev EVM selector for this function is: 0xc74d6751,
- /// or in textual repr: setCollectionSponsorSubstrate(uint256)
- function setCollectionSponsorSubstrate(uint256 sponsor) external;
/// Whether there is a pending sponsor.
/// @dev EVM selector for this function is: 0x058ac185,
@@ -161,18 +152,6 @@
/// or in textual repr: contractAddress()
function contractAddress() external view returns (address);
- /// Add collection admin by substrate address.
- /// @param newAdmin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x5730062b,
- /// or in textual repr: addCollectionAdminSubstrate(uint256)
- function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
- /// Remove collection admin by substrate address.
- /// @param admin Substrate administrator address.
- /// @dev EVM selector for this function is: 0x4048fcf9,
- /// or in textual repr: removeCollectionAdminSubstrate(uint256)
- function removeCollectionAdminSubstrate(uint256 admin) external;
-
/// Add collection admin.
/// @param newAdmin Address of the added administrator.
/// @dev EVM selector for this function is: 0x92e462c7,
@@ -223,13 +202,6 @@
/// or in textual repr: addToCollectionAllowList(address)
function addToCollectionAllowList(address user) external;
- /// Add substrate user to allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xd06ad267,
- /// or in textual repr: addToCollectionAllowListSubstrate(uint256)
- function addToCollectionAllowListSubstrate(uint256 user) external;
-
/// Remove the user from the allowed list.
///
/// @param user Address of a removed user.
@@ -237,13 +209,6 @@
/// or in textual repr: removeFromCollectionAllowList(address)
function removeFromCollectionAllowList(address user) external;
- /// Remove substrate user from allowed list.
- ///
- /// @param user User substrate address.
- /// @dev EVM selector for this function is: 0xa31913ed,
- /// or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
- function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
/// Switch permission for minting.
///
/// @param mode Enable if "true".
@@ -258,14 +223,6 @@
/// @dev EVM selector for this function is: 0x9811b0c7,
/// or in textual repr: isOwnerOrAdmin(address)
function isOwnerOrAdmin(address user) external view returns (bool);
-
- /// Check that substrate account is the owner or admin of the collection
- ///
- /// @param user account to verify
- /// @return "true" if account is the owner or admin
- /// @dev EVM selector for this function is: 0x68910e00,
- /// or in textual repr: isOwnerOrAdminSubstrate(uint256)
- function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
/// Returns collection type
///
@@ -289,14 +246,6 @@
/// @dev EVM selector for this function is: 0x13af4035,
/// or in textual repr: setOwner(address)
function setOwner(address newOwner) external;
-
- /// Changes collection owner to another substrate account
- ///
- /// @dev Owner can be changed only by current owner
- /// @param newOwner new owner substrate account
- /// @dev EVM selector for this function is: 0xb212138f,
- /// or in textual repr: setOwnerSubstrate(uint256)
- function setOwnerSubstrate(uint256 newOwner) external;
}
/// @dev anonymous struct
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionAdmin.test.ts
+++ b/tests/src/eth/collectionAdmin.test.ts
@@ -44,23 +44,24 @@
.to.be.eq(newAdmin.toLocaleLowerCase());
});
- itWeb3('Add substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('Add substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const newAdmin = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
+ // const newAdmin = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
- .to.be.eq(newAdmin.address.toLocaleLowerCase());
- });
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
+ // .to.be.eq(newAdmin.address.toLocaleLowerCase());
+ // });
itWeb3('Verify owner or admin', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
@@ -121,47 +122,49 @@
expect(adminList.length).to.be.eq(0);
});
- itWeb3('(!negative tests!) Add substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('(!negative tests!) Add substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.addCollectionAdmin(admin).send();
+ // const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // await collectionEvm.methods.addCollectionAdmin(admin).send();
- const notAdmin = privateKey('//Alice');
- await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin.addressRaw).call({from: admin}))
- .to.be.rejectedWith('NoPermission');
+ // const notAdmin = privateKey('//Alice');
+ // await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin.addressRaw).call({from: admin}))
+ // .to.be.rejectedWith('NoPermission');
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList.length).to.be.eq(1);
- expect(adminList[0].asEthereum.toString().toLocaleLowerCase())
- .to.be.eq(admin.toLocaleLowerCase());
- });
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList.length).to.be.eq(1);
+ // expect(adminList[0].asEthereum.toString().toLocaleLowerCase())
+ // .to.be.eq(admin.toLocaleLowerCase());
+ // });
- itWeb3('(!negative tests!) Add substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('(!negative tests!) Add substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const notAdmin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- const notAdmin1 = privateKey('//Alice');
- await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin1.addressRaw).call({from: notAdmin0}))
- .to.be.rejectedWith('NoPermission');
+ // const notAdmin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // const notAdmin1 = privateKey('//Alice');
+ // await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin1.addressRaw).call({from: notAdmin0}))
+ // .to.be.rejectedWith('NoPermission');
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList.length).to.be.eq(0);
- });
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList.length).to.be.eq(0);
+ // });
});
describe('Remove collection admins', () => {
@@ -189,28 +192,29 @@
expect(adminList.length).to.be.eq(0);
});
- itWeb3('Remove substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('Remove substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const newAdmin = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
- {
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
- .to.be.eq(newAdmin.address.toLocaleLowerCase());
- }
+ // const newAdmin = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
+ // {
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
+ // .to.be.eq(newAdmin.address.toLocaleLowerCase());
+ // }
- await collectionEvm.methods.removeCollectionAdminSubstrate(newAdmin.addressRaw).send();
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList.length).to.be.eq(0);
- });
+ // await collectionEvm.methods.removeCollectionAdminSubstrate(newAdmin.addressRaw).send();
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList.length).to.be.eq(0);
+ // });
itWeb3('(!negative tests!) Remove admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
@@ -264,53 +268,55 @@
}
});
- itWeb3('(!negative tests!) Remove substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('(!negative tests!) Remove substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const adminSub = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
- const adminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- await collectionEvm.methods.addCollectionAdmin(adminEth).send();
+ // const adminSub = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
+ // const adminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // await collectionEvm.methods.addCollectionAdmin(adminEth).send();
- await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: adminEth}))
- .to.be.rejectedWith('NoPermission');
+ // await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: adminEth}))
+ // .to.be.rejectedWith('NoPermission');
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList.length).to.be.eq(2);
- expect(adminList.toString().toLocaleLowerCase())
- .to.be.deep.contains(adminSub.address.toLocaleLowerCase())
- .to.be.deep.contains(adminEth.toLocaleLowerCase());
- });
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList.length).to.be.eq(2);
+ // expect(adminList.toString().toLocaleLowerCase())
+ // .to.be.deep.contains(adminSub.address.toLocaleLowerCase())
+ // .to.be.deep.contains(adminEth.toLocaleLowerCase());
+ // });
- itWeb3('(!negative tests!) Remove substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelper = evmCollectionHelpers(web3, owner);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('(!negative tests!) Remove substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const adminSub = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
- const notAdminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const adminSub = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
+ // const notAdminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: notAdminEth}))
- .to.be.rejectedWith('NoPermission');
+ // await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: notAdminEth}))
+ // .to.be.rejectedWith('NoPermission');
- const adminList = await api.rpc.unique.adminlist(collectionId);
- expect(adminList.length).to.be.eq(1);
- expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
- .to.be.eq(adminSub.address.toLocaleLowerCase());
- });
+ // const adminList = await api.rpc.unique.adminlist(collectionId);
+ // expect(adminList.length).to.be.eq(1);
+ // expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())
+ // .to.be.eq(adminSub.address.toLocaleLowerCase());
+ // });
});
describe('Change owner tests', () => {
@@ -361,52 +367,55 @@
});
describe('Change substrate owner tests', () => {
- itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const newOwner = privateKeyWrapper('//Alice');
- const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const newOwner = privateKeyWrapper('//Alice');
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;
- expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;
+ // expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;
+ // expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;
- await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();
+ // await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();
- expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;
- expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;
- });
+ // expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;
+ // expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;
+ // });
- itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const newOwner = privateKeyWrapper('//Alice');
- const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const newOwner = privateKeyWrapper('//Alice');
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());
- expect(cost < BigInt(0.2 * Number(UNIQUE)));
- expect(cost > 0);
- });
+ // const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());
+ // expect(cost < BigInt(0.2 * Number(UNIQUE)));
+ // expect(cost > 0);
+ // });
- itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const otherReceiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const newOwner = privateKeyWrapper('//Alice');
- const collectionHelper = evmCollectionHelpers(web3, owner);
- const result = await collectionHelper.methods
- .createNonfungibleCollection('A', 'B', 'C')
- .send();
- const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const otherReceiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const newOwner = privateKeyWrapper('//Alice');
+ // const collectionHelper = evmCollectionHelpers(web3, owner);
+ // const result = await collectionHelper.methods
+ // .createNonfungibleCollection('A', 'B', 'C')
+ // .send();
+ // const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;
- expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;
- });
+ // await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;
+ // expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;
+ // });
});
\ No newline at end of file
tests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -40,25 +40,26 @@
]);
});
- itWeb3('Set substrate sponsor', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelpers = evmCollectionHelpers(web3, owner);
- let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const sponsor = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('Set substrate sponsor', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelpers = evmCollectionHelpers(web3, owner);
+ // let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const sponsor = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
- result = await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
- expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+ // expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+ // result = await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+ // expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
- const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
- await submitTransactionAsync(sponsor, confirmTx);
- expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+ // const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+ // await submitTransactionAsync(sponsor, confirmTx);
+ // expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
- const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
- expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
- });
+ // const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
+ // expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
+ // });
itWeb3('Remove sponsor', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
@@ -150,60 +151,61 @@
}
});
- itWeb3('Sponsoring collection from substrate address via access list', async ({api, web3, privateKeyWrapper}) => {
- const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
- const collectionHelpers = evmCollectionHelpers(web3, owner);
- const result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
- const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const sponsor = privateKeyWrapper('//Alice');
- const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+ // TODO: Temprorary off. Need refactor
+ // itWeb3('Sponsoring collection from substrate address via access list', async ({api, web3, privateKeyWrapper}) => {
+ // const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+ // const collectionHelpers = evmCollectionHelpers(web3, owner);
+ // const result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
+ // const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+ // const sponsor = privateKeyWrapper('//Alice');
+ // const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
- await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+ // await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
- const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
- await submitTransactionAsync(sponsor, confirmTx);
+ // const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+ // await submitTransactionAsync(sponsor, confirmTx);
- const user = createEthAccount(web3);
- const nextTokenId = await collectionEvm.methods.nextTokenId().call();
- expect(nextTokenId).to.be.equal('1');
+ // const user = createEthAccount(web3);
+ // const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+ // expect(nextTokenId).to.be.equal('1');
- await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
- await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
- await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+ // await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+ // await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
+ // await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
- const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
- const sponsorBalanceBefore = (await getBalance(api, [sponsor.address]))[0];
+ // const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
+ // const sponsorBalanceBefore = (await getBalance(api, [sponsor.address]))[0];
- {
- const nextTokenId = await collectionEvm.methods.nextTokenId().call();
- expect(nextTokenId).to.be.equal('1');
- const result = await collectionEvm.methods.mintWithTokenURI(
- user,
- nextTokenId,
- 'Test URI',
- ).send({from: user});
- const events = normalizeEvents(result.events);
+ // {
+ // const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+ // expect(nextTokenId).to.be.equal('1');
+ // const result = await collectionEvm.methods.mintWithTokenURI(
+ // user,
+ // nextTokenId,
+ // 'Test URI',
+ // ).send({from: user});
+ // const events = normalizeEvents(result.events);
- expect(events).to.be.deep.equal([
- {
- address: collectionIdAddress,
- event: 'Transfer',
- args: {
- from: '0x0000000000000000000000000000000000000000',
- to: user,
- tokenId: nextTokenId,
- },
- },
- ]);
+ // expect(events).to.be.deep.equal([
+ // {
+ // address: collectionIdAddress,
+ // event: 'Transfer',
+ // args: {
+ // from: '0x0000000000000000000000000000000000000000',
+ // to: user,
+ // tokenId: nextTokenId,
+ // },
+ // },
+ // ]);
- const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
- const sponsorBalanceAfter = (await getBalance(api, [sponsor.address]))[0];
+ // const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
+ // const sponsorBalanceAfter = (await getBalance(api, [sponsor.address]))[0];
- expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
- expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
- expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
- }
- });
+ // expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+ // expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+ // expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+ // }
+ // });
itWeb3('Check that transaction via EVM spend money from sponsor address', async ({api, web3, privateKeyWrapper}) => {
const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -60,27 +60,9 @@
},
{
"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": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "addToCollectionAllowListSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -214,15 +196,6 @@
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "isOwnerOrAdmin",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "isOwnerOrAdminSubstrate",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
@@ -271,15 +244,6 @@
"type": "function"
},
{
- "inputs": [
- { "internalType": "uint256", "name": "admin", "type": "uint256" }
- ],
- "name": "removeCollectionAdminSubstrate",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
"inputs": [],
"name": "removeCollectionSponsor",
"outputs": [],
@@ -291,15 +255,6 @@
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "removeFromCollectionAllowList",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "removeFromCollectionAllowListSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -380,27 +335,9 @@
},
{
"inputs": [
- { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
- ],
- "name": "setCollectionSponsorSubstrate",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
{ "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "setOwner",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
- ],
- "name": "setOwnerSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 { "internalType": "address", "name": "newAdmin", "type": "address" }86 ],87 "name": "addCollectionAdmin",88 "outputs": [],89 "stateMutability": "nonpayable",90 "type": "function"91 },92 {93 "inputs": [94 { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }95 ],96 "name": "addCollectionAdminSubstrate",97 "outputs": [],98 "stateMutability": "nonpayable",99 "type": "function"100 },101 {102 "inputs": [103 { "internalType": "address", "name": "user", "type": "address" }104 ],105 "name": "addToCollectionAllowList",106 "outputs": [],107 "stateMutability": "nonpayable",108 "type": "function"109 },110 {111 "inputs": [112 { "internalType": "uint256", "name": "user", "type": "uint256" }113 ],114 "name": "addToCollectionAllowListSubstrate",115 "outputs": [],116 "stateMutability": "nonpayable",117 "type": "function"118 },119 {120 "inputs": [121 { "internalType": "address", "name": "user", "type": "address" }122 ],123 "name": "allowed",124 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],125 "stateMutability": "view",126 "type": "function"127 },128 {129 "inputs": [130 { "internalType": "address", "name": "approved", "type": "address" },131 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }132 ],133 "name": "approve",134 "outputs": [],135 "stateMutability": "nonpayable",136 "type": "function"137 },138 {139 "inputs": [140 { "internalType": "address", "name": "owner", "type": "address" }141 ],142 "name": "balanceOf",143 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],144 "stateMutability": "view",145 "type": "function"146 },147 {148 "inputs": [149 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }150 ],151 "name": "burn",152 "outputs": [],153 "stateMutability": "nonpayable",154 "type": "function"155 },156 {157 "inputs": [158 { "internalType": "address", "name": "from", "type": "address" },159 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }160 ],161 "name": "burnFrom",162 "outputs": [],163 "stateMutability": "nonpayable",164 "type": "function"165 },166 {167 "inputs": [],168 "name": "collectionOwner",169 "outputs": [170 {171 "components": [172 { "internalType": "address", "name": "field_0", "type": "address" },173 { "internalType": "uint256", "name": "field_1", "type": "uint256" }174 ],175 "internalType": "struct Tuple17",176 "name": "",177 "type": "tuple"178 }179 ],180 "stateMutability": "view",181 "type": "function"182 },183 {184 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],185 "name": "collectionProperty",186 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],187 "stateMutability": "view",188 "type": "function"189 },190 {191 "inputs": [],192 "name": "collectionSponsor",193 "outputs": [194 {195 "components": [196 { "internalType": "address", "name": "field_0", "type": "address" },197 { "internalType": "uint256", "name": "field_1", "type": "uint256" }198 ],199 "internalType": "struct Tuple17",200 "name": "",201 "type": "tuple"202 }203 ],204 "stateMutability": "view",205 "type": "function"206 },207 {208 "inputs": [],209 "name": "confirmCollectionSponsorship",210 "outputs": [],211 "stateMutability": "nonpayable",212 "type": "function"213 },214 {215 "inputs": [],216 "name": "contractAddress",217 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],218 "stateMutability": "view",219 "type": "function"220 },221 {222 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],223 "name": "deleteCollectionProperty",224 "outputs": [],225 "stateMutability": "nonpayable",226 "type": "function"227 },228 {229 "inputs": [230 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },231 { "internalType": "string", "name": "key", "type": "string" }232 ],233 "name": "deleteProperty",234 "outputs": [],235 "stateMutability": "nonpayable",236 "type": "function"237 },238 {239 "inputs": [],240 "name": "finishMinting",241 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],242 "stateMutability": "nonpayable",243 "type": "function"244 },245 {246 "inputs": [247 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }248 ],249 "name": "getApproved",250 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],251 "stateMutability": "view",252 "type": "function"253 },254 {255 "inputs": [],256 "name": "hasCollectionPendingSponsor",257 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],258 "stateMutability": "view",259 "type": "function"260 },261 {262 "inputs": [263 { "internalType": "address", "name": "owner", "type": "address" },264 { "internalType": "address", "name": "operator", "type": "address" }265 ],266 "name": "isApprovedForAll",267 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],268 "stateMutability": "view",269 "type": "function"270 },271 {272 "inputs": [273 { "internalType": "address", "name": "user", "type": "address" }274 ],275 "name": "isOwnerOrAdmin",276 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],277 "stateMutability": "view",278 "type": "function"279 },280 {281 "inputs": [282 { "internalType": "uint256", "name": "user", "type": "uint256" }283 ],284 "name": "isOwnerOrAdminSubstrate",285 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],286 "stateMutability": "view",287 "type": "function"288 },289 {290 "inputs": [291 { "internalType": "address", "name": "to", "type": "address" },292 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }293 ],294 "name": "mint",295 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],296 "stateMutability": "nonpayable",297 "type": "function"298 },299 {300 "inputs": [301 { "internalType": "address", "name": "to", "type": "address" },302 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }303 ],304 "name": "mintBulk",305 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],306 "stateMutability": "nonpayable",307 "type": "function"308 },309 {310 "inputs": [311 { "internalType": "address", "name": "to", "type": "address" },312 {313 "components": [314 { "internalType": "uint256", "name": "field_0", "type": "uint256" },315 { "internalType": "string", "name": "field_1", "type": "string" }316 ],317 "internalType": "struct Tuple8[]",318 "name": "tokens",319 "type": "tuple[]"320 }321 ],322 "name": "mintBulkWithTokenURI",323 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],324 "stateMutability": "nonpayable",325 "type": "function"326 },327 {328 "inputs": [329 { "internalType": "address", "name": "to", "type": "address" },330 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },331 { "internalType": "string", "name": "tokenUri", "type": "string" }332 ],333 "name": "mintWithTokenURI",334 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],335 "stateMutability": "nonpayable",336 "type": "function"337 },338 {339 "inputs": [],340 "name": "mintingFinished",341 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],342 "stateMutability": "view",343 "type": "function"344 },345 {346 "inputs": [],347 "name": "name",348 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],349 "stateMutability": "view",350 "type": "function"351 },352 {353 "inputs": [],354 "name": "nextTokenId",355 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],356 "stateMutability": "view",357 "type": "function"358 },359 {360 "inputs": [361 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }362 ],363 "name": "ownerOf",364 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],365 "stateMutability": "view",366 "type": "function"367 },368 {369 "inputs": [370 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },371 { "internalType": "string", "name": "key", "type": "string" }372 ],373 "name": "property",374 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],375 "stateMutability": "view",376 "type": "function"377 },378 {379 "inputs": [380 { "internalType": "address", "name": "admin", "type": "address" }381 ],382 "name": "removeCollectionAdmin",383 "outputs": [],384 "stateMutability": "nonpayable",385 "type": "function"386 },387 {388 "inputs": [389 { "internalType": "uint256", "name": "admin", "type": "uint256" }390 ],391 "name": "removeCollectionAdminSubstrate",392 "outputs": [],393 "stateMutability": "nonpayable",394 "type": "function"395 },396 {397 "inputs": [],398 "name": "removeCollectionSponsor",399 "outputs": [],400 "stateMutability": "nonpayable",401 "type": "function"402 },403 {404 "inputs": [405 { "internalType": "address", "name": "user", "type": "address" }406 ],407 "name": "removeFromCollectionAllowList",408 "outputs": [],409 "stateMutability": "nonpayable",410 "type": "function"411 },412 {413 "inputs": [414 { "internalType": "uint256", "name": "user", "type": "uint256" }415 ],416 "name": "removeFromCollectionAllowListSubstrate",417 "outputs": [],418 "stateMutability": "nonpayable",419 "type": "function"420 },421 {422 "inputs": [423 { "internalType": "address", "name": "from", "type": "address" },424 { "internalType": "address", "name": "to", "type": "address" },425 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }426 ],427 "name": "safeTransferFrom",428 "outputs": [],429 "stateMutability": "nonpayable",430 "type": "function"431 },432 {433 "inputs": [434 { "internalType": "address", "name": "from", "type": "address" },435 { "internalType": "address", "name": "to", "type": "address" },436 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },437 { "internalType": "bytes", "name": "data", "type": "bytes" }438 ],439 "name": "safeTransferFrom",440 "outputs": [],441 "stateMutability": "nonpayable",442 "type": "function"443 },444 {445 "inputs": [446 { "internalType": "address", "name": "operator", "type": "address" },447 { "internalType": "bool", "name": "approved", "type": "bool" }448 ],449 "name": "setApprovalForAll",450 "outputs": [],451 "stateMutability": "nonpayable",452 "type": "function"453 },454 {455 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],456 "name": "setCollectionAccess",457 "outputs": [],458 "stateMutability": "nonpayable",459 "type": "function"460 },461 {462 "inputs": [463 { "internalType": "string", "name": "limit", "type": "string" },464 { "internalType": "uint32", "name": "value", "type": "uint32" }465 ],466 "name": "setCollectionLimit",467 "outputs": [],468 "stateMutability": "nonpayable",469 "type": "function"470 },471 {472 "inputs": [473 { "internalType": "string", "name": "limit", "type": "string" },474 { "internalType": "bool", "name": "value", "type": "bool" }475 ],476 "name": "setCollectionLimit",477 "outputs": [],478 "stateMutability": "nonpayable",479 "type": "function"480 },481 {482 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],483 "name": "setCollectionMintMode",484 "outputs": [],485 "stateMutability": "nonpayable",486 "type": "function"487 },488 {489 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],490 "name": "setCollectionNesting",491 "outputs": [],492 "stateMutability": "nonpayable",493 "type": "function"494 },495 {496 "inputs": [497 { "internalType": "bool", "name": "enable", "type": "bool" },498 {499 "internalType": "address[]",500 "name": "collections",501 "type": "address[]"502 }503 ],504 "name": "setCollectionNesting",505 "outputs": [],506 "stateMutability": "nonpayable",507 "type": "function"508 },509 {510 "inputs": [511 { "internalType": "string", "name": "key", "type": "string" },512 { "internalType": "bytes", "name": "value", "type": "bytes" }513 ],514 "name": "setCollectionProperty",515 "outputs": [],516 "stateMutability": "nonpayable",517 "type": "function"518 },519 {520 "inputs": [521 { "internalType": "address", "name": "sponsor", "type": "address" }522 ],523 "name": "setCollectionSponsor",524 "outputs": [],525 "stateMutability": "nonpayable",526 "type": "function"527 },528 {529 "inputs": [530 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }531 ],532 "name": "setCollectionSponsorSubstrate",533 "outputs": [],534 "stateMutability": "nonpayable",535 "type": "function"536 },537 {538 "inputs": [539 { "internalType": "address", "name": "newOwner", "type": "address" }540 ],541 "name": "setOwner",542 "outputs": [],543 "stateMutability": "nonpayable",544 "type": "function"545 },546 {547 "inputs": [548 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }549 ],550 "name": "setOwnerSubstrate",551 "outputs": [],552 "stateMutability": "nonpayable",553 "type": "function"554 },555 {556 "inputs": [557 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },558 { "internalType": "string", "name": "key", "type": "string" },559 { "internalType": "bytes", "name": "value", "type": "bytes" }560 ],561 "name": "setProperty",562 "outputs": [],563 "stateMutability": "nonpayable",564 "type": "function"565 },566 {567 "inputs": [568 { "internalType": "string", "name": "key", "type": "string" },569 { "internalType": "bool", "name": "isMutable", "type": "bool" },570 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },571 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }572 ],573 "name": "setTokenPropertyPermission",574 "outputs": [],575 "stateMutability": "nonpayable",576 "type": "function"577 },578 {579 "inputs": [580 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }581 ],582 "name": "supportsInterface",583 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],584 "stateMutability": "view",585 "type": "function"586 },587 {588 "inputs": [],589 "name": "symbol",590 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],591 "stateMutability": "view",592 "type": "function"593 },594 {595 "inputs": [596 { "internalType": "uint256", "name": "index", "type": "uint256" }597 ],598 "name": "tokenByIndex",599 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],600 "stateMutability": "view",601 "type": "function"602 },603 {604 "inputs": [605 { "internalType": "address", "name": "owner", "type": "address" },606 { "internalType": "uint256", "name": "index", "type": "uint256" }607 ],608 "name": "tokenOfOwnerByIndex",609 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],610 "stateMutability": "view",611 "type": "function"612 },613 {614 "inputs": [615 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }616 ],617 "name": "tokenURI",618 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],619 "stateMutability": "view",620 "type": "function"621 },622 {623 "inputs": [],624 "name": "totalSupply",625 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],626 "stateMutability": "view",627 "type": "function"628 },629 {630 "inputs": [631 { "internalType": "address", "name": "to", "type": "address" },632 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }633 ],634 "name": "transfer",635 "outputs": [],636 "stateMutability": "nonpayable",637 "type": "function"638 },639 {640 "inputs": [641 { "internalType": "address", "name": "from", "type": "address" },642 { "internalType": "address", "name": "to", "type": "address" },643 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }644 ],645 "name": "transferFrom",646 "outputs": [],647 "stateMutability": "nonpayable",648 "type": "function"649 },650 {651 "inputs": [],652 "name": "uniqueCollectionType",653 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],654 "stateMutability": "view",655 "type": "function"656 }657]1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 { "internalType": "address", "name": "newAdmin", "type": "address" }86 ],87 "name": "addCollectionAdmin",88 "outputs": [],89 "stateMutability": "nonpayable",90 "type": "function"91 },92 {93 "inputs": [94 { "internalType": "address", "name": "user", "type": "address" }95 ],96 "name": "addToCollectionAllowList",97 "outputs": [],98 "stateMutability": "nonpayable",99 "type": "function"100 },101 {102 "inputs": [103 { "internalType": "address", "name": "user", "type": "address" }104 ],105 "name": "allowed",106 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],107 "stateMutability": "view",108 "type": "function"109 },110 {111 "inputs": [112 { "internalType": "address", "name": "approved", "type": "address" },113 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }114 ],115 "name": "approve",116 "outputs": [],117 "stateMutability": "nonpayable",118 "type": "function"119 },120 {121 "inputs": [122 { "internalType": "address", "name": "owner", "type": "address" }123 ],124 "name": "balanceOf",125 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],126 "stateMutability": "view",127 "type": "function"128 },129 {130 "inputs": [131 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }132 ],133 "name": "burn",134 "outputs": [],135 "stateMutability": "nonpayable",136 "type": "function"137 },138 {139 "inputs": [140 { "internalType": "address", "name": "from", "type": "address" },141 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }142 ],143 "name": "burnFrom",144 "outputs": [],145 "stateMutability": "nonpayable",146 "type": "function"147 },148 {149 "inputs": [],150 "name": "collectionOwner",151 "outputs": [152 {153 "components": [154 { "internalType": "address", "name": "field_0", "type": "address" },155 { "internalType": "uint256", "name": "field_1", "type": "uint256" }156 ],157 "internalType": "struct Tuple17",158 "name": "",159 "type": "tuple"160 }161 ],162 "stateMutability": "view",163 "type": "function"164 },165 {166 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],167 "name": "collectionProperty",168 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],169 "stateMutability": "view",170 "type": "function"171 },172 {173 "inputs": [],174 "name": "collectionSponsor",175 "outputs": [176 {177 "components": [178 { "internalType": "address", "name": "field_0", "type": "address" },179 { "internalType": "uint256", "name": "field_1", "type": "uint256" }180 ],181 "internalType": "struct Tuple17",182 "name": "",183 "type": "tuple"184 }185 ],186 "stateMutability": "view",187 "type": "function"188 },189 {190 "inputs": [],191 "name": "confirmCollectionSponsorship",192 "outputs": [],193 "stateMutability": "nonpayable",194 "type": "function"195 },196 {197 "inputs": [],198 "name": "contractAddress",199 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],200 "stateMutability": "view",201 "type": "function"202 },203 {204 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],205 "name": "deleteCollectionProperty",206 "outputs": [],207 "stateMutability": "nonpayable",208 "type": "function"209 },210 {211 "inputs": [212 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },213 { "internalType": "string", "name": "key", "type": "string" }214 ],215 "name": "deleteProperty",216 "outputs": [],217 "stateMutability": "nonpayable",218 "type": "function"219 },220 {221 "inputs": [],222 "name": "finishMinting",223 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],224 "stateMutability": "nonpayable",225 "type": "function"226 },227 {228 "inputs": [229 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }230 ],231 "name": "getApproved",232 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],233 "stateMutability": "view",234 "type": "function"235 },236 {237 "inputs": [],238 "name": "hasCollectionPendingSponsor",239 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],240 "stateMutability": "view",241 "type": "function"242 },243 {244 "inputs": [245 { "internalType": "address", "name": "owner", "type": "address" },246 { "internalType": "address", "name": "operator", "type": "address" }247 ],248 "name": "isApprovedForAll",249 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],250 "stateMutability": "view",251 "type": "function"252 },253 {254 "inputs": [255 { "internalType": "address", "name": "user", "type": "address" }256 ],257 "name": "isOwnerOrAdmin",258 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],259 "stateMutability": "view",260 "type": "function"261 },262 {263 "inputs": [264 { "internalType": "address", "name": "to", "type": "address" },265 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }266 ],267 "name": "mint",268 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],269 "stateMutability": "nonpayable",270 "type": "function"271 },272 {273 "inputs": [274 { "internalType": "address", "name": "to", "type": "address" },275 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }276 ],277 "name": "mintBulk",278 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],279 "stateMutability": "nonpayable",280 "type": "function"281 },282 {283 "inputs": [284 { "internalType": "address", "name": "to", "type": "address" },285 {286 "components": [287 { "internalType": "uint256", "name": "field_0", "type": "uint256" },288 { "internalType": "string", "name": "field_1", "type": "string" }289 ],290 "internalType": "struct Tuple8[]",291 "name": "tokens",292 "type": "tuple[]"293 }294 ],295 "name": "mintBulkWithTokenURI",296 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],297 "stateMutability": "nonpayable",298 "type": "function"299 },300 {301 "inputs": [302 { "internalType": "address", "name": "to", "type": "address" },303 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },304 { "internalType": "string", "name": "tokenUri", "type": "string" }305 ],306 "name": "mintWithTokenURI",307 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],308 "stateMutability": "nonpayable",309 "type": "function"310 },311 {312 "inputs": [],313 "name": "mintingFinished",314 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],315 "stateMutability": "view",316 "type": "function"317 },318 {319 "inputs": [],320 "name": "name",321 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],322 "stateMutability": "view",323 "type": "function"324 },325 {326 "inputs": [],327 "name": "nextTokenId",328 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],329 "stateMutability": "view",330 "type": "function"331 },332 {333 "inputs": [334 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }335 ],336 "name": "ownerOf",337 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],338 "stateMutability": "view",339 "type": "function"340 },341 {342 "inputs": [343 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },344 { "internalType": "string", "name": "key", "type": "string" }345 ],346 "name": "property",347 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],348 "stateMutability": "view",349 "type": "function"350 },351 {352 "inputs": [353 { "internalType": "address", "name": "admin", "type": "address" }354 ],355 "name": "removeCollectionAdmin",356 "outputs": [],357 "stateMutability": "nonpayable",358 "type": "function"359 },360 {361 "inputs": [],362 "name": "removeCollectionSponsor",363 "outputs": [],364 "stateMutability": "nonpayable",365 "type": "function"366 },367 {368 "inputs": [369 { "internalType": "address", "name": "user", "type": "address" }370 ],371 "name": "removeFromCollectionAllowList",372 "outputs": [],373 "stateMutability": "nonpayable",374 "type": "function"375 },376 {377 "inputs": [378 { "internalType": "address", "name": "from", "type": "address" },379 { "internalType": "address", "name": "to", "type": "address" },380 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }381 ],382 "name": "safeTransferFrom",383 "outputs": [],384 "stateMutability": "nonpayable",385 "type": "function"386 },387 {388 "inputs": [389 { "internalType": "address", "name": "from", "type": "address" },390 { "internalType": "address", "name": "to", "type": "address" },391 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },392 { "internalType": "bytes", "name": "data", "type": "bytes" }393 ],394 "name": "safeTransferFrom",395 "outputs": [],396 "stateMutability": "nonpayable",397 "type": "function"398 },399 {400 "inputs": [401 { "internalType": "address", "name": "operator", "type": "address" },402 { "internalType": "bool", "name": "approved", "type": "bool" }403 ],404 "name": "setApprovalForAll",405 "outputs": [],406 "stateMutability": "nonpayable",407 "type": "function"408 },409 {410 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],411 "name": "setCollectionAccess",412 "outputs": [],413 "stateMutability": "nonpayable",414 "type": "function"415 },416 {417 "inputs": [418 { "internalType": "string", "name": "limit", "type": "string" },419 { "internalType": "uint32", "name": "value", "type": "uint32" }420 ],421 "name": "setCollectionLimit",422 "outputs": [],423 "stateMutability": "nonpayable",424 "type": "function"425 },426 {427 "inputs": [428 { "internalType": "string", "name": "limit", "type": "string" },429 { "internalType": "bool", "name": "value", "type": "bool" }430 ],431 "name": "setCollectionLimit",432 "outputs": [],433 "stateMutability": "nonpayable",434 "type": "function"435 },436 {437 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],438 "name": "setCollectionMintMode",439 "outputs": [],440 "stateMutability": "nonpayable",441 "type": "function"442 },443 {444 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],445 "name": "setCollectionNesting",446 "outputs": [],447 "stateMutability": "nonpayable",448 "type": "function"449 },450 {451 "inputs": [452 { "internalType": "bool", "name": "enable", "type": "bool" },453 {454 "internalType": "address[]",455 "name": "collections",456 "type": "address[]"457 }458 ],459 "name": "setCollectionNesting",460 "outputs": [],461 "stateMutability": "nonpayable",462 "type": "function"463 },464 {465 "inputs": [466 { "internalType": "string", "name": "key", "type": "string" },467 { "internalType": "bytes", "name": "value", "type": "bytes" }468 ],469 "name": "setCollectionProperty",470 "outputs": [],471 "stateMutability": "nonpayable",472 "type": "function"473 },474 {475 "inputs": [476 { "internalType": "address", "name": "sponsor", "type": "address" }477 ],478 "name": "setCollectionSponsor",479 "outputs": [],480 "stateMutability": "nonpayable",481 "type": "function"482 },483 {484 "inputs": [485 { "internalType": "address", "name": "newOwner", "type": "address" }486 ],487 "name": "setOwner",488 "outputs": [],489 "stateMutability": "nonpayable",490 "type": "function"491 },492 {493 "inputs": [494 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },495 { "internalType": "string", "name": "key", "type": "string" },496 { "internalType": "bytes", "name": "value", "type": "bytes" }497 ],498 "name": "setProperty",499 "outputs": [],500 "stateMutability": "nonpayable",501 "type": "function"502 },503 {504 "inputs": [505 { "internalType": "string", "name": "key", "type": "string" },506 { "internalType": "bool", "name": "isMutable", "type": "bool" },507 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },508 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }509 ],510 "name": "setTokenPropertyPermission",511 "outputs": [],512 "stateMutability": "nonpayable",513 "type": "function"514 },515 {516 "inputs": [517 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }518 ],519 "name": "supportsInterface",520 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],521 "stateMutability": "view",522 "type": "function"523 },524 {525 "inputs": [],526 "name": "symbol",527 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],528 "stateMutability": "view",529 "type": "function"530 },531 {532 "inputs": [533 { "internalType": "uint256", "name": "index", "type": "uint256" }534 ],535 "name": "tokenByIndex",536 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],537 "stateMutability": "view",538 "type": "function"539 },540 {541 "inputs": [542 { "internalType": "address", "name": "owner", "type": "address" },543 { "internalType": "uint256", "name": "index", "type": "uint256" }544 ],545 "name": "tokenOfOwnerByIndex",546 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],547 "stateMutability": "view",548 "type": "function"549 },550 {551 "inputs": [552 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }553 ],554 "name": "tokenURI",555 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],556 "stateMutability": "view",557 "type": "function"558 },559 {560 "inputs": [],561 "name": "totalSupply",562 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],563 "stateMutability": "view",564 "type": "function"565 },566 {567 "inputs": [568 { "internalType": "address", "name": "to", "type": "address" },569 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }570 ],571 "name": "transfer",572 "outputs": [],573 "stateMutability": "nonpayable",574 "type": "function"575 },576 {577 "inputs": [578 { "internalType": "address", "name": "from", "type": "address" },579 { "internalType": "address", "name": "to", "type": "address" },580 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }581 ],582 "name": "transferFrom",583 "outputs": [],584 "stateMutability": "nonpayable",585 "type": "function"586 },587 {588 "inputs": [],589 "name": "uniqueCollectionType",590 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],591 "stateMutability": "view",592 "type": "function"593 }594]tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -91,27 +91,9 @@
},
{
"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": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "addToCollectionAllowListSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -273,15 +255,6 @@
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "isOwnerOrAdmin",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "isOwnerOrAdminSubstrate",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
@@ -385,15 +358,6 @@
"type": "function"
},
{
- "inputs": [
- { "internalType": "uint256", "name": "admin", "type": "uint256" }
- ],
- "name": "removeCollectionAdminSubstrate",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
"inputs": [],
"name": "removeCollectionSponsor",
"outputs": [],
@@ -405,15 +369,6 @@
{ "internalType": "address", "name": "user", "type": "address" }
],
"name": "removeFromCollectionAllowList",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "user", "type": "uint256" }
- ],
- "name": "removeFromCollectionAllowListSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -527,27 +482,9 @@
},
{
"inputs": [
- { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
- ],
- "name": "setCollectionSponsorSubstrate",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
{ "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "setOwner",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
- ],
- "name": "setOwnerSubstrate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"