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
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -51,147 +51,6 @@
 	event MintingFinished();
 }
 
-// Selector: 2da6e59e
-contract Collection is Dummy, ERC165 {
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		public
-	{
-		require(false, stub_error);
-		key;
-		value;
-		dummy = 0;
-	}
-
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) public {
-		require(false, stub_error);
-		key;
-		dummy = 0;
-	}
-
-	// Throws error if key not found
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
-		public
-		view
-		returns (bytes memory)
-	{
-		require(false, stub_error);
-		key;
-		dummy;
-		return hex"";
-	}
-
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) public {
-		require(false, stub_error);
-		sponsor;
-		dummy = 0;
-	}
-
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() public {
-		require(false, stub_error);
-		dummy = 0;
-	}
-
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) public {
-		require(false, stub_error);
-		limit;
-		value;
-		dummy = 0;
-	}
-
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) public {
-		require(false, stub_error);
-		limit;
-		value;
-		dummy = 0;
-	}
-
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() public view returns (address) {
-		require(false, stub_error);
-		dummy;
-		return 0x0000000000000000000000000000000000000000;
-	}
-
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) public view {
-		require(false, stub_error);
-		newAdmin;
-		dummy;
-	}
-
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 newAdmin) public view {
-		require(false, stub_error);
-		newAdmin;
-		dummy;
-	}
-
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) public view {
-		require(false, stub_error);
-		newAdmin;
-		dummy;
-	}
-
-	// Selector: removeAdmin(address) 1785f53c
-	function removeAdmin(address admin) public view {
-		require(false, stub_error);
-		admin;
-		dummy;
-	}
-
-	// Selector: setNesting(bool) e8fc50dd
-	function setNesting(bool enable) public {
-		require(false, stub_error);
-		enable;
-		dummy = 0;
-	}
-
-	// Selector: setNesting(bool,address[]) 7df12a9a
-	function setNesting(bool enable, address[] memory collections) public {
-		require(false, stub_error);
-		enable;
-		collections;
-		dummy = 0;
-	}
-
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) public {
-		require(false, stub_error);
-		mode;
-		dummy = 0;
-	}
-
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) public view {
-		require(false, stub_error);
-		user;
-		dummy;
-	}
-
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) public view {
-		require(false, stub_error);
-		user;
-		dummy;
-	}
-
-	// Selector: setMintMode(bool) 5dea9bd5
-	function setMintMode(bool mode) public {
-		require(false, stub_error);
-		mode;
-		dummy = 0;
-	}
-}
-
 // Selector: 41369377
 contract TokenProperties is Dummy, ERC165 {
 	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
@@ -471,6 +330,147 @@
 	}
 }
 
