git.delta.rocks / unique-network / refs/commits / 46330dd65bb1

difftreelog

CORE-386 Fix after rebase

Trubnikov Sergey2022-06-09parent: #ebbe668.patch.diff
in: master

9 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -201,7 +201,7 @@
 		Ok(())
 	}
 
-	fn remove_admin(&self, caller: caller, admin: address) -> Result<void> {
+	fn remove_collection_admin(&self, caller: caller, admin: address) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let admin = T::CrossAccountId::from_eth(admin);
 		<Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
@@ -220,12 +220,21 @@
 	}
 
 	#[solidity(rename_selector = "setNesting")]
-	fn set_nesting(&mut self, caller: caller, enable: bool, collections: Vec<address>) -> Result<void> {
+	fn set_nesting(
+		&mut self,
+		caller: caller,
+		enable: bool,
+		collections: Vec<address>,
+	) -> Result<void> {
 		if collections.is_empty() {
 			return Err("No addresses provided".into());
 		}
 		if collections.len() >= OwnerRestrictedSet::bound() {
-			return Err(Error::Revert(format!("Out of bound: {} >= {}", collections.len(), OwnerRestrictedSet::bound())));
+			return Err(Error::Revert(format!(
+				"Out of bound: {} >= {}",
+				collections.len(),
+				OwnerRestrictedSet::bound()
+			)));
 		}
 		check_is_owner_or_admin(caller, self)?;
 		self.collection.permissions.nesting = Some(match enable {
@@ -238,7 +247,7 @@
 					})?)
 					.map_err(|e| Error::Revert(format!("{:?}", e)))?;
 				}
-				NestingRule::OwnerRestricted (bv)
+				NestingRule::OwnerRestricted(bv)
 			}
 		});
 		save(self)?;
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -148,7 +148,6 @@
 					.saturating_mul(writes),
 			))
 	}
-
 	pub fn save(self) -> DispatchResult {
 		<CollectionById<T>>::insert(self.id, self.collection);
 		Ok(())
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
before · pallets/nonfungible/src/stubs/UniqueNFT.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Anonymous struct7struct Tuple0 {8	uint256 field_0;9	string field_1;10}1112// Common stubs holder13contract Dummy {14	uint8 dummy;15	string stub_error = "this contract is implemented in native";16}1718contract ERC165 is Dummy {19	function supportsInterface(bytes4 interfaceID)20		external21		view22		returns (bool)23	{24		require(false, stub_error);25		interfaceID;26		return true;27	}28}2930// Inline31contract ERC721Events {32	event Transfer(33		address indexed from,34		address indexed to,35		uint256 indexed tokenId36	);37	event Approval(38		address indexed owner,39		address indexed approved,40		uint256 indexed tokenId41	);42	event ApprovalForAll(43		address indexed owner,44		address indexed operator,45		bool approved46	);47}4849// Inline50contract ERC721MintableEvents {51	event MintingFinished();52}5354// Selector: 2da6e59e55contract Collection is Dummy, ERC165 {56	// Selector: setCollectionProperty(string,bytes) 2f073f6657	function setCollectionProperty(string memory key, bytes memory value)58		public59	{60		require(false, stub_error);61		key;62		value;63		dummy = 0;64	}6566	// Selector: deleteCollectionProperty(string) 7b7debce67	function deleteCollectionProperty(string memory key) public {68		require(false, stub_error);69		key;70		dummy = 0;71	}7273	// Throws error if key not found74	//75	// Selector: collectionProperty(string) cf24fd6d76	function collectionProperty(string memory key)77		public78		view79		returns (bytes memory)80	{81		require(false, stub_error);82		key;83		dummy;84		return hex"";85	}8687	// Selector: setCollectionSponsor(address) 7623402e88	function setCollectionSponsor(address sponsor) public {89		require(false, stub_error);90		sponsor;91		dummy = 0;92	}9394	// Selector: confirmCollectionSponsorship() 3c50e97a95	function confirmCollectionSponsorship() public {96		require(false, stub_error);97		dummy = 0;98	}99100	// Selector: setCollectionLimit(string,uint32) 6a3841db101	function setCollectionLimit(string memory limit, uint32 value) public {102		require(false, stub_error);103		limit;104		value;105		dummy = 0;106	}107108	// Selector: setCollectionLimit(string,bool) 993b7fba109	function setCollectionLimit(string memory limit, bool value) public {110		require(false, stub_error);111		limit;112		value;113		dummy = 0;114	}115116	// Selector: contractAddress() f6b4dfb4117	function contractAddress() public view returns (address) {118		require(false, stub_error);119		dummy;120		return 0x0000000000000000000000000000000000000000;121	}122123	// Selector: addCollectionAdminSubstrate(uint256) 5730062b124	function addCollectionAdminSubstrate(uint256 newAdmin) public view {125		require(false, stub_error);126		newAdmin;127		dummy;128	}129130	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9131	function removeCollectionAdminSubstrate(uint256 newAdmin) public view {132		require(false, stub_error);133		newAdmin;134		dummy;135	}136137	// Selector: addCollectionAdmin(address) 92e462c7138	function addCollectionAdmin(address newAdmin) public view {139		require(false, stub_error);140		newAdmin;141		dummy;142	}143144	// Selector: removeAdmin(address) 1785f53c145	function removeAdmin(address admin) public view {146		require(false, stub_error);147		admin;148		dummy;149	}150151	// Selector: setNesting(bool) e8fc50dd152	function setNesting(bool enable) public {153		require(false, stub_error);154		enable;155		dummy = 0;156	}157158	// Selector: setNesting(bool,address[]) 7df12a9a159	function setNesting(bool enable, address[] memory collections) public {160		require(false, stub_error);161		enable;162		collections;163		dummy = 0;164	}165166	// Selector: setCollectionAccess(uint8) 41835d4c167	function setCollectionAccess(uint8 mode) public {168		require(false, stub_error);169		mode;170		dummy = 0;171	}172173	// Selector: addToCollectionAllowList(address) 67844fe6174	function addToCollectionAllowList(address user) public view {175		require(false, stub_error);176		user;177		dummy;178	}179180	// Selector: removeFromCollectionAllowList(address) 85c51acb181	function removeFromCollectionAllowList(address user) public view {182		require(false, stub_error);183		user;184		dummy;185	}186187	// Selector: setMintMode(bool) 5dea9bd5188	function setMintMode(bool mode) public {189		require(false, stub_error);190		mode;191		dummy = 0;192	}193}194195// Selector: 41369377196contract TokenProperties is Dummy, ERC165 {197	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa198	function setTokenPropertyPermission(199		string memory key,200		bool isMutable,201		bool collectionAdmin,202		bool tokenOwner203	) public {204		require(false, stub_error);205		key;206		isMutable;207		collectionAdmin;208		tokenOwner;209		dummy = 0;210	}211212	// Selector: setProperty(uint256,string,bytes) 1752d67b213	function setProperty(214		uint256 tokenId,215		string memory key,216		bytes memory value217	) public {218		require(false, stub_error);219		tokenId;220		key;221		value;222		dummy = 0;223	}224225	// Selector: deleteProperty(uint256,string) 066111d1226	function deleteProperty(uint256 tokenId, string memory key) public {227		require(false, stub_error);228		tokenId;229		key;230		dummy = 0;231	}232233	// Throws error if key not found234	//235	// Selector: property(uint256,string) 7228c327236	function property(uint256 tokenId, string memory key)237		public238		view239		returns (bytes memory)240	{241		require(false, stub_error);242		tokenId;243		key;244		dummy;245		return hex"";246	}247}248249// Selector: 42966c68250contract ERC721Burnable is Dummy, ERC165 {251	// Selector: burn(uint256) 42966c68252	function burn(uint256 tokenId) public {253		require(false, stub_error);254		tokenId;255		dummy = 0;256	}257}258259// Selector: 58800161260contract ERC721 is Dummy, ERC165, ERC721Events {261	// Selector: balanceOf(address) 70a08231262	function balanceOf(address owner) public view returns (uint256) {263		require(false, stub_error);264		owner;265		dummy;266		return 0;267	}268269	// Selector: ownerOf(uint256) 6352211e270	function ownerOf(uint256 tokenId) public view returns (address) {271		require(false, stub_error);272		tokenId;273		dummy;274		return 0x0000000000000000000000000000000000000000;275	}276277	// Not implemented278	//279	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672280	function safeTransferFromWithData(281		address from,282		address to,283		uint256 tokenId,284		bytes memory data285	) public {286		require(false, stub_error);287		from;288		to;289		tokenId;290		data;291		dummy = 0;292	}293294	// Not implemented295	//296	// Selector: safeTransferFrom(address,address,uint256) 42842e0e297	function safeTransferFrom(298		address from,299		address to,300		uint256 tokenId301	) public {302		require(false, stub_error);303		from;304		to;305		tokenId;306		dummy = 0;307	}308309	// Selector: transferFrom(address,address,uint256) 23b872dd310	function transferFrom(311		address from,312		address to,313		uint256 tokenId314	) public {315		require(false, stub_error);316		from;317		to;318		tokenId;319		dummy = 0;320	}321322	// Selector: approve(address,uint256) 095ea7b3323	function approve(address approved, uint256 tokenId) public {324		require(false, stub_error);325		approved;326		tokenId;327		dummy = 0;328	}329330	// Not implemented331	//332	// Selector: setApprovalForAll(address,bool) a22cb465333	function setApprovalForAll(address operator, bool approved) public {334		require(false, stub_error);335		operator;336		approved;337		dummy = 0;338	}339340	// Not implemented341	//342	// Selector: getApproved(uint256) 081812fc343	function getApproved(uint256 tokenId) public view returns (address) {344		require(false, stub_error);345		tokenId;346		dummy;347		return 0x0000000000000000000000000000000000000000;348	}349350	// Not implemented351	//352	// Selector: isApprovedForAll(address,address) e985e9c5353	function isApprovedForAll(address owner, address operator)354		public355		view356		returns (address)357	{358		require(false, stub_error);359		owner;360		operator;361		dummy;362		return 0x0000000000000000000000000000000000000000;363	}364}365366// Selector: 5b5e139f367contract ERC721Metadata is Dummy, ERC165 {368	// Selector: name() 06fdde03369	function name() public view returns (string memory) {370		require(false, stub_error);371		dummy;372		return "";373	}374375	// Selector: symbol() 95d89b41376	function symbol() public view returns (string memory) {377		require(false, stub_error);378		dummy;379		return "";380	}381382	// Returns token's const_metadata383	//384	// Selector: tokenURI(uint256) c87b56dd385	function tokenURI(uint256 tokenId) public view returns (string memory) {386		require(false, stub_error);387		tokenId;388		dummy;389		return "";390	}391}392393// Selector: 68ccfe89394contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {395	// Selector: mintingFinished() 05d2035b396	function mintingFinished() public view returns (bool) {397		require(false, stub_error);398		dummy;399		return false;400	}401402	// `token_id` should be obtained with `next_token_id` method,403	// unlike standard, you can't specify it manually404	//405	// Selector: mint(address,uint256) 40c10f19406	function mint(address to, uint256 tokenId) public returns (bool) {407		require(false, stub_error);408		to;409		tokenId;410		dummy = 0;411		return false;412	}413414	// `token_id` should be obtained with `next_token_id` method,415	// unlike standard, you can't specify it manually416	//417	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f418	function mintWithTokenURI(419		address to,420		uint256 tokenId,421		string memory tokenUri422	) public returns (bool) {423		require(false, stub_error);424		to;425		tokenId;426		tokenUri;427		dummy = 0;428		return false;429	}430431	// Not implemented432	//433	// Selector: finishMinting() 7d64bcb4434	function finishMinting() public returns (bool) {435		require(false, stub_error);436		dummy = 0;437		return false;438	}439}440441// Selector: 780e9d63442contract ERC721Enumerable is Dummy, ERC165 {443	// Selector: tokenByIndex(uint256) 4f6ccce7444	function tokenByIndex(uint256 index) public view returns (uint256) {445		require(false, stub_error);446		index;447		dummy;448		return 0;449	}450451	// Not implemented452	//453	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59454	function tokenOfOwnerByIndex(address owner, uint256 index)455		public456		view457		returns (uint256)458	{459		require(false, stub_error);460		owner;461		index;462		dummy;463		return 0;464	}465466	// Selector: totalSupply() 18160ddd467	function totalSupply() public view returns (uint256) {468		require(false, stub_error);469		dummy;470		return 0;471	}472}473474// Selector: d74d154f475contract ERC721UniqueExtensions is Dummy, ERC165 {476	// Selector: transfer(address,uint256) a9059cbb477	function transfer(address to, uint256 tokenId) public {478		require(false, stub_error);479		to;480		tokenId;481		dummy = 0;482	}483484	// Selector: burnFrom(address,uint256) 79cc6790485	function burnFrom(address from, uint256 tokenId) public {486		require(false, stub_error);487		from;488		tokenId;489		dummy = 0;490	}491492	// Selector: nextTokenId() 75794a3c493	function nextTokenId() public view returns (uint256) {494		require(false, stub_error);495		dummy;496		return 0;497	}498499	// Selector: mintBulk(address,uint256[]) 44a9945e500	function mintBulk(address to, uint256[] memory tokenIds)501		public502		returns (bool)503	{504		require(false, stub_error);505		to;506		tokenIds;507		dummy = 0;508		return false;509	}510511	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006512	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)513		public514		returns (bool)515	{516		require(false, stub_error);517		to;518		tokens;519		dummy = 0;520		return false;521	}522}523524contract UniqueNFT is525	Dummy,526	ERC165,527	ERC721,528	ERC721Metadata,529	ERC721Enumerable,530	ERC721UniqueExtensions,531	ERC721Mintable,532	ERC721Burnable,533	Collection,534	TokenProperties535{}
modifiedruntime/tests/src/tests.rsdiffbeforeafterboth
--- a/runtime/tests/src/tests.rs
+++ b/runtime/tests/src/tests.rs
@@ -1286,7 +1286,7 @@
 			account(3)
 		)));
 
