git.delta.rocks / unique-network / refs/commits / 7b3faa5ce573

difftreelog

CORE-302 Remove unused ABI

Trubnikov Sergey2022-04-26parent: #73ad884.patch.diff
in: master

4 files changed

modifiedtests/src/eth/fungible.test.tsdiffbeforeafterboth
363 });363 });
364});364});
365365
366describe('Fungible metadata', () => {
367 itWeb3('Returns fungible decimals', async ({api, web3}) => {
368 const collection = await createCollectionExpectSuccess({
369 mode: {type: 'Fungible', decimalPoints: 6},
370 });
371 const caller = await createEthAccountWithBalance(api, web3);
372
373 const address = collectionIdToAddress(collection);
374 const contract = new web3.eth.Contract(fungibleAbi as any, address, {from: caller, ...GAS_ARGS});
375 const decimals = await contract.methods.decimals().call();
376
377 expect(+decimals).to.equal(6);
378 });
379});
deletedtests/src/eth/fungibleMetadataAbi.jsondiffbeforeafterboth

no changes

deletedtests/src/eth/metadata.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
540 });540 });
541});541});
542542
543describe('Common metadata', () => {
544 itWeb3('Returns collection name', async ({api, web3}) => {
545 const collection = await createCollectionExpectSuccess({
546 name: 'token name',
547 mode: {type: 'NFT'},
548 });
549 const caller = await createEthAccountWithBalance(api, web3);
550
551 const address = collectionIdToAddress(collection);
552 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
553 const name = await contract.methods.name().call();
554
555 expect(name).to.equal('token name');
556 });
557
558 itWeb3('Returns symbol name', async ({api, web3}) => {
559 const collection = await createCollectionExpectSuccess({
560 tokenPrefix: 'TOK',
561 mode: {type: 'NFT'},
562 });
563 const caller = await createEthAccountWithBalance(api, web3);
564
565 const address = collectionIdToAddress(collection);
566 const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: caller, ...GAS_ARGS});
567 const symbol = await contract.methods.symbol().call();
568
569 expect(symbol).to.equal('TOK');
570 });
571});