+// Selector: c0de6be0
+contract Collection is Dummy, ERC165 {
+	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	function setCollectionProperty(string memory key, bytes memory value)
+		public
+	{
+		require(false, stub_error);
+		key;
+		value;
+		dummy = 0;
+	}
+
+	// Selector: deleteCollectionProperty(string) 7b7debce
+	function deleteCollectionProperty(string memory key) public {
+		require(false, stub_error);
+		key;
+		dummy = 0;
+	}
+
+	// Throws error if key not found
+	//
+	// Selector: collectionProperty(string) cf24fd6d
+	function collectionProperty(string memory key)
+		public
+		view
+		returns (bytes memory)
+	{
+		require(false, stub_error);
+		key;
+		dummy;
+		return hex"";
+	}
+
+	// Selector: setCollectionSponsor(address) 7623402e
+	function setCollectionSponsor(address sponsor) public {
+		require(false, stub_error);
+		sponsor;
+		dummy = 0;
+	}
+
+	// Selector: confirmCollectionSponsorship() 3c50e97a
+	function confirmCollectionSponsorship() public {
+		require(false, stub_error);
+		dummy = 0;
+	}
+
+	// Selector: setCollectionLimit(string,uint32) 6a3841db
+	function setCollectionLimit(string memory limit, uint32 value) public {
+		require(false, stub_error);
+		limit;
+		value;
+		dummy = 0;
+	}
+
+	// Selector: setCollectionLimit(string,bool) 993b7fba
+	function setCollectionLimit(string memory limit, bool value) public {
+		require(false, stub_error);
+		limit;
+		value;
+		dummy = 0;
+	}
+
+	// Selector: contractAddress() f6b4dfb4
+	function contractAddress() public view returns (address) {
+		require(false, stub_error);
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
+	}
+
+	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
+	function addCollectionAdminSubstrate(uint256 newAdmin) public view {
+		require(false, stub_error);
+		newAdmin;
+		dummy;
+	}
+
+	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+	function removeCollectionAdminSubstrate(uint256 newAdmin) public view {
+		require(false, stub_error);
+		newAdmin;
+		dummy;
+	}
+
+	// Selector: addCollectionAdmin(address) 92e462c7
+	function addCollectionAdmin(address newAdmin) public view {
+		require(false, stub_error);
+		newAdmin;
+		dummy;
+	}
+
+	// Selector: removeCollectionAdmin(address) fafd7b42
+	function removeCollectionAdmin(address admin) public view {
+		require(false, stub_error);
+		admin;
+		dummy;
+	}
+
+	// Selector: setNesting(bool) e8fc50dd
+	function setNesting(bool enable) public {
+		require(false, stub_error);
+		enable;
+		dummy = 0;
+	}
+
+	// Selector: setNesting(bool,address[]) 7df12a9a
+	function setNesting(bool enable, address[] memory collections) public {
+		require(false, stub_error);
+		enable;
+		collections;
+		dummy = 0;
+	}
+
+	// Selector: setCollectionAccess(uint8) 41835d4c
+	function setCollectionAccess(uint8 mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+
+	// Selector: addToCollectionAllowList(address) 67844fe6
+	function addToCollectionAllowList(address user) public view {
+		require(false, stub_error);
+		user;
+		dummy;
+	}
+
+	// Selector: removeFromCollectionAllowList(address) 85c51acb
+	function removeFromCollectionAllowList(address user) public view {
+		require(false, stub_error);
+		user;
+		dummy;
+	}
+
+	// Selector: setMintMode(bool) 5dea9bd5
+	function setMintMode(bool mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+}
+
 // Selector: d74d154f
 contract ERC721UniqueExtensions is Dummy, ERC165 {
 	// Selector: transfer(address,uint256) a9059cbb
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
221 expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');221 expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
222 });222 });
223223
224 //TODO: CORE-302 add eth methods
225 itWeb3('Sponsoring collection from evm address via access list', async ({api, web3}) => {224 itWeb3('Sponsoring collection from evm address via access list', async ({api, web3}) => {
226 const owner = await createEthAccountWithBalance(api, web3);225 const owner = await createEthAccountWithBalance(api, web3);
227 const collectionHelpers = evmCollectionHelpers(web3, owner);226 const collectionHelpers = evmCollectionHelpers(web3, owner);
228 let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();227 let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
229 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);228 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
230 const sponsor = await createEthAccountWithBalance(api, web3);229 const sponsor = await createEthAccountWithBalance(api, web3);
231 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);230 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
232 result = await collectionEvm.methods.ethSetSponsor(sponsor).send({from: owner});231 result = await collectionEvm.methods.setCollectionSponsor(sponsor).send({from: owner});
233 let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;232 let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
234 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;233 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;
235 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));234 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
236 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');235 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');
237236
238 await collectionEvm.methods.ethConfirmSponsorship().send({from: sponsor});237 await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor});
239 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;238 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
240 expect(collectionSub.sponsorship.isConfirmed).to.be.true;239 expect(collectionSub.sponsorship.isConfirmed).to.be.true;
241 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));240 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
248 expect(oldPermissions.mintMode).to.be.false;247 expect(oldPermissions.mintMode).to.be.false;
249 expect(oldPermissions.access).to.be.equal('Normal');248 expect(oldPermissions.access).to.be.equal('Normal');
250249
251 await collectionEvm.methods.setAccess('AllowList').send({from: owner});250 await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
252 await collectionEvm.methods.addToAllowList(user).send({from: owner});251 await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
253 await collectionEvm.methods.setMintMode(true).send({from: owner});252 await collectionEvm.methods.setMintMode(true).send({from: owner});
254253
255 const newPermissions = (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();254 const newPermissions = (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman();
256 expect(newPermissions.mintMode).to.be.true;255 expect(newPermissions.mintMode).to.be.true;
257 expect(newPermissions.access).to.be.equal('AllowList');256 expect(newPermissions.access).to.be.equal('AllowList');
258257
259 // const [alicesBalanceBefore] = await getBalance(api, [alicesPublicKey]);258 const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
259 const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);
260260
261 {261 {
262 const nextTokenId = await collectionEvm.methods.nextTokenId().call();262 const nextTokenId = await collectionEvm.methods.nextTokenId().call();
265 user,265 user,
266 nextTokenId,266 nextTokenId,
267 'Test URI',267 'Test URI',
268 ).call({from: user});268 ).send({from: user});
269 console.log(result);
270 const events = normalizeEvents(result.events);269 const events = normalizeEvents(result.events);
271270
272 expect(events).to.be.deep.equal([271 expect(events).to.be.deep.equal([
273 {272 {
274 collectionIdAddress,273 address: collectionIdAddress,
275 event: 'Transfer',274 event: 'Transfer',
276 args: {275 args: {
277 from: '0x0000000000000000000000000000000000000000',276 from: '0x0000000000000000000000000000000000000000',
281 },280 },
282 ]);281 ]);
282
283 const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
284 const sponsorBalanceAfter = await ethBalanceViaSub(api, sponsor);
283285
284 expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');286 expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
287 expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
288 expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
285 }289 }
286 });290 });
287291
292 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);296 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
293 const sponsor = await createEthAccountWithBalance(api, web3);297 const sponsor = await createEthAccountWithBalance(api, web3);
294 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);298 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
295 result = await collectionEvm.methods.ethSetSponsor(sponsor).send();299 result = await collectionEvm.methods.setCollectionSponsor(sponsor).send();
296 let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;300 let collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
297 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;301 expect(collectionSub.sponsorship.isUnconfirmed).to.be.true;
298 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));302 expect(collectionSub.sponsorship.asUnconfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
299 await expect(collectionEvm.methods.ethConfirmSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');303 await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('Caller is not set as sponsor');
300 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);304 const sponsorCollection = evmCollection(web3, sponsor, collectionIdAddress);
301 await sponsorCollection.methods.ethConfirmSponsorship().send();305 await sponsorCollection.methods.confirmCollectionSponsorship().send();
302 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;306 collectionSub = (await getDetailedCollectionInfo(api, collectionId))!;
303 expect(collectionSub.sponsorship.isConfirmed).to.be.true;307 expect(collectionSub.sponsorship.isConfirmed).to.be.true;
304 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));308 expect(collectionSub.sponsorship.asConfirmed.toHuman()).to.be.eq(evmToAddress(sponsor));
305309
306 const user = createEthAccount(web3);310 const user = createEthAccount(web3);
307 await collectionEvm.methods.addAdmin(user).send();311 await collectionEvm.methods.addCollectionAdmin(user).send();
308 312
309 const ownerBalanceBefore = await ethBalanceViaSub(api, owner);313 const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
310 const sponsorBalanceBefore = await ethBalanceViaSub(api, sponsor);314 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();