-		// remove admin 3 
+		// remove admin 3
 		assert_ok!(Unique::remove_collection_admin(
 			origin1,
 			CollectionId(1),
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -42,69 +42,6 @@
 	event MintingFinished();
 }
 
-// Selector: 2da6e59e
-interface Collection is Dummy, ERC165 {
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		external;
-
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) external;
-
-	// Throws error if key not found
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
-		external
-		view
-		returns (bytes memory);
-
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) external;
-
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() external;
-
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) external;
-
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) external;
-
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() external view returns (address);
-
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) external view;
-
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 newAdmin) external view;
-
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) external view;
-
-	// Selector: removeAdmin(address) 1785f53c
-	function removeAdmin(address admin) external view;
-
-	// Selector: setNesting(bool) e8fc50dd
-	function setNesting(bool enable) external;
-
-	// Selector: setNesting(bool,address[]) 7df12a9a
-	function setNesting(bool enable, address[] memory collections) external;
-
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) external;
-
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) external view;
-
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) external view;
-
-	// Selector: setMintMode(bool) 5dea9bd5
-	function setMintMode(bool mode) external;
-}
-
 // Selector: 41369377
 interface TokenProperties is Dummy, ERC165 {
 	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
@@ -254,6 +191,69 @@
 	function totalSupply() external view returns (uint256);
 }
 
