git.delta.rocks / unique-network / refs/commits / 686c4b3b1147

difftreelog

test(nesting) remove variable and const data mentions

Fahrrader2022-06-14parent: #727b395.patch.diff
in: master

1 file changed

modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth
322 await expect(executeTransaction(api, alice, api.tx.unique.createItem(322 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
323 collectionRFT,323 collectionRFT,
324 targetAddress,324 targetAddress,
325 {ReFungible: {const_data: [], pieces: 100}},325 {ReFungible: {pieces: 100}},
326 ))).to.not.be.rejected;326 ))).to.not.be.rejected;
327327
328 // Nest a new token328 // Nest a new token
345 await expect(executeTransaction(api, alice, api.tx.unique.createItem(345 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
346 collectionRFT,346 collectionRFT,
347 targetAddress,347 targetAddress,
348 {ReFungible: {const_data: [], pieces: 100}},348 {ReFungible: {pieces: 100}},
349 ))).to.not.be.rejected;349 ))).to.not.be.rejected;
350350
351 // Nest a new token351 // Nest a new token
388 await expect(executeTransaction(api, alice, api.tx.unique.createItem(388 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
389 collection,389 collection,
390 {Ethereum: tokenIdToAddress(collection, prevToken)},390 {Ethereum: tokenIdToAddress(collection, prevToken)},
391 {nft: {const_data: [], variable_data: []}} as any,391 {nft: {}} as any,
392 )), 'while creating nested token').to.be.rejectedWith(/^structure\.DepthLimit$/);392 )), 'while creating nested token').to.be.rejectedWith(/^structure\.DepthLimit$/);
393393
394 expect(await getTopmostTokenOwner(api, collection, prevToken)).to.be.deep.equal({Substrate: alice.address});394 expect(await getTopmostTokenOwner(api, collection, prevToken)).to.be.deep.equal({Substrate: alice.address});
408 await expect(executeTransaction(api, bob, api.tx.unique.createItem(408 await expect(executeTransaction(api, bob, api.tx.unique.createItem(
409 collection,409 collection,
410 {Ethereum: tokenIdToAddress(collection, targetToken)},410 {Ethereum: tokenIdToAddress(collection, targetToken)},
411 {nft: {const_data: [], variable_data: []}} as any,411 {nft: {}} as any,
412 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);412 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
413413
414 // Try to create and nest a token in the wrong collection414 // Try to create and nest a token in the wrong collection
435 await expect(executeTransaction(api, bob, api.tx.unique.createItem(435 await expect(executeTransaction(api, bob, api.tx.unique.createItem(
436 collection,436 collection,
437 {Ethereum: tokenIdToAddress(collection, targetToken)},437 {Ethereum: tokenIdToAddress(collection, targetToken)},
438 {nft: {const_data: [], variable_data: []}} as any,438 {nft: {}} as any,
439 )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/); // todo is this right?439 )), 'while creating nested token').to.be.rejectedWith(/common\.AddressNotInAllowlist/);
440440
441 // Try to create and nest a token in the wrong collection441 // Try to create and nest a token in the wrong collection
442 const newToken = await createItemExpectSuccess(bob, collection, 'NFT');442 const newToken = await createItemExpectSuccess(bob, collection, 'NFT');
515 await expect(executeTransaction(api, alice, api.tx.unique.createItem(515 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
516 collection,516 collection,
517 {Ethereum: tokenIdToAddress(collection, targetToken)},517 {Ethereum: tokenIdToAddress(collection, targetToken)},
518 {nft: {const_data: [], variable_data: []}} as any,518 {nft: {}} as any,
519 )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);519 )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
520520
521 // Create a token to be nested521 // Create a token to be nested
543 await expect(executeTransaction(api, alice, api.tx.unique.createItem(543 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
544 collection,544 collection,
545 {Ethereum: tokenIdToAddress(collection, targetToken)},545 {Ethereum: tokenIdToAddress(collection, targetToken)},
546 {nft: {const_data: [], variable_data: []}} as any,546 {nft: {}} as any,
547 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);547 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
548548
549 // Try to create and nest a token in the wrong collection549 // Try to create and nest a token in the wrong collection
569 await expect(executeTransaction(api, alice, api.tx.unique.createItem(569 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
570 collection,570 collection,
571 {Ethereum: tokenIdToAddress(collection, targetToken)},571 {Ethereum: tokenIdToAddress(collection, targetToken)},
572 {nft: {const_data: [], variable_data: []}} as any,572 {nft: {}} as any,
573 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);573 )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
574574
575 // Try to create and nest a token in the wrong collection575 // Try to create and nest a token in the wrong collection
591 await expect(executeTransaction(api, alice, api.tx.unique.createItem(591 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
592 collection,592 collection,
593 {Ethereum: tokenIdToAddress(collection, targetToken)},593 {Ethereum: tokenIdToAddress(collection, targetToken)},
594 {nft: {const_data: [], variable_data: []}} as any,594 {nft: {}} as any,
595 )), 'while creating nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);595 )), 'while creating nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);
596596
597 // Try to create and nest a token in the wrong collection597 // Try to create and nest a token in the wrong collection
725 await expect(executeTransaction(api, alice, api.tx.unique.createItem(725 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
726 collectionRFT,726 collectionRFT,
727 targetAddress,727 targetAddress,
728 {ReFungible: {const_data: [], pieces: 100}},728 {ReFungible: {pieces: 100}},
729 )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);729 )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
730730
731 // Create a token to be nested731 // Create a token to be nested
761 await expect(executeTransaction(api, alice, api.tx.unique.createItem(761 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
762 collectionRFT,762 collectionRFT,
763 targetAddress,763 targetAddress,
764 {ReFungible: {const_data: [], pieces: 100}},764 {ReFungible: {pieces: 100}},
765 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);765 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
766766
767 // Try to create and nest a token in the wrong collection767 // Try to create and nest a token in the wrong collection
788 await expect(executeTransaction(api, alice, api.tx.unique.createItem(788 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
789 collectionRFT,789 collectionRFT,
790 targetAddress,790 targetAddress,
791 {ReFungible: {const_data: [], pieces: 100}},791 {ReFungible: {pieces: 100}},
792 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);792 )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
793793
794 // Try to create and nest a token in the wrong collection794 // Try to create and nest a token in the wrong collection
812 await expect(executeTransaction(api, alice, api.tx.unique.createItem(812 await expect(executeTransaction(api, alice, api.tx.unique.createItem(
813 collectionRFT,813 collectionRFT,
814 targetAddress,814 targetAddress,
815 {ReFungible: {const_data: [], pieces: 100}},815 {ReFungible: {pieces: 100}},
816 )), 'while creating a nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);816 )), 'while creating a nested token').to.be.rejectedWith(/common\.SourceCollectionIsNotAllowedToNest/);
817817
818 // Try to create and nest a token in the wrong collection818 // Try to create and nest a token in the wrong collection