From e713a566c28ce1ab51c63ba73f190643b2cce6c2 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Fri, 17 May 2024 14:49:49 +0200 Subject: [PATCH 01/20] :wrechn: replace rmrk ipfs gateway with kodadot --- src/mappings/utils/metadata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mappings/utils/metadata.ts b/src/mappings/utils/metadata.ts index 2daf5b4..0e44a54 100644 --- a/src/mappings/utils/metadata.ts +++ b/src/mappings/utils/metadata.ts @@ -16,7 +16,7 @@ export const fetchMetadata = async (metadata: string): Promis if (!metadata) { return ensure({}) } - const value = await $obtain(metadata, ['rmrk', 'infura_kodadot1'], true) + const value = await $obtain(metadata, ['kodadot_beta', 'infura_kodadot1'], true) return contentFrom(value as any) as T } catch (e) { logger.error(`[MINIPFS] ${e}`) From 2ccc41f66a4758f553c6dad99fec4b1c5f455cb1 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 13:55:15 +0300 Subject: [PATCH 02/20] :wrench: `version` is obsolete --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 44a74b5..7ded52a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3" - services: db: container_name: subsquid_db From 0d7117ee3b5e7ea1be82ada136c106a2989689f6 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 13:55:32 +0300 Subject: [PATCH 03/20] :arrow_up: @subsquid deps --- package-lock.json | 594 +++++++++++++++++++++++++--------------------- package.json | 12 +- 2 files changed, 328 insertions(+), 278 deletions(-) diff --git a/package-lock.json b/package-lock.json index 074e214..52b714f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,14 @@ "version": "0.2.0", "dependencies": { "@kodadot1/hyperdata": "^0.0.1-rc.4", - "@kodadot1/metasquid": "^0.3.0-rc.0", + "@kodadot1/metasquid": "^0.3.1-rc.0", "@kodadot1/minipfs": "^0.4.3-rc.1", "@subsquid/archive-registry": "3.3.2", - "@subsquid/graphql-server": "4.5.1", + "@subsquid/graphql-server": "4.6.0", "@subsquid/ss58": "2.0.2", - "@subsquid/substrate-processor": "8.2.2", + "@subsquid/substrate-processor": "8.4.1", "@subsquid/typeorm-migration": "1.3.0", - "@subsquid/typeorm-store": "1.3.0", + "@subsquid/typeorm-store": "1.5.1", "dotenv": "^16.4.5", "md5": "^2.3.0", "nanoid": "3.3.4", @@ -26,8 +26,8 @@ }, "devDependencies": { "@subsquid/substrate-metadata-explorer": "3.1.2", - "@subsquid/substrate-typegen": "8.0.2", - "@subsquid/typeorm-codegen": "1.3.3", + "@subsquid/substrate-typegen": "8.1.0", + "@subsquid/typeorm-codegen": "2.0.1", "@types/md5": "^2.3.5", "@types/node": "18.11.18", "@types/pg": "^8.11.4", @@ -983,11 +983,11 @@ "integrity": "sha512-8vBamHWimmZ/ew1Z0iUJPDdW2fkNiPC5S1Ezklsy5BjG0AvA+7t+cwpi2gD33sMrfkzAAHcg30B3EHA98sgUzw==" }, "node_modules/@kodadot1/metasquid": { - "version": "0.3.0-rc.0", - "resolved": "https://registry.npmjs.org/@kodadot1/metasquid/-/metasquid-0.3.0-rc.0.tgz", - "integrity": "sha512-RnsxKYKxrRM+S4/tCVpCi1QOIgTS6myevg6bODopNNR7Z3UzyABVPxHWoUjmsaOBuMSAthvNYn03tbCjLax0mA==", + "version": "0.3.1-rc.0", + "resolved": "https://registry.npmjs.org/@kodadot1/metasquid/-/metasquid-0.3.1-rc.0.tgz", + "integrity": "sha512-fYmeXj+Sum0RgmgRW7I52XMsk7LS2raTxHY5r/+xfOAfboKHPm8M7yyN+UYCFLiJYm3W1G+nP6o8VeUakui1cw==", "dependencies": { - "scule": "^1.1.0" + "scule": "^1.3.0" }, "engines": { "node": ">=14" @@ -995,7 +995,7 @@ "peerDependencies": { "@subsquid/logger": ">= 1", "@subsquid/ss58": ">= 2", - "@subsquid/substrate-processor": ">= 7", + "@subsquid/substrate-processor": ">= 8", "@subsquid/typeorm-store": ">= 1", "typeorm": "0.3.x" } @@ -1337,15 +1337,24 @@ "squid-archive-registry": "bin/run.js" } }, + "node_modules/@subsquid/big-decimal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/big-decimal/-/big-decimal-1.0.0.tgz", + "integrity": "sha512-/wyZEYC4Mlcm7jQWGhZnCvYpIosRmDSlNbv9SJBphE88aaFe8bOxl4sYwM/olzJgCn4Ir45nBsPU0ebF1+nXog==", + "peer": true, + "dependencies": { + "big.js": "~6.2.1" + } + }, "node_modules/@subsquid/graphiql-console": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@subsquid/graphiql-console/-/graphiql-console-0.3.0.tgz", "integrity": "sha512-C89mus6IXnNi0xMQrZqUFBZwLj8tbuq9lye8Gq/lHmmERAUpi6UsWEyLdJLx2mneZzF3JtY8eNiiZ16jmjtvfw==" }, "node_modules/@subsquid/graphql-server": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@subsquid/graphql-server/-/graphql-server-4.5.1.tgz", - "integrity": "sha512-PMC5Kc9ptjhrBIBRvvhkHiSRUEGJqv6Bc838VnvLtF5kMrGjSI+pPUiA5t+rhdfxywX1j+ZEdBpaRypAGo6Otw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@subsquid/graphql-server/-/graphql-server-4.6.0.tgz", + "integrity": "sha512-urQr5yLgYaPKSkCDQQ7ZwmpnYDOFfUSIKGxA7qk5LFoJlIJ+ycO4rkzb3ln29LrhSw25D3E/ZfrDlS+PFnV4ZA==", "dependencies": { "@apollo/utils.keyvadapter": "~1.1.2", "@apollo/utils.keyvaluecache": "~1.0.2", @@ -1354,10 +1363,10 @@ "@graphql-tools/utils": "^10.0.11", "@keyv/redis": "~2.5.8", "@subsquid/logger": "^1.3.3", - "@subsquid/openreader": "^4.5.1", - "@subsquid/typeorm-config": "^4.1.0", - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-commander": "^1.3.2", + "@subsquid/openreader": "^4.6.0", + "@subsquid/typeorm-config": "^4.1.1", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-commander": "^1.4.0", "@subsquid/util-internal-http-server": "^2.0.0", "@subsquid/util-internal-ts-node": "^0.0.0", "apollo-server-core": "^3.13.0", @@ -1397,14 +1406,14 @@ } }, "node_modules/@subsquid/graphql-server/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/graphql-server/node_modules/@subsquid/util-internal-commander": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.3.2.tgz", - "integrity": "sha512-9/1vI1dmGQMp5wjN6hb94VCnSosT+caob33tAesFaIdqLzqQlDtlTSRq1TFFossAgtsEJFi7GiQ8i31L/gaxSQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.4.0.tgz", + "integrity": "sha512-I+IztlLVow9z2S5lK/ON4aBRYXKtAKXl/rVPUn1Ue5vq+5JgEFbWEKJgnwXkd0qKnKeoYeaRFlcyQVfxirxzJw==", "peerDependencies": { "commander": "^11.1.0" } @@ -1460,18 +1469,18 @@ } }, "node_modules/@subsquid/openreader": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@subsquid/openreader/-/openreader-4.5.1.tgz", - "integrity": "sha512-N4aFZ0AzYiFCzocqbW971M8LOIKo9E8d4lt5He4x8Jcm19hwYYlNy8wwnOv1USCxFO/uCPZm/RTkARlyjOL10A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@subsquid/openreader/-/openreader-4.6.0.tgz", + "integrity": "sha512-/05vSoKP3UHxU6GJYfKcfSIi4bWfzbr9x/H2wW5XxE4uc8gFeaVZHCmQMTaO9941oK//9rk9BQTH5Slhwuj7gw==", "dependencies": { "@graphql-tools/merge": "^9.0.1", "@subsquid/graphiql-console": "^0.3.0", "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-commander": "^1.3.2", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-commander": "^1.4.0", "@subsquid/util-internal-hex": "^1.2.2", "@subsquid/util-internal-http-server": "^2.0.0", - "@subsquid/util-naming": "^1.2.2", + "@subsquid/util-naming": "^1.3.0", "apollo-server-core": "^3.13.0", "apollo-server-express": "^3.13.0", "commander": "^11.1.0", @@ -1496,14 +1505,14 @@ } }, "node_modules/@subsquid/openreader/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/openreader/node_modules/@subsquid/util-internal-commander": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.3.2.tgz", - "integrity": "sha512-9/1vI1dmGQMp5wjN6hb94VCnSosT+caob33tAesFaIdqLzqQlDtlTSRq1TFFossAgtsEJFi7GiQ8i31L/gaxSQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.4.0.tgz", + "integrity": "sha512-I+IztlLVow9z2S5lK/ON4aBRYXKtAKXl/rVPUn1Ue5vq+5JgEFbWEKJgnwXkd0qKnKeoYeaRFlcyQVfxirxzJw==", "peerDependencies": { "commander": "^11.1.0" } @@ -1517,13 +1526,13 @@ } }, "node_modules/@subsquid/rpc-client": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@subsquid/rpc-client/-/rpc-client-4.7.0.tgz", - "integrity": "sha512-RPVLg4X+C/4QiowGMT2gdJfqshmGFgg0RzPsoRLkTgVojqnHIF4Kv7ytSvKidQLmR75aHGn8BUZ3raLwAD+YLA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@subsquid/rpc-client/-/rpc-client-4.9.0.tgz", + "integrity": "sha512-lpb6qRMMlaacXOFPRhv4CZ7g4w7pKIR7ZEbMjyFexLOdv9MkcYzuGD5XT5REGaBA6mfQMaLa33K5lqAb+tJKBQ==", "dependencies": { "@subsquid/http-client": "^1.4.0", "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-binary-heap": "^1.0.0", "@subsquid/util-internal-counters": "^1.3.2", "@subsquid/util-internal-json-fix-unsafe-integers": "^0.0.0", @@ -1531,9 +1540,9 @@ } }, "node_modules/@subsquid/rpc-client/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/scale-codec": { "version": "4.0.1", @@ -1581,49 +1590,49 @@ } }, "node_modules/@subsquid/substrate-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-data/-/substrate-data-4.0.3.tgz", - "integrity": "sha512-oA5sv+ks43SvLG6aOF4s0jGQC73CbrB5C8dHMK4RqWDU5FZdT1ZG5VRUWwWr1erxIC5nc55wY0iTekswIxjqmA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-data/-/substrate-data-4.1.0.tgz", + "integrity": "sha512-IrhgP1LsqWbXtg35WQEUbVF1xkeNuSPCcwV2TCnjWM2IK2w/LpHN6JLdOIbxQVm3Em1BBPaJUzAakF24gDJQBA==", "dependencies": { "@subsquid/scale-codec": "^4.0.1", - "@subsquid/substrate-data-raw": "^1.1.2", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/substrate-data-raw": "^1.1.5", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-hex": "^1.2.2", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-range": "^0.3.0", "@subsquid/util-xxhash": "^1.2.2", "@substrate/calc": "^0.2.8", "blake2b": "^2.1.4" }, "peerDependencies": { - "@subsquid/rpc-client": "^4.7.0", - "@subsquid/substrate-runtime": "^1.0.3" + "@subsquid/rpc-client": "^4.9.0", + "@subsquid/substrate-runtime": "^2.0.0" } }, "node_modules/@subsquid/substrate-data-raw": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-data-raw/-/substrate-data-raw-1.1.2.tgz", - "integrity": "sha512-7avtgVy77acgPG8zBoJ9siTpuZ3stNdUojTP4RQeJrArpR4jbyh6Ui3Cv2nIfLPxNfVpV11qoPQ1XVKv7vb0vQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-data-raw/-/substrate-data-raw-1.1.5.tgz", + "integrity": "sha512-YdS7JkKyySdCXAjYBcTJ7TBDTbIQyvG4wyiPPrRXDz4YltBkb8qmxepx/vPUoFgkvkCXH1w3ADhlTQYdyTsdyQ==", "dependencies": { - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-range": "^0.3.0", "@subsquid/util-timeout": "^2.3.2" }, "peerDependencies": { "@subsquid/logger": "^1.3.3", - "@subsquid/rpc-client": "^4.7.0" + "@subsquid/rpc-client": "^4.9.0" } }, "node_modules/@subsquid/substrate-data-raw/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/substrate-data/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/substrate-metadata-explorer": { "version": "3.1.2", @@ -1669,42 +1678,42 @@ } }, "node_modules/@subsquid/substrate-processor": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-processor/-/substrate-processor-8.2.2.tgz", - "integrity": "sha512-gs/XUC76Xvn0KW49hQf1zpBhEnAcMxAk42wn6ILkjbR4WcgPaU0eOW+uGRglYyX6j6UbUhLodRxAtJJQcmhmNA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-processor/-/substrate-processor-8.4.1.tgz", + "integrity": "sha512-LGYNBQPi4W8OPHwvTi95HjNtqVQrhY22xNk1TChFD5A7MKdgZ4oIc51TnlZGrAzWCbAD5jcbp75DOSexQdwaXg==", "dependencies": { "@subsquid/http-client": "^1.4.0", "@subsquid/logger": "^1.3.3", - "@subsquid/rpc-client": "^4.7.0", - "@subsquid/substrate-data": "^4.0.3", - "@subsquid/substrate-data-raw": "^1.1.2", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/rpc-client": "^4.9.0", + "@subsquid/substrate-data": "^4.1.0", + "@subsquid/substrate-data-raw": "^1.1.5", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-archive-client": "^0.1.2", "@subsquid/util-internal-hex": "^1.2.2", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-json": "^1.2.3", - "@subsquid/util-internal-processor-tools": "^4.1.0", + "@subsquid/util-internal-processor-tools": "^4.1.1", "@subsquid/util-internal-range": "^0.3.0", - "@subsquid/util-internal-validation": "^0.4.0" + "@subsquid/util-internal-validation": "^0.5.0" }, "peerDependencies": { - "@subsquid/substrate-runtime": "^1.0.3" + "@subsquid/substrate-runtime": "^2.0.0" } }, "node_modules/@subsquid/substrate-processor/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/substrate-runtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-runtime/-/substrate-runtime-1.0.3.tgz", - "integrity": "sha512-3uNZqyHKzoMkSHQTZIJl1G7NiKyFl4cmDzVY3dU0o4VZhGNUAmR+HecT3WBkMMYye6uhDAeXsbVECa3ZnMM3gQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-runtime/-/substrate-runtime-2.0.0.tgz", + "integrity": "sha512-sjw0BmcUPnXasYqv9zuI8wb21Y2hyIPpz24ut9eBTVXUvdBobASw/6iFlQsFoxqzz39xxQfZIZsWXBet5AViAw==", "peer": true, "dependencies": { "@subsquid/scale-codec": "^4.0.1", "@subsquid/scale-type-system": "^1.0.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/util-internal": "^3.1.0", "@subsquid/util-internal-hex": "^1.2.2", "@subsquid/util-naming": "^1.2.2", "@subsquid/util-xxhash": "^1.2.2", @@ -1718,15 +1727,15 @@ "peer": true }, "node_modules/@subsquid/substrate-typegen": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-typegen/-/substrate-typegen-8.0.2.tgz", - "integrity": "sha512-JraheRh2ZdM1BoVF79DjhU/BIifuIlwyo2/DmL0RuGaslk6F/VGJ0gWSTpCZr6A2F3hlNFzLvzeZPO/xgH/JMg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-typegen/-/substrate-typegen-8.1.0.tgz", + "integrity": "sha512-4wEuti5ldhUdzyguZQi7IImQFflXrzz9TjviuKXSChrePs5M1oMFhtJw5X5oMDBmRB/xDY9YLioNUPArxC6O3g==", "dev": true, "dependencies": { - "@subsquid/http-client": "^1.3.2", - "@subsquid/logger": "^1.3.2", + "@subsquid/http-client": "^1.4.0", + "@subsquid/logger": "^1.3.3", "@subsquid/substrate-metadata-explorer": "^3.1.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/util-internal": "^3.1.0", "@subsquid/util-internal-code-printer": "^1.2.2", "@subsquid/util-internal-config": "^2.2.2", "@subsquid/util-internal-read-lines": "^1.2.2", @@ -1737,7 +1746,7 @@ "squid-substrate-typegen": "bin/run.js" }, "peerDependencies": { - "@subsquid/substrate-runtime": "^1.0.2" + "@subsquid/substrate-runtime": "^2.0.0" } }, "node_modules/@subsquid/substrate-typegen/node_modules/@subsquid/util-internal": { @@ -1756,15 +1765,15 @@ } }, "node_modules/@subsquid/typeorm-codegen": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-codegen/-/typeorm-codegen-1.3.3.tgz", - "integrity": "sha512-6k1oRWnaBNX4GZX737dvZll925uZKt2or/oXNaQRnHAmrCISkIEz7dYkl6PFfppYuardch41FBSFmOQaovPCXw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-codegen/-/typeorm-codegen-2.0.1.tgz", + "integrity": "sha512-OVQTHSn538lzxgZuuf4NJiRvoHPuAmAK2Hfr4PEhaAVJg1AufjXL5CjZUjDOZEFgepgS7GH40RVZJEq7E0obzg==", "dev": true, "dependencies": { - "@subsquid/openreader": "^4.4.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/openreader": "^4.6.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-code-printer": "^1.2.2", - "@subsquid/util-naming": "^1.2.2", + "@subsquid/util-naming": "^1.3.0", "commander": "^11.1.0" }, "bin": { @@ -1772,9 +1781,9 @@ } }, "node_modules/@subsquid/typeorm-codegen/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==", "dev": true }, "node_modules/@subsquid/typeorm-codegen/node_modules/commander": { @@ -1787,13 +1796,13 @@ } }, "node_modules/@subsquid/typeorm-config": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-config/-/typeorm-config-4.1.0.tgz", - "integrity": "sha512-onZsHQIypCTRguOeec1Gmm+6EPlTg63QNE7Y74nrbBb4sabZtrK3K+EQJId4KIdk/kxA2Wi/g5H/VDNZNFSe9A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-config/-/typeorm-config-4.1.1.tgz", + "integrity": "sha512-3T2L2jmFIRYxWHL/w4rMuaSiHLhDywQWPKtfD3TaSohjXR+VdDG5XimDMmSwM4dzQTBToGpnfUEkzH3v1+EnCg==", "dependencies": { - "@subsquid/logger": "^1.3.2", + "@subsquid/logger": "^1.3.3", "@subsquid/util-internal-ts-node": "^0.0.0", - "@subsquid/util-naming": "^1.2.2" + "@subsquid/util-naming": "^1.3.0" }, "peerDependencies": { "typeorm": "^0.3.17" @@ -1841,21 +1850,22 @@ } }, "node_modules/@subsquid/typeorm-store": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-store/-/typeorm-store-1.3.0.tgz", - "integrity": "sha512-32jwKA2fEYuGpyKEisKOlrz6JTd0hXTXOLC9S4IIsOnhkY70Ua69QDe0CCTgKTrvMNOCwk3gPR+q8RwrlEMupQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-store/-/typeorm-store-1.5.1.tgz", + "integrity": "sha512-XIhc/4qotnJP+8RDxWjUdsSCr+LOPOAp9U+u0VCqnyXx5rN13MDS0L5KSkIGinr/OQtK1CBWmRpDLF4ExWcWCw==", "dependencies": { - "@subsquid/typeorm-config": "^4.1.0", - "@subsquid/util-internal": "^3.1.0" + "@subsquid/typeorm-config": "^4.1.1", + "@subsquid/util-internal": "^3.2.0" }, "peerDependencies": { + "@subsquid/big-decimal": "^1.0.0", "typeorm": "^0.3.17" } }, "node_modules/@subsquid/typeorm-store/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/util-internal": { "version": "1.1.0", @@ -1881,9 +1891,9 @@ } }, "node_modules/@subsquid/util-internal-archive-client/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/util-internal-binary-heap": { "version": "1.0.0", @@ -1925,12 +1935,12 @@ } }, "node_modules/@subsquid/util-internal-ingest-tools": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ingest-tools/-/util-internal-ingest-tools-1.1.2.tgz", - "integrity": "sha512-1fgi4W6x1B2+fYLGwjo+R4FjbLvR2b9h2/0EEqT8Ww6o4V15EubLf1TjBr8o/AWGN5Y/eYaMqWlFzbQsKQlcUQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ingest-tools/-/util-internal-ingest-tools-1.1.4.tgz", + "integrity": "sha512-2xWyqfg0mITsNdsYuGi3++UTy/D04N69KovyW5Rd71zCDSEedV0ePX5hQl/IT/o+H/u++HcXPggwJMVl09g6kQ==", "dependencies": { "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-range": "^0.3.0" }, "peerDependencies": { @@ -1943,9 +1953,9 @@ } }, "node_modules/@subsquid/util-internal-ingest-tools/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/util-internal-json": { "version": "1.2.3", @@ -1961,22 +1971,23 @@ "integrity": "sha512-mtbN15IgXtV4yo98RQla+O3DhFwB28o3JTBrFuBc/i/qzxyZNbKoVdq/uczomGdXrHxGkWhTDe/istIQe9gn6w==" }, "node_modules/@subsquid/util-internal-processor-tools": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-processor-tools/-/util-internal-processor-tools-4.1.0.tgz", - "integrity": "sha512-7yOsPTB+sTSntNa79NVHo+lHFFs/QtJttut0IYp89gXNEOhAZdJ2MrwawHVTW+DEZ+UILMOO356fos42On9yGw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-processor-tools/-/util-internal-processor-tools-4.1.1.tgz", + "integrity": "sha512-zzisejusRteAvwjqFDLlFapH9b86E8GdfNswuNWSjASE+VWadJ/PLfrlXFnsbAo4SxPKtqXWEewoK8cjzVjaZA==", "dependencies": { "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-counters": "^1.3.2", "@subsquid/util-internal-prometheus-server": "^1.3.0", "@subsquid/util-internal-range": "^0.3.0", + "@subsquid/util-internal-squid-id": "^0.0.0", "prom-client": "^14.2.0" } }, "node_modules/@subsquid/util-internal-processor-tools/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/util-internal-prometheus-server": { "version": "1.3.0", @@ -1999,9 +2010,9 @@ } }, "node_modules/@subsquid/util-internal-range/node_modules/@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "node_modules/@subsquid/util-internal-read-lines": { "version": "1.2.2", @@ -2009,15 +2020,20 @@ "integrity": "sha512-D9Cks2KVmVQMsJLFskQlwufykWiLLooDFmAYmgwSkZEVnCqJ1ukX8PZfkI+ADfhT5LB64O9FZL7hI0939qiXBA==", "dev": true }, + "node_modules/@subsquid/util-internal-squid-id": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-squid-id/-/util-internal-squid-id-0.0.0.tgz", + "integrity": "sha512-LyVZIGUbC87r+3VFBRiNOEycxvpkOEEjt5enY02iGl6MneLwq3m17D44xAkwfFj/U+t7GA76eeHIoI2ZkiQKog==" + }, "node_modules/@subsquid/util-internal-ts-node": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ts-node/-/util-internal-ts-node-0.0.0.tgz", "integrity": "sha512-VBnrKrkNcqbT3hMLrjpEPuwMAihFhW9oUmK53bccBCCXrUiATNUblQD2S4IWd9/UBO5Q33ohpbE9sAodDq2DXw==" }, "node_modules/@subsquid/util-internal-validation": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-validation/-/util-internal-validation-0.4.0.tgz", - "integrity": "sha512-YrwzbMd2Ez4ufCHDWc/AZpNqZ8LR/YCJ+1Aox5HF46INvkFVun5g5YI3HjXReMwvwrpT4Gsy+JvDTYvaHtTUlQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-validation/-/util-internal-validation-0.5.0.tgz", + "integrity": "sha512-mGiwOzc/Fq651CbFe7aEpERXBr+BkqAz8cDpqTVAsve6ghvB5tvwlAv7i1MWnyt/g7OqX1LhYMhh7NFipyMeyA==", "peerDependencies": { "@subsquid/logger": "^1.3.3" }, @@ -2028,9 +2044,9 @@ } }, "node_modules/@subsquid/util-naming": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-naming/-/util-naming-1.2.2.tgz", - "integrity": "sha512-NveXOiAbWiWkWd3Iv2jEwSAKvQHOG/HfIsPmmNab8TPX/XgJ6J5Ngx6lHEiqs746m4sOhZ2yipxKAEDgrERaxA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-naming/-/util-naming-1.3.0.tgz", + "integrity": "sha512-PfYg1uFHwb7e6egbkzIbQTWf7DVlZIQr2gHy4VE35ZNiA15R9wkJLo/Mym6OkwLQyjJwhhq7pCFhkz6tm19m+A==", "dependencies": { "camelcase": "^6.3.0", "inflected": "^2.1.0" @@ -3158,6 +3174,19 @@ } ] }, + "node_modules/big.js": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", + "peer": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/bintrees": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", @@ -5365,9 +5394,9 @@ } }, "node_modules/graphql-parse-resolve-info/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dependencies": { "ms": "2.1.2" }, @@ -7624,9 +7653,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/scule": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.0.tgz", - "integrity": "sha512-vRUjqhyM/YWYzT+jsMk6tnl3NkY4A4soJ8uyh3O6Um+JXEQL9ozUCe7pqrxn3CSKokw0hw3nFStfskzpgYwR0g==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==" }, "node_modules/semver": { "version": "7.5.0", @@ -9649,11 +9678,11 @@ "integrity": "sha512-8vBamHWimmZ/ew1Z0iUJPDdW2fkNiPC5S1Ezklsy5BjG0AvA+7t+cwpi2gD33sMrfkzAAHcg30B3EHA98sgUzw==" }, "@kodadot1/metasquid": { - "version": "0.3.0-rc.0", - "resolved": "https://registry.npmjs.org/@kodadot1/metasquid/-/metasquid-0.3.0-rc.0.tgz", - "integrity": "sha512-RnsxKYKxrRM+S4/tCVpCi1QOIgTS6myevg6bODopNNR7Z3UzyABVPxHWoUjmsaOBuMSAthvNYn03tbCjLax0mA==", + "version": "0.3.1-rc.0", + "resolved": "https://registry.npmjs.org/@kodadot1/metasquid/-/metasquid-0.3.1-rc.0.tgz", + "integrity": "sha512-fYmeXj+Sum0RgmgRW7I52XMsk7LS2raTxHY5r/+xfOAfboKHPm8M7yyN+UYCFLiJYm3W1G+nP6o8VeUakui1cw==", "requires": { - "scule": "^1.1.0" + "scule": "^1.3.0" } }, "@kodadot1/minipfs": { @@ -9885,15 +9914,24 @@ "sync-fetch": "^0.5.2" } }, + "@subsquid/big-decimal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/big-decimal/-/big-decimal-1.0.0.tgz", + "integrity": "sha512-/wyZEYC4Mlcm7jQWGhZnCvYpIosRmDSlNbv9SJBphE88aaFe8bOxl4sYwM/olzJgCn4Ir45nBsPU0ebF1+nXog==", + "peer": true, + "requires": { + "big.js": "~6.2.1" + } + }, "@subsquid/graphiql-console": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@subsquid/graphiql-console/-/graphiql-console-0.3.0.tgz", "integrity": "sha512-C89mus6IXnNi0xMQrZqUFBZwLj8tbuq9lye8Gq/lHmmERAUpi6UsWEyLdJLx2mneZzF3JtY8eNiiZ16jmjtvfw==" }, "@subsquid/graphql-server": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@subsquid/graphql-server/-/graphql-server-4.5.1.tgz", - "integrity": "sha512-PMC5Kc9ptjhrBIBRvvhkHiSRUEGJqv6Bc838VnvLtF5kMrGjSI+pPUiA5t+rhdfxywX1j+ZEdBpaRypAGo6Otw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@subsquid/graphql-server/-/graphql-server-4.6.0.tgz", + "integrity": "sha512-urQr5yLgYaPKSkCDQQ7ZwmpnYDOFfUSIKGxA7qk5LFoJlIJ+ycO4rkzb3ln29LrhSw25D3E/ZfrDlS+PFnV4ZA==", "requires": { "@apollo/utils.keyvadapter": "~1.1.2", "@apollo/utils.keyvaluecache": "~1.0.2", @@ -9902,10 +9940,10 @@ "@graphql-tools/utils": "^10.0.11", "@keyv/redis": "~2.5.8", "@subsquid/logger": "^1.3.3", - "@subsquid/openreader": "^4.5.1", - "@subsquid/typeorm-config": "^4.1.0", - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-commander": "^1.3.2", + "@subsquid/openreader": "^4.6.0", + "@subsquid/typeorm-config": "^4.1.1", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-commander": "^1.4.0", "@subsquid/util-internal-http-server": "^2.0.0", "@subsquid/util-internal-ts-node": "^0.0.0", "apollo-server-core": "^3.13.0", @@ -9922,14 +9960,14 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "@subsquid/util-internal-commander": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.3.2.tgz", - "integrity": "sha512-9/1vI1dmGQMp5wjN6hb94VCnSosT+caob33tAesFaIdqLzqQlDtlTSRq1TFFossAgtsEJFi7GiQ8i31L/gaxSQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.4.0.tgz", + "integrity": "sha512-I+IztlLVow9z2S5lK/ON4aBRYXKtAKXl/rVPUn1Ue5vq+5JgEFbWEKJgnwXkd0qKnKeoYeaRFlcyQVfxirxzJw==", "requires": {} }, "commander": { @@ -9977,18 +10015,18 @@ } }, "@subsquid/openreader": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@subsquid/openreader/-/openreader-4.5.1.tgz", - "integrity": "sha512-N4aFZ0AzYiFCzocqbW971M8LOIKo9E8d4lt5He4x8Jcm19hwYYlNy8wwnOv1USCxFO/uCPZm/RTkARlyjOL10A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@subsquid/openreader/-/openreader-4.6.0.tgz", + "integrity": "sha512-/05vSoKP3UHxU6GJYfKcfSIi4bWfzbr9x/H2wW5XxE4uc8gFeaVZHCmQMTaO9941oK//9rk9BQTH5Slhwuj7gw==", "requires": { "@graphql-tools/merge": "^9.0.1", "@subsquid/graphiql-console": "^0.3.0", "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-commander": "^1.3.2", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-commander": "^1.4.0", "@subsquid/util-internal-hex": "^1.2.2", "@subsquid/util-internal-http-server": "^2.0.0", - "@subsquid/util-naming": "^1.2.2", + "@subsquid/util-naming": "^1.3.0", "apollo-server-core": "^3.13.0", "apollo-server-express": "^3.13.0", "commander": "^11.1.0", @@ -10002,14 +10040,14 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" }, "@subsquid/util-internal-commander": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.3.2.tgz", - "integrity": "sha512-9/1vI1dmGQMp5wjN6hb94VCnSosT+caob33tAesFaIdqLzqQlDtlTSRq1TFFossAgtsEJFi7GiQ8i31L/gaxSQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-commander/-/util-internal-commander-1.4.0.tgz", + "integrity": "sha512-I+IztlLVow9z2S5lK/ON4aBRYXKtAKXl/rVPUn1Ue5vq+5JgEFbWEKJgnwXkd0qKnKeoYeaRFlcyQVfxirxzJw==", "requires": {} }, "commander": { @@ -10020,13 +10058,13 @@ } }, "@subsquid/rpc-client": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@subsquid/rpc-client/-/rpc-client-4.7.0.tgz", - "integrity": "sha512-RPVLg4X+C/4QiowGMT2gdJfqshmGFgg0RzPsoRLkTgVojqnHIF4Kv7ytSvKidQLmR75aHGn8BUZ3raLwAD+YLA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@subsquid/rpc-client/-/rpc-client-4.9.0.tgz", + "integrity": "sha512-lpb6qRMMlaacXOFPRhv4CZ7g4w7pKIR7ZEbMjyFexLOdv9MkcYzuGD5XT5REGaBA6mfQMaLa33K5lqAb+tJKBQ==", "requires": { "@subsquid/http-client": "^1.4.0", "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-binary-heap": "^1.0.0", "@subsquid/util-internal-counters": "^1.3.2", "@subsquid/util-internal-json-fix-unsafe-integers": "^0.0.0", @@ -10034,9 +10072,9 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10085,15 +10123,15 @@ } }, "@subsquid/substrate-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-data/-/substrate-data-4.0.3.tgz", - "integrity": "sha512-oA5sv+ks43SvLG6aOF4s0jGQC73CbrB5C8dHMK4RqWDU5FZdT1ZG5VRUWwWr1erxIC5nc55wY0iTekswIxjqmA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-data/-/substrate-data-4.1.0.tgz", + "integrity": "sha512-IrhgP1LsqWbXtg35WQEUbVF1xkeNuSPCcwV2TCnjWM2IK2w/LpHN6JLdOIbxQVm3Em1BBPaJUzAakF24gDJQBA==", "requires": { "@subsquid/scale-codec": "^4.0.1", - "@subsquid/substrate-data-raw": "^1.1.2", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/substrate-data-raw": "^1.1.5", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-hex": "^1.2.2", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-range": "^0.3.0", "@subsquid/util-xxhash": "^1.2.2", "@substrate/calc": "^0.2.8", @@ -10101,27 +10139,27 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, "@subsquid/substrate-data-raw": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-data-raw/-/substrate-data-raw-1.1.2.tgz", - "integrity": "sha512-7avtgVy77acgPG8zBoJ9siTpuZ3stNdUojTP4RQeJrArpR4jbyh6Ui3Cv2nIfLPxNfVpV11qoPQ1XVKv7vb0vQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-data-raw/-/substrate-data-raw-1.1.5.tgz", + "integrity": "sha512-YdS7JkKyySdCXAjYBcTJ7TBDTbIQyvG4wyiPPrRXDz4YltBkb8qmxepx/vPUoFgkvkCXH1w3ADhlTQYdyTsdyQ==", "requires": { - "@subsquid/util-internal": "^3.1.0", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal": "^3.2.0", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-range": "^0.3.0", "@subsquid/util-timeout": "^2.3.2" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10162,41 +10200,41 @@ } }, "@subsquid/substrate-processor": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-processor/-/substrate-processor-8.2.2.tgz", - "integrity": "sha512-gs/XUC76Xvn0KW49hQf1zpBhEnAcMxAk42wn6ILkjbR4WcgPaU0eOW+uGRglYyX6j6UbUhLodRxAtJJQcmhmNA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-processor/-/substrate-processor-8.4.1.tgz", + "integrity": "sha512-LGYNBQPi4W8OPHwvTi95HjNtqVQrhY22xNk1TChFD5A7MKdgZ4oIc51TnlZGrAzWCbAD5jcbp75DOSexQdwaXg==", "requires": { "@subsquid/http-client": "^1.4.0", "@subsquid/logger": "^1.3.3", - "@subsquid/rpc-client": "^4.7.0", - "@subsquid/substrate-data": "^4.0.3", - "@subsquid/substrate-data-raw": "^1.1.2", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/rpc-client": "^4.9.0", + "@subsquid/substrate-data": "^4.1.0", + "@subsquid/substrate-data-raw": "^1.1.5", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-archive-client": "^0.1.2", "@subsquid/util-internal-hex": "^1.2.2", - "@subsquid/util-internal-ingest-tools": "^1.1.2", + "@subsquid/util-internal-ingest-tools": "^1.1.4", "@subsquid/util-internal-json": "^1.2.3", - "@subsquid/util-internal-processor-tools": "^4.1.0", + "@subsquid/util-internal-processor-tools": "^4.1.1", "@subsquid/util-internal-range": "^0.3.0", - "@subsquid/util-internal-validation": "^0.4.0" + "@subsquid/util-internal-validation": "^0.5.0" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, "@subsquid/substrate-runtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-runtime/-/substrate-runtime-1.0.3.tgz", - "integrity": "sha512-3uNZqyHKzoMkSHQTZIJl1G7NiKyFl4cmDzVY3dU0o4VZhGNUAmR+HecT3WBkMMYye6uhDAeXsbVECa3ZnMM3gQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-runtime/-/substrate-runtime-2.0.0.tgz", + "integrity": "sha512-sjw0BmcUPnXasYqv9zuI8wb21Y2hyIPpz24ut9eBTVXUvdBobASw/6iFlQsFoxqzz39xxQfZIZsWXBet5AViAw==", "peer": true, "requires": { "@subsquid/scale-codec": "^4.0.1", "@subsquid/scale-type-system": "^1.0.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/util-internal": "^3.1.0", "@subsquid/util-internal-hex": "^1.2.2", "@subsquid/util-naming": "^1.2.2", "@subsquid/util-xxhash": "^1.2.2", @@ -10212,15 +10250,15 @@ } }, "@subsquid/substrate-typegen": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@subsquid/substrate-typegen/-/substrate-typegen-8.0.2.tgz", - "integrity": "sha512-JraheRh2ZdM1BoVF79DjhU/BIifuIlwyo2/DmL0RuGaslk6F/VGJ0gWSTpCZr6A2F3hlNFzLvzeZPO/xgH/JMg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@subsquid/substrate-typegen/-/substrate-typegen-8.1.0.tgz", + "integrity": "sha512-4wEuti5ldhUdzyguZQi7IImQFflXrzz9TjviuKXSChrePs5M1oMFhtJw5X5oMDBmRB/xDY9YLioNUPArxC6O3g==", "dev": true, "requires": { - "@subsquid/http-client": "^1.3.2", - "@subsquid/logger": "^1.3.2", + "@subsquid/http-client": "^1.4.0", + "@subsquid/logger": "^1.3.3", "@subsquid/substrate-metadata-explorer": "^3.1.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/util-internal": "^3.1.0", "@subsquid/util-internal-code-printer": "^1.2.2", "@subsquid/util-internal-config": "^2.2.2", "@subsquid/util-internal-read-lines": "^1.2.2", @@ -10243,22 +10281,22 @@ } }, "@subsquid/typeorm-codegen": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-codegen/-/typeorm-codegen-1.3.3.tgz", - "integrity": "sha512-6k1oRWnaBNX4GZX737dvZll925uZKt2or/oXNaQRnHAmrCISkIEz7dYkl6PFfppYuardch41FBSFmOQaovPCXw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-codegen/-/typeorm-codegen-2.0.1.tgz", + "integrity": "sha512-OVQTHSn538lzxgZuuf4NJiRvoHPuAmAK2Hfr4PEhaAVJg1AufjXL5CjZUjDOZEFgepgS7GH40RVZJEq7E0obzg==", "dev": true, "requires": { - "@subsquid/openreader": "^4.4.2", - "@subsquid/util-internal": "^3.0.0", + "@subsquid/openreader": "^4.6.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-code-printer": "^1.2.2", - "@subsquid/util-naming": "^1.2.2", + "@subsquid/util-naming": "^1.3.0", "commander": "^11.1.0" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==", "dev": true }, "commander": { @@ -10270,13 +10308,13 @@ } }, "@subsquid/typeorm-config": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-config/-/typeorm-config-4.1.0.tgz", - "integrity": "sha512-onZsHQIypCTRguOeec1Gmm+6EPlTg63QNE7Y74nrbBb4sabZtrK3K+EQJId4KIdk/kxA2Wi/g5H/VDNZNFSe9A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-config/-/typeorm-config-4.1.1.tgz", + "integrity": "sha512-3T2L2jmFIRYxWHL/w4rMuaSiHLhDywQWPKtfD3TaSohjXR+VdDG5XimDMmSwM4dzQTBToGpnfUEkzH3v1+EnCg==", "requires": { - "@subsquid/logger": "^1.3.2", + "@subsquid/logger": "^1.3.3", "@subsquid/util-internal-ts-node": "^0.0.0", - "@subsquid/util-naming": "^1.2.2" + "@subsquid/util-naming": "^1.3.0" } }, "@subsquid/typeorm-migration": { @@ -10305,18 +10343,18 @@ } }, "@subsquid/typeorm-store": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@subsquid/typeorm-store/-/typeorm-store-1.3.0.tgz", - "integrity": "sha512-32jwKA2fEYuGpyKEisKOlrz6JTd0hXTXOLC9S4IIsOnhkY70Ua69QDe0CCTgKTrvMNOCwk3gPR+q8RwrlEMupQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@subsquid/typeorm-store/-/typeorm-store-1.5.1.tgz", + "integrity": "sha512-XIhc/4qotnJP+8RDxWjUdsSCr+LOPOAp9U+u0VCqnyXx5rN13MDS0L5KSkIGinr/OQtK1CBWmRpDLF4ExWcWCw==", "requires": { - "@subsquid/typeorm-config": "^4.1.0", - "@subsquid/util-internal": "^3.1.0" + "@subsquid/typeorm-config": "^4.1.1", + "@subsquid/util-internal": "^3.2.0" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10335,9 +10373,9 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10381,19 +10419,19 @@ } }, "@subsquid/util-internal-ingest-tools": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ingest-tools/-/util-internal-ingest-tools-1.1.2.tgz", - "integrity": "sha512-1fgi4W6x1B2+fYLGwjo+R4FjbLvR2b9h2/0EEqT8Ww6o4V15EubLf1TjBr8o/AWGN5Y/eYaMqWlFzbQsKQlcUQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ingest-tools/-/util-internal-ingest-tools-1.1.4.tgz", + "integrity": "sha512-2xWyqfg0mITsNdsYuGi3++UTy/D04N69KovyW5Rd71zCDSEedV0ePX5hQl/IT/o+H/u++HcXPggwJMVl09g6kQ==", "requires": { "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-range": "^0.3.0" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10411,22 +10449,23 @@ "integrity": "sha512-mtbN15IgXtV4yo98RQla+O3DhFwB28o3JTBrFuBc/i/qzxyZNbKoVdq/uczomGdXrHxGkWhTDe/istIQe9gn6w==" }, "@subsquid/util-internal-processor-tools": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-processor-tools/-/util-internal-processor-tools-4.1.0.tgz", - "integrity": "sha512-7yOsPTB+sTSntNa79NVHo+lHFFs/QtJttut0IYp89gXNEOhAZdJ2MrwawHVTW+DEZ+UILMOO356fos42On9yGw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-processor-tools/-/util-internal-processor-tools-4.1.1.tgz", + "integrity": "sha512-zzisejusRteAvwjqFDLlFapH9b86E8GdfNswuNWSjASE+VWadJ/PLfrlXFnsbAo4SxPKtqXWEewoK8cjzVjaZA==", "requires": { "@subsquid/logger": "^1.3.3", - "@subsquid/util-internal": "^3.1.0", + "@subsquid/util-internal": "^3.2.0", "@subsquid/util-internal-counters": "^1.3.2", "@subsquid/util-internal-prometheus-server": "^1.3.0", "@subsquid/util-internal-range": "^0.3.0", + "@subsquid/util-internal-squid-id": "^0.0.0", "prom-client": "^14.2.0" }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10448,9 +10487,9 @@ }, "dependencies": { "@subsquid/util-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.1.0.tgz", - "integrity": "sha512-m1lIiy7Tc2+QR5Jcx9eGsVsB4ASR/bA5Z9gnB+qUy1BzYuz5FEiJOYCQm6J5Bt+VnYDYYyANEUMq4Cl3J5wuSg==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal/-/util-internal-3.2.0.tgz", + "integrity": "sha512-foNCjOmZaP8MKMa9sNe2GXTjFSDM9UqA0I0C0/ZvCxM1lCmG3mxZb70f8Wyi7TePXC/eV8eARbIqFyz0GjQmzA==" } } }, @@ -10460,21 +10499,26 @@ "integrity": "sha512-D9Cks2KVmVQMsJLFskQlwufykWiLLooDFmAYmgwSkZEVnCqJ1ukX8PZfkI+ADfhT5LB64O9FZL7hI0939qiXBA==", "dev": true }, + "@subsquid/util-internal-squid-id": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-squid-id/-/util-internal-squid-id-0.0.0.tgz", + "integrity": "sha512-LyVZIGUbC87r+3VFBRiNOEycxvpkOEEjt5enY02iGl6MneLwq3m17D44xAkwfFj/U+t7GA76eeHIoI2ZkiQKog==" + }, "@subsquid/util-internal-ts-node": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/@subsquid/util-internal-ts-node/-/util-internal-ts-node-0.0.0.tgz", "integrity": "sha512-VBnrKrkNcqbT3hMLrjpEPuwMAihFhW9oUmK53bccBCCXrUiATNUblQD2S4IWd9/UBO5Q33ohpbE9sAodDq2DXw==" }, "@subsquid/util-internal-validation": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@subsquid/util-internal-validation/-/util-internal-validation-0.4.0.tgz", - "integrity": "sha512-YrwzbMd2Ez4ufCHDWc/AZpNqZ8LR/YCJ+1Aox5HF46INvkFVun5g5YI3HjXReMwvwrpT4Gsy+JvDTYvaHtTUlQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-validation/-/util-internal-validation-0.5.0.tgz", + "integrity": "sha512-mGiwOzc/Fq651CbFe7aEpERXBr+BkqAz8cDpqTVAsve6ghvB5tvwlAv7i1MWnyt/g7OqX1LhYMhh7NFipyMeyA==", "requires": {} }, "@subsquid/util-naming": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@subsquid/util-naming/-/util-naming-1.2.2.tgz", - "integrity": "sha512-NveXOiAbWiWkWd3Iv2jEwSAKvQHOG/HfIsPmmNab8TPX/XgJ6J5Ngx6lHEiqs746m4sOhZ2yipxKAEDgrERaxA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@subsquid/util-naming/-/util-naming-1.3.0.tgz", + "integrity": "sha512-PfYg1uFHwb7e6egbkzIbQTWf7DVlZIQr2gHy4VE35ZNiA15R9wkJLo/Mym6OkwLQyjJwhhq7pCFhkz6tm19m+A==", "requires": { "camelcase": "^6.3.0", "inflected": "^2.1.0" @@ -11305,6 +11349,12 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "big.js": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", + "peer": true + }, "bintrees": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", @@ -12928,9 +12978,9 @@ }, "dependencies": { "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "requires": { "ms": "2.1.2" } @@ -14479,9 +14529,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "scule": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/scule/-/scule-1.1.0.tgz", - "integrity": "sha512-vRUjqhyM/YWYzT+jsMk6tnl3NkY4A4soJ8uyh3O6Um+JXEQL9ozUCe7pqrxn3CSKokw0hw3nFStfskzpgYwR0g==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==" }, "semver": { "version": "7.5.0", diff --git a/package.json b/package.json index 5c6d65c..e25efdd 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,14 @@ }, "dependencies": { "@kodadot1/hyperdata": "^0.0.1-rc.4", - "@kodadot1/metasquid": "^0.3.0-rc.0", + "@kodadot1/metasquid": "^0.3.1-rc.0", "@kodadot1/minipfs": "^0.4.3-rc.1", "@subsquid/archive-registry": "3.3.2", - "@subsquid/graphql-server": "4.5.1", + "@subsquid/graphql-server": "4.6.0", "@subsquid/ss58": "2.0.2", - "@subsquid/substrate-processor": "8.2.2", + "@subsquid/substrate-processor": "8.4.1", "@subsquid/typeorm-migration": "1.3.0", - "@subsquid/typeorm-store": "1.3.0", + "@subsquid/typeorm-store": "1.5.1", "dotenv": "^16.4.5", "md5": "^2.3.0", "nanoid": "3.3.4", @@ -34,8 +34,8 @@ }, "devDependencies": { "@subsquid/substrate-metadata-explorer": "3.1.2", - "@subsquid/substrate-typegen": "8.0.2", - "@subsquid/typeorm-codegen": "1.3.3", + "@subsquid/substrate-typegen": "8.1.0", + "@subsquid/typeorm-codegen": "2.0.1", "@types/md5": "^2.3.5", "@types/node": "18.11.18", "@types/pg": "^8.11.4", From a701673220621c5bf9d11c8b4f3b2c35548094ea Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 13:56:03 +0300 Subject: [PATCH 04/20] :wrench: new cuter env --- src/environment.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/environment.ts b/src/environment.ts index 5b8de47..df912be 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -1,5 +1,3 @@ -import { lookupArchive } from '@subsquid/archive-registry' - export type Chain = 'kusama' | 'rococo' | 'polkadot' export const CHAIN: Chain = process.env.CHAIN as Chain || 'kusama' @@ -9,16 +7,16 @@ const UNIQUE_STARTING_BLOCK = 323_750 // 618838; export const STARTING_BLOCK = UNIQUE_STARTING_BLOCK // Asset Hub -const ARCHIVE_URL = lookupArchive(`asset-hub-${CHAIN}`, { release: 'ArrowSquid' }) +const ARCHIVE_URL = `https://v2.archive.subsquid.io/network/asset-hub-${CHAIN}` const NODE_URL = `wss://${CHAIN}-asset-hub-rpc.polkadot.io` -// Statemint -// const DEV_ARCHIVE_URL = lookupArchive('statemint', { release: 'FireSquid' }) -// const DEV_NODE_URL = 'wss://statemint-rpc.polkadot.io' - export const isProd = CHAIN !== 'rococo' -console.log(`Using ${CHAIN} chain ${isProd ? 'production' : 'development'} environment`) +console.table({ + CHAIN, ARCHIVE_URL, NODE_URL, STARTING_BLOCK, + disabledRPC: false, + environment: isProd ? 'production' : 'development', +}) export const getArchiveUrl = (): string => ARCHIVE_URL export const getNodeUrl = (): string => NODE_URL From 02a1c370e9831149474efe608962999edd2537db Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 13:59:55 +0300 Subject: [PATCH 05/20] :wrench: w3s vs infura --- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 52b714f..96e76f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@kodadot1/hyperdata": "^0.0.1-rc.4", "@kodadot1/metasquid": "^0.3.1-rc.0", - "@kodadot1/minipfs": "^0.4.3-rc.1", + "@kodadot1/minipfs": "^0.4.3-rc.2", "@subsquid/archive-registry": "3.3.2", "@subsquid/graphql-server": "4.6.0", "@subsquid/ss58": "2.0.2", @@ -1001,11 +1001,11 @@ } }, "node_modules/@kodadot1/minipfs": { - "version": "0.4.3-rc.1", - "resolved": "https://registry.npmjs.org/@kodadot1/minipfs/-/minipfs-0.4.3-rc.1.tgz", - "integrity": "sha512-EB+J58semTct3+qi6EC+omxyaaN33SHSSOcXmcaqEL9cg3stGp0MCfeSXzbpriweDh2NF8MtI2oAdEckueAQDg==", + "version": "0.4.3-rc.2", + "resolved": "https://registry.npmjs.org/@kodadot1/minipfs/-/minipfs-0.4.3-rc.2.tgz", + "integrity": "sha512-tUiJawjaxd40sm+FHRQi66jlkV+K7np6ZhC+SL5jQ2xXmu6RPYL03pazFydM9rDfpPnIiddaAM+DTttk45B+AQ==", "dependencies": { - "ofetch": "^1.3.3" + "ofetch": "^1.3.4" } }, "node_modules/@nodelib/fs.scandir": { @@ -3844,9 +3844,9 @@ } }, "node_modules/destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" }, "node_modules/destroy": { "version": "1.2.0", @@ -6579,9 +6579,9 @@ } }, "node_modules/node-fetch-native": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.4.0.tgz", - "integrity": "sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==" + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, "node_modules/node-gyp-build": { "version": "4.7.0", @@ -6721,13 +6721,13 @@ "dev": true }, "node_modules/ofetch": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.3.tgz", - "integrity": "sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.4.tgz", + "integrity": "sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==", "dependencies": { - "destr": "^2.0.1", - "node-fetch-native": "^1.4.0", - "ufo": "^1.3.0" + "destr": "^2.0.3", + "node-fetch-native": "^1.6.3", + "ufo": "^1.5.3" } }, "node_modules/on-finished": { @@ -8525,9 +8525,9 @@ } }, "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==" }, "node_modules/unbox-primitive": { "version": "1.0.2", @@ -9686,11 +9686,11 @@ } }, "@kodadot1/minipfs": { - "version": "0.4.3-rc.1", - "resolved": "https://registry.npmjs.org/@kodadot1/minipfs/-/minipfs-0.4.3-rc.1.tgz", - "integrity": "sha512-EB+J58semTct3+qi6EC+omxyaaN33SHSSOcXmcaqEL9cg3stGp0MCfeSXzbpriweDh2NF8MtI2oAdEckueAQDg==", + "version": "0.4.3-rc.2", + "resolved": "https://registry.npmjs.org/@kodadot1/minipfs/-/minipfs-0.4.3-rc.2.tgz", + "integrity": "sha512-tUiJawjaxd40sm+FHRQi66jlkV+K7np6ZhC+SL5jQ2xXmu6RPYL03pazFydM9rDfpPnIiddaAM+DTttk45B+AQ==", "requires": { - "ofetch": "^1.3.3" + "ofetch": "^1.3.4" } }, "@nodelib/fs.scandir": { @@ -11838,9 +11838,9 @@ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" }, "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" }, "destroy": { "version": "1.2.0", @@ -13794,9 +13794,9 @@ } }, "node-fetch-native": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.4.0.tgz", - "integrity": "sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==" + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, "node-gyp-build": { "version": "4.7.0", @@ -13893,13 +13893,13 @@ "dev": true }, "ofetch": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.3.tgz", - "integrity": "sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.4.tgz", + "integrity": "sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==", "requires": { - "destr": "^2.0.1", - "node-fetch-native": "^1.4.0", - "ufo": "^1.3.0" + "destr": "^2.0.3", + "node-fetch-native": "^1.6.3", + "ufo": "^1.5.3" } }, "on-finished": { @@ -15132,9 +15132,9 @@ "dev": true }, "ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==" + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==" }, "unbox-primitive": { "version": "1.0.2", diff --git a/package.json b/package.json index e25efdd..6a61458 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dependencies": { "@kodadot1/hyperdata": "^0.0.1-rc.4", "@kodadot1/metasquid": "^0.3.1-rc.0", - "@kodadot1/minipfs": "^0.4.3-rc.1", + "@kodadot1/minipfs": "^0.4.3-rc.2", "@subsquid/archive-registry": "3.3.2", "@subsquid/graphql-server": "4.6.0", "@subsquid/ss58": "2.0.2", From 12dda488a34a12ad43b3792f578a3b8e501bd67a Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 14:00:03 +0300 Subject: [PATCH 06/20] :wrench: w3s vs infura --- src/mappings/utils/metadata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mappings/utils/metadata.ts b/src/mappings/utils/metadata.ts index 0e44a54..53b5d68 100644 --- a/src/mappings/utils/metadata.ts +++ b/src/mappings/utils/metadata.ts @@ -16,7 +16,7 @@ export const fetchMetadata = async (metadata: string): Promis if (!metadata) { return ensure({}) } - const value = await $obtain(metadata, ['kodadot_beta', 'infura_kodadot1'], true) + const value = await $obtain(metadata, ['kodadot_beta', 'w3s'], true) return contentFrom(value as any) as T } catch (e) { logger.error(`[MINIPFS] ${e}`) From 62056fdc26cf9066e99cb177edd74146b12b6e63 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Wed, 19 Jun 2024 14:38:37 +0300 Subject: [PATCH 07/20] :bookmark: Speck@V13; --- speck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speck.yaml b/speck.yaml index 0021c0c..5b41995 100644 --- a/speck.yaml +++ b/speck.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: speck -version: 12 +version: 13 description: 'SubSquid indexer for Uniques and Assets on Statemint' build: deploy: From df79d6cd1c291343d15be93ed00a342a45deaf2f Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 20 Jun 2024 12:42:45 +0300 Subject: [PATCH 08/20] Update metadata.ts --- src/mappings/utils/metadata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mappings/utils/metadata.ts b/src/mappings/utils/metadata.ts index 53b5d68..5d9c46a 100644 --- a/src/mappings/utils/metadata.ts +++ b/src/mappings/utils/metadata.ts @@ -16,7 +16,7 @@ export const fetchMetadata = async (metadata: string): Promis if (!metadata) { return ensure({}) } - const value = await $obtain(metadata, ['kodadot_beta', 'w3s'], true) + const value = await $obtain(metadata, ['kodadot', 'w3s'], true) return contentFrom(value as any) as T } catch (e) { logger.error(`[MINIPFS] ${e}`) From db50da34fe05c5e0236e0064f0194ae7be7ab265 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 20 Jun 2024 12:47:13 +0300 Subject: [PATCH 09/20] :book: Update Speck@V12 --- speck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speck.yaml b/speck.yaml index 5b41995..0021c0c 100644 --- a/speck.yaml +++ b/speck.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: speck -version: 13 +version: 12 description: 'SubSquid indexer for Uniques and Assets on Statemint' build: deploy: From 104b063cc33f720bc3162b7840a188de1483a056 Mon Sep 17 00:00:00 2001 From: hassnian Date: Sat, 22 Jun 2024 11:56:04 +0500 Subject: [PATCH 10/20] add: tokenEntityList orderBy price nulls --- src/server-extension/model/tokenEntity.model.ts | 6 ++++-- src/server-extension/resolvers/tokenEntities.ts | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server-extension/model/tokenEntity.model.ts b/src/server-extension/model/tokenEntity.model.ts index 767769c..32c807e 100644 --- a/src/server-extension/model/tokenEntity.model.ts +++ b/src/server-extension/model/tokenEntity.model.ts @@ -10,7 +10,10 @@ export enum OrderBy { createdAt_DESC = "createdAt_DESC", price_ASC = "price_ASC", price_DESC = "price_DESC", - + price_ASC_NULLS_FIRST = "price_ASC_NULLS_FIRST", + price_ASC_NULLS_LAST = "price_ASC_NULLS_LAST", + price_DESC_NULLS_FIRST = "price_DESC_NULLS_FIRST", + price_DESC_NULLS_LAST = "price_DESC_NULLS_LAST", } registerEnumType(OrderBy, { @@ -167,4 +170,3 @@ export class TokenEntityQueryResult { Object.assign(this, props); } } - diff --git a/src/server-extension/resolvers/tokenEntities.ts b/src/server-extension/resolvers/tokenEntities.ts index f275162..1aebc00 100644 --- a/src/server-extension/resolvers/tokenEntities.ts +++ b/src/server-extension/resolvers/tokenEntities.ts @@ -78,7 +78,11 @@ ORDER BY ${orderQuery} LIMIT $2 OFFSET $3; [OrderBy.updatedAt_DESC]: 'updated_at DESC', [OrderBy.price_ASC]: 'cheapest_price ASC', [OrderBy.price_DESC]: 'cheapest_price DESC', - } + [OrderBy.price_ASC_NULLS_FIRST]: 'cheapest_price ASC NULLS FIRST', + [OrderBy.price_ASC_NULLS_LAST]: 'cheapest_price ASC NULLS LAST', + [OrderBy.price_DESC_NULLS_FIRST]: 'cheapest_price DESC NULLS FIRST', + [OrderBy.price_DESC_NULLS_LAST]: 'cheapest_price DESC NULLS LAST', + }; private getOrderByQuery(orderBy: string[] = [OrderBy.blockNumber_DESC]): string { return orderBy.map((order) => this.ORDER_BY_MAPPING[order]).join(', ') From a33086ca45f3ff824e52fe15db0bdf21376b3736 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:44:46 +0300 Subject: [PATCH 11/20] Ability to rewrite incorrect values --- src/mappings/nfts/setAttribute.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mappings/nfts/setAttribute.ts b/src/mappings/nfts/setAttribute.ts index 4ac755d..bb86459 100644 --- a/src/mappings/nfts/setAttribute.ts +++ b/src/mappings/nfts/setAttribute.ts @@ -25,15 +25,15 @@ export async function handleAttributeSet(context: Context): Promise { if ('royalty' in final && event.trait === 'royalty') { const value = unHex(event.value) - final.royalty = final.royalty ?? Number.parseFloat(value || '0') + final.royalty = final.royalty || Number.parseFloat(value || '0') } if ('recipient' in final && event.trait === 'recipient') { try { - final.recipient = final.recipient ?? addressOf(event.value as string) + final.recipient = final.recipient || addressOf(event.value as string) } catch (error) { console.log(error) - final.recipient = final.recipient ?? (event.value as string) + final.recipient = '' // final.recipient ?? (event.value as string) } } From da48410facb06a45e8b03bd6e2eb2f52a9569514 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:45:31 +0300 Subject: [PATCH 12/20] :zap: tokenUri to calculate next uri --- src/mappings/utils/helper.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mappings/utils/helper.ts b/src/mappings/utils/helper.ts index 3656f72..16cebea 100644 --- a/src/mappings/utils/helper.ts +++ b/src/mappings/utils/helper.ts @@ -61,6 +61,20 @@ export function unHex(value: T): T | string { return isHex(value) ? decodeHex(value).toString() : value } +/** + * create a token uri from the base uri and the token id + * @param baseUri - base uri from the collection + * @param tokenId - the token id +**/ +export function tokenUri(baseUri: Optional, tokenId: Optional): string { + if (!baseUri || !tokenId) { + return '' + } + + const uri = baseUri.endsWith('/') ? baseUri : `${baseUri}/` + return `${uri}${tokenId}` +} + /** * @deprecated Use the unjs/ufo package **/ From a899e6f69cff89fbf627a61c1c3fb36f42653bc0 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:47:43 +0300 Subject: [PATCH 13/20] :squid: codegen --- src/model/generated/assetEntity.model.ts | 8 +-- src/model/generated/cacheStatus.model.ts | 4 +- src/model/generated/collectionEntity.model.ts | 49 ++++++++++--------- src/model/generated/collectionEvent.model.ts | 13 +++-- src/model/generated/event.model.ts | 13 +++-- src/model/generated/marshal.ts | 30 ------------ src/model/generated/metadataEntity.model.ts | 14 +++--- src/model/generated/nftEntity.model.ts | 36 +++++++------- src/model/generated/tokenEntity.model.ts | 25 +++++----- 9 files changed, 81 insertions(+), 111 deletions(-) diff --git a/src/model/generated/assetEntity.model.ts b/src/model/generated/assetEntity.model.ts index fdb9d4b..2a1291f 100644 --- a/src/model/generated/assetEntity.model.ts +++ b/src/model/generated/assetEntity.model.ts @@ -1,4 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_} from "typeorm" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, StringColumn as StringColumn_, IntColumn as IntColumn_} from "@subsquid/typeorm-store" @Entity_() export class AssetEntity { @@ -9,12 +9,12 @@ export class AssetEntity { @PrimaryColumn_() id!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) name!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) symbol!: string | undefined | null - @Column_("int4", {nullable: true}) + @IntColumn_({nullable: true}) decimals!: number | undefined | null } diff --git a/src/model/generated/cacheStatus.model.ts b/src/model/generated/cacheStatus.model.ts index 8cf22f3..9ad1b82 100644 --- a/src/model/generated/cacheStatus.model.ts +++ b/src/model/generated/cacheStatus.model.ts @@ -1,4 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_} from "typeorm" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, DateTimeColumn as DateTimeColumn_} from "@subsquid/typeorm-store" @Entity_() export class CacheStatus { @@ -9,6 +9,6 @@ export class CacheStatus { @PrimaryColumn_() id!: string - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) lastBlockTimestamp!: Date } diff --git a/src/model/generated/collectionEntity.model.ts b/src/model/generated/collectionEntity.model.ts index 455d655..cb19d52 100644 --- a/src/model/generated/collectionEntity.model.ts +++ b/src/model/generated/collectionEntity.model.ts @@ -1,4 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, Index as Index_, OneToMany as OneToMany_, ManyToOne as ManyToOne_} from "typeorm" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, StringColumn as StringColumn_, BigIntColumn as BigIntColumn_, Index as Index_, BooleanColumn as BooleanColumn_, DateTimeColumn as DateTimeColumn_, IntColumn as IntColumn_, OneToMany as OneToMany_, ManyToOne as ManyToOne_, FloatColumn as FloatColumn_} from "@subsquid/typeorm-store" import * as marshal from "./marshal" import {Attribute} from "./_attribute" import {CollectionEvent} from "./collectionEvent.model" @@ -16,93 +16,96 @@ export class CollectionEntity { @Column_("jsonb", {transformer: {to: obj => obj == null ? undefined : obj.map((val: any) => val.toJSON()), from: obj => obj == null ? undefined : marshal.fromList(obj, val => new Attribute(undefined, marshal.nonNull(val)))}, nullable: true}) attributes!: (Attribute)[] | undefined | null + @StringColumn_({nullable: true}) + baseUri!: string | undefined | null + @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) blockNumber!: bigint | undefined | null - @Column_("bool", {nullable: false}) + @BooleanColumn_({nullable: false}) burned!: boolean @Index_() - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) createdAt!: Date - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) currentOwner!: string - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) distribution!: number @OneToMany_(() => CollectionEvent, e => e.collection) events!: CollectionEvent[] @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) + @BigIntColumn_({nullable: false}) floor!: bigint @Index_({unique: true}) - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) hash!: string @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) + @BigIntColumn_({nullable: false}) highestSale!: bigint @PrimaryColumn_() id!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) image!: string | undefined | null - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) issuer!: string - @Column_("int4", {nullable: true}) + @IntColumn_({nullable: true}) max!: number | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) media!: string | undefined | null @Index_() @ManyToOne_(() => MetadataEntity, {nullable: true}) meta!: MetadataEntity | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) metadata!: string | undefined | null @Index_() - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) name!: string | undefined | null @Index_() - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) nftCount!: number @OneToMany_(() => NFTEntity, e => e.collection) nfts!: NFTEntity[] - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) ownerCount!: number - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) recipient!: string | undefined | null - @Column_("numeric", {transformer: marshal.floatTransformer, nullable: true}) + @FloatColumn_({nullable: true}) royalty!: number | undefined | null @Index_() - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) supply!: number @Index_() - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) updatedAt!: Date - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) version!: number @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) + @BigIntColumn_({nullable: false}) volume!: bigint @Column_("varchar", {length: 8, nullable: true}) diff --git a/src/model/generated/collectionEvent.model.ts b/src/model/generated/collectionEvent.model.ts index f2ccc0f..eb8d78b 100644 --- a/src/model/generated/collectionEvent.model.ts +++ b/src/model/generated/collectionEvent.model.ts @@ -1,5 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, ManyToOne as ManyToOne_, Index as Index_} from "typeorm" -import * as marshal from "./marshal" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, BigIntColumn as BigIntColumn_, DateTimeColumn as DateTimeColumn_, StringColumn as StringColumn_, ManyToOne as ManyToOne_, Index as Index_} from "@subsquid/typeorm-store" import {Interaction} from "./_interaction" import {CollectionEntity} from "./collectionEntity.model" @@ -12,22 +11,22 @@ export class CollectionEvent { @PrimaryColumn_() id!: string - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) blockNumber!: bigint | undefined | null - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) timestamp!: Date - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) caller!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) currentOwner!: string | undefined | null @Column_("varchar", {length: 12, nullable: false}) interaction!: Interaction - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) meta!: string @Index_() diff --git a/src/model/generated/event.model.ts b/src/model/generated/event.model.ts index 295c827..54dfa35 100644 --- a/src/model/generated/event.model.ts +++ b/src/model/generated/event.model.ts @@ -1,5 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, ManyToOne as ManyToOne_, Index as Index_} from "typeorm" -import * as marshal from "./marshal" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, BigIntColumn as BigIntColumn_, DateTimeColumn as DateTimeColumn_, StringColumn as StringColumn_, ManyToOne as ManyToOne_, Index as Index_} from "@subsquid/typeorm-store" import {Interaction} from "./_interaction" import {NFTEntity} from "./nftEntity.model" @@ -12,22 +11,22 @@ export class Event { @PrimaryColumn_() id!: string - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) blockNumber!: bigint | undefined | null - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) timestamp!: Date - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) caller!: string - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) currentOwner!: string @Column_("varchar", {length: 12, nullable: false}) interaction!: Interaction - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) meta!: string @Index_() diff --git a/src/model/generated/marshal.ts b/src/model/generated/marshal.ts index eaf8d36..2cf1c3a 100644 --- a/src/model/generated/marshal.ts +++ b/src/model/generated/marshal.ts @@ -127,36 +127,6 @@ export function nonNull(val: T | undefined | null): T { } -export const bigintTransformer = { - to(x?: bigint) { - return x?.toString() - }, - from(s?: string): bigint | undefined { - return s == null ? undefined : BigInt(s) - } -} - - -export const floatTransformer = { - to(x?: number) { - return x?.toString() - }, - from(s?: string): number | undefined { - return s == null ? undefined : Number(s) - } -} - - -export const bigdecimalTransformer = { - to(x?: any) { - return x?.toString() - }, - from(s?: any): any | undefined { - return s == null ? undefined : decimal.BigDecimal(s) - } -} - - export function enumFromJson(json: unknown, enumObject: E): E[keyof E] { assert(typeof json == 'string', 'invalid enum value') let val = (enumObject as any)[json] diff --git a/src/model/generated/metadataEntity.model.ts b/src/model/generated/metadataEntity.model.ts index 17e4601..790cca7 100644 --- a/src/model/generated/metadataEntity.model.ts +++ b/src/model/generated/metadataEntity.model.ts @@ -1,4 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_} from "typeorm" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, StringColumn as StringColumn_} from "@subsquid/typeorm-store" import * as marshal from "./marshal" import {Attribute} from "./_attribute" @@ -11,24 +11,24 @@ export class MetadataEntity { @PrimaryColumn_() id!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) name!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) description!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) image!: string | undefined | null @Column_("jsonb", {transformer: {to: obj => obj == null ? undefined : obj.map((val: any) => val.toJSON()), from: obj => obj == null ? undefined : marshal.fromList(obj, val => new Attribute(undefined, marshal.nonNull(val)))}, nullable: true}) attributes!: (Attribute)[] | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) animationUrl!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) type!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) banner!: string | undefined | null } diff --git a/src/model/generated/nftEntity.model.ts b/src/model/generated/nftEntity.model.ts index 4a25437..d0717de 100644 --- a/src/model/generated/nftEntity.model.ts +++ b/src/model/generated/nftEntity.model.ts @@ -1,4 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, Index as Index_, ManyToOne as ManyToOne_, OneToMany as OneToMany_} from "typeorm" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, BigIntColumn as BigIntColumn_, Index as Index_, BooleanColumn as BooleanColumn_, ManyToOne as ManyToOne_, DateTimeColumn as DateTimeColumn_, StringColumn as StringColumn_, OneToMany as OneToMany_, FloatColumn as FloatColumn_, IntColumn as IntColumn_} from "@subsquid/typeorm-store" import * as marshal from "./marshal" import {Attribute} from "./_attribute" import {CollectionEntity} from "./collectionEntity.model" @@ -16,10 +16,10 @@ export class NFTEntity { attributes!: (Attribute)[] | undefined | null @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) blockNumber!: bigint | undefined | null - @Column_("bool", {nullable: false}) + @BooleanColumn_({nullable: false}) burned!: boolean @Index_() @@ -27,65 +27,65 @@ export class NFTEntity { collection!: CollectionEntity @Index_() - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) createdAt!: Date @Index_() - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) currentOwner!: string @OneToMany_(() => Event, e => e.nft) events!: Event[] @Index_() - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) hash!: string @PrimaryColumn_() id!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) image!: string | undefined | null - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) issuer!: string - @Column_("bool", {nullable: false}) + @BooleanColumn_({nullable: false}) lewd!: boolean - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) media!: string | undefined | null @Index_() @ManyToOne_(() => MetadataEntity, {nullable: true}) meta!: MetadataEntity | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) metadata!: string | undefined | null @Index_() - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) name!: string | undefined | null @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) price!: bigint | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) recipient!: string | undefined | null - @Column_("numeric", {transformer: marshal.floatTransformer, nullable: true}) + @FloatColumn_({nullable: true}) royalty!: number | undefined | null @Index_() - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) + @BigIntColumn_({nullable: false}) sn!: bigint @Index_() - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) updatedAt!: Date - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) version!: number @Index_() diff --git a/src/model/generated/tokenEntity.model.ts b/src/model/generated/tokenEntity.model.ts index acf0c4c..6ffd734 100644 --- a/src/model/generated/tokenEntity.model.ts +++ b/src/model/generated/tokenEntity.model.ts @@ -1,5 +1,4 @@ -import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, ManyToOne as ManyToOne_, Index as Index_, OneToMany as OneToMany_} from "typeorm" -import * as marshal from "./marshal" +import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, BigIntColumn as BigIntColumn_, ManyToOne as ManyToOne_, Index as Index_, OneToMany as OneToMany_, StringColumn as StringColumn_, DateTimeColumn as DateTimeColumn_, IntColumn as IntColumn_, BooleanColumn as BooleanColumn_} from "@subsquid/typeorm-store" import {CollectionEntity} from "./collectionEntity.model" import {NFTEntity} from "./nftEntity.model" import {MetadataEntity} from "./metadataEntity.model" @@ -13,7 +12,7 @@ export class TokenEntity { @PrimaryColumn_() id!: string - @Column_("numeric", {transformer: marshal.bigintTransformer, nullable: true}) + @BigIntColumn_({nullable: true}) blockNumber!: bigint | undefined | null @Index_() @@ -24,38 +23,38 @@ export class TokenEntity { nfts!: NFTEntity[] @Index_() - @Column_("text", {nullable: false}) + @StringColumn_({nullable: false}) hash!: string - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) image!: string | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) media!: string | undefined | null @Index_() @ManyToOne_(() => MetadataEntity, {nullable: true}) meta!: MetadataEntity | undefined | null - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) metadata!: string | undefined | null @Index_() - @Column_("text", {nullable: true}) + @StringColumn_({nullable: true}) name!: string | undefined | null - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) updatedAt!: Date - @Column_("timestamp with time zone", {nullable: false}) + @DateTimeColumn_({nullable: false}) createdAt!: Date - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) supply!: number - @Column_("int4", {nullable: false}) + @IntColumn_({nullable: false}) count!: number - @Column_("bool", {nullable: false}) + @BooleanColumn_({nullable: false}) deleted!: boolean } From 578b1ecf306538049718869b0c7e12b0c2504f88 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:47:55 +0300 Subject: [PATCH 14/20] :alien: baseUri --- schema.graphql | 1 + 1 file changed, 1 insertion(+) diff --git a/schema.graphql b/schema.graphql index 56e0f4d..fc17cac 100644 --- a/schema.graphql +++ b/schema.graphql @@ -3,6 +3,7 @@ # https://github.com/paritytech/polkadot-sdk/blob/b8ad0d1f565659f004165c5244acba78828d0bf7/substrate/frame/nfts/src/lib.rs#L217 type CollectionEntity @entity { attributes: [Attribute!] + baseUri: String blockNumber: BigInt @index burned: Boolean! createdAt: DateTime! @index From c094dd6b98308800d6b2beccc0d82c25eb256412 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:55:42 +0300 Subject: [PATCH 15/20] :zap: apply base uri to collection --- src/mappings/nfts/setAttribute.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mappings/nfts/setAttribute.ts b/src/mappings/nfts/setAttribute.ts index bb86459..99f3bb1 100644 --- a/src/mappings/nfts/setAttribute.ts +++ b/src/mappings/nfts/setAttribute.ts @@ -28,6 +28,11 @@ export async function handleAttributeSet(context: Context): Promise { final.royalty = final.royalty || Number.parseFloat(value || '0') } + if ('baseUri' in final && event.trait === 'baseUri') { + const value = unHex(event.value) + final.baseUri = final.baseUri || value + } + if ('recipient' in final && event.trait === 'recipient') { try { final.recipient = final.recipient || addressOf(event.value as string) From 3fc19c48c2f65ebfdbbba299c4c6d19981138bf7 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 11:59:23 +0300 Subject: [PATCH 16/20] :label: metaquid is you good friend --- src/mappings/utils/helper.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mappings/utils/helper.ts b/src/mappings/utils/helper.ts index 16cebea..4f32d87 100644 --- a/src/mappings/utils/helper.ts +++ b/src/mappings/utils/helper.ts @@ -1,5 +1,5 @@ import { emOf } from '@kodadot1/metasquid/entity' -import { ArchiveCallWithOptionalValue, Store } from '@kodadot1/metasquid/types' +import { ArchiveCallWithOptionalValue, Optional, Store } from '@kodadot1/metasquid/types' import * as ss58 from '@subsquid/ss58' import { decodeHex } from '@subsquid/substrate-processor' import { CHAIN } from '../../environment' @@ -11,8 +11,6 @@ const codec = CHAIN export const UNIQUE_PREFIX = 'u' as const export const EMPTY = '' as const -type Optional = T | undefined - /** * Check if an object is empty * @param obj - the object to check From dace05065b9791d112ef9dda38273e50f90caca3 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Tue, 25 Jun 2024 12:36:17 +0300 Subject: [PATCH 17/20] :zap: useBaseUri --- src/mappings/nfts/mint.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappings/nfts/mint.ts b/src/mappings/nfts/mint.ts index 589aff1..74de6b2 100644 --- a/src/mappings/nfts/mint.ts +++ b/src/mappings/nfts/mint.ts @@ -7,7 +7,7 @@ import { handleMetadata } from '../shared/metadata' import { unwrap } from '../utils/extract' import { debug, pending, success } from '../utils/logger' import { Action, Context, createTokenId } from '../utils/types' -import { calculateCollectionOwnerCountAndDistribution, versionOf } from '../utils/helper' +import { calculateCollectionOwnerCountAndDistribution, tokenUri, versionOf } from '../utils/helper' import { mintHandler } from '../shared/token' import { getCreateTokenEvent } from './getters' @@ -42,7 +42,7 @@ export async function handleTokenCreate(context: Context): Promise { final.blockNumber = BigInt(event.blockNumber) final.collection = collection final.sn = BigInt(event.sn) - final.metadata = event.metadata || collection.metadata + final.metadata = event.metadata || tokenUri(collection.baseUri, event.sn) || collection.metadata final.price = BigInt(0) final.burned = false final.createdAt = event.timestamp From 10cc8e16c39a457d25f5b27926cacf56acfa1b09 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 27 Jun 2024 12:21:35 +0300 Subject: [PATCH 18/20] Update speck.yaml --- speck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speck.yaml b/speck.yaml index 0021c0c..5b41995 100644 --- a/speck.yaml +++ b/speck.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: speck -version: 12 +version: 13 description: 'SubSquid indexer for Uniques and Assets on Statemint' build: deploy: From ab91dd40617cdbf63546cab56ba1f4687468bfce Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 27 Jun 2024 14:57:22 +0300 Subject: [PATCH 19/20] :card_file_box: base_uri --- db/migrations/1719489409922-Data.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrations/1719489409922-Data.js diff --git a/db/migrations/1719489409922-Data.js b/db/migrations/1719489409922-Data.js new file mode 100644 index 0000000..63501ed --- /dev/null +++ b/db/migrations/1719489409922-Data.js @@ -0,0 +1,11 @@ +module.exports = class Data1719489409922 { + name = 'Data1719489409922' + + async up(db) { + await db.query(`ALTER TABLE "collection_entity" ADD "base_uri" text`) + } + + async down(db) { + await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "base_uri"`) + } +} From 3de49cbba39493f26efff5a028b2be8392113b70 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 27 Jun 2024 15:09:58 +0300 Subject: [PATCH 20/20] :bookmark: Stick v13 --- squid.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squid.yaml b/squid.yaml index d0be548..f0fe126 100644 --- a/squid.yaml +++ b/squid.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: stick -version: 11 +version: 13 description: 'SubSquid indexer for Uniques and Assets on Statemine' build: deploy: