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
--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -36,12 +36,12 @@
 		string memory name,
 		string memory description,
 		string memory tokenPrefix
-	) public view returns (address) {
+	) public returns (address) {
 		require(false, stub_error);
 		name;
 		description;
 		tokenPrefix;
-		dummy;
+		dummy = 0;
 		return 0x0000000000000000000000000000000000000000;
 	}
 
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
26 ],26 ],
27 "name": "createNonfungibleCollection",27 "name": "createNonfungibleCollection",
28 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],28 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
29 "stateMutability": "view",29 "stateMutability": "nonpayable",
30 "type": "function"30 "type": "function"
31 },31 },
32 {32 {