git.delta.rocks / unique-network / refs/commits / 916ae427c879

difftreelog

Merge pull request #829 from UniqueNetwork/feature/remove_and_hide_some_minting_methods_and_events

Yaroslav Bolyukin2023-01-17parents: #7db8050 #4f40188.patch.diff
in: master

24 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -291,12 +291,6 @@
 	},
 }
 
-#[derive(ToLog)]
-pub enum ERC721UniqueMintableEvents {
-	#[allow(dead_code)]
-	MintingFinished {},
-}
-
 /// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 #[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f)]
@@ -544,12 +538,8 @@
 }
 
 /// @title ERC721 minting logic.
-#[solidity_interface(name = ERC721UniqueMintable, events(ERC721UniqueMintableEvents))]
+#[solidity_interface(name = ERC721UniqueMintable)]
 impl<T: Config> NonfungibleHandle<T> {
-	fn minting_finished(&self) -> Result<bool> {
-		Ok(false)
-	}
-
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -678,11 +668,6 @@
 		)
 		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
-	}
-
-	/// @dev Not implemented
-	fn finish_minting(&mut self, _caller: caller) -> Result<bool> {
-		Err("not implementable".into())
 	}
 }
 
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -700,22 +700,9 @@
 	}
 }
 
-/// @dev inlined interface
-contract ERC721UniqueMintableEvents {
-	event MintingFinished();
-}
-
 /// @title ERC721 minting logic.
-/// @dev the ERC-165 identifier for this interface is 0x476ff149
-contract ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {
-	/// @dev EVM selector for this function is: 0x05d2035b,
-	///  or in textual repr: mintingFinished()
-	function mintingFinished() public view returns (bool) {
-		require(false, stub_error);
-		dummy;
-		return false;
-	}
-
+/// @dev the ERC-165 identifier for this interface is 0x3fd94ea6
+contract ERC721UniqueMintable is Dummy, ERC165 {
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -756,7 +743,6 @@
 		dummy = 0;
 		return 0;
 	}
-
 	// /// @notice Function to mint token with the given tokenUri.
 	// /// @dev `tokenId` should be obtained with `nextTokenId` method,
 	// ///  unlike standard, you can't specify it manually
@@ -774,14 +760,6 @@
 	// 	return false;
 	// }
 
-	/// @dev Not implemented
-	/// @dev EVM selector for this function is: 0x7d64bcb4,
-	///  or in textual repr: finishMinting()
-	function finishMinting() public returns (bool) {
-		require(false, stub_error);
-		dummy = 0;
-		return false;
-	}
 }
 
 /// @title Unique extensions for ERC721.
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -288,13 +288,6 @@
 	},
 }
 
-#[derive(ToLog)]
-pub enum ERC721UniqueMintableEvents {
-	/// @dev Not supported
-	#[allow(dead_code)]
-	MintingFinished {},
-}
-
 /// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
 #[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f)]
@@ -576,12 +569,8 @@
 }
 
 /// @title ERC721 minting logic.
-#[solidity_interface(name = ERC721UniqueMintable, events(ERC721UniqueMintableEvents))]
+#[solidity_interface(name = ERC721UniqueMintable)]
 impl<T: Config> RefungibleHandle<T> {
-	fn minting_finished(&self) -> Result<bool> {
-		Ok(false)
-	}
-
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -717,11 +706,6 @@
 		)
 		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
-	}
-
-	/// @dev Not implemented
-	fn finish_minting(&mut self, _caller: caller) -> Result<bool> {
-		Err("not implementable".into())
 	}
 }
 
