From bae40f93bed20883f535845d8a399e5cae197a7c Mon Sep 17 00:00:00 2001 From: Yuri Date: Wed, 9 Feb 2022 22:52:50 +0000 Subject: [PATCH 01/34] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c411f85..f4d608b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # RMRK Tools -Typescript implementation of the [RMRK spec](https://github.com/Swader/rmrk-spec/). +Typescript implementation of the [RMRK spec](https://github.com/Swader/rmrk-spec/) using Substrate `system.remark` extrinsics. + +Note that there are also [EVM](https://github.com/rmrk-team/evm) and [Substrate pallet](https://github.com/rmrk-team/rmrk-substrate) implementations of [RMRK standard](https://github.com/rmrk-team/rmrk-spec) ![Tests](https://github.com/Swader/rmrk-tools/actions/workflows/run-tests.yml/badge.svg) From 43d752ce49b5d3e347f46321e8c9c2f3070fd85d Mon Sep 17 00:00:00 2001 From: Yuri Date: Wed, 9 Feb 2022 22:53:21 +0000 Subject: [PATCH 02/34] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4d608b7..db1a130a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # RMRK Tools -Typescript implementation of the [RMRK spec](https://github.com/Swader/rmrk-spec/) using Substrate `system.remark` extrinsics. +Typescript implementation of the [RMRK spec](https://github.com/Swader/rmrk-spec/) using Substrate's `system.remark` extrinsics. -Note that there are also [EVM](https://github.com/rmrk-team/evm) and [Substrate pallet](https://github.com/rmrk-team/rmrk-substrate) implementations of [RMRK standard](https://github.com/rmrk-team/rmrk-spec) +Note that there are also [EVM](https://github.com/rmrk-team/evm) and [Substrate pallet](https://github.com/rmrk-team/rmrk-substrate) implementations of [RMRK spec](https://github.com/rmrk-team/rmrk-spec) ![Tests](https://github.com/Swader/rmrk-tools/actions/workflows/run-tests.yml/badge.svg) From 6e7c5fb5178b16bda99ccc787a71718b0238e557 Mon Sep 17 00:00:00 2001 From: Yuri Date: Thu, 10 Feb 2022 12:58:33 +0000 Subject: [PATCH 03/34] Allow equip in slot with "*" whitelisting --- .../tools/consolidator/interactions/equip.ts | 2 +- .../__snapshots__/equip.test.ts.snap | 119 ++++++++++++++++++ test/2.0.0/consolidator/equip.test.ts | 36 ++++++ 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/equip.ts b/src/rmrk2.0.0/tools/consolidator/interactions/equip.ts index 5f7f0433..f667d08f 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/equip.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/equip.ts @@ -88,7 +88,7 @@ export const equipInteraction = async ( ); } - if (!basepart.equippable?.includes(nft.collection)) { + if (!basepart.equippable?.includes(nft.collection) && !basepart.equippable?.includes("*")) { throw new Error( `[${OP_TYPES.EQUIP}] Cannot equip NFT ${equipEntity.id} because it's base ${base} slot ${slot} doesn't allow it's collection ${nft.collection}` ); diff --git a/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap index 40336d1a..c5bfdca0 100644 --- a/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap @@ -124,6 +124,125 @@ Object { } `; +exports[`rmrk2.0.0 Consolidator: EQUIP Should Equip NFT with * slot whitelisting 1`] = ` +Object { + "bases": Object { + "base-4-KBASE777": Object { + "block": 4, + "changes": Array [], + "id": "base-4-KBASE777", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "parts": Array [ + Object { + "equippable": "*", + "id": "background", + "type": "slot", + "z": 0, + }, + Object { + "equippable": Array [ + "d43593c715a56da27d-KANARIABIRDS", + ], + "id": "backpack", + "type": "slot", + "z": 1, + }, + Object { + "id": "tail", + "src": "ipfs://ipfs/QmcEuigDVCScMLs2dcrJ8qU4Q265xGisUyKeYdnnGFn6AE/var3_tail.svg", + "type": "fixed", + "z": 2, + }, + ], + "symbol": "KBASE777", + "themes": Object { + "themeOne": Object { + "_inherit": true, + "primary": "#fff", + }, + }, + "type": "svg", + }, + }, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [], + "nfts": Object { + "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "block": 3, + "burned": "", + "changes": Array [], + "children": Array [ + Object { + "equipped": "base-4-KBASE777.background", + "id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "pending": false, + }, + ], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [ + "xXhhR", + ], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [ + Object { + "base": "base-4-KBASE777", + "id": "xXhhR", + "pending": false, + }, + ], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000777", + "symbol": "KANR", + "transferable": 1, + }, + "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { + "block": 6, + "burned": "", + "changes": Array [], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "metadata": undefined, + "owner": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "pending": false, + "priority": Array [ + "jXhhR", + ], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [ + Object { + "id": "jXhhR", + "pending": false, + "slot": "base-4-KBASE777.background", + }, + ], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000888", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + exports[`rmrk2.0.0 Consolidator: EQUIP Should fail to Equip NFT on a non-existent parent NFT 1`] = ` Object { "bases": Object {}, diff --git a/test/2.0.0/consolidator/equip.test.ts b/test/2.0.0/consolidator/equip.test.ts index 0ab4973c..3b5ee73e 100644 --- a/test/2.0.0/consolidator/equip.test.ts +++ b/test/2.0.0/consolidator/equip.test.ts @@ -183,6 +183,42 @@ describe("rmrk2.0.0 Consolidator: EQUIP", () => { expect(consolidatedResult).toMatchSnapshot(); }); + it("Should Equip NFT with * slot whitelisting", async () => { + const remarks = getRemarksFromBlocksMock([ + ...getBlockCallsMock(createCollectionMock().create()), + ...getBlockCallsMock(mintNftMock().mint()), + ...getBlockCallsMock(createBaseMock().base()), + ...getBlockCallsMock( + mintNftMock(3).resadd({ base: createBaseMock(4).getId(), id: resid2 }) + ), + ...getBlockCallsMock(mintNftMock2().mint(mintNftMock(3).getId())), + ...getBlockCallsMock( + mintNftMock2(6).resadd({ + slot: `${createBaseMock(4).getId()}.${ + createBaseMock(4).parts?.[0].id + }`, + id: resid, + }) + ), + ...getBlockCallsMock( + createBaseMock(4).equippable({ + slot: createBaseMock(4).parts?.[0].id || "", + collections: ["*"], + operator: "+", + }) + ), + ...getBlockCallsMock( + mintNftMock2(6).equip( + `${createBaseMock(4).getId()}.${createBaseMock(4).parts?.[0].id}` + ) + ), + ]); + + const consolidator = new Consolidator(); + const consolidatedResult = await consolidator.consolidate(remarks); + expect(consolidatedResult).toMatchSnapshot(); + }); + it("Should fail to Equip NFT while base is still pending accept", async () => { const remarks = getRemarksFromBlocksMock([ ...getBlockCallsMock(createCollectionMock().create()), From 3642c61b06587352fbecdffbcf02ecbfff0bd91e Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Thu, 10 Feb 2022 13:00:14 +0000 Subject: [PATCH 04/34] v2.0.41 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8535ffd0..7d20c10f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.40", + "version": "2.0.41", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 21d0efc81e4e7ac839690b6de63cf8ce6e363a48 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 14 Feb 2022 11:43:43 +0000 Subject: [PATCH 05/34] Save extra balance transfers alongside BUY change --- src/rmrk2.0.0/changelog.ts | 6 ++++ .../tools/consolidator/interactions/buy.ts | 31 ++++++++++++++++++- src/rmrk2.0.0/tools/validate-metadata.ts | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/rmrk2.0.0/changelog.ts b/src/rmrk2.0.0/changelog.ts index 0e096072..c0b1e2a7 100644 --- a/src/rmrk2.0.0/changelog.ts +++ b/src/rmrk2.0.0/changelog.ts @@ -1,5 +1,10 @@ import { OP_TYPES } from "./tools/constants"; +export type ChangeExtraBalanceTransfer = { + receiver: string; + amount: string; +}; + export type Change = { field: string; old: any; @@ -7,4 +12,5 @@ export type Change = { caller: string; block: number; opType: OP_TYPES; + extraTransfers?: ChangeExtraBalanceTransfer[]; }; diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts index d459d02a..5fd37e5d 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts @@ -1,7 +1,7 @@ import { Buy } from "../../../classes/buy"; import { OP_TYPES } from "../../constants"; import { BlockCall } from "../../types"; -import { Change } from "../../../changelog"; +import { Change, ChangeExtraBalanceTransfer } from "../../../changelog"; import { Remark } from "../remark"; import { NFT } from "../../../classes/nft"; import { encodeAddress } from "@polkadot/keyring"; @@ -76,6 +76,7 @@ export const buyInteraction = async ( caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, + extraTransfers: getExtraBalanceTransfers(remark, nft, ss58Format), } as Change); nft.owner = buyEntity.recipient || remark.caller; nft.rootowner = buyEntity.recipient || remark.caller; @@ -87,10 +88,38 @@ export const buyInteraction = async ( caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, + extraTransfers: getExtraBalanceTransfers(remark, nft, ss58Format), } as Change); nft.forsale = BigInt(0); }; +const getExtraBalanceTransfers = ( + remark: Remark, + nft: NFT, + ss58Format?: number +): ChangeExtraBalanceTransfer[] => { + const extraTransfers: ChangeExtraBalanceTransfer[] = []; + + remark.extra_ex?.forEach((el: BlockCall) => { + if (el.call === "balances.transfer") { + const [owner, forsale] = el.value.split(","); + const ownerEncoded = ss58Format + ? encodeAddress(owner, ss58Format) + : owner; + // Only record 'extra' transfers and not the main balance transfer + const transferValue = [ownerEncoded, forsale].join(","); + if (transferValue !== `${nft.rootowner},${nft.forsale}`) { + extraTransfers.push({ + receiver: ownerEncoded, + amount: forsale, + }); + } + } + }); + + return extraTransfers; +}; + const isTransferValid = (remark: Remark, nft: NFT, ss58Format?: number) => { let transferValid = false; let transferValue = ""; diff --git a/src/rmrk2.0.0/tools/validate-metadata.ts b/src/rmrk2.0.0/tools/validate-metadata.ts index 86e3208c..2697bac3 100644 --- a/src/rmrk2.0.0/tools/validate-metadata.ts +++ b/src/rmrk2.0.0/tools/validate-metadata.ts @@ -71,7 +71,7 @@ export const validateAttributes = (properties?: IProperties) => { } } - if (type === "int" || type === "float") { + if (type === "int" || type === "float" || type === "number") { if (typeof value !== "number") { throw new Error("for type 'number' 'value' has to be a number"); } From 5d35fe26980c9f9e3b6ca50e6e4aa72cffa48914 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 14 Feb 2022 12:16:25 +0000 Subject: [PATCH 06/34] update tests --- .../tools/consolidator/interactions/buy.ts | 10 +- .../__snapshots__/buy.test.ts.snap | 123 ++++++++++++++++++ test/2.0.0/consolidator/buy.test.ts | 23 ++++ 3 files changed, 152 insertions(+), 4 deletions(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts index 5fd37e5d..ef36f2d3 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts @@ -69,6 +69,8 @@ export const buyInteraction = async ( } } + const extraTransfers = getExtraBalanceTransfers(remark, nft, ss58Format); + nft.addChange({ field: "owner", old: nft.owner, @@ -76,7 +78,7 @@ export const buyInteraction = async ( caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, - extraTransfers: getExtraBalanceTransfers(remark, nft, ss58Format), + ...(extraTransfers ? { extraTransfers } : {}), } as Change); nft.owner = buyEntity.recipient || remark.caller; nft.rootowner = buyEntity.recipient || remark.caller; @@ -88,7 +90,7 @@ export const buyInteraction = async ( caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, - extraTransfers: getExtraBalanceTransfers(remark, nft, ss58Format), + ...(extraTransfers ? { extraTransfers } : {}), } as Change); nft.forsale = BigInt(0); }; @@ -97,7 +99,7 @@ const getExtraBalanceTransfers = ( remark: Remark, nft: NFT, ss58Format?: number -): ChangeExtraBalanceTransfer[] => { +): ChangeExtraBalanceTransfer[] | undefined => { const extraTransfers: ChangeExtraBalanceTransfer[] = []; remark.extra_ex?.forEach((el: BlockCall) => { @@ -117,7 +119,7 @@ const getExtraBalanceTransfers = ( } }); - return extraTransfers; + return extraTransfers.length > 0 ? extraTransfers : undefined; }; const isTransferValid = (remark: Remark, nft: NFT, ss58Format?: number) => { diff --git a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap index 980d6c5b..0b6c56f2 100644 --- a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap @@ -358,6 +358,129 @@ Object { } `; +exports[`rmrk2.0.0 Consolidator: BUY Should correctly save changes when commission is paid 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [], + "nfts": Object { + "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "block": 3, + "burned": "", + "changes": Array [], + "children": Array [ + Object { + "equipped": "", + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "pending": false, + }, + ], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000777", + "symbol": "KANR", + "transferable": 1, + }, + "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { + "block": 4, + "burned": "", + "changes": Array [], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "metadata": undefined, + "owner": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000888", + "symbol": "KANR", + "transferable": 1, + }, + "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999": Object { + "block": 5, + "burned": "", + "changes": Array [ + Object { + "block": 6, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "field": "forsale", + "new": 1000000000000n, + "old": 0n, + "opType": "LIST", + }, + Object { + "block": 7, + "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "extraTransfers": Array [ + Object { + "amount": "100000000000", + "receiver": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + }, + ], + "field": "owner", + "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "opType": "BUY", + }, + Object { + "block": 7, + "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "extraTransfers": Array [ + Object { + "amount": "100000000000", + "receiver": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + }, + ], + "field": "forsale", + "new": 0n, + "old": 1000000000000n, + "opType": "BUY", + }, + ], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", + "metadata": undefined, + "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "sn": "00000999", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + exports[`rmrk2.0.0 Consolidator: BUY Should prevent you from BUYing NFT with incorrect balance transfer 1`] = ` Object { "bases": Object {}, diff --git a/test/2.0.0/consolidator/buy.test.ts b/test/2.0.0/consolidator/buy.test.ts index 003dddd6..1436ff08 100644 --- a/test/2.0.0/consolidator/buy.test.ts +++ b/test/2.0.0/consolidator/buy.test.ts @@ -179,4 +179,27 @@ describe("rmrk2.0.0 Consolidator: BUY", () => { const consolidator = new Consolidator(); expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); }); + + it("Should correctly save changes when commission is paid", async () => { + const remarks = getRemarksFromBlocksMock([ + ...getSetupRemarks(), + ...getBlockCallsMock(mintNftMock2().mint(mintNftMock(3).getId())), + ...getBlockCallsMock(mintNftMock3().mint(mintNftMock2(4).getId())), + ...getBlockCallsMock(mintNftMock3(5).list(BigInt(1e12))), + ...getBlockCallsMock(mintNftMock3(5).buy(), getBobKey().address, [ + { + call: "balances.transfer", + value: `${getAliceKey().address},${BigInt(1e12).toString()}`, + caller: getBobKey().address, + }, + { + call: "balances.transfer", + value: `${getAliceKey().address},${BigInt(0.1e12).toString()}`, + caller: getAliceKey().address, + }, + ]), + ]); + const consolidator = new Consolidator(); + expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); + }); }); From f1f14abc885afb6217b081168fbd45fc30cfed59 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Mon, 14 Feb 2022 12:25:23 +0000 Subject: [PATCH 07/34] v2.0.43 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d20c10f..b11597fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.41", + "version": "2.0.43", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 854c56d6f11a3b727955ff3d21716cd5a0350ba8 Mon Sep 17 00:00:00 2001 From: Yuri Date: Thu, 17 Feb 2022 10:29:34 +0000 Subject: [PATCH 08/34] only save extraTransfers on BUY change for field "forsale" --- src/rmrk2.0.0/tools/consolidator/interactions/buy.ts | 1 - test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts index ef36f2d3..b897c1d4 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts @@ -78,7 +78,6 @@ export const buyInteraction = async ( caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, - ...(extraTransfers ? { extraTransfers } : {}), } as Change); nft.owner = buyEntity.recipient || remark.caller; nft.rootowner = buyEntity.recipient || remark.caller; diff --git a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap index 0b6c56f2..29062a9f 100644 --- a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap @@ -435,12 +435,6 @@ Object { Object { "block": 7, "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "extraTransfers": Array [ - Object { - "amount": "100000000000", - "receiver": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - }, - ], "field": "owner", "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", From 21dc19e62e8af1264623cdcd18fea7da9f8b0751 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Thu, 17 Feb 2022 10:31:09 +0000 Subject: [PATCH 09/34] v2.0.44 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b11597fb..0e424fcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.43", + "version": "2.0.44", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 1c759015c518f7a5bec74575da6d4fca63528a3e Mon Sep 17 00:00:00 2001 From: Yuri Date: Sun, 20 Feb 2022 22:42:46 +0000 Subject: [PATCH 10/34] Make Base type optional field and change validation to any string --- src/rmrk2.0.0/classes/base.ts | 6 +++--- src/rmrk2.0.0/tools/types.ts | 2 +- src/rmrk2.0.0/tools/validate-remark.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rmrk2.0.0/classes/base.ts b/src/rmrk2.0.0/classes/base.ts index b3495fe5..2f4f1539 100644 --- a/src/rmrk2.0.0/classes/base.ts +++ b/src/rmrk2.0.0/classes/base.ts @@ -7,7 +7,7 @@ import { Change } from "../changelog"; export class Base { readonly block: number; readonly symbol: string; - readonly type: BaseType; + readonly type?: BaseType; readonly parts?: IBasePart[]; issuer: string; changes: Change[] = []; @@ -17,13 +17,13 @@ export class Base { block: number, symbol: string, issuer: string, - type: BaseType, + type?: BaseType, parts?: IBasePart[], themes?: Record ) { this.block = block; this.symbol = symbol; - this.type = type; + this.type = type || undefined; this.issuer = issuer; this.parts = parts || undefined; this.themes = themes || undefined; diff --git a/src/rmrk2.0.0/tools/types.ts b/src/rmrk2.0.0/tools/types.ts index 2e788e3c..b39b3e3a 100644 --- a/src/rmrk2.0.0/tools/types.ts +++ b/src/rmrk2.0.0/tools/types.ts @@ -72,6 +72,6 @@ export type BlockCall = { extras?: BlockCall[]; }; -export type BaseType = "svg"; +export type BaseType = "svg" | "png" | string; export type Interaction = Send | Buy | List | Emote | ChangeIssuer; diff --git a/src/rmrk2.0.0/tools/validate-remark.ts b/src/rmrk2.0.0/tools/validate-remark.ts index 63f38fd8..ca30f84d 100644 --- a/src/rmrk2.0.0/tools/validate-remark.ts +++ b/src/rmrk2.0.0/tools/validate-remark.ts @@ -111,7 +111,7 @@ const EMOTEStruct = type({ const BaseStruct = type({ issuer: string(), - type: enums(["svg"]), + type: optional(string()), symbol: string(), parts: array(PartStruct), }); From 8cc12689f5a4b0b7843b75001cfec9555f31d093 Mon Sep 17 00:00:00 2001 From: Yuri Date: Sun, 20 Feb 2022 22:49:19 +0000 Subject: [PATCH 11/34] Update consolidator.ts --- src/rmrk2.0.0/tools/consolidator/consolidator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rmrk2.0.0/tools/consolidator/consolidator.ts b/src/rmrk2.0.0/tools/consolidator/consolidator.ts index b99eb6a0..37d0d5d1 100644 --- a/src/rmrk2.0.0/tools/consolidator/consolidator.ts +++ b/src/rmrk2.0.0/tools/consolidator/consolidator.ts @@ -108,7 +108,7 @@ export interface BaseConsolidated { symbol: string; issuer: string; id: string; - type: BaseType; + type?: BaseType; parts?: IBasePart[]; changes: Change[]; themes?: Record; From b405c53d3b210fe6dfb33c30e664b3b263ef687e Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Sun, 20 Feb 2022 22:52:51 +0000 Subject: [PATCH 12/34] v2.0.46 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e424fcc..25492c22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.44", + "version": "2.0.46", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 89a971abb1e85d4eff4b567753a23831ad8b28c6 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 21 Feb 2022 15:08:02 +0000 Subject: [PATCH 13/34] save rootowner in old field of BUY change --- src/rmrk2.0.0/tools/consolidator/interactions/buy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts index b897c1d4..9dbbca80 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts @@ -73,7 +73,7 @@ export const buyInteraction = async ( nft.addChange({ field: "owner", - old: nft.owner, + old: nft.rootowner, new: buyEntity.recipient || remark.caller, caller: remark.caller, block: remark.block, @@ -170,7 +170,7 @@ const validate = ( ); case !transferValid: throw new Error( - `[${OP_TYPES.BUY}] Transfer for the purchase of NFT ID ${buyEntity.id} not valid. Recipient, amount should be ${nft.owner},${nft.forsale}, is ${transferValue}.` + `[${OP_TYPES.BUY}] Transfer for the purchase of NFT ID ${buyEntity.id} not valid. Recipient, amount should be ${nft.rootowner},${nft.forsale}, is ${transferValue}.` ); } }; From cbfb35068f73711d0880416f635202fbf4e5262e Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 21 Feb 2022 15:08:04 +0000 Subject: [PATCH 14/34] Update buy.test.ts.snap --- test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap index 29062a9f..e50d1240 100644 --- a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap @@ -326,7 +326,7 @@ Object { "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", "field": "owner", "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "opType": "BUY", }, Object { @@ -437,7 +437,7 @@ Object { "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", "field": "owner", "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "opType": "BUY", }, Object { From 9ffa5139553044b3ff66a4e34885360d2cbac616 Mon Sep 17 00:00:00 2001 From: Yuri Date: Thu, 24 Feb 2022 11:31:52 +0000 Subject: [PATCH 15/34] safe validateDecode --- package.json | 12 +- src/rmrk2.0.0/tools/utils.ts | 14 +- yarn.lock | 460 +++++++++++++++++++++++------------ 3 files changed, 326 insertions(+), 160 deletions(-) diff --git a/package.json b/package.json index 25492c22..48fe10cf 100644 --- a/package.json +++ b/package.json @@ -55,11 +55,11 @@ "@babel/preset-env": "^7.13.9", "@babel/preset-typescript": "^7.13.0", "@pinata/sdk": "^1.1.13", - "@polkadot/api": "^7.7.1", + "@polkadot/api": "^7.9.1", "@polkadot/extension-dapp": "^0.42.7", - "@polkadot/keyring": "^8.3.3", - "@polkadot/util-crypto": "^8.3.3", - "@polkadot/x-randomvalues": "^8.3.3", + "@polkadot/keyring": "^8.4.1", + "@polkadot/util-crypto": "^8.4.1", + "@polkadot/x-randomvalues": "^8.4.1", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-json": "^4.1.0", @@ -89,7 +89,7 @@ "webpack-cli": "^4.5.0" }, "dependencies": { - "@polkadot/api-augment": "^7.7.1", + "@polkadot/api-augment": "^7.9.1", "JSONStream": "^1.3.5", "chalk": "^4.1.0", "emoji-regex": "^9.2.2", @@ -103,7 +103,7 @@ }, "peerDependency": { "@polkadot/api": "^7.x", - "@polkadot/extension-dapp": "^0.40.x", + "@polkadot/extension-dapp": "^0.42.x", "@polkadot/keyring": "^7.x", "@polkadot/util-crypto": "^7.x", "@polkadot/util": "^7.x" diff --git a/src/rmrk2.0.0/tools/utils.ts b/src/rmrk2.0.0/tools/utils.ts index fbc23cef..1c5d58c0 100644 --- a/src/rmrk2.0.0/tools/utils.ts +++ b/src/rmrk2.0.0/tools/utils.ts @@ -92,7 +92,9 @@ export const getRemarksFromBlocks = ( for (const call of row.calls) { if (call.call !== "system.remark") continue; const str = hexToString(call.value); + const isValid = validateDecode(str); if ( + !isValid || !prefixes.some((word) => str.startsWith(hexToString(word))) || !str.includes(`::${VERSION}::`) ) { @@ -148,6 +150,16 @@ export const isBatchInterrupted = async ( return Boolean(events.length); }; +export const validateDecode = (value: string) => { + try { + const decoded = decodeURI(value); + return true; + } catch (error: any) { + console.log(error, value); + return false; + } +}; + export const isSystemRemark = (call: TCall, prefixes: string[]): boolean => call.section === "system" && call.method === "remark" && @@ -263,7 +275,7 @@ export const getBlockCallsFromSignedBlock = async ( } as BlockCall); } else { const isBalanceTransfer = - `${el.section}.${el.method}` === `balances.transfer`; + `${el.section}.${el.method}` === `balances.transfer`; const extraCall = { call: `${el.section}.${el.method}`, diff --git a/yarn.lock b/yarn.lock index d8bc40b2..bed58408 100644 --- a/yarn.lock +++ b/yarn.lock @@ -849,10 +849,10 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0" - integrity sha512-etcO/ohMNaNA2UBdaXBBSX/3aEzFMRrVfaPv8Ptc0k+cWpWW0QFiGZ2XnVqQZI1Cf734LbPGmqBKWESfW4x/dQ== +"@babel/runtime@^7.17.2": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" + integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== dependencies: regenerator-runtime "^0.13.4" @@ -1409,11 +1409,21 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-0.5.7.tgz#8605d84b34daf43d15c344fae54f0a1d5d5a4632" integrity sha512-R9PPYv7TqoYi+enikzZvwRQesGTxR0+jwqzZJGL0uNcf2NFL+lt/uvCCewtXXmr6jWBxiMuNjBfJwKv9UJaCng== +"@noble/hashes@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" + integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== + "@noble/secp256k1@1.3.4": version "1.3.4" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.3.4.tgz#158ded712d09237c0d3428be60dc01ce8ebab9fb" integrity sha512-ZVRouDO5mbdCiDg4zCd3ZZABduRtpy4tCnB33Gh9upHe9tRzpiqbRSN1VTjrj/2g8u2c6MBi0YLNnNQpBYOiWg== +"@noble/secp256k1@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.5.2.tgz#40399e4fba54f588fda14fc03a4499044fdcab24" + integrity sha512-5mzA40W2q55VCRuC9XzmkiEnODdY0c5a7qsK2QcOfI5/MuVQyBaWGQyE6YOEF7kDwp+tDVWGsCDVJUME+wsWWw== + "@nodelib/fs.scandir@2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" @@ -1446,68 +1456,68 @@ is-ipfs "^0.6.0" recursive-fs "^1.1.2" -"@polkadot/api-augment@7.7.1", "@polkadot/api-augment@^7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-7.7.1.tgz#8412a09db75da7993419284f4bc708421d321f03" - integrity sha512-M8c38haMh39K2pg3wRE4azpEr3hkaKV8dTlXG6whDmpDsPGTLa/wE9rCUzduRXTLpUZYBUCH529+bJ5LVwmSNQ== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/api-base" "7.7.1" - "@polkadot/rpc-augment" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/types-augment" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/util" "^8.3.3" - -"@polkadot/api-base@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-7.7.1.tgz#02e799a5e05474e1b008b4f706eb4ec0b793f5f4" - integrity sha512-gzgETQrgjMOqcQj7dwsiqVxmlUQEMH89ome0qargrJWiwbFUeceOlvt47E/WGG6/1oWUl3SMZcNRLYANME93ag== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/rpc-core" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/util" "^8.3.3" - rxjs "^7.5.2" - -"@polkadot/api-derive@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-7.7.1.tgz#2ede88baac97b38ccca86575b13cd284a399e442" - integrity sha512-1dBj+vtVk+XAcvwC6BE+eUdVnbcBteWDXzBxrIuzT8NlkAReIq+74+bOEZH7GDcGMorTR5s+Z3FZD1ElmUiUNQ== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/api" "7.7.1" - "@polkadot/api-augment" "7.7.1" - "@polkadot/api-base" "7.7.1" - "@polkadot/rpc-core" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - rxjs "^7.5.2" - -"@polkadot/api@7.7.1", "@polkadot/api@^7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-7.7.1.tgz#a4a1738473005bcde0f21239ba08ae22e3d548f4" - integrity sha512-wWwtVgRz1Lc7HY0evRnzKZNaRBIo818V16fZ+S73zfIMxvDmO2zbfui9scIlpi4WwL2K3YQbznOwBlWeHH92LA== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/api-augment" "7.7.1" - "@polkadot/api-base" "7.7.1" - "@polkadot/api-derive" "7.7.1" - "@polkadot/keyring" "^8.3.3" - "@polkadot/rpc-augment" "7.7.1" - "@polkadot/rpc-core" "7.7.1" - "@polkadot/rpc-provider" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/types-augment" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/types-create" "7.7.1" - "@polkadot/types-known" "7.7.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" +"@polkadot/api-augment@7.9.1", "@polkadot/api-augment@^7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-7.9.1.tgz#1a7bea0934757677b88d240bd43c8ae61ddce266" + integrity sha512-mfCcN73uXH/KN69Gfsijzas7L68FU/oV5AhVW4ijp7/9uG66+VWYkhRTnHRBgFdavUQME7fTQ+eQiyA3kRozTg== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/api-base" "7.9.1" + "@polkadot/rpc-augment" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-augment" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/util" "^8.4.1" + +"@polkadot/api-base@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-7.9.1.tgz#54d35dfd662e2fdd5c8e462f35015c7697cad818" + integrity sha512-sxUEbQAt80/UEtnY5ho+tNmh0Zl8fJxhIaSlWbSyEr15gAOeP2vu4U9RxFzESOK393QuUsm8Ef0F79RkQYG5Ew== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/rpc-core" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/util" "^8.4.1" + rxjs "^7.5.4" + +"@polkadot/api-derive@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-7.9.1.tgz#65ac3b494890c65ef9245038141e4badf7d657ff" + integrity sha512-yEBSGPkQN+eR2RPYWxt91pR5k8gljV8zYo+6m5NvESYCrPWzfOJL1mQRr+N+4cNcfZ+ZL0+8e0LUIlac4MMesw== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/api" "7.9.1" + "@polkadot/api-augment" "7.9.1" + "@polkadot/api-base" "7.9.1" + "@polkadot/rpc-core" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/util" "^8.4.1" + "@polkadot/util-crypto" "^8.4.1" + rxjs "^7.5.4" + +"@polkadot/api@7.9.1", "@polkadot/api@^7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-7.9.1.tgz#56d29bb3bc4822e80c94b1267e8f63a7f067e6ea" + integrity sha512-bV+qaUwbNsPwLYVQ2ZmA7Spi8znp1RrNGJPP3ZiR96vdShe4iLizbkcPpV+X9+E/tytvTouU2pGUM4UW4EsQ5w== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/api-augment" "7.9.1" + "@polkadot/api-base" "7.9.1" + "@polkadot/api-derive" "7.9.1" + "@polkadot/keyring" "^8.4.1" + "@polkadot/rpc-augment" "7.9.1" + "@polkadot/rpc-core" "7.9.1" + "@polkadot/rpc-provider" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-augment" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/types-create" "7.9.1" + "@polkadot/types-known" "7.9.1" + "@polkadot/util" "^8.4.1" + "@polkadot/util-crypto" "^8.4.1" eventemitter3 "^4.0.7" - rxjs "^7.5.2" + rxjs "^7.5.4" "@polkadot/extension-dapp@^0.42.7": version "0.42.7" @@ -1540,7 +1550,16 @@ "@polkadot/util" "8.3.3" "@polkadot/util-crypto" "8.3.3" -"@polkadot/networks@8.3.3", "@polkadot/networks@^8.3.3": +"@polkadot/keyring@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-8.4.1.tgz#71098121c60a05e1ad33653fcc521c52f22ad1b8" + integrity sha512-0qfS7qikUxhe6LEdCOcMRdCxEa26inJ5aSUWaf5dXy+dgy9VJiov6uXAbXdAd1UHpDvr9hvw94FX+hXsJ7Vsyw== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/util" "8.4.1" + "@polkadot/util-crypto" "8.4.1" + +"@polkadot/networks@8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-8.3.3.tgz#2def73213451f12bc940b0c9ce8942aebbe5d4a8" integrity sha512-yj0DMqmzRZbvgaoZztV3/RPgYJjBhT17Dhu+FX/LUJzVbAF/RfjkzNsJT4Ta4kLDxQMYZq1avUac0ia2j9NcNw== @@ -1548,43 +1567,52 @@ "@babel/runtime" "^7.16.7" "@polkadot/util" "8.3.3" -"@polkadot/rpc-augment@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-7.7.1.tgz#2e4ff7a77c4839fe6d3fb4e26c6c9fa689f72d40" - integrity sha512-Hwa6qjxHSuzjyYxa2gOpIoN0PWhWDLEOxpHFZxwNoCkmGtcIpNwWOtK1chZWEl9Zd1Yq+JLIEoimNN+2ok/3cA== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/rpc-core" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/util" "^8.3.3" - -"@polkadot/rpc-core@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-7.7.1.tgz#a51adeaebced83515354a26bb28676f0bb11f8d9" - integrity sha512-vJuuTbmGKEcjJY3JIjMirLESVjnHBGajtTaLtlcwBcp8Jgj/fBi+FoL3gcpZS4BR87/qVe35aoNO2hDhU9DUJA== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/rpc-augment" "7.7.1" - "@polkadot/rpc-provider" "7.7.1" - "@polkadot/types" "7.7.1" - "@polkadot/util" "^8.3.3" - rxjs "^7.5.2" - -"@polkadot/rpc-provider@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.7.1.tgz#51dd5f941ec8029af91139b0d60e43f1ca387f14" - integrity sha512-PPAMjQgV4pA/l+L+mk93dvmzwMA2tZSzVf0DjsldD0vi5Oydo0Sw8I4YEsueTnHme0PadIZXUzWEonG81klAlw== - dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/keyring" "^8.3.3" - "@polkadot/types" "7.7.1" - "@polkadot/types-support" "7.7.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - "@polkadot/x-fetch" "^8.3.3" - "@polkadot/x-global" "^8.3.3" - "@polkadot/x-ws" "^8.3.3" +"@polkadot/networks@8.4.1", "@polkadot/networks@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-8.4.1.tgz#c22585edb38f5ae0a329a1f471577d8b35bf64e4" + integrity sha512-YFY3fPLbc1Uz9zsX4TOzjY/FF09nABMgrMkvqddrVbSgo71NvoBv3Gqw3mKV/7bX1Gzk1ODfvTzamdpsKEWSnA== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/util" "8.4.1" + "@substrate/ss58-registry" "^1.14.0" + +"@polkadot/rpc-augment@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-7.9.1.tgz#f10272ebb44ea256a3d8b42bbcf4964205f1291f" + integrity sha512-8rI0cfNT7A6rdrk7lBRcB/1Qm8x6yarDTVUaRuqTBLzjgr/4WExg1h7sjjFOLVPE6T+SXBY0RKjRKglTcolv5g== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/rpc-core" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/util" "^8.4.1" + +"@polkadot/rpc-core@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-7.9.1.tgz#302210d7bebfc31740b2bff682e7a3be62bea613" + integrity sha512-p1Z0Ii+/w31EBS3lcE9fr83Gf3zZK7IM1+AEuCW7NGM9iHMTLZtzMKE23B34Hs8eR5JdDBcXMYtcwNL+W/I5jA== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/rpc-augment" "7.9.1" + "@polkadot/rpc-provider" "7.9.1" + "@polkadot/types" "7.9.1" + "@polkadot/util" "^8.4.1" + rxjs "^7.5.4" + +"@polkadot/rpc-provider@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.9.1.tgz#1dd6e64c69a397ad117d2d9c2dbf14a9339b0fc0" + integrity sha512-gDcWFxzea5sfjEOCiO3rRRGxWYiUzlcra8PK/aS0H7GU6QnYNi7VXQY4fgM0VZbo1tkrw0+lBlpXrEZcPAP6Qg== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/keyring" "^8.4.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-support" "7.9.1" + "@polkadot/util" "^8.4.1" + "@polkadot/util-crypto" "^8.4.1" + "@polkadot/x-fetch" "^8.4.1" + "@polkadot/x-global" "^8.4.1" + "@polkadot/x-ws" "^8.4.1" eventemitter3 "^4.0.7" mock-socket "^9.1.2" nock "^13.2.4" @@ -1617,15 +1645,15 @@ "@polkadot/types-codec" "7.6.1" "@polkadot/util" "^8.3.3" -"@polkadot/types-augment@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.7.1.tgz#8c180c31e4cb1ca17232c1ca606185a7d8205389" - integrity sha512-NsPJgD85UUIOao2rtY9jCzt2+MdZsn2qhBSphnqQqS3yOQKoonaHojCsRKt39raQ0UNST+At5zL1+HdcKP53EQ== +"@polkadot/types-augment@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.9.1.tgz#a7ba01d89d6a80fa3a403c31c26ecad28e6dbcfa" + integrity sha512-2dl7CzgEBgGSjcqNcH2F2ZIlGVkf/mtbvu8ObmVw4z/ojpRLv26MO2TexF6fUMAFi7uNnq4r4yB9NsAxdUv2ZQ== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/types" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/util" "^8.3.3" + "@babel/runtime" "^7.17.2" + "@polkadot/types" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/util" "^8.4.1" "@polkadot/types-codec@7.6.1": version "7.6.1" @@ -1635,13 +1663,13 @@ "@babel/runtime" "^7.16.7" "@polkadot/util" "^8.3.3" -"@polkadot/types-codec@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.7.1.tgz#d1ad3343d67449b79d2ccde113662ec0d80bb53b" - integrity sha512-NqxQGpfagc+51TGBo8lrmEJox3cZwx6lSeoPnGUqQBcOhqjaJ8EPEAaFHc0TTc22/sLs1qYqBc+cz+9UXKAEOg== +"@polkadot/types-codec@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.9.1.tgz#b41c090cce86c3416ded572c2d38beec00b69408" + integrity sha512-wFSvVrBuk7s8SF1pIs1ftwE0B1TpU2CuWy/AGCh4TG510nbrpCh7DaJQJKfsRXprpbo08ybkocT2p6Snv6SIOA== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/util" "^8.3.3" + "@babel/runtime" "^7.17.2" + "@polkadot/util" "^8.4.1" "@polkadot/types-create@7.6.1": version "7.6.1" @@ -1652,26 +1680,26 @@ "@polkadot/types-codec" "7.6.1" "@polkadot/util" "^8.3.3" -"@polkadot/types-create@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.7.1.tgz#28b9bd3858845626c8ddb00b4b12bb5945a82fdc" - integrity sha512-T7iyu0u1Ji3ErA3YcY+WuI83TMcnvhTYJXs+OmGksWa64MQAiWs2pkYNmS4ieArUW3vsel5nv9noBzyl2MAocQ== +"@polkadot/types-create@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.9.1.tgz#75575a30a6dc761aee5d4b7bac33d38493349bc2" + integrity sha512-/l0EIMrtQFlD7mltwyWv2GuZiOYCHWOSvMMIYSocmhijKIBlJb0Wsn5RIpmUaDojYre01tx5NSwnLH82uTK6mQ== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/types-codec" "7.7.1" - "@polkadot/util" "^8.3.3" + "@babel/runtime" "^7.17.2" + "@polkadot/types-codec" "7.9.1" + "@polkadot/util" "^8.4.1" -"@polkadot/types-known@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-7.7.1.tgz#dbf621f03ba37b5c693a5b2193056c3bbb5a386b" - integrity sha512-NtRPOwHwKCJhzYGBWq/8n9pPalWY3AAx9jNE3TXAfxOCwVelZaXhC9TZ8iXkzZUixG1pJ+5KInXbjDeGfGpi/g== +"@polkadot/types-known@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-7.9.1.tgz#1b97783f6cf78c2ee12c3311a9b7c073fefed4af" + integrity sha512-O4Mir1Iec4Dex+i5tu9ouUjD2hEV1LzwWsqnu690QoIKNdb4Kc3LDSBt4CyCsb/yTvn4tXIMwO+D3n0i91QJuQ== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/networks" "^8.3.3" - "@polkadot/types" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/types-create" "7.7.1" - "@polkadot/util" "^8.3.3" + "@babel/runtime" "^7.17.2" + "@polkadot/networks" "^8.4.1" + "@polkadot/types" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/types-create" "7.9.1" + "@polkadot/util" "^8.4.1" "@polkadot/types-support@7.6.1": version "7.6.1" @@ -1681,13 +1709,13 @@ "@babel/runtime" "^7.16.7" "@polkadot/util" "^8.3.3" -"@polkadot/types-support@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.7.1.tgz#bbd36a00a75c68cb332bd489a229144b0df55cfc" - integrity sha512-JQmplnNGML43sE+dArlnzEbDMvpo0TkOMvpM8VflThjabG1MhCFuZdiOSm0WQ/iz4wm+3KihOKGzR6TPpGMKOA== +"@polkadot/types-support@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.9.1.tgz#e883bec5ac5c1787083a0c8b8bb883f7eff546a0" + integrity sha512-WO0xE2P01KqfQ7vJH0DGRYeK/UdIEKakJLdm7Js5zXoWwAtjSJ9Xk66F6TOpqnji5dvYlVcEA0t3a5NgivuzcQ== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/util" "^8.3.3" + "@babel/runtime" "^7.17.2" + "@polkadot/util" "^8.4.1" "@polkadot/types@7.6.1", "@polkadot/types@^7.5.1": version "7.6.1" @@ -1703,19 +1731,19 @@ "@polkadot/util-crypto" "^8.3.3" rxjs "^7.5.2" -"@polkadot/types@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.7.1.tgz#1e0b5ef0e94bd64ff3e1d6a39ff92d421be877fa" - integrity sha512-koJfoKvSiwpZKkHZrOpelb+JxCf+0iGzVOt0hj0plOK5oOOSJd0Elpy1dc8QQEJUC3V/pNdAGTsV6dvqi8rnAg== +"@polkadot/types@7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.9.1.tgz#db133d405a25b193b2b14c4ec4dcbc600014568e" + integrity sha512-yyBMqPh3pmEWY+G5XWwO8HK6Xh80rrrPiq+BoggPIue8c9ecrXhwRbOyzah7Gk4/Mq2My7nwsDwyhqJfwkUtKw== dependencies: - "@babel/runtime" "^7.17.0" - "@polkadot/keyring" "^8.3.3" - "@polkadot/types-augment" "7.7.1" - "@polkadot/types-codec" "7.7.1" - "@polkadot/types-create" "7.7.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - rxjs "^7.5.2" + "@babel/runtime" "^7.17.2" + "@polkadot/keyring" "^8.4.1" + "@polkadot/types-augment" "7.9.1" + "@polkadot/types-codec" "7.9.1" + "@polkadot/types-create" "7.9.1" + "@polkadot/util" "^8.4.1" + "@polkadot/util-crypto" "^8.4.1" + rxjs "^7.5.4" "@polkadot/util-crypto@8.3.3", "@polkadot/util-crypto@^8.3.3": version "8.3.3" @@ -1734,6 +1762,23 @@ micro-base "^0.10.2" tweetnacl "^1.0.3" +"@polkadot/util-crypto@8.4.1", "@polkadot/util-crypto@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-8.4.1.tgz#41ff754dc995b681913fc0a484bb0d309221a703" + integrity sha512-mWjp83aIWw+EhKN9RkUDmubXibo25q5yHJl4BGm2gT71yTZcABB7q1SGfpDqLH9AB3eXJiutqhC4L3SH7YZ+6Q== + dependencies: + "@babel/runtime" "^7.17.2" + "@noble/hashes" "1.0.0" + "@noble/secp256k1" "1.5.2" + "@polkadot/networks" "8.4.1" + "@polkadot/util" "8.4.1" + "@polkadot/wasm-crypto" "^4.5.1" + "@polkadot/x-bigint" "8.4.1" + "@polkadot/x-randomvalues" "8.4.1" + "@scure/base" "1.0.0" + ed2curve "^0.3.0" + tweetnacl "^1.0.3" + "@polkadot/util@8.3.3", "@polkadot/util@^8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-8.3.3.tgz#0bd79f771a82a8276b0ca0e713068d23ee53abf2" @@ -1748,6 +1793,20 @@ bn.js "^4.12.0" ip-regex "^4.3.0" +"@polkadot/util@8.4.1", "@polkadot/util@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-8.4.1.tgz#b84835c55585c8b5fc5608a99aa62ac815292ae7" + integrity sha512-8+wqHgFbFWI5TfrvtcL888w0nWvFpbTTYIcbpEw+zYGp3n1YZTAMMP26bXWAaQX5AttxynJRij7JP3ySxYY1fg== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-bigint" "8.4.1" + "@polkadot/x-global" "8.4.1" + "@polkadot/x-textdecoder" "8.4.1" + "@polkadot/x-textencoder" "8.4.1" + "@types/bn.js" "^5.1.0" + bn.js "^5.2.0" + ip-regex "^4.3.0" + "@polkadot/wasm-crypto-asmjs@^4.5.1": version "4.5.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.5.1.tgz#e1025a49e106db11d1187caf65f56c960ea2ad2b" @@ -1779,6 +1838,14 @@ "@babel/runtime" "^7.16.7" "@polkadot/x-global" "8.3.3" +"@polkadot/x-bigint@8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-8.4.1.tgz#d3ccddd26cdc5413f5c722d8c53ec523299e3ff1" + integrity sha512-QVP0UMoM0nBD998s3ESeaoSiVMEnHK3x0CCqocKO4l7ADNw8lfWdDG7Bb0+ymNaFYGz2KgEWxkN0VhNEnXzo0w== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@polkadot/x-fetch@^8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-8.3.3.tgz#8c81b928868efd573219c231b25f0bcc38107a1b" @@ -1789,6 +1856,16 @@ "@types/node-fetch" "^2.5.12" node-fetch "^2.6.7" +"@polkadot/x-fetch@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-8.4.1.tgz#7254cdb70b61aea79debd7d0c9ae5e126f78d90d" + integrity sha512-DPkgXZYt1B4xCzEw/3hxRc4/lR+NEr/b/GYijSPM8UsVoEKqHWTx2qCXrxvmKh1WD9reQ+oUACPVjRcBz5bs+g== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@types/node-fetch" "^2.5.12" + node-fetch "^2.6.7" + "@polkadot/x-global@8.3.3", "@polkadot/x-global@^8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-8.3.3.tgz#ee2f4a0acd46626bc04174e1bf966478a2feef94" @@ -1796,7 +1873,14 @@ dependencies: "@babel/runtime" "^7.16.7" -"@polkadot/x-randomvalues@8.3.3", "@polkadot/x-randomvalues@^8.3.3": +"@polkadot/x-global@8.4.1", "@polkadot/x-global@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-8.4.1.tgz#61def1f5962001200c17b9fde92f6837736b3c55" + integrity sha512-MQs89LKQrJwiXjV7dY2kDOPNaiWrwaQ/Fzg93ycB2xMCclRV1jRFRhnhTPJ8Ao79lhCCoazd7pXIyFgfifxdqg== + dependencies: + "@babel/runtime" "^7.17.2" + +"@polkadot/x-randomvalues@8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-8.3.3.tgz#29f855d903fdcac1cb42cacbbc85ca5db7eaccd8" integrity sha512-yxM6GWQholf+vY4dHxKVwtJwDzNUz4UJlL/iN3PA0cuhQ37gxmtJugnNAllcFd8LDNXEN47Ky6Ifw1OHHmZaVw== @@ -1804,6 +1888,14 @@ "@babel/runtime" "^7.16.7" "@polkadot/x-global" "8.3.3" +"@polkadot/x-randomvalues@8.4.1", "@polkadot/x-randomvalues@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-8.4.1.tgz#4488d2d6b982e7b2ecafc573cd25e3f1e85a512c" + integrity sha512-1dRIFIib4RzyVo0k5oMLuxqSuZEV6UVvvN+jJw9G/9P1ggZtHjM1KwoFcyHgvpk2RWTB9eJZFemwSvQTpdmSJw== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@polkadot/x-textdecoder@8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-8.3.3.tgz#d2ef1c63c712f015489025eb95e01a466a5614a7" @@ -1812,6 +1904,14 @@ "@babel/runtime" "^7.16.7" "@polkadot/x-global" "8.3.3" +"@polkadot/x-textdecoder@8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-8.4.1.tgz#5a227006d183f5ec3a8a331ca38e4969d24c4a97" + integrity sha512-qbSXyR2KvE1bO6QGsxWU3Yrx5e70rX2lwv0MHG++MyyNaDoBM3hjx14lF911bYRWXR6MW4eZ+0Nakn0oM5uSKw== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@polkadot/x-textencoder@8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-8.3.3.tgz#f59bf164fcd5ca9899c61065f36911cabec7c9f8" @@ -1820,6 +1920,14 @@ "@babel/runtime" "^7.16.7" "@polkadot/x-global" "8.3.3" +"@polkadot/x-textencoder@8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-8.4.1.tgz#ea01733ce6b80821bf8af943a1d98878a9150af5" + integrity sha512-1UYuckNOk6NUk70Y/SGbK8oyGbqPlrny1x2OWoK/BT3/tyL2xKVV5TlXDOiFrX1PChbskXye5M8blCTYikFiJg== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@polkadot/x-ws@^8.3.3": version "8.3.3" resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-8.3.3.tgz#ab06d87637cb9b86fa341cc95e52f06cc4265d74" @@ -1830,6 +1938,16 @@ "@types/websocket" "^1.0.4" websocket "^1.0.34" +"@polkadot/x-ws@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-8.4.1.tgz#502fc034588cd81ed9dc0301ca70197bf3d78799" + integrity sha512-u9rsJdVrBkSARy8BhJPho1yMMBSiI/Z/W8ZQRr1I28/QOwl02VYktFpFWWrhkBHsL9JlZ0wfnyKBPXrw8Wp2Vw== + dependencies: + "@babel/runtime" "^7.17.2" + "@polkadot/x-global" "8.4.1" + "@types/websocket" "^1.0.5" + websocket "^1.0.34" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -1941,6 +2059,11 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@scure/base@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.0.0.tgz#109fb595021de285f05a7db6806f2f48296fcee7" + integrity sha512-gIVaYhUsy+9s58m/ETjSJVKHhKTBMmcRb9cEV5/5dwvfDlfORjKrFsDeDHWRrm6RjcPvCLZFwGJjAjLj1gg4HA== + "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" @@ -1969,6 +2092,11 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@substrate/ss58-registry@^1.14.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.15.0.tgz#211c7c9e5cbcbfb6ee9c300efd719a038af38c36" + integrity sha512-UU5uN8HEp0NM22od6kHWLltX0McQPgPX6O3gj7fSf1mMExsCS5fzW88gv1WaVaT8Q+umvGgnIAF7+Tvp8fqTFw== + "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.14" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" @@ -2016,6 +2144,13 @@ dependencies: "@types/node" "*" +"@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + "@types/component-emitter@^1.2.10": version "1.2.10" resolved "https://registry.yarnpkg.com/@types/component-emitter/-/component-emitter-1.2.10.tgz#ef5b1589b9f16544642e473db5ea5639107ef3ea" @@ -2158,6 +2293,13 @@ dependencies: "@types/node" "*" +"@types/websocket@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.5.tgz#3fb80ed8e07f88e51961211cd3682a3a4a81569c" + integrity sha512-NbsqiNX9CnEfC1Z0Vf4mE1SgAJ07JnRYcNex7AJ9zAVzmiGHmjKFEk7O4TJIsgv2B1sLEb6owKFZrACwdYngsQ== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "20.2.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" @@ -2919,6 +3061,11 @@ bn.js@^4.0.0, bn.js@^4.11.9, bn.js@^4.12.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== +bn.js@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + borc@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/borc/-/borc-2.1.2.tgz#6ce75e7da5ce711b963755117dd1b187f6f8cf19" @@ -8406,6 +8553,13 @@ rxjs@^7.5.2: dependencies: tslib "^2.1.0" +rxjs@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d" + integrity sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" From 4c4088ab68e0e7e08d04e4b8fcab2ca8bfd56389 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Thu, 24 Feb 2022 11:36:43 +0000 Subject: [PATCH 16/34] v2.0.47 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48fe10cf..790c56b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.46", + "version": "2.0.47", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 1e9d97904104e4b57240ae06e7fd4d0e4b5a8389 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Sat, 26 Feb 2022 00:38:44 +0000 Subject: [PATCH 17/34] v1.0.40-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 790c56b2..5b7c8a18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.47", + "version": "1.0.40-rc.2", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 6518bc06f93babd055d66fa9cb42434d85429dcc Mon Sep 17 00:00:00 2001 From: Yuri Date: Sat, 26 Feb 2022 01:18:51 +0000 Subject: [PATCH 18/34] substra no longer guatranteed finalised block emission --- cli/run-listener.ts | 1 + src/rmrk2.0.0/listener.ts | 72 +++++++++++++++++++++++++++++++++------ 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/cli/run-listener.ts b/cli/run-listener.ts index 6342466f..41d24312 100755 --- a/cli/run-listener.ts +++ b/cli/run-listener.ts @@ -41,6 +41,7 @@ const runListener = async () => { prefixes: ["0x726d726b", "0x524d524b"], consolidateFunction, storageProvider, + loggerEnabled: true }); const subscriber = listener.initialiseObservable(); subscriber.subscribe((val) => console.log(val)); diff --git a/src/rmrk2.0.0/listener.ts b/src/rmrk2.0.0/listener.ts index 31f14e92..e0056ba5 100644 --- a/src/rmrk2.0.0/listener.ts +++ b/src/rmrk2.0.0/listener.ts @@ -1,5 +1,4 @@ import "isomorphic-fetch"; -import "@polkadot/api-augment"; import { ApiPromise } from "@polkadot/api"; import { Observable, Subscriber } from "rxjs"; import { Header } from "@polkadot/types/interfaces/runtime"; @@ -16,7 +15,7 @@ import { ConsolidatorReturnType } from "./tools/consolidator/consolidator"; import fetchRemarks from "./tools/fetchRemarks"; import { hexToString } from "@polkadot/util"; import { VERSION } from "./tools/constants"; -import { PromiseRpcResult } from "@polkadot/api/types"; +import { PromiseRpcResult } from "@polkadot/api-base/types/rpc"; interface IProps { polkadotApi: ApiPromise | null; @@ -26,6 +25,7 @@ interface IProps { consolidateFunction: (remarks: Remark[]) => Promise; storageProvider?: IStorageProvider; storageKey?: string; + loggerEnabled?: boolean; } export interface IStorageProvider { @@ -83,6 +83,7 @@ export class RemarkListener { private missingBlockCallsFetched: boolean; private prefixes: string[]; private currentBlockNum: number; + private loggerEnabled: boolean; public storageProvider: IStorageProvider; private consolidateFunction: ( remarks: Remark[] @@ -94,6 +95,7 @@ export class RemarkListener { consolidateFunction, storageProvider, storageKey, + loggerEnabled = false, }: IProps) { if (!polkadotApi) { throw new Error( @@ -112,6 +114,7 @@ export class RemarkListener { this.prefixes = prefixes || ["0x726d726b", "0x524d524b"]; this.consolidateFunction = consolidateFunction; this.storageProvider = storageProvider || new StorageProvider(storageKey); + this.loggerEnabled = loggerEnabled; } private initialize = async () => { @@ -129,6 +132,12 @@ export class RemarkListener { } }; + private logger = (message: string) => { + if (this.loggerEnabled) { + console.log(message); + } + }; + /* Rxjs observable for finalised remarks, this will return all of consolidated remarks */ public initialiseObservable = (): Observable => { const subscriber = new Observable((observer) => { @@ -153,9 +162,18 @@ export class RemarkListener { /* Fetch blocks between last block in dump and last block on chain */ - public async fetchMissingBlockCalls(latestBlock: number): Promise { + public async fetchMissingBlockCalls( + latestBlock: number, + toBlock?: number + ): Promise { try { - const to = await getLatestFinalizedBlock(this.apiPromise); + const to = toBlock || (await getLatestFinalizedBlock(this.apiPromise)); + + this.logger( + `Fetching missing or skipped blocks between ${ + latestBlock + 1 + } and ${to}` + ); return await fetchRemarks( this.apiPromise, latestBlock + 1, @@ -199,6 +217,16 @@ export class RemarkListener { ...this.latestBlockCallsFinalised, ]; + // Logging + if (blockCalls.length > 0 && this.loggerEnabled) { + const blockNums = blockCalls.map((blockCall) => blockCall.block); + this.logger( + `Consolidating block range between: ${blockNums[0]} and ${ + blockNums[blockNums.length - 1] + }` + ); + } + const remarks = getRemarksFromBlocks(blockCalls, this.prefixes); this.latestBlockCallsFinalised = []; this.missingBlockCalls = []; @@ -222,7 +250,7 @@ export class RemarkListener { Subscribe to latest block heads, (finalised, and un-finalised) Save them to 2 separate arrays, and once block is finalised, remove it from unfinalised array this.latestBlockCalls is array of unfinalised blocks, - we keep it for reference in case burnr wants to disable remarks that are being interacted with + we keep it for reference in case burner wants to disable remarks that are being interacted with */ private async initialiseListener({ finalised }: { finalised: boolean }) { const headSubscriber = finalised @@ -244,13 +272,29 @@ export class RemarkListener { this.prefixes, this.apiPromise ); - const filteredCalls = calls.filter((call) => { return hexToString(call.value).includes(`::${VERSION}::`); }); + const latestFinalisedBlockNum = header.number.toNumber(); + if (finalised) { - this.currentBlockNum = header.number.toNumber(); + const latestSavedBlock = this.currentBlockNum; + // Compare block sequence order to see if there's a skipped finalised block + if ( + latestSavedBlock && + latestSavedBlock + 1 < latestFinalisedBlockNum && + this.missingBlockCallsFetched + ) { + // Fetch all the missing blocks and save their remarks for next consolidation. + this.missingBlockCallsFetched = false; + this.missingBlockCalls = await this.fetchMissingBlockCalls( + latestSavedBlock, + latestFinalisedBlockNum - 1 + ); + this.missingBlockCallsFetched = true; + } + this.currentBlockNum = latestFinalisedBlockNum; } // Update local db latestBlock @@ -260,7 +304,7 @@ export class RemarkListener { filteredCalls.length === 0 ) { try { - await this.storageProvider.set(header.number.toNumber()); + await this.storageProvider.set(latestFinalisedBlockNum); } catch (e: any) { console.error(e); } @@ -268,7 +312,7 @@ export class RemarkListener { if (filteredCalls.length > 0) { const blockCalls: BlockCalls = { - block: header.number.toNumber(), + block: latestFinalisedBlockNum, calls: filteredCalls, }; @@ -276,13 +320,19 @@ export class RemarkListener { if (finalised) { this.latestBlockCallsFinalised.push(blockCalls); // Now that block has been finalised, - // remove remarks that we found in it from unfinalised blockCalls array that we keep in memory + // remove remarks that we found in it from unfinalised blockCalls array that we keep in memory or stalled blocks (more than 10 blocks) this.latestBlockCalls = this.latestBlockCalls.filter( - (item) => item?.block !== blockCalls.block + (item) => + item?.block !== blockCalls.block || + blockCalls.block - item.block > 20 ); // Call consolidate to re-consolidate and fire subscription event back to subscriber await this.consolidate(); } else { + // Filter stalled blocks (20 blocks) to free up memory + this.latestBlockCalls = this.latestBlockCalls.filter( + (item) => blockCalls.block - item.block > 20 + ); this.latestBlockCalls.push(blockCalls); /* If someone is listening to unfinalised blocks, return them here */ if (this.observerUnfinalised) { From a829013b67e019b2e8410acb06fd1a371f1fef30 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Sat, 26 Feb 2022 01:24:06 +0000 Subject: [PATCH 19/34] v2.0.49 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b7c8a18..531f3dd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "1.0.40-rc.2", + "version": "2.0.49", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From a1436dc353efc20472b14573e7dbbc4e5d25d995 Mon Sep 17 00:00:00 2001 From: Yuri Date: Sat, 26 Feb 2022 03:17:31 +0000 Subject: [PATCH 20/34] Update listener.ts --- src/rmrk2.0.0/listener.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rmrk2.0.0/listener.ts b/src/rmrk2.0.0/listener.ts index e0056ba5..0e7626c7 100644 --- a/src/rmrk2.0.0/listener.ts +++ b/src/rmrk2.0.0/listener.ts @@ -174,12 +174,16 @@ export class RemarkListener { latestBlock + 1 } and ${to}` ); - return await fetchRemarks( + const remarks = await fetchRemarks( this.apiPromise, latestBlock + 1, to, this.prefixes ); + + this.logger(`Found ${remarks.length} remarks`); + + return remarks; } catch (error: any) { console.log(error); return []; @@ -310,6 +314,10 @@ export class RemarkListener { } } + if (filteredCalls.length < 1 && this.missingBlockCalls.length > 0) { + await this.consolidate(); + } + if (filteredCalls.length > 0) { const blockCalls: BlockCalls = { block: latestFinalisedBlockNum, From 54e109e2ecf5866dcf8686b72dd473ec72de0f60 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Sat, 26 Feb 2022 03:19:07 +0000 Subject: [PATCH 21/34] v2.0.50 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 531f3dd1..b0832638 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.49", + "version": "2.0.50", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From fcd22e38426b9f66a7a5e18c1a2a60a4b6e5604e Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 28 Feb 2022 00:24:10 +0000 Subject: [PATCH 22/34] update polkadot deps --- package.json | 5 +- yarn.lock | 424 ++++++++++++--------------------------------------- 2 files changed, 98 insertions(+), 331 deletions(-) diff --git a/package.json b/package.json index b0832638..4ece480a 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,7 @@ "@babel/preset-env": "^7.13.9", "@babel/preset-typescript": "^7.13.0", "@pinata/sdk": "^1.1.13", - "@polkadot/api": "^7.9.1", - "@polkadot/extension-dapp": "^0.42.7", + "@polkadot/api": "^7.10.1", "@polkadot/keyring": "^8.4.1", "@polkadot/util-crypto": "^8.4.1", "@polkadot/x-randomvalues": "^8.4.1", @@ -89,7 +88,7 @@ "webpack-cli": "^4.5.0" }, "dependencies": { - "@polkadot/api-augment": "^7.9.1", + "@polkadot/api-augment": "^7.10.1", "JSONStream": "^1.3.5", "chalk": "^4.1.0", "emoji-regex": "^9.2.2", diff --git a/yarn.lock b/yarn.lock index bed58408..97681ee8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -842,7 +842,7 @@ "@babel/helper-validator-option" "^7.12.17" "@babel/plugin-transform-typescript" "^7.13.0" -"@babel/runtime@^7.16.3", "@babel/runtime@^7.16.7": +"@babel/runtime@^7.16.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa" integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ== @@ -1404,21 +1404,11 @@ resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw== -"@noble/hashes@0.5.7": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-0.5.7.tgz#8605d84b34daf43d15c344fae54f0a1d5d5a4632" - integrity sha512-R9PPYv7TqoYi+enikzZvwRQesGTxR0+jwqzZJGL0uNcf2NFL+lt/uvCCewtXXmr6jWBxiMuNjBfJwKv9UJaCng== - "@noble/hashes@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== -"@noble/secp256k1@1.3.4": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.3.4.tgz#158ded712d09237c0d3428be60dc01ce8ebab9fb" - integrity sha512-ZVRouDO5mbdCiDg4zCd3ZZABduRtpy4tCnB33Gh9upHe9tRzpiqbRSN1VTjrj/2g8u2c6MBi0YLNnNQpBYOiWg== - "@noble/secp256k1@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.5.2.tgz#40399e4fba54f588fda14fc03a4499044fdcab24" @@ -1456,100 +1446,69 @@ is-ipfs "^0.6.0" recursive-fs "^1.1.2" -"@polkadot/api-augment@7.9.1", "@polkadot/api-augment@^7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-7.9.1.tgz#1a7bea0934757677b88d240bd43c8ae61ddce266" - integrity sha512-mfCcN73uXH/KN69Gfsijzas7L68FU/oV5AhVW4ijp7/9uG66+VWYkhRTnHRBgFdavUQME7fTQ+eQiyA3kRozTg== +"@polkadot/api-augment@7.10.1", "@polkadot/api-augment@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-7.10.1.tgz#efe43b8b62ac8c243c264b887b4622efc4cf5bdf" + integrity sha512-7OeCeiwtKAncXDO08a/cqU++IGYAVtFe0ENBJ+gzvj0VhlxXLF0zIH6qBtmELZGfl4f5JKO/yQd4iae8CbbVOQ== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/api-base" "7.9.1" - "@polkadot/rpc-augment" "7.9.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-augment" "7.9.1" - "@polkadot/types-codec" "7.9.1" + "@polkadot/api-base" "7.10.1" + "@polkadot/rpc-augment" "7.10.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-augment" "7.10.1" + "@polkadot/types-codec" "7.10.1" "@polkadot/util" "^8.4.1" -"@polkadot/api-base@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-7.9.1.tgz#54d35dfd662e2fdd5c8e462f35015c7697cad818" - integrity sha512-sxUEbQAt80/UEtnY5ho+tNmh0Zl8fJxhIaSlWbSyEr15gAOeP2vu4U9RxFzESOK393QuUsm8Ef0F79RkQYG5Ew== +"@polkadot/api-base@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-7.10.1.tgz#a11cec26687fa904d2fe8061b578934008d9185a" + integrity sha512-OsWM7jR1RM8OgpiSqGqLXFU8zE4v6yp0/d0ePP1NUtOas9agmSzRrDMUZ0mRFT2fI9I/YkgSOoZIlWFe6uPiIw== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/rpc-core" "7.9.1" - "@polkadot/types" "7.9.1" + "@polkadot/rpc-core" "7.10.1" + "@polkadot/types" "7.10.1" "@polkadot/util" "^8.4.1" rxjs "^7.5.4" -"@polkadot/api-derive@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-7.9.1.tgz#65ac3b494890c65ef9245038141e4badf7d657ff" - integrity sha512-yEBSGPkQN+eR2RPYWxt91pR5k8gljV8zYo+6m5NvESYCrPWzfOJL1mQRr+N+4cNcfZ+ZL0+8e0LUIlac4MMesw== +"@polkadot/api-derive@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-7.10.1.tgz#3ab5e70dcbdb312fd03439b71f21b5527017ff85" + integrity sha512-v/IOl9TH1CO2oyzJMBj+YCwtSDKGToob7J1F4i9cKu/7jNkfYlN9YuH5HHlfIL2ND+VorkYMrbiDLDl4Vpo6Uw== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/api" "7.9.1" - "@polkadot/api-augment" "7.9.1" - "@polkadot/api-base" "7.9.1" - "@polkadot/rpc-core" "7.9.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-codec" "7.9.1" + "@polkadot/api" "7.10.1" + "@polkadot/api-augment" "7.10.1" + "@polkadot/api-base" "7.10.1" + "@polkadot/rpc-core" "7.10.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-codec" "7.10.1" "@polkadot/util" "^8.4.1" "@polkadot/util-crypto" "^8.4.1" rxjs "^7.5.4" -"@polkadot/api@7.9.1", "@polkadot/api@^7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-7.9.1.tgz#56d29bb3bc4822e80c94b1267e8f63a7f067e6ea" - integrity sha512-bV+qaUwbNsPwLYVQ2ZmA7Spi8znp1RrNGJPP3ZiR96vdShe4iLizbkcPpV+X9+E/tytvTouU2pGUM4UW4EsQ5w== +"@polkadot/api@7.10.1", "@polkadot/api@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-7.10.1.tgz#a4866e7e139f00e0387687a9cc11545855ca7b5c" + integrity sha512-uZcDI9sVyCkIQB58IZMSs658dMl337Z0N3XrFPA+iJTih45NfeCWBZPjUhdYit+ss3TXAQHbZKlP7WamNNO2WA== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/api-augment" "7.9.1" - "@polkadot/api-base" "7.9.1" - "@polkadot/api-derive" "7.9.1" + "@polkadot/api-augment" "7.10.1" + "@polkadot/api-base" "7.10.1" + "@polkadot/api-derive" "7.10.1" "@polkadot/keyring" "^8.4.1" - "@polkadot/rpc-augment" "7.9.1" - "@polkadot/rpc-core" "7.9.1" - "@polkadot/rpc-provider" "7.9.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-augment" "7.9.1" - "@polkadot/types-codec" "7.9.1" - "@polkadot/types-create" "7.9.1" - "@polkadot/types-known" "7.9.1" + "@polkadot/rpc-augment" "7.10.1" + "@polkadot/rpc-core" "7.10.1" + "@polkadot/rpc-provider" "7.10.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-augment" "7.10.1" + "@polkadot/types-codec" "7.10.1" + "@polkadot/types-create" "7.10.1" + "@polkadot/types-known" "7.10.1" "@polkadot/util" "^8.4.1" "@polkadot/util-crypto" "^8.4.1" eventemitter3 "^4.0.7" rxjs "^7.5.4" -"@polkadot/extension-dapp@^0.42.7": - version "0.42.7" - resolved "https://registry.yarnpkg.com/@polkadot/extension-dapp/-/extension-dapp-0.42.7.tgz#0b442d274373980c042dd2e9b66d54cd77459f4c" - integrity sha512-KqibGf1tE81Azax7MRc/c0asnGcxum/tFpsGSVacz4mR8WV6P7tVO2q8/7CwFL8aQ6lg4Wm7EVKo2YYX1VurxA== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/extension-inject" "^0.42.7" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - -"@polkadot/extension-inject@^0.42.7": - version "0.42.7" - resolved "https://registry.yarnpkg.com/@polkadot/extension-inject/-/extension-inject-0.42.7.tgz#c6ff7612cd6e6069390f35782514a65d1aa912ce" - integrity sha512-ZGomWdr9NDZv6jhoaT4CJDSuYZo3mXm1HCi1SnwbVwd1o3lDMUciNef/5uZKT6ZhT88Q2Jr1Qg7pWdpXKRByLg== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/rpc-provider" "^7.5.1" - "@polkadot/types" "^7.5.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - "@polkadot/x-global" "^8.3.3" - -"@polkadot/keyring@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-8.3.3.tgz#931c809f9a3b092231b2d319007e02e64bec8f21" - integrity sha512-TgoIpaTqn7voT7lDu5W6p0Z+216OImpqtHuaiFy125ekCQurrf9BVIdwp56y5qoFLDAZ5i9gnWHMIgOQ6AJj/Q== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/util" "8.3.3" - "@polkadot/util-crypto" "8.3.3" - "@polkadot/keyring@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-8.4.1.tgz#71098121c60a05e1ad33653fcc521c52f22ad1b8" @@ -1559,14 +1518,6 @@ "@polkadot/util" "8.4.1" "@polkadot/util-crypto" "8.4.1" -"@polkadot/networks@8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-8.3.3.tgz#2def73213451f12bc940b0c9ce8942aebbe5d4a8" - integrity sha512-yj0DMqmzRZbvgaoZztV3/RPgYJjBhT17Dhu+FX/LUJzVbAF/RfjkzNsJT4Ta4kLDxQMYZq1avUac0ia2j9NcNw== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/util" "8.3.3" - "@polkadot/networks@8.4.1", "@polkadot/networks@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-8.4.1.tgz#c22585edb38f5ae0a329a1f471577d8b35bf64e4" @@ -1576,38 +1527,38 @@ "@polkadot/util" "8.4.1" "@substrate/ss58-registry" "^1.14.0" -"@polkadot/rpc-augment@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-7.9.1.tgz#f10272ebb44ea256a3d8b42bbcf4964205f1291f" - integrity sha512-8rI0cfNT7A6rdrk7lBRcB/1Qm8x6yarDTVUaRuqTBLzjgr/4WExg1h7sjjFOLVPE6T+SXBY0RKjRKglTcolv5g== +"@polkadot/rpc-augment@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-7.10.1.tgz#0b29386195a1f8523afe47a113f66a25b7f42c61" + integrity sha512-/ECg22GAQSwD+HloiUEIiz/Yt4uw7gHYS5Hb6VjlbO3q4L1pDcT5yFneB0YoVlbjAmriS+j3wRETzohj8QWOUg== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/rpc-core" "7.9.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-codec" "7.9.1" + "@polkadot/rpc-core" "7.10.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-codec" "7.10.1" "@polkadot/util" "^8.4.1" -"@polkadot/rpc-core@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-7.9.1.tgz#302210d7bebfc31740b2bff682e7a3be62bea613" - integrity sha512-p1Z0Ii+/w31EBS3lcE9fr83Gf3zZK7IM1+AEuCW7NGM9iHMTLZtzMKE23B34Hs8eR5JdDBcXMYtcwNL+W/I5jA== +"@polkadot/rpc-core@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-7.10.1.tgz#6cdeb4d9b367c98d6461b1636e842d4e1fa78b38" + integrity sha512-EXtCVXUfdO+/VqZLmaTgvMoEOn6vCCh9wmpkDd5QmQJTAS1Pk/imB6uFHgQGywSVXQxw/rT9g0MVxf3OlnbDNA== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/rpc-augment" "7.9.1" - "@polkadot/rpc-provider" "7.9.1" - "@polkadot/types" "7.9.1" + "@polkadot/rpc-augment" "7.10.1" + "@polkadot/rpc-provider" "7.10.1" + "@polkadot/types" "7.10.1" "@polkadot/util" "^8.4.1" rxjs "^7.5.4" -"@polkadot/rpc-provider@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.9.1.tgz#1dd6e64c69a397ad117d2d9c2dbf14a9339b0fc0" - integrity sha512-gDcWFxzea5sfjEOCiO3rRRGxWYiUzlcra8PK/aS0H7GU6QnYNi7VXQY4fgM0VZbo1tkrw0+lBlpXrEZcPAP6Qg== +"@polkadot/rpc-provider@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.10.1.tgz#59e5eb9a424950e1d79a31a14d258518379b8319" + integrity sha512-UMcTC3y3oPkCmROx0SM7aziYw3Fs6MLOlIjxaWc9FQXOwBEva6tjYiFAMl4qmGzyvpoT7Q6/pePnE/pUKEG+Jw== dependencies: "@babel/runtime" "^7.17.2" "@polkadot/keyring" "^8.4.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-support" "7.9.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-support" "7.10.1" "@polkadot/util" "^8.4.1" "@polkadot/util-crypto" "^8.4.1" "@polkadot/x-fetch" "^8.4.1" @@ -1617,151 +1568,67 @@ mock-socket "^9.1.2" nock "^13.2.4" -"@polkadot/rpc-provider@^7.5.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-7.6.1.tgz#7e21c1f2125bcd956df40472183583e5b877c7f5" - integrity sha512-jevBGp/n16ra+Y+JV8nnNRTtKPU1Oo3nBiyMhUla6crWLjMnLAYvcyteRq27aBmU3Olh4n/0xDVNCvTxfEghxQ== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/keyring" "^8.3.3" - "@polkadot/types" "7.6.1" - "@polkadot/types-support" "7.6.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - "@polkadot/x-fetch" "^8.3.3" - "@polkadot/x-global" "^8.3.3" - "@polkadot/x-ws" "^8.3.3" - eventemitter3 "^4.0.7" - mock-socket "^9.1.2" - nock "^13.2.2" - -"@polkadot/types-augment@7.6.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.6.1.tgz#b65d21e9e89d6e7f34703fb4bd7f7a8d6aea7db3" - integrity sha512-OLTVgMlSiZy37eXhUa6zYRHBUK7eJ2opovAKYpk+S8biA4nrq7LUXis2MnCP9C1TvsQozPlZ5q0M89WRVw96TA== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/types" "7.6.1" - "@polkadot/types-codec" "7.6.1" - "@polkadot/util" "^8.3.3" - -"@polkadot/types-augment@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.9.1.tgz#a7ba01d89d6a80fa3a403c31c26ecad28e6dbcfa" - integrity sha512-2dl7CzgEBgGSjcqNcH2F2ZIlGVkf/mtbvu8ObmVw4z/ojpRLv26MO2TexF6fUMAFi7uNnq4r4yB9NsAxdUv2ZQ== +"@polkadot/types-augment@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-7.10.1.tgz#5c6ea06c72ee60dfae53b801fbac5813766c12f8" + integrity sha512-HEE9k6ehxFwxHUTDjmfK9kO2fTYeCvK9PBUM4g/yfKJ1Os53tglO27axXT0lLWnkWIEftYznm5fOE/qj8XcPKQ== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/types" "7.9.1" - "@polkadot/types-codec" "7.9.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-codec" "7.10.1" "@polkadot/util" "^8.4.1" -"@polkadot/types-codec@7.6.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.6.1.tgz#523ae3b0ae29cceda71dd9d4c0072f4e8381921a" - integrity sha512-Zm4oQJK4BeB3reElKCVfJm1tzVK2O+hfS9QlKJAHy+kYwPB20o0UYv1d0K1WOZedSmVIaoW/diOaxMePV1S55Q== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/util" "^8.3.3" - -"@polkadot/types-codec@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.9.1.tgz#b41c090cce86c3416ded572c2d38beec00b69408" - integrity sha512-wFSvVrBuk7s8SF1pIs1ftwE0B1TpU2CuWy/AGCh4TG510nbrpCh7DaJQJKfsRXprpbo08ybkocT2p6Snv6SIOA== +"@polkadot/types-codec@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-7.10.1.tgz#24c0ac5a765f2cf17449c516520e969ab30449fc" + integrity sha512-S2rCZBKduQYdCSop7FUfnVdGPitgJQkA009migEmrTgu9pJx1iWPUSHl6IiQwRfoybwe/pavZieyNctDSTdM4w== dependencies: "@babel/runtime" "^7.17.2" "@polkadot/util" "^8.4.1" -"@polkadot/types-create@7.6.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.6.1.tgz#bc5fbc461b7600e8da86776eb99ca31f5c306947" - integrity sha512-vGUT5O3/bYpP/NOa/5TV8aCDoDE8DbeRSiykzQ8ceOrnmB4VrlJ+L4zklyiuRdAFXPYmi+7S9Dzr/IrNrf72wg== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/types-codec" "7.6.1" - "@polkadot/util" "^8.3.3" - -"@polkadot/types-create@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.9.1.tgz#75575a30a6dc761aee5d4b7bac33d38493349bc2" - integrity sha512-/l0EIMrtQFlD7mltwyWv2GuZiOYCHWOSvMMIYSocmhijKIBlJb0Wsn5RIpmUaDojYre01tx5NSwnLH82uTK6mQ== +"@polkadot/types-create@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-7.10.1.tgz#af2c826d279f592de3a62c4895f81ca31bb62d91" + integrity sha512-60UiS7UBArU9rEWXk9pl4EcA6152mBWyIAChgL/uME3mvpoGoHizzF+/XtzS/bSbbSYsO5I01VipE0dIjzEAoQ== dependencies: "@babel/runtime" "^7.17.2" - "@polkadot/types-codec" "7.9.1" + "@polkadot/types-codec" "7.10.1" "@polkadot/util" "^8.4.1" -"@polkadot/types-known@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-7.9.1.tgz#1b97783f6cf78c2ee12c3311a9b7c073fefed4af" - integrity sha512-O4Mir1Iec4Dex+i5tu9ouUjD2hEV1LzwWsqnu690QoIKNdb4Kc3LDSBt4CyCsb/yTvn4tXIMwO+D3n0i91QJuQ== +"@polkadot/types-known@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-7.10.1.tgz#6f082e1d0b0c8528b74e57a41e06e82e09499bc0" + integrity sha512-9603BZL4RJud312NVHshv/Sd/CPtjw5xYe+k+4BmOuA3kxg3EPsejhHvT+zkQbcrggMvxIgI751/HZZP0h+Aew== dependencies: "@babel/runtime" "^7.17.2" "@polkadot/networks" "^8.4.1" - "@polkadot/types" "7.9.1" - "@polkadot/types-codec" "7.9.1" - "@polkadot/types-create" "7.9.1" + "@polkadot/types" "7.10.1" + "@polkadot/types-codec" "7.10.1" + "@polkadot/types-create" "7.10.1" "@polkadot/util" "^8.4.1" -"@polkadot/types-support@7.6.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.6.1.tgz#7b464459c42ade35ef2e507645eb7a06cfbb4e38" - integrity sha512-ssLpYW1bo535sQ2V0FqBag4egGZTObeP+dKlyEMP+MzF/xYLxf+jjJ0czyyjpyR0XR539KfSsdixa49wzgSnAg== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/util" "^8.3.3" - -"@polkadot/types-support@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.9.1.tgz#e883bec5ac5c1787083a0c8b8bb883f7eff546a0" - integrity sha512-WO0xE2P01KqfQ7vJH0DGRYeK/UdIEKakJLdm7Js5zXoWwAtjSJ9Xk66F6TOpqnji5dvYlVcEA0t3a5NgivuzcQ== +"@polkadot/types-support@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-7.10.1.tgz#1342d7a1ac2b863f2e481941a7ee740e5a5ffe79" + integrity sha512-mQbAY9TD+2jYMYEAt6VYBGasX9/niIgj+bH0AcIA1AzjNSjHuQ0/agfuRn29LijYpf6bD1Jz2TSjCKi8Tem1lg== dependencies: "@babel/runtime" "^7.17.2" "@polkadot/util" "^8.4.1" -"@polkadot/types@7.6.1", "@polkadot/types@^7.5.1": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.6.1.tgz#e521c799a92e4c7243dfc93b18f1e8007f0e1b52" - integrity sha512-4GotmyT6h5n2qpgqPKqzVzgZKuPS9fNMeQBBbhxZxjyFmSTYtIqQeyqFw1bgIGcsZBH81WK7yE1U221l8gmj1Q== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/keyring" "^8.3.3" - "@polkadot/types-augment" "7.6.1" - "@polkadot/types-codec" "7.6.1" - "@polkadot/types-create" "7.6.1" - "@polkadot/util" "^8.3.3" - "@polkadot/util-crypto" "^8.3.3" - rxjs "^7.5.2" - -"@polkadot/types@7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.9.1.tgz#db133d405a25b193b2b14c4ec4dcbc600014568e" - integrity sha512-yyBMqPh3pmEWY+G5XWwO8HK6Xh80rrrPiq+BoggPIue8c9ecrXhwRbOyzah7Gk4/Mq2My7nwsDwyhqJfwkUtKw== +"@polkadot/types@7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-7.10.1.tgz#c19dce979d68e9f9b32321b44746034e1a35d81f" + integrity sha512-nAe/X61NTMPQTGl2x5mAjnQQN2SPs5ta3g+luLmER1WBwrjC7HixBxMRqVxDEzcjQFU8DsRfh8buR5CIs6uNFQ== dependencies: "@babel/runtime" "^7.17.2" "@polkadot/keyring" "^8.4.1" - "@polkadot/types-augment" "7.9.1" - "@polkadot/types-codec" "7.9.1" - "@polkadot/types-create" "7.9.1" + "@polkadot/types-augment" "7.10.1" + "@polkadot/types-codec" "7.10.1" + "@polkadot/types-create" "7.10.1" "@polkadot/util" "^8.4.1" "@polkadot/util-crypto" "^8.4.1" rxjs "^7.5.4" -"@polkadot/util-crypto@8.3.3", "@polkadot/util-crypto@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-8.3.3.tgz#684a04c26bd390a150e83fe34840d9e219a22d24" - integrity sha512-kXaT2VTEbJq1wNiV0Dz5qJuVWy7pK+x1QLcyWC+6OFERYO+BCp1Y2bTOcLUeF/gyyR/ZaRMMdTyu0ZbHrwH0xg== - dependencies: - "@babel/runtime" "^7.16.7" - "@noble/hashes" "0.5.7" - "@noble/secp256k1" "1.3.4" - "@polkadot/networks" "8.3.3" - "@polkadot/util" "8.3.3" - "@polkadot/wasm-crypto" "^4.5.1" - "@polkadot/x-bigint" "8.3.3" - "@polkadot/x-randomvalues" "8.3.3" - ed2curve "^0.3.0" - micro-base "^0.10.2" - tweetnacl "^1.0.3" - "@polkadot/util-crypto@8.4.1", "@polkadot/util-crypto@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-8.4.1.tgz#41ff754dc995b681913fc0a484bb0d309221a703" @@ -1779,20 +1646,6 @@ ed2curve "^0.3.0" tweetnacl "^1.0.3" -"@polkadot/util@8.3.3", "@polkadot/util@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-8.3.3.tgz#0bd79f771a82a8276b0ca0e713068d23ee53abf2" - integrity sha512-8u1NShSHrCFeFvxWL8WAyRN8y1/iPvijqYCDeeHziBxCNBrL3VKDc9GNF11skeay/EKQiCHBSBeAYyyQOpLebA== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-bigint" "8.3.3" - "@polkadot/x-global" "8.3.3" - "@polkadot/x-textdecoder" "8.3.3" - "@polkadot/x-textencoder" "8.3.3" - "@types/bn.js" "^4.11.6" - bn.js "^4.12.0" - ip-regex "^4.3.0" - "@polkadot/util@8.4.1", "@polkadot/util@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-8.4.1.tgz#b84835c55585c8b5fc5608a99aa62ac815292ae7" @@ -1830,14 +1683,6 @@ "@polkadot/wasm-crypto-asmjs" "^4.5.1" "@polkadot/wasm-crypto-wasm" "^4.5.1" -"@polkadot/x-bigint@8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-8.3.3.tgz#3787c4cbfc996bda05c342a80c04bd58a1beaf4b" - integrity sha512-2CT25f0zN/uhch3KpM38jtQfFJ1zJCNT41exg49ztsOvm4f6l+6hW91NLhNAZ313B/c6Z4Lm3DalsjAOdBZ8Nw== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@polkadot/x-bigint@8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-8.4.1.tgz#d3ccddd26cdc5413f5c722d8c53ec523299e3ff1" @@ -1846,16 +1691,6 @@ "@babel/runtime" "^7.17.2" "@polkadot/x-global" "8.4.1" -"@polkadot/x-fetch@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-8.3.3.tgz#8c81b928868efd573219c231b25f0bcc38107a1b" - integrity sha512-+ScnWnt0i1IF+fM9IC+OnjkTi5NonK+ji8q861hwkNCtK2ziibibcD3mGavCA6wZvij4wUTovWEsTc5Su0+KTA== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@types/node-fetch" "^2.5.12" - node-fetch "^2.6.7" - "@polkadot/x-fetch@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-8.4.1.tgz#7254cdb70b61aea79debd7d0c9ae5e126f78d90d" @@ -1866,13 +1701,6 @@ "@types/node-fetch" "^2.5.12" node-fetch "^2.6.7" -"@polkadot/x-global@8.3.3", "@polkadot/x-global@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-8.3.3.tgz#ee2f4a0acd46626bc04174e1bf966478a2feef94" - integrity sha512-7DWjcNhTDIpYNiQmLq56o6xYOONr0i6WXdoPUxYrToxZWeWyj/FWaYMfttedLydABPcy87lmvIy8ECp7qCcnyw== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global@8.4.1", "@polkadot/x-global@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-8.4.1.tgz#61def1f5962001200c17b9fde92f6837736b3c55" @@ -1880,14 +1708,6 @@ dependencies: "@babel/runtime" "^7.17.2" -"@polkadot/x-randomvalues@8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-8.3.3.tgz#29f855d903fdcac1cb42cacbbc85ca5db7eaccd8" - integrity sha512-yxM6GWQholf+vY4dHxKVwtJwDzNUz4UJlL/iN3PA0cuhQ37gxmtJugnNAllcFd8LDNXEN47Ky6Ifw1OHHmZaVw== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@polkadot/x-randomvalues@8.4.1", "@polkadot/x-randomvalues@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-8.4.1.tgz#4488d2d6b982e7b2ecafc573cd25e3f1e85a512c" @@ -1896,14 +1716,6 @@ "@babel/runtime" "^7.17.2" "@polkadot/x-global" "8.4.1" -"@polkadot/x-textdecoder@8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-8.3.3.tgz#d2ef1c63c712f015489025eb95e01a466a5614a7" - integrity sha512-oEvFJv/F+fQ336ciRuJJgJFtfyOX6a2Nyr/5GCkiSQjkEIdnBUuO49yXpHNmQsNI0WndLWIEitiVVa9KuDslYw== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@polkadot/x-textdecoder@8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-8.4.1.tgz#5a227006d183f5ec3a8a331ca38e4969d24c4a97" @@ -1912,14 +1724,6 @@ "@babel/runtime" "^7.17.2" "@polkadot/x-global" "8.4.1" -"@polkadot/x-textencoder@8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-8.3.3.tgz#f59bf164fcd5ca9899c61065f36911cabec7c9f8" - integrity sha512-acVsJjmlQ7aluUq8JARY2wJAbf+6dvZNoUrvgzdX/jl5MqvqeIXmX3LX71MyidLt27Z537VDgNzWw8V/524AVQ== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@polkadot/x-textencoder@8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-8.4.1.tgz#ea01733ce6b80821bf8af943a1d98878a9150af5" @@ -1928,16 +1732,6 @@ "@babel/runtime" "^7.17.2" "@polkadot/x-global" "8.4.1" -"@polkadot/x-ws@^8.3.3": - version "8.3.3" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-8.3.3.tgz#ab06d87637cb9b86fa341cc95e52f06cc4265d74" - integrity sha512-Dd0kscZSb7MULVqo5isPZyqvErvgE7lYIwZ4IA0rNdgUWi3mrJWeeWrzVMxC6nbg6q1ahIEGxxZLMVzeI3u/Ew== - dependencies: - "@babel/runtime" "^7.16.7" - "@polkadot/x-global" "8.3.3" - "@types/websocket" "^1.0.4" - websocket "^1.0.34" - "@polkadot/x-ws@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-8.4.1.tgz#502fc034588cd81ed9dc0301ca70197bf3d78799" @@ -2137,13 +1931,6 @@ dependencies: "@types/node" "*" -"@types/bn.js@^4.11.6": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - "@types/bn.js@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" @@ -2286,13 +2073,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/websocket@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.4.tgz#1dc497280d8049a5450854dd698ee7e6ea9e60b8" - integrity sha512-qn1LkcFEKK8RPp459jkjzsfpbsx36BBt3oC3pITYtkoBw/aVX+EZFa5j3ThCRTNpLFvIMr5dSTD4RaMdilIOpA== - dependencies: - "@types/node" "*" - "@types/websocket@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.5.tgz#3fb80ed8e07f88e51961211cd3682a3a4a81569c" @@ -3056,7 +2836,7 @@ blob@0.0.5: resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bn.js@^4.0.0, bn.js@^4.11.9, bn.js@^4.12.0: +bn.js@^4.0.0, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -7166,11 +6946,6 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micro-base@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/micro-base/-/micro-base-0.10.2.tgz#f6f9f0bd949ce511883e5a99f9147d80ddc32f5a" - integrity sha512-lqqJrT7lfJtDmmiQ4zRLZuIJBk96t0RAc5pCrrWpL9zDeH5i/SUL85mku9HqzTI/OCZ8EQ3aicbMW+eK5Nyu5w== - micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -7565,7 +7340,7 @@ nise@^4.0.4: just-extend "^4.0.2" path-to-regexp "^1.7.0" -nock@^13.2.2, nock@^13.2.4: +nock@^13.2.4: version "13.2.4" resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.4.tgz#43a309d93143ee5cdcca91358614e7bde56d20e1" integrity sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug== @@ -8546,13 +8321,6 @@ run@^1.4.0: dependencies: minimatch "*" -rxjs@^7.5.2: - version "7.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.2.tgz#11e4a3a1dfad85dbf7fb6e33cbba17668497490b" - integrity sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w== - dependencies: - tslib "^2.1.0" - rxjs@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d" From d684d06f62681d184dc805ff34f7da615944cbc0 Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Mon, 28 Feb 2022 00:42:21 +0000 Subject: [PATCH 23/34] v2.0.51 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ece480a..f1971f61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.50", + "version": "2.0.51", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 4cbc9a5d806c3bc5a4995dcd368964c165019db6 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 28 Feb 2022 22:47:27 +0000 Subject: [PATCH 24/34] Invalidate extrinsic with royalty value less than 0 and more than 100 --- .../tools/consolidator/interactions/mint.ts | 5 ++ .../consolidator/interactions/setproperty.ts | 6 +- src/rmrk2.0.0/tools/validate-remark.ts | 27 +++++++ .../__snapshots__/mint.test.ts.snap | 75 +++++++++++++++++++ .../__snapshots__/setproperty.test.ts.snap | 64 ++++++++++++++++ test/2.0.0/consolidator/mint.test.ts | 56 +++++++++++++- test/2.0.0/consolidator/setproperty.test.ts | 16 ++++ 7 files changed, 247 insertions(+), 2 deletions(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/mint.ts b/src/rmrk2.0.0/tools/consolidator/interactions/mint.ts index 0593e328..eaeaee28 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/mint.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/mint.ts @@ -4,6 +4,7 @@ import { OP_TYPES } from "../../constants"; import { Collection } from "../../../classes/collection"; import { IConsolidatorAdapter } from "../adapters/types"; import { findRealOwner, isValidAddressPolkadotAddress } from "../utils"; +import { validateRoyaltiesPropertyValue } from "../../validate-remark"; export const validateMintNFT = async ( remark: Remark, @@ -47,6 +48,10 @@ export const validateMintNFT = async ( } } + if (nft.properties) { + validateRoyaltiesPropertyValue(nft.properties); + } + // nft.owner can be already set if mint remark has recipient field that allows to mint directly onto another nft nft.owner = nft.owner || remark.caller; nft.rootowner = nft.rootowner || remark.caller; diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/setproperty.ts b/src/rmrk2.0.0/tools/consolidator/interactions/setproperty.ts index 9f7be6f2..a78ba39e 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/setproperty.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/setproperty.ts @@ -4,7 +4,7 @@ import { OP_TYPES } from "../../constants"; import { IConsolidatorAdapter } from "../adapters/types"; import { findRealOwner } from "../utils"; import { Setproperty } from "../../../classes/setproperty"; -import { validateRemarkBase } from "../../validate-remark"; +import {validateRemarkBase, validateRoyaltiesPropertyValue} from "../../validate-remark"; import { hexToString } from "@polkadot/util"; import { Collection } from "../../../classes/collection"; @@ -108,6 +108,10 @@ export const setPropertyInteraction = async ( nft.properties = {}; } + if (nft.properties) { + validateRoyaltiesPropertyValue(nft.properties); + } + if ( typeof nft.properties[setPropertyEntity.key].value === typeof setPropertyEntity.property diff --git a/src/rmrk2.0.0/tools/validate-remark.ts b/src/rmrk2.0.0/tools/validate-remark.ts index ca30f84d..66482054 100644 --- a/src/rmrk2.0.0/tools/validate-remark.ts +++ b/src/rmrk2.0.0/tools/validate-remark.ts @@ -20,6 +20,7 @@ import { import { getRemarkData } from "./utils"; import { collectionRegexPattern } from "../classes/equippable"; import { PropertiesStruct } from "./validate-metadata"; +import { IProperties, IRoyaltyAttribute } from "./types"; const PartStruct = type({ type: enums(["slot", "fixed"]), @@ -170,6 +171,27 @@ export const validateCollection = (remark: string): any => { } }; +export const validateRoyaltiesPropertyValue = ( + properties: IProperties | undefined +) => { + if (properties as IProperties | undefined) { + + const royalties = Object.values(properties as IProperties).find( + (property) => property && property.type === "royalty" + ); + + // Royalties cannot be more than 100 and less than 0 + if ( + (royalties as IRoyaltyAttribute)?.value?.royaltyPercentFloat && + ((royalties as IRoyaltyAttribute)?.value?.royaltyPercentFloat < 0 || + (royalties as IRoyaltyAttribute)?.value?.royaltyPercentFloat > 100) + ) { + throw new Error("Royalty percentage value have to be between 0 and 100"); + } + } + return true; +}; + export const validateNFT = (remark: string): any => { // With array destructuring it's important to not remove unused destructured variables, as order is important const [_prefix, _op_type, _version, dataString] = remark.split("::"); @@ -177,6 +199,9 @@ export const validateNFT = (remark: string): any => { try { validateRemarkBase(remark, OP_TYPES.MINT); const obj = getRemarkData(dataString); + + validateRoyaltiesPropertyValue(obj?.properties); + return assert(obj, NFTStruct); } catch (error: any) { throw new Error( @@ -264,6 +289,8 @@ export const validateSetAttribute = (remark: string): any => { throw new Error("No NFT id specified for SETPROPERTY"); } const obj = getRemarkData(property); + + validateRoyaltiesPropertyValue({ [key]: obj }); return assert(obj, any()); } catch (error: any) { throw new Error( diff --git a/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap index 16d7bd0f..0142409e 100644 --- a/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap @@ -1,5 +1,53 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`rmrk2.0.0 Consolidator: MINT Should allow to mint NFT with royalties 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [], + "nfts": Object { + "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000999": Object { + "block": 3, + "burned": "", + "changes": Array [], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [], + "properties": Object { + "royaltyInfo": Object { + "type": "royalty", + "value": Object { + "receiver": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "royaltyPercentFloat": 2.3, + }, + }, + }, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000999", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + exports[`rmrk2.0.0 Consolidator: MINT Should mint a NFT and make another NFT an owner 1`] = ` Object { "bases": Object {}, @@ -100,6 +148,33 @@ Object { } `; +exports[`rmrk2.0.0 Consolidator: MINT Should not allow to mint NFT with invalid royalties 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [ + Object { + "block": 3, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "message": "[MINT] Dead before instantiation: Royalty percentage value have to be between 0 and 100", + "object_id": "RMRK::MINT::2.0.0::{\\"collection\\"%3A\\"d43593c715a56da27d-KANARIABIRDS\\"%2C\\"symbol\\"%3A\\"KANR\\"%2C\\"transferable\\"%3A1%2C\\"sn\\"%3A\\"00000999\\"%2C\\"properties\\"%3A{\\"royaltyInfo\\"%3A{\\"type\\"%3A\\"royalty\\"%2C\\"value\\"%3A{\\"royaltyPercentFloat\\"%3A101%2C\\"receiver\\"%3A\\"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty\\"}}}}", + "op_type": "MINT", + }, + ], + "nfts": Object {}, +} +`; + exports[`rmrk2.0.0 Consolidator: MINT Should not allow to mint a NFT without a calss 1`] = ` Object { "bases": Object {}, diff --git a/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap index 90c1fe97..3079f84b 100644 --- a/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap @@ -147,6 +147,70 @@ Object { } `; +exports[`rmrk2.0.0 Consolidator: SETPROPERTY should not allow to mutate royalty to an invalid value 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + "d43593c715a56da27d-KANARIAGEMS": Collection { + "block": 3, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIAGEMS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIAGEMS", + }, + }, + "invalid": Array [], + "nfts": Object { + "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "block": 4, + "burned": "", + "changes": Array [], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [], + "properties": Object { + "royaltyInfo": Object { + "_mutation": Object { + "allowed": true, + }, + "type": "royalty", + "value": Object { + "receiver": "xxx", + "royaltyPercentFloat": 101, + }, + }, + "test": Object { + "type": "string", + "value": "foo", + }, + }, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000777", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + exports[`rmrk2.0.0 Consolidator: SETPROPERTY should throw if we are trying to mutate property with no matching extra call condition 1`] = ` Object { "bases": Object {}, diff --git a/test/2.0.0/consolidator/mint.test.ts b/test/2.0.0/consolidator/mint.test.ts index dd8686b1..157d31be 100644 --- a/test/2.0.0/consolidator/mint.test.ts +++ b/test/2.0.0/consolidator/mint.test.ts @@ -1,4 +1,4 @@ -import { Consolidator } from "../../../src/rmrk2.0.0"; +import { Consolidator, NFT } from "../../../src/rmrk2.0.0"; import { createCollectionMock, getBlockCallsMock, @@ -46,4 +46,58 @@ describe("rmrk2.0.0 Consolidator: MINT", () => { const consolidator = new Consolidator(); expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); }); + + it("Should allow to mint NFT with royalties", async () => { + const nft = new NFT({ + block: 0, + collection: createCollectionMock().id, + symbol: "KANR", + sn: "999".padStart(8, "0"), + transferable: 1, + owner: getBobKey().address, + properties: { + royaltyInfo: { + type: "royalty", + value: { + royaltyPercentFloat: 2.3, + receiver: getBobKey().address, + }, + }, + }, + }); + + const remarks = getRemarksFromBlocksMock([ + ...getBlockCallsMock(createCollectionMock().create()), + ...getBlockCallsMock(nft.mint()), + ]); + const consolidator = new Consolidator(); + expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); + }); + + it("Should not allow to mint NFT with invalid royalties", async () => { + const nft = new NFT({ + block: 0, + collection: createCollectionMock().id, + symbol: "KANR", + sn: "999".padStart(8, "0"), + transferable: 1, + owner: getBobKey().address, + properties: { + royaltyInfo: { + type: "royalty", + value: { + royaltyPercentFloat: 101, + receiver: getBobKey().address, + }, + }, + }, + }); + + const remarks = getRemarksFromBlocksMock([ + ...getBlockCallsMock(createCollectionMock().create()), + ...getBlockCallsMock(nft.mint()), + ]); + const consolidator = new Consolidator(); + expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); + }); }); diff --git a/test/2.0.0/consolidator/setproperty.test.ts b/test/2.0.0/consolidator/setproperty.test.ts index 0b7a2e0e..24c7bd64 100644 --- a/test/2.0.0/consolidator/setproperty.test.ts +++ b/test/2.0.0/consolidator/setproperty.test.ts @@ -274,4 +274,20 @@ describe("rmrk2.0.0 Consolidator: SETPROPERTY", () => { "[SETPROPERTY] Only issuer can mutate an attribute of type 'royalty'." ); }); + + it("should not allow to mutate royalty to an invalid value", async () => { + const remarks = getRemarksFromBlocksMock([ + ...getSetupRemarks(), + ...getBlockCallsMock(mintNftWithProperties().mint()), + ...getBlockCallsMock( + mintNftWithProperties(4).setproperty("royaltyInfo", { + receiver: "xxx", + royaltyPercentFloat: 101, + }) + ), + ]); + const consolidator = new Consolidator(); + const consolidatedResult = await consolidator.consolidate(remarks); + expect(consolidatedResult).toMatchSnapshot(); + }); }); From f3c835d34541da0b1f95b833d42facb7165a41db Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Mon, 28 Feb 2022 22:50:55 +0000 Subject: [PATCH 25/34] v2.0.52 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1971f61..87b350c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.51", + "version": "2.0.52", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 52b17a1978610674d068f92e49281604bb61e1a0 Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 1 Mar 2022 12:40:51 +0000 Subject: [PATCH 26/34] Convert address according to ss58Format --- src/rmrk2.0.0/classes/changeissuer.ts | 13 +- src/rmrk2.0.0/classes/nft.ts | 17 +- src/rmrk2.0.0/classes/send.ts | 10 +- .../tools/consolidator/consolidator.ts | 6 +- .../consolidator/interactions/changeIssuer.ts | 7 +- .../tools/consolidator/interactions/send.ts | 1 - .../__snapshots__/send.test.ts.snap | 152 ++++++++++++++++++ test/2.0.0/consolidator/send.test.ts | 13 +- 8 files changed, 204 insertions(+), 15 deletions(-) diff --git a/src/rmrk2.0.0/classes/changeissuer.ts b/src/rmrk2.0.0/classes/changeissuer.ts index 3cb44811..7c79cae8 100644 --- a/src/rmrk2.0.0/classes/changeissuer.ts +++ b/src/rmrk2.0.0/classes/changeissuer.ts @@ -1,4 +1,6 @@ import { validateChangeIssuer } from "../tools/validate-remark"; +import { isValidAddressPolkadotAddress } from "../tools/consolidator/utils"; +import { encodeAddress } from "@polkadot/keyring"; export class ChangeIssuer { issuer: string; @@ -9,11 +11,18 @@ export class ChangeIssuer { this.id = id; } - static fromRemark(remark: string): ChangeIssuer | string { + static fromRemark( + remark: string, + ss58Format?: number + ): ChangeIssuer | string { try { validateChangeIssuer(remark); const [prefix, op_type, version, id, issuer] = remark.split("::"); - return new ChangeIssuer(issuer, id); + let encodedIssuer = issuer; + if (isValidAddressPolkadotAddress(issuer)) { + encodedIssuer = encodeAddress(issuer, ss58Format); + } + return new ChangeIssuer(encodedIssuer, id); } catch (e: any) { console.error(e.message); console.log(`CHANGEISSUER error: full input was ${remark}`); diff --git a/src/rmrk2.0.0/classes/nft.ts b/src/rmrk2.0.0/classes/nft.ts index 15c24ba2..80eee264 100644 --- a/src/rmrk2.0.0/classes/nft.ts +++ b/src/rmrk2.0.0/classes/nft.ts @@ -9,6 +9,7 @@ import { EMOTE_NAMESPACES } from "./emote"; import { IProperties } from "../tools/types"; import { Theme } from "./base"; import { isValidAddressPolkadotAddress } from "../tools/consolidator/utils"; +import { encodeAddress } from "@polkadot/keyring"; interface INftInstanceProps { block: number; @@ -112,7 +113,11 @@ export class NFT { return `${PREFIX}::${OP_TYPES.BURN}::${VERSION}::${id}`; } - static fromRemark(remark: string, block?: number): NFT | string { + static fromRemark( + remark: string, + block?: number, + ss58Format?: number + ): NFT | string { if (!block) { block = 0; } @@ -121,6 +126,10 @@ export class NFT { const [prefix, op_type, version, dataString, recipient] = remark.split( "::" ); + let recipientEncoded = recipient; + if (isValidAddressPolkadotAddress(recipient)) { + recipientEncoded = encodeAddress(recipient, ss58Format); + } const obj = getRemarkData(dataString); return new this({ block, @@ -132,9 +141,9 @@ export class NFT { : parseInt(obj.transferable, 10), sn: obj.sn, metadata: obj.metadata, - owner: recipient, - rootowner: isValidAddressPolkadotAddress(recipient) - ? recipient + owner: recipientEncoded, + rootowner: isValidAddressPolkadotAddress(recipientEncoded) + ? recipientEncoded : undefined, properties: obj.properties || {}, }); diff --git a/src/rmrk2.0.0/classes/send.ts b/src/rmrk2.0.0/classes/send.ts index 6f8d7770..8695e962 100644 --- a/src/rmrk2.0.0/classes/send.ts +++ b/src/rmrk2.0.0/classes/send.ts @@ -1,4 +1,6 @@ import { validateSend } from "../tools/validate-remark"; +import { isValidAddressPolkadotAddress } from "../tools/consolidator/utils"; +import { encodeAddress } from "@polkadot/keyring"; export class Send { recipient: string; @@ -9,11 +11,15 @@ export class Send { this.id = id; } - static fromRemark(remark: string): Send | string { + static fromRemark(remark: string, ss58Format?: number): Send | string { try { validateSend(remark); const [_prefix, _op_type, _version, id, recipient] = remark.split("::"); - return new Send(id, recipient); + let recipientEncoded = recipient; + if (isValidAddressPolkadotAddress(recipient)) { + recipientEncoded = encodeAddress(recipient, ss58Format); + } + return new Send(id, recipientEncoded); } catch (e: any) { console.error(e.message); console.log(`SEND error: full input was ${remark}`); diff --git a/src/rmrk2.0.0/tools/consolidator/consolidator.ts b/src/rmrk2.0.0/tools/consolidator/consolidator.ts index 37d0d5d1..d647b5e7 100644 --- a/src/rmrk2.0.0/tools/consolidator/consolidator.ts +++ b/src/rmrk2.0.0/tools/consolidator/consolidator.ts @@ -381,7 +381,7 @@ export class Consolidator { const invalidate = this.updateInvalidCalls(OP_TYPES.MINT, remark).bind( this ); - const nft = NFT.fromRemark(remark.remark, remark.block); + const nft = NFT.fromRemark(remark.remark, remark.block, this.ss58Format); if (typeof nft === "string") { invalidate( @@ -439,7 +439,7 @@ export class Consolidator { this ); - const sendEntity = Send.fromRemark(remark.remark); + const sendEntity = Send.fromRemark(remark.remark, this.ss58Format); if (typeof sendEntity === "string") { invalidate( @@ -672,7 +672,7 @@ export class Consolidator { let changeIssuerEntity: ChangeIssuer; try { - changeIssuerEntity = getChangeIssuerEntity(remark); + changeIssuerEntity = getChangeIssuerEntity(remark, this.ss58Format); } catch (e: any) { invalidate(remark.remark, e.message); return true; diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/changeIssuer.ts b/src/rmrk2.0.0/tools/consolidator/interactions/changeIssuer.ts index 9e444612..6ab2b0d7 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/changeIssuer.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/changeIssuer.ts @@ -5,8 +5,11 @@ import { Remark } from "../remark"; import { ChangeIssuer } from "../../../classes/changeissuer"; import { Base } from "../../../classes/base"; -export const getChangeIssuerEntity = (remark: Remark): ChangeIssuer => { - const changeIssuerEntity = ChangeIssuer.fromRemark(remark.remark); +export const getChangeIssuerEntity = ( + remark: Remark, + ss58Format?: number +): ChangeIssuer => { + const changeIssuerEntity = ChangeIssuer.fromRemark(remark.remark, ss58Format); if (typeof changeIssuerEntity === "string") { throw new Error( diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/send.ts b/src/rmrk2.0.0/tools/consolidator/interactions/send.ts index 90e2d911..0635abbf 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/send.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/send.ts @@ -10,7 +10,6 @@ import { findRealOwner, isValidAddressPolkadotAddress, } from "../utils"; -import { uploadRMRKMetadata } from "../../metadata-to-ipfs"; export const sendInteraction = async ( remark: Remark, diff --git a/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap index bdf9a9ff..13a2e5b9 100644 --- a/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap @@ -178,6 +178,158 @@ Object { } `; +exports[`rmrk2.0.0 Consolidator: Send NFT to other NFT Should convert recipient according to passed ss58FOrmat 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [], + "nfts": Object { + "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "block": 3, + "burned": "", + "changes": Array [], + "children": Array [ + Object { + "equipped": "", + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "pending": true, + }, + ], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000777", + "symbol": "KANR", + "transferable": 1, + }, + "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { + "block": 4, + "burned": "", + "changes": Array [ + Object { + "block": 5, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "field": "owner", + "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "opType": "SEND", + }, + Object { + "block": 6, + "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "field": "owner", + "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "old": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "opType": "SEND", + }, + ], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "metadata": undefined, + "owner": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "pending": true, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000888", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + +exports[`rmrk2.0.0 Consolidator: Send NFT to other NFT Should convert recipient according to passed ss58Format 1`] = ` +Object { + "bases": Object {}, + "collections": Object { + "d43593c715a56da27d-KANARIABIRDS": Collection { + "block": 2, + "changes": Array [], + "id": "d43593c715a56da27d-KANARIABIRDS", + "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "max": 0, + "metadata": "https://some.url", + "symbol": "KANARIABIRDS", + }, + }, + "invalid": Array [], + "nfts": Object { + "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "block": 3, + "burned": "", + "changes": Array [], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "metadata": undefined, + "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "sn": "00000777", + "symbol": "KANR", + "transferable": 1, + }, + "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { + "block": 4, + "burned": "", + "changes": Array [ + Object { + "block": 5, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "field": "owner", + "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "opType": "SEND", + }, + ], + "children": Array [], + "collection": "d43593c715a56da27d-KANARIABIRDS", + "forsale": 0n, + "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "metadata": undefined, + "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "pending": false, + "priority": Array [], + "properties": Object {}, + "reactions": Object {}, + "resources": Array [], + "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "sn": "00000888", + "symbol": "KANR", + "transferable": 1, + }, + }, +} +`; + exports[`rmrk2.0.0 Consolidator: Send NFT to other NFT Should set NFT as pending if sent from non parent owner 1`] = ` Object { "bases": Object {}, diff --git a/test/2.0.0/consolidator/send.test.ts b/test/2.0.0/consolidator/send.test.ts index 52ae369f..e57ff646 100644 --- a/test/2.0.0/consolidator/send.test.ts +++ b/test/2.0.0/consolidator/send.test.ts @@ -54,6 +54,15 @@ describe("rmrk2.0.0 Consolidator: Send NFT to other NFT", () => { expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); }); + it("Should convert recipient according to passed ss58Format", async () => { + const remarks = getRemarksFromBlocksMock([ + ...getSetupRemarks(), + ...getBlockCallsMock(mintNftMock2(4).send(getBobKey().address)), + ]); + const consolidator = new Consolidator(0); + expect(await consolidator.consolidate(remarks)).toMatchSnapshot(); + }); + it("Should set NFT as pending if sent from non parent owner", async () => { const remarks = getRemarksFromBlocksMock([ ...getSetupRemarks(), @@ -140,7 +149,9 @@ describe("rmrk2.0.0 Consolidator: Send NFT to other NFT", () => { getBobKey().address ), ...getBlockCallsMock( - mintNftMock3(6, createCollectionMock2(0, getBobKey()).id).send(mintNftMock(3).getId()) + mintNftMock3(6, createCollectionMock2(0, getBobKey()).id).send( + mintNftMock(3).getId() + ) ), // Send to another NFT first ...getBlockCallsMock(nftMock.send(getBobKey().address)), // Send to Bob ]); From fd2fb8812f6e1309a6306d2dcac3f8248f755024 Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 1 Mar 2022 14:50:09 +0000 Subject: [PATCH 27/34] Consolidate according to ss58Format --- src/rmrk2.0.0/classes/base.ts | 9 +- src/rmrk2.0.0/classes/collection.ts | 9 +- .../tools/consolidator/consolidator.ts | 9 +- .../tools/consolidator/interactions/base.ts | 4 +- .../tools/consolidator/interactions/create.ts | 11 +- src/rmrk2.0.0/tools/utils.ts | 10 +- .../__snapshots__/consolidator.test.ts.snap | 2 +- .../__snapshots__/accept.test.ts.snap | 44 ++-- .../__snapshots__/base.test.ts.snap | 2 +- .../__snapshots__/burn.test.ts.snap | 26 +- .../__snapshots__/buy.test.ts.snap | 152 ++++++------ .../__snapshots__/changeissuer.test.ts.snap | 30 +-- .../__snapshots__/destroy.test.ts.snap | 16 +- .../__snapshots__/equip.test.ts.snap | 122 ++++----- .../__snapshots__/equippable.test.ts.snap | 12 +- .../__snapshots__/list.test.ts.snap | 78 +++--- .../__snapshots__/lock.test.ts.snap | 14 +- .../__snapshots__/mint.test.ts.snap | 26 +- .../__snapshots__/send.test.ts.snap | 233 +++++------------- .../__snapshots__/setproperty.test.ts.snap | 48 ++-- .../__snapshots__/themeadd.test.ts.snap | 8 +- test/2.0.0/consolidator/send.test.ts | 2 +- test/2.0.0/consolidator/setproperty.test.ts | 2 +- 23 files changed, 389 insertions(+), 480 deletions(-) diff --git a/src/rmrk2.0.0/classes/base.ts b/src/rmrk2.0.0/classes/base.ts index 2f4f1539..20f91fd2 100644 --- a/src/rmrk2.0.0/classes/base.ts +++ b/src/rmrk2.0.0/classes/base.ts @@ -3,6 +3,7 @@ import { getRemarkData } from "../tools/utils"; import { OP_TYPES, PREFIX, VERSION } from "../tools/constants"; import { BaseType } from "../tools/types"; import { Change } from "../changelog"; +import { encodeAddress } from "@polkadot/keyring"; export class Base { readonly block: number; @@ -133,7 +134,11 @@ export class Base { return this.changes; } - static fromRemark(remark: string, block?: number): Base | string { + static fromRemark( + remark: string, + block?: number, + ss58Format?: number + ): Base | string { if (!block) { block = 0; } @@ -144,7 +149,7 @@ export class Base { return new this( block, obj.symbol, - obj.issuer, + encodeAddress(obj.issuer, ss58Format), obj.type, obj.parts, obj.themes diff --git a/src/rmrk2.0.0/classes/collection.ts b/src/rmrk2.0.0/classes/collection.ts index 04768fe1..32ba5382 100644 --- a/src/rmrk2.0.0/classes/collection.ts +++ b/src/rmrk2.0.0/classes/collection.ts @@ -3,6 +3,7 @@ import { validateCollection } from "../tools/validate-remark"; import { getRemarkData } from "../tools/utils"; import { OP_TYPES, PREFIX, VERSION } from "../tools/constants"; import { IProperties } from "../tools/types"; +import { encodeAddress } from "@polkadot/keyring"; export class Collection { readonly block: number; @@ -98,7 +99,11 @@ export class Collection { ); } - static fromRemark(remark: string, block = 0): Collection | string { + static fromRemark( + remark: string, + block = 0, + ss58Format?: number + ): Collection | string { try { validateCollection(remark); const [prefix, op_type, version, dataString] = remark.split("::"); @@ -106,7 +111,7 @@ export class Collection { return new this( block, obj.max, - obj.issuer, + encodeAddress(obj.issuer, ss58Format), obj.symbol, obj.id, obj.metadata diff --git a/src/rmrk2.0.0/tools/consolidator/consolidator.ts b/src/rmrk2.0.0/tools/consolidator/consolidator.ts index d647b5e7..3293c3f7 100644 --- a/src/rmrk2.0.0/tools/consolidator/consolidator.ts +++ b/src/rmrk2.0.0/tools/consolidator/consolidator.ts @@ -59,6 +59,7 @@ import { Destroy } from "../../classes/destroy"; import { destroyInteraction } from "./interactions/destroy"; import { Lock } from "../../classes/lock"; import { lockInteraction } from "./interactions/lock"; +import {encodeAddress} from "@polkadot/keyring"; type InteractionChanges = Partial>[]; @@ -167,7 +168,7 @@ export class Consolidator { * @param emitInteractionChanges return interactions changes ( OP_TYPE: id ) */ constructor( - ss58Format?: number, + ss58Format = 2, dbAdapter?: IConsolidatorAdapter, emitEmoteChanges?: boolean, emitInteractionChanges?: boolean @@ -190,7 +191,7 @@ export class Consolidator { const invalidCallBase: Partial = { op_type, block: remark.block, - caller: remark.caller, + caller: encodeAddress(remark.caller, this.ss58Format), }; return function update( this: Consolidator, @@ -216,7 +217,7 @@ export class Consolidator { let base; try { - base = getBaseFromRemark(remark); + base = getBaseFromRemark(remark, this.ss58Format); } catch (e: any) { invalidate(remark.remark, e.message); return true; @@ -256,7 +257,7 @@ export class Consolidator { let collection; try { - collection = getCollectionFromRemark(remark); + collection = getCollectionFromRemark(remark, this.ss58Format); } catch (e: any) { invalidate(remark.remark, e.message); return true; diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/base.ts b/src/rmrk2.0.0/tools/consolidator/interactions/base.ts index 9a15aa63..d814a5a7 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/base.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/base.ts @@ -2,8 +2,8 @@ import { Remark } from "../remark"; import { OP_TYPES } from "../../constants"; import {Base} from "../../../classes/base"; -export const getBaseFromRemark = (remark: Remark) => { - const base = Base.fromRemark(remark.remark, remark.block); +export const getBaseFromRemark = (remark: Remark, ss58Format?: number) => { + const base = Base.fromRemark(remark.remark, remark.block, ss58Format); if (typeof base === "string") { throw new Error(`[${OP_TYPES.BASE}] Dead before instantiation: ${base}`); } diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/create.ts b/src/rmrk2.0.0/tools/consolidator/interactions/create.ts index 94207cb4..8c4c1b32 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/create.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/create.ts @@ -4,8 +4,15 @@ import { u8aToHex } from "@polkadot/util"; import { Remark } from "../remark"; import { OP_TYPES } from "../../constants"; -export const getCollectionFromRemark = (remark: Remark) => { - const collection = Collection.fromRemark(remark.remark, remark.block); +export const getCollectionFromRemark = ( + remark: Remark, + ss58Format?: number +) => { + const collection = Collection.fromRemark( + remark.remark, + remark.block, + ss58Format + ); if (typeof collection === "string") { throw new Error( `[${OP_TYPES.CREATE}] Dead before instantiation: ${collection}` diff --git a/src/rmrk2.0.0/tools/utils.ts b/src/rmrk2.0.0/tools/utils.ts index 1c5d58c0..46a73e89 100644 --- a/src/rmrk2.0.0/tools/utils.ts +++ b/src/rmrk2.0.0/tools/utils.ts @@ -85,7 +85,8 @@ export type Block = { export const getRemarksFromBlocks = ( blocks: Block[], - prefixes: string[] + prefixes: string[], + ss58Format = 2 ): Remark[] => { const remarks: Remark[] = []; for (const row of blocks) { @@ -121,7 +122,7 @@ export const getRemarksFromBlocks = ( const r: Remark = { block: row.block, - caller: call.caller, + caller: encodeAddress(call.caller, ss58Format), interaction_type: meta.type, version: meta.version, remark: remark, @@ -329,10 +330,11 @@ export const getRemarkData = (dataString: string) => { export const filterBlocksByCollection = ( blockCalls: BlockCalls[], prefixes: string[], - collectionFilter?: string + collectionFilter?: string, + ss58Format?: number ): BlockCalls[] => blockCalls.filter((block) => - getRemarksFromBlocks([block], prefixes).some( + getRemarksFromBlocks([block], prefixes, ss58Format).some( (rmrk) => (collectionFilter && rmrk.remark.includes(collectionFilter)) || !collectionFilter diff --git a/test/2.0.0/__snapshots__/consolidator.test.ts.snap b/test/2.0.0/__snapshots__/consolidator.test.ts.snap index 5e40f2b1..59e1cf24 100644 --- a/test/2.0.0/__snapshots__/consolidator.test.ts.snap +++ b/test/2.0.0/__snapshots__/consolidator.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", diff --git a/test/2.0.0/consolidator/__snapshots__/accept.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/accept.test.ts.snap index 3c950903..e73dc36b 100644 --- a/test/2.0.0/consolidator/__snapshots__/accept.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/accept.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -31,13 +31,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -48,10 +48,10 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "old": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "opType": "SEND", }, ], @@ -66,7 +66,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -83,7 +83,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -92,7 +92,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[ACCEPT] Attempting to accept RES on a non-existant NFT 4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "ACCEPT", @@ -105,10 +105,10 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -117,7 +117,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, @@ -129,7 +129,7 @@ Object { "pending": true, }, ], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -146,7 +146,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -155,7 +155,7 @@ Object { "invalid": Array [ Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[ACCEPT] Attempting to accept RES on burned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "ACCEPT", @@ -168,15 +168,15 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "burned", "new": "true", "old": "", @@ -184,7 +184,7 @@ Object { }, Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "forsale", "new": 0n, "old": 0n, @@ -197,7 +197,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, @@ -209,7 +209,7 @@ Object { "pending": true, }, ], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/base.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/base.test.ts.snap index 98a317a7..f759991f 100644 --- a/test/2.0.0/consolidator/__snapshots__/base.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/base.test.ts.snap @@ -7,7 +7,7 @@ Object { "block": 2, "changes": Array [], "id": "base-2-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], diff --git a/test/2.0.0/consolidator/__snapshots__/burn.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/burn.test.ts.snap index 23195a17..609000c1 100644 --- a/test/2.0.0/consolidator/__snapshots__/burn.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/burn.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -22,7 +22,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "0x484f554f55", "old": "", @@ -30,7 +30,7 @@ Object { }, Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -43,13 +43,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -66,7 +66,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -80,7 +80,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "0x484f554f55", "old": "", @@ -88,7 +88,7 @@ Object { }, Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -107,13 +107,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -124,7 +124,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -132,7 +132,7 @@ Object { }, Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -151,7 +151,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap index e50d1240..37c7d406 100644 --- a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -22,7 +22,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -30,15 +30,15 @@ Object { }, Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", "new": "5Cafn1kueAGQnrcvN2uHFQ5NaMznSMyrfeUzuDHDQsMRSsN6", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -73,7 +73,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -87,7 +87,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -95,15 +95,15 @@ Object { }, Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -115,13 +115,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -138,7 +138,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -152,7 +152,7 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -160,15 +160,15 @@ Object { }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -186,13 +186,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -218,7 +218,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -238,7 +238,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -255,7 +255,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -278,13 +278,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -304,7 +304,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -315,7 +315,7 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -323,15 +323,15 @@ Object { }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -343,13 +343,13 @@ Object { "forsale": 0n, "id": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -366,7 +366,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -389,13 +389,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -415,7 +415,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -426,7 +426,7 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -434,19 +434,19 @@ Object { }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, Object { "block": 7, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "extraTransfers": Array [ Object { "amount": "100000000000", - "receiver": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "receiver": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, ], "field": "forsale", @@ -460,13 +460,13 @@ Object { "forsale": 0n, "id": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -483,7 +483,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -492,8 +492,8 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "message": "[BUY] Transfer for the purchase of NFT ID 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 not valid. Recipient, amount should be 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,1000000000000, is 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,2000000000000.", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "message": "[BUY] Transfer for the purchase of NFT ID 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 not valid. Recipient, amount should be HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F,1000000000000, is HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F,2000000000000.", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", }, @@ -505,7 +505,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -517,13 +517,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -540,7 +540,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -549,8 +549,8 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "message": "[BUY] Transfer for the purchase of NFT ID 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 not valid. Recipient, amount should be 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,1000000000000, is .", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "message": "[BUY] Transfer for the purchase of NFT ID 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 not valid. Recipient, amount should be HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F,1000000000000, is .", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", }, @@ -562,7 +562,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -574,13 +574,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -597,7 +597,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -606,7 +606,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[BUY] Attempting to buy burned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", @@ -619,7 +619,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -627,7 +627,7 @@ Object { }, Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -635,7 +635,7 @@ Object { }, Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -648,13 +648,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -671,7 +671,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -680,7 +680,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[BUY] Attempting to buy not-for-sale NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", @@ -702,13 +702,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -719,7 +719,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -737,7 +737,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -753,7 +753,7 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[BUY] Attempting to buy non-existant NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", @@ -771,7 +771,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -780,7 +780,7 @@ Object { "invalid": Array [ Object { "block": 4, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[BUY] Attempting to buy not-for-sale NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "BUY", @@ -796,13 +796,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/changeissuer.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/changeissuer.test.ts.snap index e8eaf63a..e95126f7 100644 --- a/test/2.0.0/consolidator/__snapshots__/changeissuer.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/changeissuer.test.ts.snap @@ -8,15 +8,15 @@ Object { "changes": Array [ Object { "block": 3, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "issuer", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "CHANGEISSUER", }, ], "id": "base-2-KBASE777", - "issuer": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "issuer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "parts": Array [ Object { "equippable": Array [], @@ -64,15 +64,15 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "issuer", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "CHANGEISSUER", }, ], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "issuer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -89,13 +89,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -111,7 +111,7 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "This CHANGEISSUER remark is invalid - no such base with ID base-3-KBASE777 found before block 2!", "object_id": "base-3-KBASE777", "op_type": "CHANGEISSUER", @@ -128,14 +128,14 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "This CHANGEISSUER remark is invalid - no such base with ID base-3-KBASE777 found before block 2!", "object_id": "base-3-KBASE777", "op_type": "CHANGEISSUER", }, Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "This CHANGEISSUER remark is invalid - no such collection with ID d43593c715a56da27d-KANARIABIRDS found before block 2!", "object_id": "d43593c715a56da27d-KANARIABIRDS", "op_type": "CHANGEISSUER", @@ -153,7 +153,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -162,7 +162,7 @@ Object { "invalid": Array [ Object { "block": 3, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "Attempting to change issuer of collection d43593c715a56da27d-KANARIABIRDS when not issuer!", "object_id": "d43593c715a56da27d-KANARIABIRDS", "op_type": "CHANGEISSUER", diff --git a/test/2.0.0/consolidator/__snapshots__/destroy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/destroy.test.ts.snap index 19d09443..698f42d1 100644 --- a/test/2.0.0/consolidator/__snapshots__/destroy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/destroy.test.ts.snap @@ -12,7 +12,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -20,7 +20,7 @@ Object { }, Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -33,13 +33,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -56,7 +56,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -65,7 +65,7 @@ Object { "invalid": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[DESTROY] Collection with unburned nfts cannot be destroyed d43593c715a56da27d-KANARIABIRDS", "object_id": "d43593c715a56da27d-KANARIABIRDS", "op_type": "DESTROY", @@ -81,13 +81,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap index c5bfdca0..ec095fdd 100644 --- a/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/equip.test.ts.snap @@ -7,7 +7,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -45,7 +45,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -68,7 +68,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [ "xXhhR", @@ -87,7 +87,7 @@ Object { "pending": false, }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -115,7 +115,7 @@ Object { "slot": "base-4-KBASE777.backpack", }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -131,7 +131,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": "*", @@ -169,7 +169,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -192,7 +192,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [ "xXhhR", @@ -206,7 +206,7 @@ Object { "pending": false, }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -234,7 +234,7 @@ Object { "slot": "base-4-KBASE777.background", }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -251,7 +251,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -260,8 +260,8 @@ Object { "invalid": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "message": "[EQUIP] Attempting to equip NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 who's owner is account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY. You can only EQUIP on parent NFT", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "message": "[EQUIP] Attempting to equip NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 who's owner is account HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F. You can only EQUIP on parent NFT", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "EQUIP", }, @@ -276,13 +276,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -298,7 +298,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -336,7 +336,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -345,7 +345,7 @@ Object { "invalid": Array [ Object { "block": 9, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[EQUIP] Cannot equip NFT 6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888 because parent's base is pending", "object_id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "EQUIP", @@ -367,7 +367,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, @@ -379,7 +379,7 @@ Object { "pending": true, }, ], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -405,7 +405,7 @@ Object { "slot": "base-4-KBASE777.backpack", }, ], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -421,7 +421,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -459,7 +459,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -468,7 +468,7 @@ Object { "invalid": Array [ Object { "block": 8, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[EQUIP] Cannot equip NFT 6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888 because it has no compatible resource base-4-KBASE777.backpack", "object_id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "EQUIP", @@ -490,7 +490,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [ "xXhhR", @@ -504,7 +504,7 @@ Object { "pending": false, }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -532,7 +532,7 @@ Object { "slot": "base-incompatible.slot", }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -548,7 +548,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -586,7 +586,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -595,7 +595,7 @@ Object { "invalid": Array [ Object { "block": 8, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[EQUIP] Cannot equip NFT 6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888 because it's base base-4-KBASE777 slot background doesn't allow it's collection d43593c715a56da27d-KANARIABIRDS", "object_id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "EQUIP", @@ -617,7 +617,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [ "xXhhR", @@ -631,7 +631,7 @@ Object { "pending": false, }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -659,7 +659,7 @@ Object { "slot": "base-4-KBASE777.background", }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -676,7 +676,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -685,7 +685,7 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[EQUIP] Attempting to equip burned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "EQUIP", @@ -698,7 +698,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -706,7 +706,7 @@ Object { }, Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -719,13 +719,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -741,7 +741,7 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[EQUIP] Attempting to equip a non-existant NFT 6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "object_id": "6-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "EQUIP", @@ -759,7 +759,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -768,15 +768,15 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "message": "[SEND] Attempting to send non-owned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777, real owner: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "message": "[SEND] Attempting to send non-owned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777, real owner: FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "SEND", }, Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "message": "[EQUIP] Attempting to equip NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 who's owner is account 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty. You can only EQUIP on parent NFT", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "message": "[EQUIP] Attempting to equip NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 who's owner is account FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP. You can only EQUIP on parent NFT", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "EQUIP", }, @@ -791,13 +791,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -811,13 +811,13 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -834,7 +834,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -843,7 +843,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "message": "[EQUIP] Cannot equip NFT 4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888 because it wasn't accepted by a parent yet", "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "EQUIP", @@ -865,13 +865,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -882,10 +882,10 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -900,7 +900,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -916,7 +916,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -954,7 +954,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -977,7 +977,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [ "xXhhR", @@ -996,7 +996,7 @@ Object { "pending": false, }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -1024,7 +1024,7 @@ Object { "slot": "base-4-KBASE777.backpack", }, ], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/equippable.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/equippable.test.ts.snap index b426cf4a..a3692db7 100644 --- a/test/2.0.0/consolidator/__snapshots__/equippable.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/equippable.test.ts.snap @@ -7,7 +7,7 @@ Object { "block": 3, "changes": Array [], "id": "base-3-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [ @@ -47,7 +47,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -65,7 +65,7 @@ Object { "block": 3, "changes": Array [], "id": "base-3-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -101,7 +101,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -119,7 +119,7 @@ Object { "block": 3, "changes": Array [], "id": "base-3-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -155,7 +155,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", diff --git a/test/2.0.0/consolidator/__snapshots__/list.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/list.test.ts.snap index f68cfcdf..884e3a27 100644 --- a/test/2.0.0/consolidator/__snapshots__/list.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/list.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -22,7 +22,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -34,13 +34,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -57,7 +57,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -80,13 +80,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -97,7 +97,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -115,7 +115,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -132,7 +132,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -141,7 +141,7 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[LIST] Attempting to list burned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "LIST", @@ -154,7 +154,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -162,7 +162,7 @@ Object { }, Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -175,13 +175,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -198,7 +198,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -207,7 +207,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "Attempting to do something with an NFT who's parent 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777 is listed for sale", "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "LIST", @@ -220,7 +220,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -238,13 +238,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -264,7 +264,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -280,7 +280,7 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[LIST] Attempting to list non-existant NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "LIST", @@ -298,7 +298,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -307,8 +307,8 @@ Object { "invalid": Array [ Object { "block": 4, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "message": "[LIST] Attempting to list non-owned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777, real owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "message": "[LIST] Attempting to list non-owned NFT 3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777, real owner: HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "LIST", }, @@ -323,13 +323,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -346,7 +346,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -355,7 +355,7 @@ Object { "invalid": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[LIST] There should be minimum of 5 blocks between last LIST interaction: RMRK::LIST::2.0.0::3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777::2000000000000", "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "LIST", @@ -368,7 +368,7 @@ Object { "changes": Array [ Object { "block": 4, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -380,13 +380,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -403,7 +403,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -417,7 +417,7 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -435,13 +435,13 @@ Object { "forsale": 1000000000000n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -452,7 +452,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 1000000000000n, "old": 0n, @@ -460,7 +460,7 @@ Object { }, Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 1000000000000n, @@ -478,7 +478,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/lock.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/lock.test.ts.snap index 7b7eb5c4..d67ad335 100644 --- a/test/2.0.0/consolidator/__snapshots__/lock.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/lock.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 1, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -22,7 +22,7 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "burned", "new": "true", "old": "", @@ -30,7 +30,7 @@ Object { }, Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "forsale", "new": 0n, "old": 0n, @@ -43,13 +43,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -63,13 +63,13 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap index 0142409e..777bb4c5 100644 --- a/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/mint.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -25,7 +25,7 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object { @@ -39,7 +39,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -56,7 +56,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -73,13 +73,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -99,7 +99,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -116,7 +116,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -133,13 +133,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -156,7 +156,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -165,7 +165,7 @@ Object { "invalid": Array [ Object { "block": 3, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[MINT] Dead before instantiation: Royalty percentage value have to be between 0 and 100", "object_id": "RMRK::MINT::2.0.0::{\\"collection\\"%3A\\"d43593c715a56da27d-KANARIABIRDS\\"%2C\\"symbol\\"%3A\\"KANR\\"%2C\\"transferable\\"%3A1%2C\\"sn\\"%3A\\"00000999\\"%2C\\"properties\\"%3A{\\"royaltyInfo\\"%3A{\\"type\\"%3A\\"royalty\\"%2C\\"value\\"%3A{\\"royaltyPercentFloat\\"%3A101%2C\\"receiver\\"%3A\\"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty\\"}}}}", "op_type": "MINT", @@ -182,7 +182,7 @@ Object { "invalid": Array [ Object { "block": 2, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "NFT referencing non-existant parent collection d43593c715a56da27d-KANARIABIRDS", "object_id": "2-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "op_type": "MINT", diff --git a/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap index 13a2e5b9..c92f46e0 100644 --- a/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/send.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -31,13 +31,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -48,10 +48,10 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -66,7 +66,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -83,7 +83,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -100,13 +100,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -117,15 +117,15 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, Object { "block": 7, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", "new": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", "old": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", @@ -143,7 +143,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -163,13 +163,13 @@ Object { "forsale": 0n, "id": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000999", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -178,89 +178,6 @@ Object { } `; -exports[`rmrk2.0.0 Consolidator: Send NFT to other NFT Should convert recipient according to passed ss58FOrmat 1`] = ` -Object { - "bases": Object {}, - "collections": Object { - "d43593c715a56da27d-KANARIABIRDS": Collection { - "block": 2, - "changes": Array [], - "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "max": 0, - "metadata": "https://some.url", - "symbol": "KANARIABIRDS", - }, - }, - "invalid": Array [], - "nfts": Object { - "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { - "block": 3, - "burned": "", - "changes": Array [], - "children": Array [ - Object { - "equipped": "", - "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", - "pending": true, - }, - ], - "collection": "d43593c715a56da27d-KANARIABIRDS", - "forsale": 0n, - "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "pending": false, - "priority": Array [], - "properties": Object {}, - "reactions": Object {}, - "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "sn": "00000777", - "symbol": "KANR", - "transferable": 1, - }, - "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { - "block": 4, - "burned": "", - "changes": Array [ - Object { - "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "opType": "SEND", - }, - Object { - "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "field": "owner", - "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "opType": "SEND", - }, - ], - "children": Array [], - "collection": "d43593c715a56da27d-KANARIABIRDS", - "forsale": 0n, - "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", - "metadata": undefined, - "owner": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "pending": true, - "priority": Array [], - "properties": Object {}, - "reactions": Object {}, - "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "sn": "00000888", - "symbol": "KANR", - "transferable": 1, - }, - }, -} -`; - exports[`rmrk2.0.0 Consolidator: Send NFT to other NFT Should convert recipient according to passed ss58Format 1`] = ` Object { "bases": Object {}, @@ -275,58 +192,30 @@ Object { "symbol": "KANARIABIRDS", }, }, - "invalid": Array [], - "nfts": Object { - "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777": Object { + "invalid": Array [ + Object { "block": 3, - "burned": "", - "changes": Array [], - "children": Array [], - "collection": "d43593c715a56da27d-KANARIABIRDS", - "forsale": 0n, - "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "pending": false, - "priority": Array [], - "properties": Object {}, - "reactions": Object {}, - "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "sn": "00000777", - "symbol": "KANR", - "transferable": 1, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "message": "Attempted issue of NFT in non-owned collection. Issuer: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY, caller: HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "object_id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", + "op_type": "MINT", }, - "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888": Object { + Object { "block": 4, - "burned": "", - "changes": Array [ - Object { - "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - "opType": "SEND", - }, - ], - "children": Array [], - "collection": "d43593c715a56da27d-KANARIABIRDS", - "forsale": 0n, - "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", - "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "pending": false, - "priority": Array [], - "properties": Object {}, - "reactions": Object {}, - "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "sn": "00000888", - "symbol": "KANR", - "transferable": 1, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "message": "Attempted issue of NFT in non-owned collection. Issuer: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY, caller: HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "op_type": "MINT", }, - }, + Object { + "block": 5, + "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "message": "[SEND] Attempting to send non-existant NFT 4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "op_type": "SEND", + }, + ], + "nfts": Object {}, } `; @@ -338,7 +227,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -361,13 +250,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -378,18 +267,18 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, Object { "block": 6, - "caller": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", "new": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", - "old": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "old": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "opType": "SEND", }, ], @@ -404,7 +293,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -421,7 +310,7 @@ Object { "block": 5, "changes": Array [], "id": "8eaf04151694f26a48-KANARIAGEMS", - "issuer": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "issuer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "max": 0, "metadata": "https://some.url", "symbol": "KANARIAGEMS", @@ -430,7 +319,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -447,13 +336,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -464,10 +353,10 @@ Object { "changes": Array [ Object { "block": 7, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", "new": "6-8eaf04151694f26a48-KANARIAGEMS-KANR-00000999", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -482,7 +371,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -502,13 +391,13 @@ Object { "forsale": 0n, "id": "6-8eaf04151694f26a48-KANARIAGEMS-KANR-00000999", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000999", "symbol": "KANR", "transferable": 1, @@ -525,7 +414,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -539,10 +428,10 @@ Object { "changes": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -557,13 +446,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -589,7 +478,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -609,7 +498,7 @@ Object { "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000999", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap index 3079f84b..0eca2f46 100644 --- a/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/setproperty.test.ts.snap @@ -8,7 +8,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -17,7 +17,7 @@ Object { "block": 3, "changes": Array [], "id": "d43593c715a56da27d-KANARIAGEMS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIAGEMS", @@ -34,7 +34,7 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object { @@ -52,7 +52,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -66,13 +66,13 @@ Object { "forsale": 0n, "id": "5-d43593c715a56da27d-KANARIAGEMS-KANGEM-00000111", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000111", "symbol": "KANGEM", "transferable": 1, @@ -89,7 +89,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -98,7 +98,7 @@ Object { "block": 3, "changes": Array [], "id": "d43593c715a56da27d-KANARIAGEMS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIAGEMS", @@ -112,10 +112,10 @@ Object { "changes": Array [ Object { "block": 5, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "field": "owner", - "new": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", - "old": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "SEND", }, ], @@ -124,7 +124,7 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "owner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "pending": false, "priority": Array [], "properties": Object { @@ -138,7 +138,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty", + "rootowner": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -155,7 +155,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -164,7 +164,7 @@ Object { "block": 3, "changes": Array [], "id": "d43593c715a56da27d-KANARIAGEMS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIAGEMS", @@ -181,7 +181,7 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object { @@ -202,7 +202,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, @@ -219,7 +219,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -228,7 +228,7 @@ Object { "block": 3, "changes": Array [], "id": "d43593c715a56da27d-KANARIAGEMS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIAGEMS", @@ -237,7 +237,7 @@ Object { "invalid": Array [ Object { "block": 6, - "caller": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "message": "[SETPROPERTY] Attempting to mutate an property but it's mutation condition doesn't match", "object_id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "op_type": "SETPROPERTY", @@ -253,7 +253,7 @@ Object { "forsale": 0n, "id": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object { @@ -271,7 +271,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000888", "symbol": "KANR", "transferable": 1, @@ -285,7 +285,7 @@ Object { "forsale": 0n, "id": "5-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object { @@ -299,7 +299,7 @@ Object { }, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/__snapshots__/themeadd.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/themeadd.test.ts.snap index 74e0d520..a15a204e 100644 --- a/test/2.0.0/consolidator/__snapshots__/themeadd.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/themeadd.test.ts.snap @@ -7,7 +7,7 @@ Object { "block": 4, "changes": Array [], "id": "base-4-KBASE777", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "parts": Array [ Object { "equippable": Array [], @@ -48,7 +48,7 @@ Object { "block": 2, "changes": Array [], "id": "d43593c715a56da27d-KANARIABIRDS", - "issuer": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "issuer": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "max": 0, "metadata": "https://some.url", "symbol": "KANARIABIRDS", @@ -65,13 +65,13 @@ Object { "forsale": 0n, "id": "3-d43593c715a56da27d-KANARIABIRDS-KANR-00000777", "metadata": undefined, - "owner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "owner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "pending": false, "priority": Array [], "properties": Object {}, "reactions": Object {}, "resources": Array [], - "rootowner": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + "rootowner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "sn": "00000777", "symbol": "KANR", "transferable": 1, diff --git a/test/2.0.0/consolidator/send.test.ts b/test/2.0.0/consolidator/send.test.ts index e57ff646..c6033935 100644 --- a/test/2.0.0/consolidator/send.test.ts +++ b/test/2.0.0/consolidator/send.test.ts @@ -158,7 +158,7 @@ describe("rmrk2.0.0 Consolidator: Send NFT to other NFT", () => { const consolidator = new Consolidator(); const consolidated = await consolidator.consolidate(remarks); expect(consolidated.invalid[0].message).toEqual( - "[SEND] Attempting to send non-owned NFT 6-8eaf04151694f26a48-KANARIAGEMS-KANR-00000999, real owner: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty" + "[SEND] Attempting to send non-owned NFT 6-8eaf04151694f26a48-KANARIAGEMS-KANR-00000999, real owner: FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP" ); }); diff --git a/test/2.0.0/consolidator/setproperty.test.ts b/test/2.0.0/consolidator/setproperty.test.ts index 24c7bd64..586b7b4a 100644 --- a/test/2.0.0/consolidator/setproperty.test.ts +++ b/test/2.0.0/consolidator/setproperty.test.ts @@ -116,7 +116,7 @@ describe("rmrk2.0.0 Consolidator: SETPROPERTY", () => { const consolidator = new Consolidator(); const consolidatedResult = await consolidator.consolidate(remarks); expect(consolidatedResult.invalid[0].message).toEqual( - "[SETPROPERTY] Attempting to set property on a non-owned NFT. Expected 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty but received 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" + "[SETPROPERTY] Attempting to set property on a non-owned NFT. Expected FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP but received HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F" ); }); From 97f752cd8a7e761c1a8232fdc998c7f2d2b0bc1c Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 1 Mar 2022 15:24:14 +0000 Subject: [PATCH 28/34] use ss58Format in listener --- cli/consolidate.ts | 12 +++++++++--- cli/run-listener.ts | 2 +- src/rmrk2.0.0/listener.ts | 19 +++++++++++++++---- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/cli/consolidate.ts b/cli/consolidate.ts index b82188b3..8b752841 100644 --- a/cli/consolidate.ts +++ b/cli/consolidate.ts @@ -16,11 +16,17 @@ import { Remark } from "../src/rmrk2.0.0/tools/consolidator/remark"; const getRemarks = ( inputData: any, prefixes: string[], - collectionFilter?: string + collectionFilter?: string, + ss58Format?: number ): Remark[] => { let blocks = inputData; if (collectionFilter) { - blocks = filterBlocksByCollection(blocks, prefixes, collectionFilter); + blocks = filterBlocksByCollection( + blocks, + prefixes, + collectionFilter, + ss58Format + ); } return getRemarksFromBlocks(blocks, prefixes); }; @@ -68,7 +74,7 @@ const consolidate = async () => { console.log(`Loaded ${rawdata.length} blocks with remark calls`); - const remarks = getRemarks(rawdata, prefixes, collectionFilter); + const remarks = getRemarks(rawdata, prefixes, collectionFilter, ss58Format); const con = new Consolidator(ss58Format); const ret = await con.consolidate(remarks); diff --git a/cli/run-listener.ts b/cli/run-listener.ts index 41d24312..22e7aa84 100755 --- a/cli/run-listener.ts +++ b/cli/run-listener.ts @@ -41,7 +41,7 @@ const runListener = async () => { prefixes: ["0x726d726b", "0x524d524b"], consolidateFunction, storageProvider, - loggerEnabled: true + loggerEnabled: true, }); const subscriber = listener.initialiseObservable(); subscriber.subscribe((val) => console.log(val)); diff --git a/src/rmrk2.0.0/listener.ts b/src/rmrk2.0.0/listener.ts index 0e7626c7..6f0aa560 100644 --- a/src/rmrk2.0.0/listener.ts +++ b/src/rmrk2.0.0/listener.ts @@ -26,6 +26,7 @@ interface IProps { storageProvider?: IStorageProvider; storageKey?: string; loggerEnabled?: boolean; + ss58Format?: number; } export interface IStorageProvider { @@ -84,6 +85,7 @@ export class RemarkListener { private prefixes: string[]; private currentBlockNum: number; private loggerEnabled: boolean; + private ss58Format: number; public storageProvider: IStorageProvider; private consolidateFunction: ( remarks: Remark[] @@ -96,12 +98,14 @@ export class RemarkListener { storageProvider, storageKey, loggerEnabled = false, + ss58Format = 2, }: IProps) { if (!polkadotApi) { throw new Error( `"providerInterface" is missing. Please provide polkadot.js provider interface (i.e. websocket)` ); } + this.ss58Format = ss58Format; this.currentBlockNum = 0; this.apiPromise = polkadotApi; this.missingBlockCalls = []; @@ -178,7 +182,8 @@ export class RemarkListener { this.apiPromise, latestBlock + 1, to, - this.prefixes + this.prefixes, + this.ss58Format ); this.logger(`Found ${remarks.length} remarks`); @@ -231,7 +236,11 @@ export class RemarkListener { ); } - const remarks = getRemarksFromBlocks(blockCalls, this.prefixes); + const remarks = getRemarksFromBlocks( + blockCalls, + this.prefixes, + this.ss58Format + ); this.latestBlockCallsFinalised = []; this.missingBlockCalls = []; const consolidatedFinal = await this.consolidateFunction(remarks); @@ -243,7 +252,8 @@ export class RemarkListener { if (this.observerUnfinalised) { const remarks = getRemarksFromBlocks( [...this.missingBlockCalls, ...this.latestBlockCalls], - this.prefixes + this.prefixes, + this.ss58Format ); // Fire event to a subscriber this.observerUnfinalised.next(remarks); @@ -346,7 +356,8 @@ export class RemarkListener { if (this.observerUnfinalised) { const remarks = getRemarksFromBlocks( [...this.latestBlockCalls], - this.prefixes + this.prefixes, + this.ss58Format ); this.observerUnfinalised.next(remarks); } From a7bf516f1c34a73dfe6c58810ae30975114fd3da Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Tue, 1 Mar 2022 15:26:50 +0000 Subject: [PATCH 29/34] v2.0.53 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87b350c6..4e2e2e16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.52", + "version": "2.0.53", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 82c7ec81eadc18f0d40b4f848ae2d9eea22d5358 Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 1 Mar 2022 17:25:11 +0000 Subject: [PATCH 30/34] Update buy.ts --- .../tools/consolidator/interactions/buy.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts index 9dbbca80..cd1b54ae 100644 --- a/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts +++ b/src/rmrk2.0.0/tools/consolidator/interactions/buy.ts @@ -73,14 +73,29 @@ export const buyInteraction = async ( nft.addChange({ field: "owner", - old: nft.rootowner, + old: nft.owner, new: buyEntity.recipient || remark.caller, caller: remark.caller, block: remark.block, opType: OP_TYPES.BUY, } as Change); + + const newRootOwner = + buyEntity.recipient && isValidAddressPolkadotAddress(buyEntity.recipient) + ? buyEntity.recipient + : remark.caller; + + nft.addChange({ + field: "rootowner", + old: nft.rootowner, + new: newRootOwner, + caller: remark.caller, + block: remark.block, + opType: OP_TYPES.BUY, + } as Change); + nft.owner = buyEntity.recipient || remark.caller; - nft.rootowner = buyEntity.recipient || remark.caller; + nft.rootowner = newRootOwner; nft.addChange({ field: "forsale", From 57b95ff39230369f3e452ed31c9b91cc00d0795d Mon Sep 17 00:00:00 2001 From: Yuri Date: Tue, 1 Mar 2022 17:28:34 +0000 Subject: [PATCH 31/34] Update buy.test.ts.snap --- .../__snapshots__/buy.test.ts.snap | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap index 37c7d406..35445f83 100644 --- a/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap +++ b/test/2.0.0/consolidator/__snapshots__/buy.test.ts.snap @@ -36,6 +36,14 @@ Object { "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, + Object { + "block": 5, + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "field": "rootowner", + "new": "5Cafn1kueAGQnrcvN2uHFQ5NaMznSMyrfeUzuDHDQsMRSsN6", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "opType": "BUY", + }, Object { "block": 5, "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", @@ -101,6 +109,14 @@ Object { "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, + Object { + "block": 5, + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "field": "rootowner", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "opType": "BUY", + }, Object { "block": 5, "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", @@ -166,6 +182,14 @@ Object { "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, + Object { + "block": 7, + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "field": "rootowner", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "opType": "BUY", + }, Object { "block": 7, "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", @@ -326,6 +350,14 @@ Object { "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "opType": "BUY", + }, + Object { + "block": 7, + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "field": "rootowner", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, @@ -437,6 +469,14 @@ Object { "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "field": "owner", "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "old": "4-d43593c715a56da27d-KANARIABIRDS-KANR-00000888", + "opType": "BUY", + }, + Object { + "block": 7, + "caller": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "field": "rootowner", + "new": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", "old": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", "opType": "BUY", }, From aead82b2b816b0ac64908461a944b3cf0a9afd0a Mon Sep 17 00:00:00 2001 From: Yuripetusko Date: Tue, 1 Mar 2022 17:30:39 +0000 Subject: [PATCH 32/34] v2.0.54 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e2e2e16..e791278d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rmrk-tools", - "version": "2.0.53", + "version": "2.0.54", "description": "Suite of libraries implementing RMRK.app specs", "repository": { "type": "git", From 7c7a4ae4bc644ac58ab090685860334ee8989b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Thu, 3 Mar 2022 22:28:17 +0100 Subject: [PATCH 33/34] export all types --- src/rmrk2.0.0/index.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/rmrk2.0.0/index.ts b/src/rmrk2.0.0/index.ts index 3d603d86..31afb86a 100644 --- a/src/rmrk2.0.0/index.ts +++ b/src/rmrk2.0.0/index.ts @@ -1,20 +1,20 @@ import "@polkadot/api-augment"; -export { Consolidator } from "./tools/consolidator/consolidator"; -export { Collection } from "./classes/collection"; -export { NFT } from "./classes/nft"; -export { Base } from "./classes/base"; -export { List } from "./classes/list"; -export { Burn } from "./classes/burn"; -export { ChangeIssuer } from "./classes/changeissuer"; -export { Buy } from "./classes/buy"; -export { Send } from "./classes/send"; -export { Emote } from "./classes/emote"; -export { Accept } from "./classes/accept"; -export { Resadd } from "./classes/resadd"; -export { Setproperty } from "./classes/setproperty"; -export { Equip } from "./classes/equip"; -export { Equippable } from "./classes/equippable"; -export { Setpriority } from "./classes/setpriority"; +export * from "./tools/consolidator/consolidator"; +export * from "./classes/collection"; +export * from "./classes/nft"; +export * from "./classes/base"; +export * from "./classes/list"; +export * from "./classes/burn"; +export * from "./classes/changeissuer"; +export * from "./classes/buy"; +export * from "./classes/send"; +export * from "./classes/emote"; +export * from "./classes/accept"; +export * from "./classes/resadd"; +export * from "./classes/setproperty"; +export * from "./classes/equip"; +export * from "./classes/equippable"; +export * from "./classes/setpriority"; export { default as fetchRemarks } from "./tools/fetchRemarks"; export * from "./tools/consolidator/utils"; export { RemarkListener } from "./listener"; From d6e634ba473d0c55e6a6135fd9b2d4b1f3b763a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Fri, 4 Mar 2022 11:20:06 +0100 Subject: [PATCH 34/34] export all from types --- src/rmrk2.0.0/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rmrk2.0.0/index.ts b/src/rmrk2.0.0/index.ts index 31afb86a..06edd728 100644 --- a/src/rmrk2.0.0/index.ts +++ b/src/rmrk2.0.0/index.ts @@ -1,4 +1,5 @@ import "@polkadot/api-augment"; +export * from './tools/types' export * from "./tools/consolidator/consolidator"; export * from "./classes/collection"; export * from "./classes/nft";