+// Selector: c0de6be0
+interface Collection is Dummy, ERC165 {
+	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	function setCollectionProperty(string memory key, bytes memory value)
+		external;
+
+	// Selector: deleteCollectionProperty(string) 7b7debce
+	function deleteCollectionProperty(string memory key) external;
+
+	// Throws error if key not found
+	//
+	// Selector: collectionProperty(string) cf24fd6d
+	function collectionProperty(string memory key)
+		external
+		view
+		returns (bytes memory);
+
+	// Selector: setCollectionSponsor(address) 7623402e
+	function setCollectionSponsor(address sponsor) external;
+
+	// Selector: confirmCollectionSponsorship() 3c50e97a
+	function confirmCollectionSponsorship() external;
+
+	// Selector: setCollectionLimit(string,uint32) 6a3841db
+	function setCollectionLimit(string memory limit, uint32 value) external;
+
+	// Selector: setCollectionLimit(string,bool) 993b7fba
+	function setCollectionLimit(string memory limit, bool value) external;
+
+	// Selector: contractAddress() f6b4dfb4
+	function contractAddress() external view returns (address);
+
+	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
+	function addCollectionAdminSubstrate(uint256 newAdmin) external view;
+
+	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+	function removeCollectionAdminSubstrate(uint256 newAdmin) external view;
+
+	// Selector: addCollectionAdmin(address) 92e462c7
+	function addCollectionAdmin(address newAdmin) external view;
+
+	// Selector: removeCollectionAdmin(address) fafd7b42
+	function removeCollectionAdmin(address admin) external view;
+
+	// Selector: setNesting(bool) e8fc50dd
+	function setNesting(bool enable) external;
+
+	// Selector: setNesting(bool,address[]) 7df12a9a
+	function setNesting(bool enable, address[] memory collections) external;
+
+	// Selector: setCollectionAccess(uint8) 41835d4c
+	function setCollectionAccess(uint8 mode) external;
+
+	// Selector: addToCollectionAllowList(address) 67844fe6
+	function addToCollectionAllowList(address user) external view;
+
+	// Selector: removeFromCollectionAllowList(address) 85c51acb
+	function removeFromCollectionAllowList(address user) external view;
+
+	// Selector: setMintMode(bool) 5dea9bd5
+	function setMintMode(bool mode) external;
+}
+
 // Selector: d74d154f
 interface ERC721UniqueExtensions is Dummy, ERC165 {
 	// Selector: transfer(address,uint256) a9059cbb
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -221,7 +221,6 @@
     expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
   });
 
-  //TODO: CORE-302 add eth methods
   itWeb3('Sponsoring collection from evm address via access list', async ({api, web3}) => {
     const owner = await createEthAccountWithBalance(api, web3);
     const collectionHelpers = evmCollectionHelpers(web3, owner);
@@ -229,13 +228,13 @@
     const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
     const sponsor = await createEthAccountWithBalance(api, web3);
     const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
-    result = await collectionEvm.methods.ethSetSponsor(sponsor).send({from: owner});
+    result = await collectionEvm.methods.setCollectionSponsor(sponsor).send({from: owner});
     let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
     expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;
     expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
     await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');
 
-    await collectionEvm.methods.ethConfirmSponsorship().send({from: sponsor});
+    await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
     collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
     expect(collectionSub.sponsorship.isConfirmed).to.be.true;
     expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
@@ -248,15 +247,16 @@
     expect(oldPermissions.mintMode).to.be.false;
     expect(oldPermissions.access).to.be.equal('Normal');
 
-    await collectionEvm.methods.setAccess('AllowList').send({from: owner});
-    await collectionEvm.methods.addToAllowList(user).send({from: owner});
+    await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+    await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
     await collectionEvm.methods.setMintMode(true).send({from: owner});
 
     const newPermissions = (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
     expect(newPermissions.mintMode).to.be.true;
     expect(newPermissions.access).to.be.equal('AllowList');
 
-    // const [alicesBalanceBefore] = await getBalance(api, [alicesPublicKey]);
+    const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
+    const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);
 
     {
       const nextTokenId = await collectionEvm.methods.nextTokenId().call();
@@ -265,13 +265,12 @@
         user,
         nextTokenId,
         'Test URI',
-      ).call({from: user});
-      console.log(result);
+      ).send({from: user});
       const events = normalizeEvents(result.events);
 
       expect(events).to.be.deep.equal([
         {
-          collectionIdAddress,
+          address: collectionIdAddress,
           event: 'Transfer',
           args: {
             from: '0x0000000000000000000000000000000000000000',
@@ -281,7 +280,12 @@
         },
       ]);
 
+      const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
+      const sponsorBalanceAfter = await ethBalanceViaSub(api, sponsor);
+
       expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+      expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+      expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
     }
   });
 
@@ -292,19 +296,19 @@
     const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
     const sponsor = await createEthAccountWithBalance(api, web3);
     const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
-    result = await collectionEvm.methods.ethSetSponsor(sponsor).send();
+    result = await collectionEvm.methods.setCollectionSponsor(sponsor).send();
     let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
     expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;
     expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
-    await expect(collectionEvm.methods.ethConfirmSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');
+    await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');
     const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);
-    await sponsorCollection.methods.ethConfirmSponsorship().send();
+    await sponsorCollection.methods.confirmCollectionSponsorship().send();
     collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
     expect(collectionSub.sponsorship.isConfirmed).to.be.true;
     expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
 
     const user = createEthAccount(web3);
-    await collectionEvm.methods.addAdmin(user).send();
+    await collectionEvm.methods.addCollectionAdmin(user).send();
     
     const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
     const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -302,7 +302,7 @@
     "inputs": [
       { "internalType": "address", "name": "admin", "type": "address" }
     ],
-    "name": "removeAdmin",
+    "name": "removeCollectionAdmin",
     "outputs": [],
     "stateMutability": "view",
     "type": "function"
modifiedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -99,7 +99,7 @@
     const collectionEvmOwned = evmCollection(web3, owner, collectionIdAddress);
     const collectionEvm = evmCollection(web3, caller, collectionIdAddress);
     const contract = await proxyWrap(api, web3, collectionEvm);
-    await collectionEvmOwned.methods.addAdmin(contract.options.address).send();
+    await collectionEvmOwned.methods.addCollectionAdmin(contract.options.address).send();
 
     {
       const nextTokenId = await contract.methods.nextTokenId().call();