difftreelog
Merge branch 'develop' into feature/rft_arbitrary_fractions
in: master
3 files changed
Dockerfilediffbeforeafterboth1# ===== BUILD ======1# ===== BUILD ======223FROM phusion/baseimage:0.10.2 as builder3FROM phusion/baseimage:18.04-1.0.0 as builder4LABEL maintainer="gz@usetech.com"4LABEL maintainer="gz@usetech.com"556ENV WASM_TOOLCHAIN=nightly-2020-10-016ENV WASM_TOOLCHAIN=nightly-2021-01-27778ARG PROFILE=release8ARG PROFILE=release99373738# ===== RUN ======38# ===== RUN ======393940FROM phusion/baseimage:0.10.240FROM phusion/baseimage:18.04-1.0.041ARG PROFILE=release41ARG PROFILE=release424243COPY --from=builder /nft_parachain/target/$PROFILE/nft /usr/local/bin43COPY --from=builder /nft_parachain/target/$PROFILE/nft /usr/local/bintests/src/addCollectionAdmin.test.tsdiffbeforeafterboth103 });
103 });
104 });
104 });
105
105
106 it('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
106 it.only('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
107 await usingApi(async (api: ApiPromise) => {
107 await usingApi(async (api: ApiPromise) => {
108 const Alice = privateKey('//Alice');
108 const Alice = privateKey('//Alice');
109 const accounts = [
109 const accounts = [
118 const collectionId = await createCollectionExpectSuccess();
118 const collectionId = await createCollectionExpectSuccess();
119
119
120 const chainLimit = await api.query.nft.chainLimit() as unknown as { CollectionAdminsLimit: BN };
120 const chainLimit = await api.query.nft.chainLimit() as unknown as { CollectionAdminsLimit: BN };
121 const chainLimitNumber = chainLimit.CollectionAdminsLimit.toNumber();
121 const chainAdminLimit = chainLimit.CollectionAdminsLimit.toNumber();
122 expect(chainLimitNumber).to.be.equal(5);
122 expect(chainAdminLimit).to.be.equal(5);
123
123
124 for (let i = 0; i < chainLimitNumber; i++) {
124 for (let i = 0; i < chainAdminLimit; i++) {
125 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, accounts[i]);
125 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, accounts[i]);
126 await submitTransactionAsync(Alice, changeAdminTx);
126 await submitTransactionAsync(Alice, changeAdminTx);
127 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
127 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
128 expect(adminListAfterAddAdmin).to.be.contains(accounts[i]);
128 expect(adminListAfterAddAdmin).to.be.contains(accounts[i]);
129 }
129 }
130
130
131 const tx = api.tx.nft.addCollectionAdmin(collectionId, accounts[chainLimitNumber]);
131 const tx = api.tx.nft.addCollectionAdmin(collectionId, accounts[chainAdminLimit]);
132 await expect(submitTransactionExpectFailAsync(Alice, tx)).to.be.rejected;
132 await expect(submitTransactionExpectFailAsync(Alice, tx)).to.be.rejected;
133 });
133 });
134 });
134 });
tests/src/transfer.test.tsdiffbeforeafterboth63 });63 });64 });64 });656566 it('Create collection, balance transfers and check balance', async () => {66 it('User can transfer owned token', async () => {67 await usingApi(async (api) => {67 await usingApi(async (api) => {68 const Alice = privateKey('//Alice');68 const Alice = privateKey('//Alice');69 const Bob = privateKey('//Bob');69 const Bob = privateKey('//Bob');