modifiedpallets/refungible/src/erc_token.rsdiffbeforeafterboth
before · pallets/refungible/src/erc_token.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Refungible Pallet EVM API for token pieces18//!19//! Provides ERC-20 standart support implementation and EVM API for unique extensions for Refungible Pallet.20//! Method implementations are mostly doing parameter conversion and calling Nonfungible Pallet methods.2122use core::{23	char::{REPLACEMENT_CHARACTER, decode_utf16},24	convert::TryInto,25	ops::Deref,26};27use evm_coder::{28	abi::AbiType, ToLog, execution::*, generate_stubgen, solidity_interface, types::*, weight,29};30use pallet_common::{31	CommonWeightInfo,32	erc::{CommonEvmHandler, PrecompileResult},33	eth::collection_id_to_address,34};35use pallet_evm::{account::CrossAccountId, PrecompileHandle};36use pallet_evm_coder_substrate::{call, dispatch_to_evm, WithRecorder};37use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};38use sp_std::vec::Vec;39use up_data_structs::TokenId;4041use crate::{42	Allowance, Balance, common::CommonWeights, Config, Pallet, RefungibleHandle, SelfWeightOf,43	TotalSupply, weights::WeightInfo,44};4546/// Refungible token handle contains information about token's collection and id47///48/// RefungibleTokenHandle doesn't check token's existance upon creation49pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);5051#[solidity_interface(name = ERC1633)]52impl<T: Config> RefungibleTokenHandle<T> {53	fn parent_token(&self) -> Result<address> {54		Ok(collection_id_to_address(self.id))55	}5657	fn parent_token_id(&self) -> Result<uint256> {58		Ok(self.1.into())59	}60}6162#[derive(ToLog)]63pub enum ERC20Events {64	/// @dev This event is emitted when the amount of tokens (value) is sent65	/// from the from address to the to address. In the case of minting new66	/// tokens, the transfer is usually from the 0 address while in the case67	/// of burning tokens the transfer is to 0.68	Transfer {69		#[indexed]70		from: address,71		#[indexed]72		to: address,73		value: uint256,74	},75	/// @dev This event is emitted when the amount of tokens (value) is approved76	/// by the owner to be used by the spender.77	Approval {78		#[indexed]79		owner: address,80		#[indexed]81		spender: address,82		value: uint256,83	},84}8586/// @title Standard ERC20 token87///88/// @dev Implementation of the basic standard token.89/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md90#[solidity_interface(name = ERC20, events(ERC20Events))]91impl<T: Config> RefungibleTokenHandle<T> {92	/// @return the name of the token.93	fn name(&self) -> Result<string> {94		Ok(decode_utf16(self.name.iter().copied())95			.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))96			.collect::<string>())97	}9899	/// @return the symbol of the token.100	fn symbol(&self) -> Result<string> {101		Ok(string::from_utf8_lossy(&self.token_prefix).into())102	}103104	/// @dev Total number of tokens in existence105	fn total_supply(&self) -> Result<uint256> {106		self.consume_store_reads(1)?;107		Ok(<TotalSupply<T>>::get((self.id, self.1)).into())108	}109110	/// @dev Not supported111	fn decimals(&self) -> Result<uint8> {112		// Decimals aren't supported for refungible tokens113		Ok(0)114	}115116	/// @dev Gets the balance of the specified address.117	/// @param owner The address to query the balance of.118	/// @return An uint256 representing the amount owned by the passed address.119	fn balance_of(&self, owner: address) -> Result<uint256> {120		self.consume_store_reads(1)?;121		let owner = T::CrossAccountId::from_eth(owner);122		let balance = <Balance<T>>::get((self.id, self.1, owner));123		Ok(balance.into())124	}125126	/// @dev Transfer token for a specified address127	/// @param to The address to transfer to.128	/// @param amount The amount to be transferred.129	#[weight(<CommonWeights<T>>::transfer())]130	fn transfer(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {131		let caller = T::CrossAccountId::from_eth(caller);132		let to = T::CrossAccountId::from_eth(to);133		let amount = amount.try_into().map_err(|_| "amount overflow")?;134		let budget = self135			.recorder136			.weight_calls_budget(<StructureWeight<T>>::find_parent());137138		<Pallet<T>>::transfer(self, &caller, &to, self.1, amount, &budget)139			.map_err(dispatch_to_evm::<T>)?;140		Ok(true)141	}142143	/// @dev Transfer tokens from one address to another144	/// @param from address The address which you want to send tokens from145	/// @param to address The address which you want to transfer to146	/// @param amount uint256 the amount of tokens to be transferred147	#[weight(<CommonWeights<T>>::transfer_from())]148	fn transfer_from(149		&mut self,150		caller: caller,151		from: address,152		to: address,153		amount: uint256,154	) -> Result<bool> {155		let caller = T::CrossAccountId::from_eth(caller);156		let from = T::CrossAccountId::from_eth(from);157		let to = T::CrossAccountId::from_eth(to);158		let amount = amount.try_into().map_err(|_| "amount overflow")?;159		let budget = self160			.recorder161			.weight_calls_budget(<StructureWeight<T>>::find_parent());162163		<Pallet<T>>::transfer_from(self, &caller, &from, &to, self.1, amount, &budget)164			.map_err(dispatch_to_evm::<T>)?;165		Ok(true)166	}167168	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.169	/// Beware that changing an allowance with this method brings the risk that someone may use both the old170	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this171	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:172	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729173	/// @param spender The address which will spend the funds.174	/// @param amount The amount of tokens to be spent.175	#[weight(<SelfWeightOf<T>>::approve())]176	fn approve(&mut self, caller: caller, spender: address, amount: uint256) -> Result<bool> {177		let caller = T::CrossAccountId::from_eth(caller);178		let spender = T::CrossAccountId::from_eth(spender);179		let amount = amount.try_into().map_err(|_| "amount overflow")?;180181		<Pallet<T>>::set_allowance(self, &caller, &spender, self.1, amount)182			.map_err(dispatch_to_evm::<T>)?;183		Ok(true)184	}185186	/// @dev Function to check the amount of tokens that an owner allowed to a spender.187	/// @param owner address The address which owns the funds.188	/// @param spender address The address which will spend the funds.189	/// @return A uint256 specifying the amount of tokens still available for the spender.190	fn allowance(&self, owner: address, spender: address) -> Result<uint256> {191		self.consume_store_reads(1)?;192		let owner = T::CrossAccountId::from_eth(owner);193		let spender = T::CrossAccountId::from_eth(spender);194195		Ok(<Allowance<T>>::get((self.id, self.1, owner, spender)).into())196	}197}198199#[solidity_interface(name = ERC20UniqueExtensions)]200impl<T: Config> RefungibleTokenHandle<T>201where202	T::AccountId: From<[u8; 32]>,203{204	/// @dev Function that burns an amount of the token of a given account,205	/// deducting from the sender's allowance for said account.206	/// @param from The account whose tokens will be burnt.207	/// @param amount The amount that will be burnt.208	#[weight(<SelfWeightOf<T>>::burn_from())]209	fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {210		let caller = T::CrossAccountId::from_eth(caller);211		let from = T::CrossAccountId::from_eth(from);212		let amount = amount.try_into().map_err(|_| "amount overflow")?;213		let budget = self214			.recorder215			.weight_calls_budget(<StructureWeight<T>>::find_parent());216217		<Pallet<T>>::burn_from(self, &caller, &from, self.1, amount, &budget)218			.map_err(dispatch_to_evm::<T>)?;219		Ok(true)220	}221222	/// @dev Function that burns an amount of the token of a given account,223	/// deducting from the sender's allowance for said account.224	/// @param from The account whose tokens will be burnt.225	/// @param amount The amount that will be burnt.226	#[weight(<SelfWeightOf<T>>::burn_from())]227	fn burn_from_cross(228		&mut self,229		caller: caller,230		from: pallet_common::eth::CrossAddress,231		amount: uint256,232	) -> Result<bool> {233		let caller = T::CrossAccountId::from_eth(caller);234		let from = from.into_sub_cross_account::<T>()?;235		let amount = amount.try_into().map_err(|_| "amount overflow")?;236		let budget = self237			.recorder238			.weight_calls_budget(<StructureWeight<T>>::find_parent());239240		<Pallet<T>>::burn_from(self, &caller, &from, self.1, amount, &budget)241			.map_err(dispatch_to_evm::<T>)?;242		Ok(true)243	}244245	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.246	/// Beware that changing an allowance with this method brings the risk that someone may use both the old247	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this248	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:249	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729250	/// @param spender The crossaccount which will spend the funds.251	/// @param amount The amount of tokens to be spent.252	#[weight(<SelfWeightOf<T>>::approve())]253	fn approve_cross(254		&mut self,255		caller: caller,256		spender: pallet_common::eth::CrossAddress,257		amount: uint256,258	) -> Result<bool> {259		let caller = T::CrossAccountId::from_eth(caller);260		let spender = spender.into_sub_cross_account::<T>()?;261		let amount = amount.try_into().map_err(|_| "amount overflow")?;262263		<Pallet<T>>::set_allowance(self, &caller, &spender, self.1, amount)264			.map_err(dispatch_to_evm::<T>)?;265		Ok(true)266	}267	/// @dev Function that changes total amount of the tokens.268	///  Throws if `msg.sender` doesn't owns all of the tokens.269	/// @param amount New total amount of the tokens.270	#[weight(<SelfWeightOf<T>>::repartition_item())]271	fn repartition(&mut self, caller: caller, amount: uint256) -> Result<bool> {272		let caller = T::CrossAccountId::from_eth(caller);273		let amount = amount.try_into().map_err(|_| "amount overflow")?;274275		<Pallet<T>>::repartition(self, &caller, self.1, amount).map_err(dispatch_to_evm::<T>)?;276		Ok(true)277	}278279	/// @dev Transfer token for a specified address280	/// @param to The crossaccount to transfer to.281	/// @param amount The amount to be transferred.282	#[weight(<CommonWeights<T>>::transfer())]283	fn transfer_cross(284		&mut self,285		caller: caller,286		to: pallet_common::eth::CrossAddress,287		amount: uint256,288	) -> Result<bool> {289		let caller = T::CrossAccountId::from_eth(caller);290		let to = to.into_sub_cross_account::<T>()?;291		let amount = amount.try_into().map_err(|_| "amount overflow")?;292		let budget = self293			.recorder294			.weight_calls_budget(<StructureWeight<T>>::find_parent());295296		<Pallet<T>>::transfer(self, &caller, &to, self.1, amount, &budget)297			.map_err(dispatch_to_evm::<T>)?;298		Ok(true)299	}300301	/// @dev Transfer tokens from one address to another302	/// @param from The address which you want to send tokens from303	/// @param to The address which you want to transfer to304	/// @param amount the amount of tokens to be transferred305	#[weight(<CommonWeights<T>>::transfer_from())]306	fn transfer_from_cross(307		&mut self,308		caller: caller,309		from: pallet_common::eth::CrossAddress,310		to: pallet_common::eth::CrossAddress,311		amount: uint256,312	) -> Result<bool> {313		let caller = T::CrossAccountId::from_eth(caller);314		let from = from.into_sub_cross_account::<T>()?;315		let to = to.into_sub_cross_account::<T>()?;316		let amount = amount.try_into().map_err(|_| "amount overflow")?;317		let budget = self318			.recorder319			.weight_calls_budget(<StructureWeight<T>>::find_parent());320321		<Pallet<T>>::transfer_from(self, &caller, &from, &to, self.1, amount, &budget)322			.map_err(dispatch_to_evm::<T>)?;323		Ok(true)324	}325}326327impl<T: Config> RefungibleTokenHandle<T> {328	pub fn into_inner(self) -> RefungibleHandle<T> {329		self.0330	}331	pub fn common_mut(&mut self) -> &mut RefungibleHandle<T> {332		&mut self.0333	}334}335336impl<T: Config> WithRecorder<T> for RefungibleTokenHandle<T> {337	fn recorder(&self) -> &pallet_evm_coder_substrate::SubstrateRecorder<T> {338		self.0.recorder()339	}340	fn into_recorder(self) -> pallet_evm_coder_substrate::SubstrateRecorder<T> {341		self.0.into_recorder()342	}343}344345impl<T: Config> Deref for RefungibleTokenHandle<T> {346	type Target = RefungibleHandle<T>;347348	fn deref(&self) -> &Self::Target {349		&self.0350	}351}352353#[solidity_interface(354	name = UniqueRefungibleToken,355	is(ERC20, ERC20UniqueExtensions, ERC1633)356)]357impl<T: Config> RefungibleTokenHandle<T> where T::AccountId: From<[u8; 32]> {}358359generate_stubgen!(gen_impl, UniqueRefungibleTokenCall<()>, true);360generate_stubgen!(gen_iface, UniqueRefungibleTokenCall<()>, false);361362impl<T: Config> CommonEvmHandler for RefungibleTokenHandle<T>363where364	T::AccountId: From<[u8; 32]>,365{366	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueRefungibleToken.raw");367368	fn call(self, handle: &mut impl PrecompileHandle) -> Option<PrecompileResult> {369		call::<T, UniqueRefungibleTokenCall<T>, _, _>(handle, self)370	}371}
after · pallets/refungible/src/erc_token.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Refungible Pallet EVM API for token pieces18//!19//! Provides ERC-20 standart support implementation and EVM API for unique extensions for Refungible Pallet.20//! Method implementations are mostly doing parameter conversion and calling Nonfungible Pallet methods.2122use core::{23	char::{REPLACEMENT_CHARACTER, decode_utf16},24	convert::TryInto,25	ops::Deref,26};27use evm_coder::{28	abi::AbiType, ToLog, execution::*, generate_stubgen, solidity_interface, solidity, types::*,29	weight,30};31use pallet_common::{32	CommonWeightInfo,33	erc::{CommonEvmHandler, PrecompileResult},34	eth::collection_id_to_address,35};36use pallet_evm::{account::CrossAccountId, PrecompileHandle};37use pallet_evm_coder_substrate::{call, dispatch_to_evm, WithRecorder};38use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};39use sp_std::vec::Vec;40use up_data_structs::TokenId;4142use crate::{43	Allowance, Balance, common::CommonWeights, Config, Pallet, RefungibleHandle, SelfWeightOf,44	TotalSupply, weights::WeightInfo,45};4647/// Refungible token handle contains information about token's collection and id48///49/// RefungibleTokenHandle doesn't check token's existance upon creation50pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);5152#[solidity_interface(name = ERC1633)]53impl<T: Config> RefungibleTokenHandle<T> {54	fn parent_token(&self) -> Result<address> {55		Ok(collection_id_to_address(self.id))56	}5758	fn parent_token_id(&self) -> Result<uint256> {59		Ok(self.1.into())60	}61}6263#[derive(ToLog)]64pub enum ERC20Events {65	/// @dev This event is emitted when the amount of tokens (value) is sent66	/// from the from address to the to address. In the case of minting new67	/// tokens, the transfer is usually from the 0 address while in the case68	/// of burning tokens the transfer is to 0.69	Transfer {70		#[indexed]71		from: address,72		#[indexed]73		to: address,74		value: uint256,75	},76	/// @dev This event is emitted when the amount of tokens (value) is approved77	/// by the owner to be used by the spender.78	Approval {79		#[indexed]80		owner: address,81		#[indexed]82		spender: address,83		value: uint256,84	},85}8687/// @title Standard ERC20 token88///89/// @dev Implementation of the basic standard token.90/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md91#[solidity_interface(name = ERC20, events(ERC20Events))]92impl<T: Config> RefungibleTokenHandle<T> {93	/// @return the name of the token.94	fn name(&self) -> Result<string> {95		Ok(decode_utf16(self.name.iter().copied())96			.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))97			.collect::<string>())98	}99100	/// @return the symbol of the token.101	fn symbol(&self) -> Result<string> {102		Ok(string::from_utf8_lossy(&self.token_prefix).into())103	}104105	/// @dev Total number of tokens in existence106	fn total_supply(&self) -> Result<uint256> {107		self.consume_store_reads(1)?;108		Ok(<TotalSupply<T>>::get((self.id, self.1)).into())109	}110111	/// @dev Not supported112	fn decimals(&self) -> Result<uint8> {113		// Decimals aren't supported for refungible tokens114		Ok(0)115	}116117	/// @dev Gets the balance of the specified address.118	/// @param owner The address to query the balance of.119	/// @return An uint256 representing the amount owned by the passed address.120	fn balance_of(&self, owner: address) -> Result<uint256> {121		self.consume_store_reads(1)?;122		let owner = T::CrossAccountId::from_eth(owner);123		let balance = <Balance<T>>::get((self.id, self.1, owner));124		Ok(balance.into())125	}126127	/// @dev Transfer token for a specified address128	/// @param to The address to transfer to.129	/// @param amount The amount to be transferred.130	#[weight(<CommonWeights<T>>::transfer())]131	fn transfer(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {132		let caller = T::CrossAccountId::from_eth(caller);133		let to = T::CrossAccountId::from_eth(to);134		let amount = amount.try_into().map_err(|_| "amount overflow")?;135		let budget = self136			.recorder137			.weight_calls_budget(<StructureWeight<T>>::find_parent());138139		<Pallet<T>>::transfer(self, &caller, &to, self.1, amount, &budget)140			.map_err(dispatch_to_evm::<T>)?;141		Ok(true)142	}143144	/// @dev Transfer tokens from one address to another145	/// @param from address The address which you want to send tokens from146	/// @param to address The address which you want to transfer to147	/// @param amount uint256 the amount of tokens to be transferred148	#[weight(<CommonWeights<T>>::transfer_from())]149	fn transfer_from(150		&mut self,151		caller: caller,152		from: address,153		to: address,154		amount: uint256,155	) -> Result<bool> {156		let caller = T::CrossAccountId::from_eth(caller);157		let from = T::CrossAccountId::from_eth(from);158		let to = T::CrossAccountId::from_eth(to);159		let amount = amount.try_into().map_err(|_| "amount overflow")?;160		let budget = self161			.recorder162			.weight_calls_budget(<StructureWeight<T>>::find_parent());163164		<Pallet<T>>::transfer_from(self, &caller, &from, &to, self.1, amount, &budget)165			.map_err(dispatch_to_evm::<T>)?;166		Ok(true)167	}168169	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.170	/// Beware that changing an allowance with this method brings the risk that someone may use both the old171	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this172	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:173	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729174	/// @param spender The address which will spend the funds.175	/// @param amount The amount of tokens to be spent.176	#[weight(<SelfWeightOf<T>>::approve())]177	fn approve(&mut self, caller: caller, spender: address, amount: uint256) -> Result<bool> {178		let caller = T::CrossAccountId::from_eth(caller);179		let spender = T::CrossAccountId::from_eth(spender);180		let amount = amount.try_into().map_err(|_| "amount overflow")?;181182		<Pallet<T>>::set_allowance(self, &caller, &spender, self.1, amount)183			.map_err(dispatch_to_evm::<T>)?;184		Ok(true)185	}186187	/// @dev Function to check the amount of tokens that an owner allowed to a spender.188	/// @param owner address The address which owns the funds.189	/// @param spender address The address which will spend the funds.190	/// @return A uint256 specifying the amount of tokens still available for the spender.191	fn allowance(&self, owner: address, spender: address) -> Result<uint256> {192		self.consume_store_reads(1)?;193		let owner = T::CrossAccountId::from_eth(owner);194		let spender = T::CrossAccountId::from_eth(spender);195196		Ok(<Allowance<T>>::get((self.id, self.1, owner, spender)).into())197	}198}199200#[solidity_interface(name = ERC20UniqueExtensions)]201impl<T: Config> RefungibleTokenHandle<T>202where203	T::AccountId: From<[u8; 32]>,204{205	/// @dev Function that burns an amount of the token of a given account,206	/// deducting from the sender's allowance for said account.207	/// @param from The account whose tokens will be burnt.208	/// @param amount The amount that will be burnt.209	#[weight(<SelfWeightOf<T>>::burn_from())]210	#[solidity(hide)]211	fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {212		let caller = T::CrossAccountId::from_eth(caller);213		let from = T::CrossAccountId::from_eth(from);214		let amount = amount.try_into().map_err(|_| "amount overflow")?;215		let budget = self216			.recorder217			.weight_calls_budget(<StructureWeight<T>>::find_parent());218219		<Pallet<T>>::burn_from(self, &caller, &from, self.1, amount, &budget)220			.map_err(dispatch_to_evm::<T>)?;221		Ok(true)222	}223224	/// @dev Function that burns an amount of the token of a given account,225	/// deducting from the sender's allowance for said account.226	/// @param from The account whose tokens will be burnt.227	/// @param amount The amount that will be burnt.228	#[weight(<SelfWeightOf<T>>::burn_from())]229	fn burn_from_cross(230		&mut self,231		caller: caller,232		from: pallet_common::eth::CrossAddress,233		amount: uint256,234	) -> Result<bool> {235		let caller = T::CrossAccountId::from_eth(caller);236		let from = from.into_sub_cross_account::<T>()?;237		let amount = amount.try_into().map_err(|_| "amount overflow")?;238		let budget = self239			.recorder240			.weight_calls_budget(<StructureWeight<T>>::find_parent());241242		<Pallet<T>>::burn_from(self, &caller, &from, self.1, amount, &budget)243			.map_err(dispatch_to_evm::<T>)?;244		Ok(true)245	}246247	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.248	/// Beware that changing an allowance with this method brings the risk that someone may use both the old249	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this250	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:251	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729252	/// @param spender The crossaccount which will spend the funds.253	/// @param amount The amount of tokens to be spent.254	#[weight(<SelfWeightOf<T>>::approve())]255	fn approve_cross(256		&mut self,257		caller: caller,258		spender: pallet_common::eth::CrossAddress,259		amount: uint256,260	) -> Result<bool> {261		let caller = T::CrossAccountId::from_eth(caller);262		let spender = spender.into_sub_cross_account::<T>()?;263		let amount = amount.try_into().map_err(|_| "amount overflow")?;264265		<Pallet<T>>::set_allowance(self, &caller, &spender, self.1, amount)266			.map_err(dispatch_to_evm::<T>)?;267		Ok(true)268	}269	/// @dev Function that changes total amount of the tokens.270	///  Throws if `msg.sender` doesn't owns all of the tokens.271	/// @param amount New total amount of the tokens.272	#[weight(<SelfWeightOf<T>>::repartition_item())]273	fn repartition(&mut self, caller: caller, amount: uint256) -> Result<bool> {274		let caller = T::CrossAccountId::from_eth(caller);275		let amount = amount.try_into().map_err(|_| "amount overflow")?;276277		<Pallet<T>>::repartition(self, &caller, self.1, amount).map_err(dispatch_to_evm::<T>)?;278		Ok(true)279	}280281	/// @dev Transfer token for a specified address282	/// @param to The crossaccount to transfer to.283	/// @param amount The amount to be transferred.284	#[weight(<CommonWeights<T>>::transfer())]285	fn transfer_cross(286		&mut self,287		caller: caller,288		to: pallet_common::eth::CrossAddress,289		amount: uint256,290	) -> Result<bool> {291		let caller = T::CrossAccountId::from_eth(caller);292		let to = to.into_sub_cross_account::<T>()?;293		let amount = amount.try_into().map_err(|_| "amount overflow")?;294		let budget = self295			.recorder296			.weight_calls_budget(<StructureWeight<T>>::find_parent());297298		<Pallet<T>>::transfer(self, &caller, &to, self.1, amount, &budget)299			.map_err(dispatch_to_evm::<T>)?;300		Ok(true)301	}302303	/// @dev Transfer tokens from one address to another304	/// @param from The address which you want to send tokens from305	/// @param to The address which you want to transfer to306	/// @param amount the amount of tokens to be transferred307	#[weight(<CommonWeights<T>>::transfer_from())]308	fn transfer_from_cross(309		&mut self,310		caller: caller,311		from: pallet_common::eth::CrossAddress,312		to: pallet_common::eth::CrossAddress,313		amount: uint256,314	) -> Result<bool> {315		let caller = T::CrossAccountId::from_eth(caller);316		let from = from.into_sub_cross_account::<T>()?;317		let to = to.into_sub_cross_account::<T>()?;318		let amount = amount.try_into().map_err(|_| "amount overflow")?;319		let budget = self320			.recorder321			.weight_calls_budget(<StructureWeight<T>>::find_parent());322323		<Pallet<T>>::transfer_from(self, &caller, &from, &to, self.1, amount, &budget)324			.map_err(dispatch_to_evm::<T>)?;325		Ok(true)326	}327}328329impl<T: Config> RefungibleTokenHandle<T> {330	pub fn into_inner(self) -> RefungibleHandle<T> {331		self.0332	}333	pub fn common_mut(&mut self) -> &mut RefungibleHandle<T> {334		&mut self.0335	}336}337338impl<T: Config> WithRecorder<T> for RefungibleTokenHandle<T> {339	fn recorder(&self) -> &pallet_evm_coder_substrate::SubstrateRecorder<T> {340		self.0.recorder()341	}342	fn into_recorder(self) -> pallet_evm_coder_substrate::SubstrateRecorder<T> {343		self.0.into_recorder()344	}345}346347impl<T: Config> Deref for RefungibleTokenHandle<T> {348	type Target = RefungibleHandle<T>;349350	fn deref(&self) -> &Self::Target {351		&self.0352	}353}354355#[solidity_interface(356	name = UniqueRefungibleToken,357	is(ERC20, ERC20UniqueExtensions, ERC1633)358)]359impl<T: Config> RefungibleTokenHandle<T> where T::AccountId: From<[u8; 32]> {}360361generate_stubgen!(gen_impl, UniqueRefungibleTokenCall<()>, true);362generate_stubgen!(gen_iface, UniqueRefungibleTokenCall<()>, false);363364impl<T: Config> CommonEvmHandler for RefungibleTokenHandle<T>365where366	T::AccountId: From<[u8; 32]>,367{368	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueRefungibleToken.raw");369370	fn call(self, handle: &mut impl PrecompileHandle) -> Option<PrecompileResult> {371		call::<T, UniqueRefungibleTokenCall<T>, _, _>(handle, self)372	}373}
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -700,22 +700,9 @@
 	}
 }
 
