git.delta.rocks / unique-network / refs/commits / e82bbde54078

difftreelog

Merge pull request #417 from UniqueNetwork/bugfix/remove_view

kozyrevdev2022-07-05parents: #a7e0a81 #05906c7.patch.diff
in: master
Remove 'view' from createNonfungibleCollection interface

5 files changed

modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -48,7 +48,7 @@
 impl<T: Config + pallet_nonfungible::Config> EvmCollectionHelpers<T> {
 	#[weight(<SelfWeightOf<T>>::create_collection())]
 	fn create_nonfungible_collection(
-		&self,
+		&mut self,
 		caller: caller,
 		name: string,
 		description: string,
modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth
before · pallets/unique/src/eth/stubs/CollectionHelpers.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID)14		external15		view16		returns (bool)17	{18		require(false, stub_error);19		interfaceID;20		return true;21	}22}2324// Inline25contract CollectionHelpersEvents {26	event CollectionCreated(27		address indexed owner,28		address indexed collectionId29	);30}3132// Selector: 20947cd033contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {34	// Selector: createNonfungibleCollection(string,string,string) e34a684435	function createNonfungibleCollection(36		string memory name,37		string memory description,38		string memory tokenPrefix39	) public view returns (address) {40		require(false, stub_error);41		name;42		description;43		tokenPrefix;44		dummy;45		return 0x0000000000000000000000000000000000000000;46	}4748	// Selector: isCollectionExist(address) c3de149449	function isCollectionExist(address collectionAddress)50		public51		view52		returns (bool)53	{54		require(false, stub_error);55		collectionAddress;56		dummy;57		return false;58	}59}
modifiedtests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -27,7 +27,7 @@
 		string memory name,
 		string memory description,
 		string memory tokenPrefix
-	) external view returns (address);
+	) external returns (address);
 
 	// Selector: isCollectionExist(address) c3de1494
 	function isCollectionExist(address collectionAddress)
modifiedtests/src/eth/collectionHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/collectionHelpersAbi.json
+++ b/tests/src/eth/collectionHelpersAbi.json
@@ -26,7 +26,7 @@
     ],
     "name": "createNonfungibleCollection",
     "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
-    "stateMutability": "view",
+    "stateMutability": "nonpayable",
     "type": "function"
   },
   {