From 639934592c2e5b518ac14079bcccdd490e51f4e1 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 18 Apr 2023 14:11:50 +0100 Subject: [PATCH] simpleNFT -> utxoNFT (#90) * simpleNFT -> utxoNFT * use latest node --- app/util/appUtil.js | 8 ++++---- docker-compose.yaml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/util/appUtil.js b/app/util/appUtil.js index f8f95eb..562e960 100644 --- a/app/util/appUtil.js +++ b/app/util/appUtil.js @@ -70,7 +70,7 @@ export const processRoles = async (roles) => { export async function getMaxMetadataCount() { await api.isReady - return api.consts.simpleNFT.maxMetadataCount.toNumber() + return api.consts.utxoNFT.maxMetadataCount.toNumber() } const validMetadataValueTypes = new Set(['LITERAL', 'TOKEN_ID', 'FILE', 'NONE']) @@ -190,7 +190,7 @@ const downloadFile = async (dirHash) => { export async function getLastTokenId() { await api.isReady - const lastTokenId = await api.query.simpleNFT.lastToken() + const lastTokenId = await api.query.utxoNFT.lastToken() return lastTokenId ? parseInt(lastTokenId, 10) : 0 } @@ -240,7 +240,7 @@ export async function runProcess(process, inputs, outputs) { logger.debug('Running Transaction inputs: %j outputs: %j', inputs, relevantOutputs) return new Promise((resolve, reject) => { let unsub = null - api.tx.simpleNFT + api.tx.utxoNFT .runProcess(process, inputs, relevantOutputs) .signAndSend(alice, (result) => { logger.debug('result.status %s', JSON.stringify(result.status)) @@ -298,7 +298,7 @@ function transformItem({ originalId, createdAt, destroyedAt, ...rest }) { export async function getItem(tokenId) { await api.isReady - const itemRaw = (await api.query.simpleNFT.tokensById(tokenId)).toJSON() + const itemRaw = (await api.query.utxoNFT.tokensById(tokenId)).toJSON() if (!itemRaw) { return null diff --git a/docker-compose.yaml b/docker-compose.yaml index 672cfb8..aa16abe 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -23,7 +23,7 @@ services: - 8081:8080 - 5002:5001 dscp-node: - image: digicatapult/dscp-node:v5.0.3 + image: digicatapult/dscp-node:latest command: --base-path /data/ --dev diff --git a/package-lock.json b/package-lock.json index fe055f1..19fe342 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dscp-api", - "version": "5.0.5", + "version": "5.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dscp-api", - "version": "5.0.5", + "version": "5.0.6", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^10.0.0", diff --git a/package.json b/package.json index ba50716..4d51e8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dscp-api", - "version": "5.0.5", + "version": "5.0.6", "description": "DSCP API", "type": "module", "repository": {