difftreelog
feat Add `collection_admins` method to eth collection.
in: master
2 files changed
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth64 expect(adminList).to.be.like([{Substrate: newAdmin.address}]);64 expect(adminList).to.be.like([{Substrate: newAdmin.address}]);65 });65 });666667 // itEth('Check adminlist', async ({helper, privateKey}) => {67 itEth('Check adminlist', async ({helper, privateKey}) => {68 // const owner = await helper.eth.createAccountWithBalance(donor);68 const owner = await helper.eth.createAccountWithBalance(donor);69 69 70 // const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');70 const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');71 // const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);71 const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);727273 // const admin1 = helper.eth.createAccount();73 const admin1 = helper.eth.createAccount();74 // const admin2 = await privateKey('admin');74 const admin2 = privateKey('admin');75 // await collectionEvm.methods.addCollectionAdmin(admin1).send();75 await collectionEvm.methods.addCollectionAdmin(admin1).send();76 // await collectionEvm.methods.addCollectionAdminCross(helper.ethCrossAccount.fromKeyringPair(admin2)).send();76 await collectionEvm.methods.addCollectionAdminSubstrate(admin2.addressRaw).send();777778 // const adminListRpc = await helper.collection.getAdmins(collectionId);78 const adminListRpc = await helper.collection.getAdmins(collectionId);79 // let adminListEth = await collectionEvm.methods.collectionAdmins().call();79 let adminListEth = await collectionEvm.methods.collectionAdmins().call();80 // adminListEth = adminListEth.map((element: IEthCrossAccountId) => {80 adminListEth = adminListEth.map((element: IEthCrossAccountId) => {81 // return helper.address.convertCrossAccountFromEthCrossAcoount(element);81 return helper.address.convertCrossAccountFromEthCrossAcoount(element);82 // });82 });83 // expect(adminListRpc).to.be.like(adminListEth);83 expect(adminListRpc).to.be.like(adminListEth);84 // });84 });858586 itEth('Verify owner or admin', async ({helper}) => {86 itEth('Verify owner or admin', async ({helper}) => {87 const owner = await helper.eth.createAccountWithBalance(donor);87 const owner = await helper.eth.createAccountWithBalance(donor);tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -40,6 +40,7 @@
AcalaAssetMetadata,
MoonbeamAssetInfo,
DemocracyStandardAccountVote,
+ IEthCrossAccountId,
} from './types';
import {RuntimeDispatchInfo} from '@polkadot/types/interfaces';