-/// @dev inlined interface
-contract ERC721UniqueMintableEvents {
-	event MintingFinished();
-}
-
 /// @title ERC721 minting logic.
-/// @dev the ERC-165 identifier for this interface is 0x476ff149
-contract ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {
-	/// @dev EVM selector for this function is: 0x05d2035b,
-	///  or in textual repr: mintingFinished()
-	function mintingFinished() public view returns (bool) {
-		require(false, stub_error);
-		dummy;
-		return false;
-	}
-
+/// @dev the ERC-165 identifier for this interface is 0x3fd94ea6
+contract ERC721UniqueMintable is Dummy, ERC165 {
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -756,7 +743,6 @@
 		dummy = 0;
 		return 0;
 	}
-
 	// /// @notice Function to mint token with the given tokenUri.
 	// /// @dev `tokenId` should be obtained with `nextTokenId` method,
 	// ///  unlike standard, you can't specify it manually
@@ -774,14 +760,6 @@
 	// 	return false;
 	// }
 
-	/// @dev Not implemented
-	/// @dev EVM selector for this function is: 0x7d64bcb4,
-	///  or in textual repr: finishMinting()
-	function finishMinting() public returns (bool) {
-		require(false, stub_error);
-		dummy = 0;
-		return false;
-	}
 }
 
 /// @title Unique extensions for ERC721.
modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
@@ -38,19 +38,19 @@
 
 /// @dev the ERC-165 identifier for this interface is 0xe17a7d2b
 contract ERC20UniqueExtensions is Dummy, ERC165 {
-	/// @dev Function that burns an amount of the token of a given account,
-	/// deducting from the sender's allowance for said account.
-	/// @param from The account whose tokens will be burnt.
-	/// @param amount The amount that will be burnt.
-	/// @dev EVM selector for this function is: 0x79cc6790,
-	///  or in textual repr: burnFrom(address,uint256)
-	function burnFrom(address from, uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		from;
-		amount;
-		dummy = 0;
-		return false;
-	}
+	// /// @dev Function that burns an amount of the token of a given account,
+	// /// deducting from the sender's allowance for said account.
+	// /// @param from The account whose tokens will be burnt.
+	// /// @param amount The amount that will be burnt.
+	// /// @dev EVM selector for this function is: 0x79cc6790,
+	// ///  or in textual repr: burnFrom(address,uint256)
+	// function burnFrom(address from, uint256 amount) public returns (bool) {
+	// 	require(false, stub_error);
+	// 	from;
+	// 	amount;
+	// 	dummy = 0;
+	// 	return false;
+	// }
 
 	/// @dev Function that burns an amount of the token of a given account,
 	/// deducting from the sender's allowance for said account.
modifiedruntime/common/ethereum/sponsoring/refungible.rsdiffbeforeafterboth
--- a/runtime/common/ethereum/sponsoring/refungible.rs
+++ b/runtime/common/ethereum/sponsoring/refungible.rs
@@ -265,11 +265,9 @@
 
 		match call {
 			// Readonly
-			ERC165Call(_, _) | MintingFinished => None,
+			ERC165Call(_, _) => None,
 
-			// Not sponsored
-			FinishMinting => None,
-
+			// Sponsored
 			Mint { .. }
 			| MintCheckId { .. }
 			| MintWithTokenUri { .. }
modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/burnItemEvent.test.ts
+++ b/tests/src/check-event/burnItemEvent.test.ts
@@ -32,6 +32,7 @@
     const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
     const token = await collection.mintToken(alice, {Substrate: alice.address});
     await token.burn(alice);
+    await helper.wait.newBlocks(1);
 
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createCollectionEvent.test.ts
+++ b/tests/src/check-event/createCollectionEvent.test.ts
@@ -29,6 +29,7 @@
   });
   itSub('Check event from createCollection(): ', async ({helper}) => {
     await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createItemEvent.test.ts
+++ b/tests/src/check-event/createItemEvent.test.ts
@@ -30,6 +30,7 @@
   itSub('Check event from createItem(): ', async ({helper}) => {
     const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
     await collection.mintToken(alice, {Substrate: alice.address});
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createMultipleItemsEvent.test.ts
+++ b/tests/src/check-event/createMultipleItemsEvent.test.ts
@@ -35,6 +35,7 @@
       {owner: {Substrate: alice.address}},
     ]);
 
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/destroyCollectionEvent.test.ts
+++ b/tests/src/check-event/destroyCollectionEvent.test.ts
@@ -31,6 +31,7 @@
   itSub('Check event from destroyCollection(): ', async ({helper}) => {
     const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
     await collection.burn(alice);
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferEvent.test.ts
+++ b/tests/src/check-event/transferEvent.test.ts
@@ -34,6 +34,7 @@
     const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
     const token = await collection.mintToken(alice, {Substrate: alice.address});
     await token.transfer(alice, {Substrate: bob.address});
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferFromEvent.test.ts
+++ b/tests/src/check-event/transferFromEvent.test.ts
@@ -33,6 +33,7 @@
     const collection = await helper.nft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'test'});
     const token = await collection.mintToken(alice, {Substrate: alice.address});
     await token.transferFrom(alice, {Substrate: alice.address}, {Substrate: bob.address});
+    await helper.wait.newBlocks(1);
     const event = helper.chainLog[helper.chainLog.length - 1].events as IEvent[];
     const eventStrings = event.map(e => `${e.section}.${e.method}`);
 
modifiedtests/src/eth/abi/nonFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -51,12 +51,6 @@
   },
   {
     "anonymous": false,
-    "inputs": [],
-    "name": "MintingFinished",
-    "type": "event"
-  },
-  {
-    "anonymous": false,
     "inputs": [
       {
         "indexed": true,
@@ -420,13 +414,6 @@
     "name": "description",
     "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
     "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "finishMinting",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "nonpayable",
     "type": "function"
   },
   {
@@ -513,13 +500,6 @@
     "name": "mintWithTokenURI",
     "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
     "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "mintingFinished",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "view",
     "type": "function"
   },
   {
modifiedtests/src/eth/abi/reFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -51,12 +51,6 @@
   },
   {
     "anonymous": false,
-    "inputs": [],
-    "name": "MintingFinished",
-    "type": "event"
-  },
-  {
-    "anonymous": false,
     "inputs": [
       {
         "indexed": true,
@@ -402,13 +396,6 @@
     "name": "description",
     "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
     "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "finishMinting",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "nonpayable",
     "type": "function"
   },
   {
@@ -495,13 +482,6 @@
     "name": "mintWithTokenURI",
     "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
     "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "mintingFinished",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "view",
     "type": "function"
   },
   {
modifiedtests/src/eth/abi/reFungibleToken.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/reFungibleToken.json
+++ b/tests/src/eth/abi/reFungibleToken.json
@@ -98,16 +98,6 @@
   },
   {
     "inputs": [
-      { "internalType": "address", "name": "from", "type": "address" },
-      { "internalType": "uint256", "name": "amount", "type": "uint256" }
-    ],
-    "name": "burnFrom",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       {
         "components": [
           { "internalType": "address", "name": "eth", "type": "address" },
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -483,18 +483,9 @@
 	function burn(uint256 tokenId) external;
 }
 
-/// @dev inlined interface
-interface ERC721UniqueMintableEvents {
-	event MintingFinished();
-}
-
 /// @title ERC721 minting logic.
-/// @dev the ERC-165 identifier for this interface is 0x476ff149
-interface ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {
-	/// @dev EVM selector for this function is: 0x05d2035b,
-	///  or in textual repr: mintingFinished()
-	function mintingFinished() external view returns (bool);
-
+/// @dev the ERC-165 identifier for this interface is 0x3fd94ea6
+interface ERC721UniqueMintable is Dummy, ERC165 {
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -518,7 +509,6 @@
 	/// @dev EVM selector for this function is: 0x45c17782,
 	///  or in textual repr: mintWithTokenURI(address,string)
 	function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
-
 	// /// @notice Function to mint token with the given tokenUri.
 	// /// @dev `tokenId` should be obtained with `nextTokenId` method,
 	// ///  unlike standard, you can't specify it manually
@@ -529,10 +519,6 @@
 	// ///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	// function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
 
-	/// @dev Not implemented
-	/// @dev EVM selector for this function is: 0x7d64bcb4,
-	///  or in textual repr: finishMinting()
-	function finishMinting() external returns (bool);
 }
 
 /// @title Unique extensions for ERC721.
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -483,18 +483,9 @@
 	function burn(uint256 tokenId) external;
 }
 
-/// @dev inlined interface
-interface ERC721UniqueMintableEvents {
-	event MintingFinished();
-}
-
 /// @title ERC721 minting logic.
-/// @dev the ERC-165 identifier for this interface is 0x476ff149
-interface ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {
-	/// @dev EVM selector for this function is: 0x05d2035b,
-	///  or in textual repr: mintingFinished()
-	function mintingFinished() external view returns (bool);
-
+/// @dev the ERC-165 identifier for this interface is 0x3fd94ea6
+interface ERC721UniqueMintable is Dummy, ERC165 {
 	/// @notice Function to mint a token.
 	/// @param to The new owner
 	/// @return uint256 The id of the newly minted token
@@ -518,7 +509,6 @@
 	/// @dev EVM selector for this function is: 0x45c17782,
 	///  or in textual repr: mintWithTokenURI(address,string)
 	function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
-
 	// /// @notice Function to mint token with the given tokenUri.
 	// /// @dev `tokenId` should be obtained with `nextTokenId` method,
 	// ///  unlike standard, you can't specify it manually
@@ -529,10 +519,6 @@
 	// ///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	// function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
 
-	/// @dev Not implemented
-	/// @dev EVM selector for this function is: 0x7d64bcb4,
-	///  or in textual repr: finishMinting()
-	function finishMinting() external returns (bool);
 }
 
 /// @title Unique extensions for ERC721.
modifiedtests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungibleToken.sol
+++ b/tests/src/eth/api/UniqueRefungibleToken.sol
@@ -25,13 +25,13 @@
 
 /// @dev the ERC-165 identifier for this interface is 0xe17a7d2b
 interface ERC20UniqueExtensions is Dummy, ERC165 {
-	/// @dev Function that burns an amount of the token of a given account,
-	/// deducting from the sender's allowance for said account.
-	/// @param from The account whose tokens will be burnt.
-	/// @param amount The amount that will be burnt.
-	/// @dev EVM selector for this function is: 0x79cc6790,
-	///  or in textual repr: burnFrom(address,uint256)
-	function burnFrom(address from, uint256 amount) external returns (bool);
+	// /// @dev Function that burns an amount of the token of a given account,
+	// /// deducting from the sender's allowance for said account.
+	// /// @param from The account whose tokens will be burnt.
+	// /// @param amount The amount that will be burnt.
+	// /// @dev EVM selector for this function is: 0x79cc6790,
+	// ///  or in textual repr: burnFrom(address,uint256)
+	// function burnFrom(address from, uint256 amount) external returns (bool);
 
 	/// @dev Function that burns an amount of the token of a given account,
 	/// deducting from the sender's allowance for said account.
modifiedtests/src/eth/base.test.tsdiffbeforeafterboth
--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -108,10 +108,6 @@
     await checkInterface(helper, '0x5b5e139f', false, true);
   });
 
-  itEth('ERC721UniqueMintable - 0x476ff149 - support', async ({helper}) => {
-    await checkInterface(helper, '0x476ff149', true, true);
-  });
-
   itEth('ERC721Enumerable - 0x780e9d63 - support', async ({helper}) => {
     await checkInterface(helper, '0x780e9d63', true, true);
   });