From 028713e24e6bcb3b7296432416582aec9fa90c77 Mon Sep 17 00:00:00 2001 From: Zewasik <89100777+Zewasik@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:48:12 +0300 Subject: [PATCH 1/2] chore(api): bump polkadot version to latest (#1649) --- api/package.json | 12 +- api/yarn.lock | 629 ++++++++++++++++++++++++----------------------- 2 files changed, 329 insertions(+), 312 deletions(-) diff --git a/api/package.json b/api/package.json index 3bf41312f7..a444a30593 100644 --- a/api/package.json +++ b/api/package.json @@ -1,6 +1,6 @@ { "name": "@gear-js/api", - "version": "0.38.2", + "version": "0.38.3", "description": "A JavaScript library that provides functionality to connect GEAR Component APIs.", "main": "cjs/index.js", "module": "index.js", @@ -48,7 +48,7 @@ }, "license": "GPL-3.0", "peerDependencies": { - "@polkadot/api": "12.0.1", + "@polkadot/api": "13.2.1", "@polkadot/wasm-crypto": "7.3.2", "rxjs": "7.8.1" }, @@ -56,10 +56,10 @@ "@babel/plugin-transform-typescript": "7.25.2", "@babel/preset-env": "7.25.3", "@babel/preset-typescript": "7.24.7", - "@polkadot/api": "12.2.3", - "@polkadot/typegen": "12.2.3", - "@polkadot/types": "12.2.3", - "@polkadot/types-codec": "12.2.3", + "@polkadot/api": "13.2.1", + "@polkadot/typegen": "13.2.1", + "@polkadot/types": "13.2.1", + "@polkadot/types-codec": "13.2.1", "@polkadot/wasm-crypto": "7.3.2", "@rollup/plugin-commonjs": "26.0.1", "@rollup/plugin-json": "6.1.0", diff --git a/api/yarn.lock b/api/yarn.lock index 259be6e774..29af19f3e5 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -1990,10 +1990,10 @@ __metadata: "@babel/plugin-transform-typescript": 7.25.2 "@babel/preset-env": 7.25.3 "@babel/preset-typescript": 7.24.7 - "@polkadot/api": 12.2.3 - "@polkadot/typegen": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-codec": 12.2.3 + "@polkadot/api": 13.2.1 + "@polkadot/typegen": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-codec": 13.2.1 "@polkadot/wasm-crypto": 7.3.2 "@rollup/plugin-commonjs": 26.0.1 "@rollup/plugin-json": 6.1.0 @@ -2015,7 +2015,7 @@ __metadata: ts-node: 10.9.2 typescript: 5.5.4 peerDependencies: - "@polkadot/api": 12.0.1 + "@polkadot/api": 13.2.1 "@polkadot/wasm-crypto": 7.3.2 rxjs: 7.8.1 languageName: unknown @@ -2451,235 +2451,238 @@ __metadata: languageName: node linkType: hard -"@polkadot-api/json-rpc-provider-proxy@npm:0.0.1": - version: 0.0.1 - resolution: "@polkadot-api/json-rpc-provider-proxy@npm:0.0.1" - checksum: cf8daf52ff6d92f26c6027f13ef5fbef9e512626e0225bc8408b79002cfd34fc17c5f2d856beebcb01aa5f84c93ccc8272f9264dc8349b7f6cb63845b30119b5 +"@polkadot-api/json-rpc-provider-proxy@npm:^0.1.0": + version: 0.1.0 + resolution: "@polkadot-api/json-rpc-provider-proxy@npm:0.1.0" + checksum: 3dcfa50dfa9c1b5654d97d818ae85042facfdf47b71c418f069d664eba149c6be10eb02a8e8de011ce8753a813e214fff195f45f55851b8cfc7f60138fe9dfb2 languageName: node linkType: hard -"@polkadot-api/json-rpc-provider@npm:0.0.1": +"@polkadot-api/json-rpc-provider@npm:0.0.1, @polkadot-api/json-rpc-provider@npm:^0.0.1": version: 0.0.1 resolution: "@polkadot-api/json-rpc-provider@npm:0.0.1" checksum: 1f315bdadcba7def7145011132e6127b983c6f91f976be217ad7d555bb96a67f3a270fe4a46e427531822c5d54d353d84a6439d112a99cdfc07013d3b662ee3c languageName: node linkType: hard -"@polkadot-api/metadata-builders@npm:0.0.1": - version: 0.0.1 - resolution: "@polkadot-api/metadata-builders@npm:0.0.1" +"@polkadot-api/metadata-builders@npm:0.3.2": + version: 0.3.2 + resolution: "@polkadot-api/metadata-builders@npm:0.3.2" dependencies: - "@polkadot-api/substrate-bindings": 0.0.1 - "@polkadot-api/utils": 0.0.1 - checksum: 7cf69e583e64f0ea1b90b141d9f61c4b0ba445daf87d4eba25bfcaa629c95cf4bbe6d89f5263dc495189fae0795c45810a004a2a8fbf59ece01ae71e1e049f17 + "@polkadot-api/substrate-bindings": 0.6.0 + "@polkadot-api/utils": 0.1.0 + checksum: e37a664ac2582048a0dd0357b378349f2165eb2f0902f7bc3aa7ec7b84735cba2b4103d36169089671c422caab30af00467cf2866c1456fc668f57ff1c8d3b55 languageName: node linkType: hard -"@polkadot-api/observable-client@npm:0.1.0": - version: 0.1.0 - resolution: "@polkadot-api/observable-client@npm:0.1.0" +"@polkadot-api/observable-client@npm:^0.3.0": + version: 0.3.2 + resolution: "@polkadot-api/observable-client@npm:0.3.2" dependencies: - "@polkadot-api/metadata-builders": 0.0.1 - "@polkadot-api/substrate-bindings": 0.0.1 - "@polkadot-api/substrate-client": 0.0.1 - "@polkadot-api/utils": 0.0.1 + "@polkadot-api/metadata-builders": 0.3.2 + "@polkadot-api/substrate-bindings": 0.6.0 + "@polkadot-api/utils": 0.1.0 peerDependencies: + "@polkadot-api/substrate-client": 0.1.4 rxjs: ">=7.8.0" - checksum: 694ee405f40ce47eb8d23dd2fc68359a5016c54ac530893a76e772a2d6a1a7c09c3a11d772b7c196af4faa29e98a443849334b97c6bf91af616990b4c7834caa + checksum: a559a815c11fe29c5ce1d69e132bbfb451abd1de3fa2c701fa60777388c3730fb86acd7f6e3d9580ae50a148c742d4562aca90070c04c70fa9d45f9d5148b448 languageName: node linkType: hard -"@polkadot-api/substrate-bindings@npm:0.0.1": - version: 0.0.1 - resolution: "@polkadot-api/substrate-bindings@npm:0.0.1" +"@polkadot-api/substrate-bindings@npm:0.6.0": + version: 0.6.0 + resolution: "@polkadot-api/substrate-bindings@npm:0.6.0" dependencies: "@noble/hashes": ^1.3.1 - "@polkadot-api/utils": 0.0.1 + "@polkadot-api/utils": 0.1.0 "@scure/base": ^1.1.1 scale-ts: ^1.6.0 - checksum: fc49e49ffe749fc6fab49eee1d10d47fcd1fa3a9b6ca4e7bbde4e9741b9e062cd4e9271fd86a2525095ff36bf33b95d57c51efb88635bb60b2c77fa9e83b2cd6 + checksum: c752d52dbea2b332357652b5475297ee6fa2f1ab8adffa7bd697522df5a42a0c358aec6f558523fd6f38ab20ab54ed0bda284c0c0424d917c1c68ef435dde4a4 languageName: node linkType: hard -"@polkadot-api/substrate-client@npm:0.0.1": - version: 0.0.1 - resolution: "@polkadot-api/substrate-client@npm:0.0.1" - checksum: 13dc05f1fce0d00241b48d262d691a740c65b107800cdfdf8d800333e9b3950932ce50a88bf65810892e43103bf57d1541c71538e68aa27b9aba55b389835b91 +"@polkadot-api/substrate-client@npm:^0.1.2": + version: 0.1.4 + resolution: "@polkadot-api/substrate-client@npm:0.1.4" + dependencies: + "@polkadot-api/json-rpc-provider": 0.0.1 + "@polkadot-api/utils": 0.1.0 + checksum: b975bdf030523ea7620ef58b50ca1d258266656f040a95fa7875a59535a935b05d23d893090fc1216b0e119327b2df329a1aaca84c8893f5924b9536d2ed8473 languageName: node linkType: hard -"@polkadot-api/utils@npm:0.0.1": - version: 0.0.1 - resolution: "@polkadot-api/utils@npm:0.0.1" - checksum: 11e67019cbf6dd39997d772edf14296c1b156d7a59c7726ce117b438ee85a5e50e305514a2a93cba87fdce1380fcf045931f2fb959df3a43bb327e77ac876148 +"@polkadot-api/utils@npm:0.1.0": + version: 0.1.0 + resolution: "@polkadot-api/utils@npm:0.1.0" + checksum: 55f39cf6949e54b763fc67e5132ae7d1095bf28f8413895dcec7e5778d9fe345b1ce9fe08f127c84f79fb9aedd51f045aa8ed84b2a72f4217047a91d2ecb4c27 languageName: node linkType: hard -"@polkadot/api-augment@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/api-augment@npm:12.2.3" +"@polkadot/api-augment@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/api-augment@npm:13.2.1" dependencies: - "@polkadot/api-base": 12.2.3 - "@polkadot/rpc-augment": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-augment": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: bf40a0db154865f59c495ea938cb0aabcb16e7d14b3443655dcd73ea2b907ce1fb65a88ee6d9cfb0c1c5da25641de08a0cde62ca40c457e83aa7408766ca5322 + "@polkadot/api-base": 13.2.1 + "@polkadot/rpc-augment": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-augment": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: f8402367ea9eedc66e4fdbe46535a89e96fb58ccd6b26c31bee49d4aa5a7ee4d2fa67301a96fb2d10033764a999eb793903e3cf0c7389cd3b373c2c42b86c20b languageName: node linkType: hard -"@polkadot/api-base@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/api-base@npm:12.2.3" +"@polkadot/api-base@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/api-base@npm:13.2.1" dependencies: - "@polkadot/rpc-core": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/util": ^13.0.2 + "@polkadot/rpc-core": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/util": ^13.1.1 rxjs: ^7.8.1 - tslib: ^2.6.2 - checksum: 93671b0386f1cb7c4554ac1d287ced15aafe30ffffc79f356f21380bb71ec4202d17c6c120fc87d1a4fcccc032d96e9e3aa18ed3d794338d09223daf90039e77 + tslib: ^2.7.0 + checksum: 00ceedaaf021feae3ab9379eef91c3ee32d605d7fdb4c03868ac7817decab6dbfac86f85ceec7678f61e96033bac107406575f84a08cb3484c4c86fc71a40f46 languageName: node linkType: hard -"@polkadot/api-derive@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/api-derive@npm:12.2.3" +"@polkadot/api-derive@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/api-derive@npm:13.2.1" dependencies: - "@polkadot/api": 12.2.3 - "@polkadot/api-augment": 12.2.3 - "@polkadot/api-base": 12.2.3 - "@polkadot/rpc-core": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 + "@polkadot/api": 13.2.1 + "@polkadot/api-augment": 13.2.1 + "@polkadot/api-base": 13.2.1 + "@polkadot/rpc-core": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/util": ^13.1.1 + "@polkadot/util-crypto": ^13.1.1 rxjs: ^7.8.1 - tslib: ^2.6.2 - checksum: 86af8b1c3b32f9c39ba0b9276163e82490034261a16ccd5e9cf1a1346bc9d30f9ee8141ed1e60d614ed9eb65f10879110cbce2aaa24d078bc261ccca782c261f - languageName: node - linkType: hard - -"@polkadot/api@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/api@npm:12.2.3" - dependencies: - "@polkadot/api-augment": 12.2.3 - "@polkadot/api-base": 12.2.3 - "@polkadot/api-derive": 12.2.3 - "@polkadot/keyring": ^13.0.2 - "@polkadot/rpc-augment": 12.2.3 - "@polkadot/rpc-core": 12.2.3 - "@polkadot/rpc-provider": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-augment": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/types-create": 12.2.3 - "@polkadot/types-known": 12.2.3 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 + tslib: ^2.7.0 + checksum: 646a30f6474c69264260d4f1e71f9fab8f312611b534ee8829045ff62469761f4d9b29e24249fed807e7b419f7b91987e606f307a12c4df4ac8bd474cb34009c + languageName: node + linkType: hard + +"@polkadot/api@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/api@npm:13.2.1" + dependencies: + "@polkadot/api-augment": 13.2.1 + "@polkadot/api-base": 13.2.1 + "@polkadot/api-derive": 13.2.1 + "@polkadot/keyring": ^13.1.1 + "@polkadot/rpc-augment": 13.2.1 + "@polkadot/rpc-core": 13.2.1 + "@polkadot/rpc-provider": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-augment": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/types-create": 13.2.1 + "@polkadot/types-known": 13.2.1 + "@polkadot/util": ^13.1.1 + "@polkadot/util-crypto": ^13.1.1 eventemitter3: ^5.0.1 rxjs: ^7.8.1 - tslib: ^2.6.2 - checksum: 08c1600b090b6d52ab20e7f662a80ab3a91dce39ecca68fae7985b6fa720fb86cb7603824d37ec8921d27e3c74dd1e8d1fec9acca91d10b6cd7054bb80a6b001 + tslib: ^2.7.0 + checksum: 1cd5cd681173dee93279e149f923939f12e275d9c3278d3c63e1bb10249bdbd213b5d9b023620ff636ade6df353f08c3d18c83aa9f236e0b85fb5f2b1c74a8f2 languageName: node linkType: hard -"@polkadot/keyring@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/keyring@npm:13.0.2" +"@polkadot/keyring@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/keyring@npm:13.1.1" dependencies: - "@polkadot/util": 13.0.2 - "@polkadot/util-crypto": 13.0.2 - tslib: ^2.6.2 + "@polkadot/util": 13.1.1 + "@polkadot/util-crypto": 13.1.1 + tslib: ^2.7.0 peerDependencies: - "@polkadot/util": 13.0.2 - "@polkadot/util-crypto": 13.0.2 - checksum: 334aaee396e3f624341ac87bbf9288b3ae0b7c5d8ef222741b802563b1ae88c47f2b8ec2a1989cd62403e1ae0261b4380218c5e112d8a44674cf432216f5c3bb + "@polkadot/util": 13.1.1 + "@polkadot/util-crypto": 13.1.1 + checksum: 415077740d4971e4697f20e28705f7ee9c819f8f1f05f2ab3c52342cb23240028bb0dfce683f7e1ed46a66c1c290d2a688edbb29d594bbf0b57eb9a842e5f809 languageName: node linkType: hard -"@polkadot/networks@npm:13.0.2, @polkadot/networks@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/networks@npm:13.0.2" +"@polkadot/networks@npm:13.1.1, @polkadot/networks@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/networks@npm:13.1.1" dependencies: - "@polkadot/util": 13.0.2 - "@substrate/ss58-registry": ^1.46.0 - tslib: ^2.6.2 - checksum: 4bc02ae6a95c0bf770ab2ba99af59013665edf4e759a228148289859dcc171be61d93359f6846a5d248707eb215bcbf2ca69ae9f63eb1720caa38ceb3dab7587 + "@polkadot/util": 13.1.1 + "@substrate/ss58-registry": ^1.50.0 + tslib: ^2.7.0 + checksum: 82c11848e900259dc4c7a9b4829b566003bfb1db815316047042704d73820fb4658e1acdeb71a87de3bcbf531f89180de2f51ca8ef83659126073ef16efadb16 languageName: node linkType: hard -"@polkadot/rpc-augment@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/rpc-augment@npm:12.2.3" +"@polkadot/rpc-augment@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/rpc-augment@npm:13.2.1" dependencies: - "@polkadot/rpc-core": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: 97d0b2c5451d5cb96e84569b0c5e2763abd83def4704def25f6ad728ca8eddc4c3872bd5afb26d9a8be28273f2bd927d1292b0e480727b0fe302548c5c432ae8 + "@polkadot/rpc-core": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: f998195128f37ab0bb0d3b5729cd05293c73e7e56e78fd17b0495878d87033978a7c85b8adec5c14752f32394d34042a2aed79ccdb318c4a1688732fb76ad5ac languageName: node linkType: hard -"@polkadot/rpc-core@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/rpc-core@npm:12.2.3" +"@polkadot/rpc-core@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/rpc-core@npm:13.2.1" dependencies: - "@polkadot/rpc-augment": 12.2.3 - "@polkadot/rpc-provider": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/util": ^13.0.2 + "@polkadot/rpc-augment": 13.2.1 + "@polkadot/rpc-provider": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/util": ^13.1.1 rxjs: ^7.8.1 - tslib: ^2.6.2 - checksum: bf0ff9d66ce3581751d0d0c26fd469e8b8d53bb50fdfd0e5da5cfbe1e811eefdf9c57cfbbb5f89e41ffc9ba44b0ea42ab8d73175d5a85ce73c1673c04e452003 + tslib: ^2.7.0 + checksum: f2751d9e516d6452f62f603baf1b64fcbef8617b14398b6bd28a5152c7f9771ece3ad97e08a955bd930343a05d6ac58d2c9bf3c10de7a412976839452f6f2d8e languageName: node linkType: hard -"@polkadot/rpc-provider@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/rpc-provider@npm:12.2.3" +"@polkadot/rpc-provider@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/rpc-provider@npm:13.2.1" dependencies: - "@polkadot/keyring": ^13.0.2 - "@polkadot/types": 12.2.3 - "@polkadot/types-support": 12.2.3 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - "@polkadot/x-fetch": ^13.0.2 - "@polkadot/x-global": ^13.0.2 - "@polkadot/x-ws": ^13.0.2 - "@substrate/connect": 0.8.10 + "@polkadot/keyring": ^13.1.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-support": 13.2.1 + "@polkadot/util": ^13.1.1 + "@polkadot/util-crypto": ^13.1.1 + "@polkadot/x-fetch": ^13.1.1 + "@polkadot/x-global": ^13.1.1 + "@polkadot/x-ws": ^13.1.1 + "@substrate/connect": 0.8.11 eventemitter3: ^5.0.1 mock-socket: ^9.3.1 - nock: ^13.5.0 - tslib: ^2.6.2 + nock: ^13.5.4 + tslib: ^2.7.0 dependenciesMeta: "@substrate/connect": optional: true - checksum: 88d7f7ce64c73bd2c118510aa0ae399707fd2e1b3420d593c76f7e5de570484ee48f0fbf4fcac9c0fe75da6d3beb0efe3d4f115dff16be509301819563f8cf52 - languageName: node - linkType: hard - -"@polkadot/typegen@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/typegen@npm:12.2.3" - dependencies: - "@polkadot/api": 12.2.3 - "@polkadot/api-augment": 12.2.3 - "@polkadot/rpc-augment": 12.2.3 - "@polkadot/rpc-provider": 12.2.3 - "@polkadot/types": 12.2.3 - "@polkadot/types-augment": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/types-create": 12.2.3 - "@polkadot/types-support": 12.2.3 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - "@polkadot/x-ws": ^13.0.2 + checksum: df0507226679bc77dcfdbd311aa7abaad2be2283727677c5e2fff024ce63401d032578d323b5588e5f15b38861e310fdc8e9978086ebd4725c49317b151c5077 + languageName: node + linkType: hard + +"@polkadot/typegen@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/typegen@npm:13.2.1" + dependencies: + "@polkadot/api": 13.2.1 + "@polkadot/api-augment": 13.2.1 + "@polkadot/rpc-augment": 13.2.1 + "@polkadot/rpc-provider": 13.2.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-augment": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/types-create": 13.2.1 + "@polkadot/types-support": 13.2.1 + "@polkadot/util": ^13.1.1 + "@polkadot/util-crypto": ^13.1.1 + "@polkadot/x-ws": ^13.1.1 handlebars: ^4.7.8 - tslib: ^2.6.2 + tslib: ^2.7.0 yargs: ^17.7.2 bin: polkadot-types-chain-info: scripts/polkadot-types-chain-info.mjs @@ -2687,116 +2690,116 @@ __metadata: polkadot-types-from-defs: scripts/polkadot-types-from-defs.mjs polkadot-types-internal-interfaces: scripts/polkadot-types-internal-interfaces.mjs polkadot-types-internal-metadata: scripts/polkadot-types-internal-metadata.mjs - checksum: cbcc70e3a363d1650cb1c566ff89762554bc6190c9e845540e6ddfa6c3b4b464c33efc0cccb9b78d32a1fd11a928690678de27a842884247ec9ce51b1718dd0e + checksum: 5eb71b64f6d3f6693fc910b97a58694d75784abfd5120c04749ba81e0679ad1b9e7b7d560b134744f938804b870c955a6b0ca2b43a9a7ab6103c2bd6cf3ed3a6 languageName: node linkType: hard -"@polkadot/types-augment@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types-augment@npm:12.2.3" +"@polkadot/types-augment@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types-augment@npm:13.2.1" dependencies: - "@polkadot/types": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: f5e47c7764f655f7275162ccd080426ab0c23572fa8905134a792ed5917b302c1c71180d3a8051a61825698f4f00b072b5d6e7e4f9daed3414a3b2c223e7e7ee + "@polkadot/types": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: 4d2247471c959e2c6ac9b5483a7e963f939a7fadbc65a9745de33585e2796e467a97e3ebe8bf2b20cd3eecef6dd17080c647778365dd45a84836efe2ea54a5f1 languageName: node linkType: hard -"@polkadot/types-codec@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types-codec@npm:12.2.3" +"@polkadot/types-codec@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types-codec@npm:13.2.1" dependencies: - "@polkadot/util": ^13.0.2 - "@polkadot/x-bigint": ^13.0.2 - tslib: ^2.6.2 - checksum: 6f1cd31a6356cfe6f3210060dd7078030236c8dc2dac44e80110e614e6076087b9b7204664de2ba9e23e1cb7249b1bba3bb022df28c7a61d855ebb9a0aa70bf1 + "@polkadot/util": ^13.1.1 + "@polkadot/x-bigint": ^13.1.1 + tslib: ^2.7.0 + checksum: afb485abd10d8f2c27d3304de0ad68158ea848036cc25cb48f0b02a5342202f0bceb4361d225217678196e5c3aba6e864e48c076e18bbf6eb01f904a228b11b4 languageName: node linkType: hard -"@polkadot/types-create@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types-create@npm:12.2.3" +"@polkadot/types-create@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types-create@npm:13.2.1" dependencies: - "@polkadot/types-codec": 12.2.3 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: 5397bf6f850552155e3381ea81b211e564fbf7c2271805e7bded6b1d7ad54409dcd1fd1354bf7be10bbc96f02576d8199ed7f6110b02935cdea7eb369d1cbaeb + "@polkadot/types-codec": 13.2.1 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: 6af005ee71e862be7e23409a3947e22280f627026d314ca7eab3ea00273006fb1e83305651f6011605532be63892a9e13509f9fdfe8a4f7905209abc00b68cdb languageName: node linkType: hard -"@polkadot/types-known@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types-known@npm:12.2.3" +"@polkadot/types-known@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types-known@npm:13.2.1" dependencies: - "@polkadot/networks": ^13.0.2 - "@polkadot/types": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/types-create": 12.2.3 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: e2499edb751d8e38925512ff0e1396c5fe456e42d71fbdf090af8fe8dc14ac381fd747cd0b6a8c2492f90f2e6d48a0fc26a1da2cc7c8166648782f09916fc956 + "@polkadot/networks": ^13.1.1 + "@polkadot/types": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/types-create": 13.2.1 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: ff26b3781e6c9d761c6d72bc30471f19ddcfe3513f6747125a63fed69d26e06b5c7cae2cb725953ab4837b8106835c4b56c5a07e68292a36d9be8b5d98bbebff languageName: node linkType: hard -"@polkadot/types-support@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types-support@npm:12.2.3" +"@polkadot/types-support@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types-support@npm:13.2.1" dependencies: - "@polkadot/util": ^13.0.2 - tslib: ^2.6.2 - checksum: dc681525f49129b8a2201f81e64032ac01ec84add507beb2e44dc8046246657645e6e7ed92012a03dfc08ea1167d5c4704c650396e0614ed2bc694054fc0a1d0 + "@polkadot/util": ^13.1.1 + tslib: ^2.7.0 + checksum: 7861aaab3249252d530995c7ba7f56ff16577b98cb589ea54261aa827ba45e70e4bdd94a411797ab9ccafd08590c66f6219685b9802443d4f4e59b58750fdc25 languageName: node linkType: hard -"@polkadot/types@npm:12.2.3": - version: 12.2.3 - resolution: "@polkadot/types@npm:12.2.3" +"@polkadot/types@npm:13.2.1": + version: 13.2.1 + resolution: "@polkadot/types@npm:13.2.1" dependencies: - "@polkadot/keyring": ^13.0.2 - "@polkadot/types-augment": 12.2.3 - "@polkadot/types-codec": 12.2.3 - "@polkadot/types-create": 12.2.3 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 + "@polkadot/keyring": ^13.1.1 + "@polkadot/types-augment": 13.2.1 + "@polkadot/types-codec": 13.2.1 + "@polkadot/types-create": 13.2.1 + "@polkadot/util": ^13.1.1 + "@polkadot/util-crypto": ^13.1.1 rxjs: ^7.8.1 - tslib: ^2.6.2 - checksum: 00b61ecb7a5d9c1ef1da568682c0fe65f28a5a16735944b0f7659943cf9dc15e6941824bd8e32920780ea507b5bf34472d393210cbf24dfe89c3fe84d1a5985d + tslib: ^2.7.0 + checksum: 7a2a970907c6d0a4cf4018cea940dc42d7900a8a770cb436e6075a99db9e13c53ca359212d95fb4979c9c97924f7355803ffd68a0fff5f0522a86ed40695deae languageName: node linkType: hard -"@polkadot/util-crypto@npm:13.0.2, @polkadot/util-crypto@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/util-crypto@npm:13.0.2" +"@polkadot/util-crypto@npm:13.1.1, @polkadot/util-crypto@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/util-crypto@npm:13.1.1" dependencies: "@noble/curves": ^1.3.0 "@noble/hashes": ^1.3.3 - "@polkadot/networks": 13.0.2 - "@polkadot/util": 13.0.2 + "@polkadot/networks": 13.1.1 + "@polkadot/util": 13.1.1 "@polkadot/wasm-crypto": ^7.3.2 "@polkadot/wasm-util": ^7.3.2 - "@polkadot/x-bigint": 13.0.2 - "@polkadot/x-randomvalues": 13.0.2 - "@scure/base": ^1.1.5 - tslib: ^2.6.2 + "@polkadot/x-bigint": 13.1.1 + "@polkadot/x-randomvalues": 13.1.1 + "@scure/base": ^1.1.7 + tslib: ^2.7.0 peerDependencies: - "@polkadot/util": 13.0.2 - checksum: 025bb2179d77b73dd8af775192627fe31e985e365fbecf38d7903a663aa11b703fa3f23fbb65e53d0a9710cc087e0cb9a113b0a660d8e9b36de21c36c1bc40d7 + "@polkadot/util": 13.1.1 + checksum: 54a99d68ffe3cc2c455f4a919e5b64e801f0a029b22823d8fb387a97ca70dafaf125449a9f0d713abce96f7e3cb997f1920c6a669f42f3c162792fb48f18e7b8 languageName: node linkType: hard -"@polkadot/util@npm:13.0.2, @polkadot/util@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/util@npm:13.0.2" +"@polkadot/util@npm:13.1.1, @polkadot/util@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/util@npm:13.1.1" dependencies: - "@polkadot/x-bigint": 13.0.2 - "@polkadot/x-global": 13.0.2 - "@polkadot/x-textdecoder": 13.0.2 - "@polkadot/x-textencoder": 13.0.2 + "@polkadot/x-bigint": 13.1.1 + "@polkadot/x-global": 13.1.1 + "@polkadot/x-textdecoder": 13.1.1 + "@polkadot/x-textencoder": 13.1.1 "@types/bn.js": ^5.1.5 bn.js: ^5.2.1 - tslib: ^2.6.2 - checksum: c7d71898395d2e9fb994ed53be10e9b44e9cb6f6bd502ce31a48848dda032a9e3f462a6039759798023425c6e17d5a7515784f0a8c0ab74c1a0a2691b0ef3660 + tslib: ^2.7.0 + checksum: 88c2095454539f9583b1cef96b7265c9890bd7c345823f572ea345f0ee7d9f8b088144a34b84d43a298f3e41fc5f2932e7ec95e137aa09891f28509d0a3d5733 languageName: node linkType: hard @@ -2880,77 +2883,77 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:13.0.2, @polkadot/x-bigint@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-bigint@npm:13.0.2" +"@polkadot/x-bigint@npm:13.1.1, @polkadot/x-bigint@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-bigint@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 - tslib: ^2.6.2 - checksum: a1c9d9ab3aa27f7a68a879c76cea38ca4757ae4802c6d2a7402dbfbf31468c4dd3c4f1e852e62c0a1bff18889fccac1ccbc38649bf96e9473948ea7d7c2899f3 + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 1c2ca55a7e49306a1c5ae5110c5dd13ad7c14e8a6f0ec36226571ab8c4ad468351f97c36ddea2ad88bd540c786dc27941db6ee92dfede42e75e053982e439559 languageName: node linkType: hard -"@polkadot/x-fetch@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-fetch@npm:13.0.2" +"@polkadot/x-fetch@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-fetch@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 + "@polkadot/x-global": 13.1.1 node-fetch: ^3.3.2 - tslib: ^2.6.2 - checksum: 459948a2b95601b0a39a7eb55277e80bd33e2df1ecab133dbe9823e020d3d5f2a64056911fc2072d0c328550c510e7e0ec45327b354530ae83306d536c616e29 + tslib: ^2.7.0 + checksum: 4b94ec5d4f05981ab7256998f2aafbf1137ec65efb3084fc6f9ee025267f1a3f032fed3e598eabf367f572098a2d773bcf5760762bce59fa3c2af49e4d9e4925 languageName: node linkType: hard -"@polkadot/x-global@npm:13.0.2, @polkadot/x-global@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-global@npm:13.0.2" +"@polkadot/x-global@npm:13.1.1, @polkadot/x-global@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-global@npm:13.1.1" dependencies: - tslib: ^2.6.2 - checksum: b487bf2a15d77681efae5e928364526102cff48207a871662515c500404ae58d9d08df813fd675c8bf0a2744dbf4648db6a0fe927993e597e8391349295560c8 + tslib: ^2.7.0 + checksum: 0cea1b38cb19b07ec1d50d2913f3187e1ecd7a72e58c49017cad93d1f944d0236842e224b5f4ebe5d1f99ca31483643c33500e385553ed774128e0f00edecee8 languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-randomvalues@npm:13.0.2" +"@polkadot/x-randomvalues@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-randomvalues@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 - tslib: ^2.6.2 + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 peerDependencies: - "@polkadot/util": 13.0.2 + "@polkadot/util": 13.1.1 "@polkadot/wasm-util": "*" - checksum: 3968ca273ccdc3055466a8bdeae64141ef20dd5451f7fc750eaef28465460e41d28cdd4eadedf3b4ca94024c9ebae023a8a04eb946b9fd17a1ff9c105ebfe39c + checksum: 30d8d0c4063d5f85d6f4e55c14822dc0304bb115c46a040f8a74a89fecbe20cfc8f8ef826ab816eedc0b80986ecec20d6d76de2095fa7caf203c761a6c2f1a45 languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-textdecoder@npm:13.0.2" +"@polkadot/x-textdecoder@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-textdecoder@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 - tslib: ^2.6.2 - checksum: 586c970c66a014471b5354d41a55aa6dbeaa4aec041153d294205d7f86f93cfb6cb5c274b6ef38b0923b515b531bc8608fea7cdc6116c6dc61c370d892b207e4 + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 03007249aee07501e8747a2e19448cb435ee5ca7c4e7dc1de667e811ee813e960311f26f1c1ca989391fb5d28600f68b72eded96ee643d0673b4d8e84cfb2ca0 languageName: node linkType: hard -"@polkadot/x-textencoder@npm:13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-textencoder@npm:13.0.2" +"@polkadot/x-textencoder@npm:13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-textencoder@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 - tslib: ^2.6.2 - checksum: b2db5ab0fd94b8a13816f028f9fb52e0f00c43df4a727c01911902b5fc11bec476b02b92aee5a98adabf4696907e828752c6e0eb9bece79f0440675e4eb030c9 + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 + checksum: 9a72e477a3db29c273f245317cfc72e2752322a3317bc5aa6818e3c620e17551f5bd0685290ed7b67ccc8d3bf94118d806f6c64cff958983e6d8f45278769f29 languageName: node linkType: hard -"@polkadot/x-ws@npm:^13.0.2": - version: 13.0.2 - resolution: "@polkadot/x-ws@npm:13.0.2" +"@polkadot/x-ws@npm:^13.1.1": + version: 13.1.1 + resolution: "@polkadot/x-ws@npm:13.1.1" dependencies: - "@polkadot/x-global": 13.0.2 - tslib: ^2.6.2 + "@polkadot/x-global": 13.1.1 + tslib: ^2.7.0 ws: ^8.16.0 - checksum: c5aad76a3e121016dd740eddaf5601b2d98b7e568da51b6a0ffe4bced6dfb7373a15067d0c5c267e6daed40ea55014ef4b875c5eaf395c8b3fcd9e85047d2dd9 + checksum: 10d1f191d19179054c5dd6896b6e5668ffab249f5e301e94f14006a8319dacc292bf4c6a323549e156d98dcbdd9c67659888039847a0c6c7cd0437bbf0f3cdb2 languageName: node linkType: hard @@ -3179,13 +3182,20 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.1, @scure/base@npm:^1.1.5": +"@scure/base@npm:^1.1.1": version: 1.1.5 resolution: "@scure/base@npm:1.1.5" checksum: 9e9ee6088cb3aa0fb91f5a48497d26682c7829df3019b1251d088d166d7a8c0f941c68aaa8e7b96bbad20c71eb210397cb1099062cde3e29d4bad6b975c18519 languageName: node linkType: hard +"@scure/base@npm:^1.1.7": + version: 1.1.9 + resolution: "@scure/base@npm:1.1.9" + checksum: 120820a37dfe9dfe4cab2b7b7460552d08e67dee8057ed5354eb68d8e3440890ae983ce3bee957d2b45684950b454a2b6d71d5ee77c1fd3fddc022e2a510337f + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -3218,46 +3228,46 @@ __metadata: languageName: node linkType: hard -"@substrate/connect-known-chains@npm:^1.1.4": - version: 1.1.6 - resolution: "@substrate/connect-known-chains@npm:1.1.6" - checksum: 2ed04da37e721e773b15778732b8331031c175a3a95742b60ed04ee317c332be1d7435320012c4040a7a9d3dea590d3ecaf875aeba2bab7d93bd5a0ff74e5e0a +"@substrate/connect-known-chains@npm:^1.1.5": + version: 1.4.1 + resolution: "@substrate/connect-known-chains@npm:1.4.1" + checksum: 9be930b3e75ed5ac04d87898ba357ff044f314e39175d190bfa4bcdc0b4eb419ae22584ecaa551274573cdf2985cd059c9c8a0be0ec5003915635ffdec916437 languageName: node linkType: hard -"@substrate/connect@npm:0.8.10": - version: 0.8.10 - resolution: "@substrate/connect@npm:0.8.10" +"@substrate/connect@npm:0.8.11": + version: 0.8.11 + resolution: "@substrate/connect@npm:0.8.11" dependencies: "@substrate/connect-extension-protocol": ^2.0.0 - "@substrate/connect-known-chains": ^1.1.4 - "@substrate/light-client-extension-helpers": ^0.0.6 - smoldot: 2.0.22 - checksum: 2ed22ff5eefc547f9c3a7547f166b20c844372802cf406e6511844ed2f813b091f515611a720847e1b78848af1156d5cba403c9423c4ad32e4009daf014150bc + "@substrate/connect-known-chains": ^1.1.5 + "@substrate/light-client-extension-helpers": ^1.0.0 + smoldot: 2.0.26 + checksum: c7c915ef51c43258f928323b8197b20f8dc3c14f5a5369b320a209df0037bd49aa5fee849486872bee22f40fced8be169e23a600d36b6f254d7e9e80ac2e1c9c languageName: node linkType: hard -"@substrate/light-client-extension-helpers@npm:^0.0.6": - version: 0.0.6 - resolution: "@substrate/light-client-extension-helpers@npm:0.0.6" +"@substrate/light-client-extension-helpers@npm:^1.0.0": + version: 1.0.0 + resolution: "@substrate/light-client-extension-helpers@npm:1.0.0" dependencies: - "@polkadot-api/json-rpc-provider": 0.0.1 - "@polkadot-api/json-rpc-provider-proxy": 0.0.1 - "@polkadot-api/observable-client": 0.1.0 - "@polkadot-api/substrate-client": 0.0.1 + "@polkadot-api/json-rpc-provider": ^0.0.1 + "@polkadot-api/json-rpc-provider-proxy": ^0.1.0 + "@polkadot-api/observable-client": ^0.3.0 + "@polkadot-api/substrate-client": ^0.1.2 "@substrate/connect-extension-protocol": ^2.0.0 - "@substrate/connect-known-chains": ^1.1.4 + "@substrate/connect-known-chains": ^1.1.5 rxjs: ^7.8.1 peerDependencies: smoldot: 2.x - checksum: a0cc169e6edf56cdbfd839a32487e31ad0bcb4cc9d4d50bac632c16f95d6ebf54638b268c1f7b8e651482e201f38411139a90071bc91268a2c01e5b50f39f338 + checksum: 12b2180c1b5fa9884588e7e94c095ba6bdd4bc386ca54c2bd2d58e8b606b361b04636ae0536b1eb4a18398e31d191d5949e3b3ba9b3a01d6592f425fb671881c languageName: node linkType: hard -"@substrate/ss58-registry@npm:^1.46.0": - version: 1.49.0 - resolution: "@substrate/ss58-registry@npm:1.49.0" - checksum: 917437915d5ba98c46c650dce2fbe1f6a7bbcf2a6fa058df2a751743c774db37d6b5dacab4c2ce8bdf9d52275b2d325fcc63f6f08d37e5428fa133ff72e19c56 +"@substrate/ss58-registry@npm:^1.50.0": + version: 1.50.0 + resolution: "@substrate/ss58-registry@npm:1.50.0" + checksum: d19d933fadf9bfbebd1c4a62c750620de34bd920ca6beb3ad8d66147c6d672e0773b57fce8394ec52a36c60d0564a92b7961ed1eac8508bca0248e23f62b8460 languageName: node linkType: hard @@ -7360,14 +7370,14 @@ __metadata: languageName: node linkType: hard -"nock@npm:^13.5.0": - version: 13.5.4 - resolution: "nock@npm:13.5.4" +"nock@npm:^13.5.4": + version: 13.5.5 + resolution: "nock@npm:13.5.5" dependencies: debug: ^4.1.0 json-stringify-safe: ^5.0.1 propagate: ^2.0.0 - checksum: d31f924e34c87ae985edfb7b5a56e8a4dcfc3a072334ceb6d686326581f93090b3e23492663a64ce61b8df4f365b113231d926bc300bcfe9e5eb309c3e4b8628 + checksum: 91947b683992096a694140714323f11493b8ad9961c172e3e574c4801131fea259755e95c48e7e01527c14209967c20f151ff03b6bf6700471f0f76fa4071d32 languageName: node linkType: hard @@ -8363,12 +8373,12 @@ __metadata: languageName: node linkType: hard -"smoldot@npm:2.0.22": - version: 2.0.22 - resolution: "smoldot@npm:2.0.22" +"smoldot@npm:2.0.26": + version: 2.0.26 + resolution: "smoldot@npm:2.0.26" dependencies: ws: ^8.8.1 - checksum: 383bc6a5481190d64302fad56e9e4120a484885aee5543b268887de425708f04e8b3b3b69893333dfd9fd0e596f006afaa7c7ee5ff260c5d2be929c60302d385 + checksum: df1b27afae3ade7ee08947ca73f6e7afd450106b7ae4ff127ad7e71b7c20b01a2dc64135a07a7039aeeb23ad30fb549d7003c3131afa368f47125abf6837d919 languageName: node linkType: hard @@ -8847,6 +8857,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.7.0": + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 1606d5c89f88d466889def78653f3aab0f88692e80bb2066d090ca6112ae250ec1cfa9dbfaab0d17b60da15a4186e8ec4d893801c67896b277c17374e36e1d28 + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" From 87941b3b48372e1827954bf88db8672f761826e5 Mon Sep 17 00:00:00 2001 From: Zewasik <89100777+Zewasik@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:21:17 +0300 Subject: [PATCH 2/2] refactor(idea/squid) change typescript null check config (#1653) --- idea/indexer-db/src/entities/code.entity.ts | 4 +- idea/indexer-db/src/entities/event.entity.ts | 8 +-- .../entities/message-from-program.entity.ts | 16 +++--- .../src/entities/message-to-program.entity.ts | 12 ++--- .../indexer-db/src/entities/program.entity.ts | 10 ++-- idea/squid/src/config.ts | 24 ++++++--- idea/squid/src/event.route.ts | 4 +- idea/squid/src/main.ts | 10 ++-- idea/squid/src/temp-state.ts | 52 ++++++++++--------- idea/squid/tsconfig.json | 1 + 10 files changed, 77 insertions(+), 64 deletions(-) diff --git a/idea/indexer-db/src/entities/code.entity.ts b/idea/indexer-db/src/entities/code.entity.ts index 079bdee609..828217cf81 100644 --- a/idea/indexer-db/src/entities/code.entity.ts +++ b/idea/indexer-db/src/entities/code.entity.ts @@ -26,9 +26,9 @@ export class Code extends BaseEntity { public expiration?: string; @Column({ nullable: true, name: 'meta_type' }) - public metaType?: MetaType; + public metaType?: MetaType | null; // TODO: remove later @Column({ nullable: true }) - public metahash?: string; + public metahash?: string | null; } diff --git a/idea/indexer-db/src/entities/event.entity.ts b/idea/indexer-db/src/entities/event.entity.ts index f34570b6eb..a13fc4509b 100644 --- a/idea/indexer-db/src/entities/event.entity.ts +++ b/idea/indexer-db/src/entities/event.entity.ts @@ -18,14 +18,14 @@ export class Event extends BaseEntity { public source: string; @Column({ nullable: true }) - public payload: string; + public payload: string | null; @Column({ nullable: true, name: 'parent_id' }) - public parentId: string; + public parentId: string | null; @Column({ nullable: true }) - public service?: string; + public service?: string | null; @Column({ nullable: true }) - public name?: string; + public name?: string | null; } diff --git a/idea/indexer-db/src/entities/message-from-program.entity.ts b/idea/indexer-db/src/entities/message-from-program.entity.ts index ab11ac2b63..0f9322f101 100644 --- a/idea/indexer-db/src/entities/message-from-program.entity.ts +++ b/idea/indexer-db/src/entities/message-from-program.entity.ts @@ -22,29 +22,29 @@ export class MessageFromProgram extends BaseEntity { public source: string; @Column({ nullable: true }) - public payload: string; + public payload: string | null; @Column({ nullable: true, name: 'parent_id' }) - public parentId: string; + public parentId: string | null; @Column({ default: '0' }) public value: string; @Column({ nullable: true, name: 'exit_code' }) - public exitCode?: number; + public exitCode?: number | null; @Column({ nullable: true, name: 'reply_to_msg_id' }) - public replyToMessageId?: string; + public replyToMessageId?: string | null; @Column({ nullable: true }) - public expiration?: number; + public expiration?: number | null; @Column({ type: 'text', nullable: true, default: null, name: 'read_reason' }) - public readReason?: MessageReadReason; + public readReason?: MessageReadReason | null; @Column({ nullable: true }) - public service?: string; + public service?: string | null; @Column({ nullable: true }) - public fn?: string; + public fn?: string | null; } diff --git a/idea/indexer-db/src/entities/message-to-program.entity.ts b/idea/indexer-db/src/entities/message-to-program.entity.ts index f74e4dc232..8e001b18d5 100644 --- a/idea/indexer-db/src/entities/message-to-program.entity.ts +++ b/idea/indexer-db/src/entities/message-to-program.entity.ts @@ -22,23 +22,23 @@ export class MessageToProgram extends BaseEntity { public source: string; @Column({ nullable: true }) - public payload: string; + public payload: string | null; @Column({ default: '0' }) public value: string; @Column({ nullable: true, name: 'reply_to_msg_id' }) - public replyToMessageId?: string; + public replyToMessageId?: string | null; @Column({ nullable: true, name: 'processed_with_panic' }) - public processedWithPanic?: boolean; + public processedWithPanic?: boolean | null; @Column({ type: 'text', nullable: true, default: null }) - public entry: MessageEntryPoint; + public entry: MessageEntryPoint | null; @Column({ nullable: true }) - public service?: string; + public service?: string | null; @Column({ nullable: true }) - public fn?: string; + public fn?: string | null; } diff --git a/idea/indexer-db/src/entities/program.entity.ts b/idea/indexer-db/src/entities/program.entity.ts index 2bf9ce8e2b..41e2f700ce 100644 --- a/idea/indexer-db/src/entities/program.entity.ts +++ b/idea/indexer-db/src/entities/program.entity.ts @@ -14,14 +14,14 @@ export class Program extends BaseEntity { public id: string; @Column({ nullable: true }) - public owner?: string; + public owner?: string | null; @Column({ nullable: true }) @Index() - public name: string; + public name: string | null; @Column({ nullable: true }) - public expiration: string; + public expiration: string | null; @Column({ type: 'text', default: ProgramStatus.Unknown }) public status: ProgramStatus; @@ -30,9 +30,9 @@ export class Program extends BaseEntity { public codeId: string; @Column({ name: 'meta_type', nullable: true }) - public metaType?: 'sails' | 'meta'; + public metaType?: 'sails' | 'meta' | null; // TODO: remove later @Column({ nullable: true }) - public metahash: string; + public metahash: string | null; } diff --git a/idea/squid/src/config.ts b/idea/squid/src/config.ts index 4003c67497..7ca4bcfecb 100644 --- a/idea/squid/src/config.ts +++ b/idea/squid/src/config.ts @@ -1,18 +1,28 @@ import dotenv from 'dotenv'; +import { strict as assert } from 'assert'; dotenv.config(); +export const getEnv = (envName: string, defaultValue?: string) => { + const env = process.env[envName]; + if (!env && defaultValue) { + return defaultValue; + } + assert.notStrictEqual(env, undefined, `${envName} is not specified`); + return env as string; +}; + export const config = { squid: { - gateway: process.env.ARCHIVE_GATEWAY, - rpc: process.env.RPC_ENDPOINT, - rate: parseInt(process.env.RATE_LIMIT || '10'), - fromBlock: parseInt(process.env.FROM_BLOCK || '0'), - toBlock: parseInt(process.env.TO_BLOCK) || undefined, + gateway: process.env.ARCHIVE_GATEWAY || '', + rpc: process.env.RPC_ENDPOINT || '', + rate: parseInt(getEnv('RATE_LIMIT', '10')), + fromBlock: parseInt(getEnv('FROM_BLOCK', '0')), + toBlock: parseInt(getEnv('TO_BLOCK', '0')) || undefined, }, redis: { - host: process.env.REDIS_HOST || '127.0.0.1', - port: parseInt(process.env.REDIS_PORT) || 6379, + host: getEnv('REDIS_HOST', '127.0.0.1'), + port: parseInt(getEnv('REDIS_PORT', '6379')), user: process.env.REDIS_USER || '', password: process.env.REDIS_PASSWORD || '', }, diff --git a/idea/squid/src/event.route.ts b/idea/squid/src/event.route.ts index ce6cd876d0..fdfff54607 100644 --- a/idea/squid/src/event.route.ts +++ b/idea/squid/src/event.route.ts @@ -43,7 +43,7 @@ const callHandlers: Array<{ ]; export async function handleMessageQueued({ ctx, block, event, common, tempState }: IHandleEventProps) { - const call = event.call; + const call = event.call!; const msg = new MessageToProgram({ ...common, @@ -53,7 +53,7 @@ export async function handleMessageQueued({ ctx, block, event, common, tempState entry: event.args.entry.__kind.toLowerCase() as MessageEntryPoint, }); - const { handler } = callHandlers.find(({ pattern }) => pattern(call)); + const { handler } = callHandlers.find(({ pattern }) => pattern(call)) || {}; if (!handler) { console.log(call); diff --git a/idea/squid/src/main.ts b/idea/squid/src/main.ts index 0fd4b0d03b..ec64260d8b 100644 --- a/idea/squid/src/main.ts +++ b/idea/squid/src/main.ts @@ -39,19 +39,17 @@ const handler = async (ctx: ProcessorContext) => { for (const block of ctx.blocks) { const common = { - timestamp: new Date((block.header as any).timestamp), + timestamp: new Date(block.header.timestamp!), blockHash: block.header.hash, blockNumber: block.header.height.toString(), }; for (const event of block.events) { - const { handler } = eventHandlers.find(({ pattern }) => pattern(event)); + const { handler } = eventHandlers.find(({ pattern }) => pattern(event)) || {}; - if (!handler) { - continue; + if (handler) { + await handler({ block, common, ctx, event, tempState }); } - - await handler({ block, common, ctx, event, tempState }); } } diff --git a/idea/squid/src/temp-state.ts b/idea/squid/src/temp-state.ts index a0539e9a3a..ac7fb73825 100644 --- a/idea/squid/src/temp-state.ts +++ b/idea/squid/src/temp-state.ts @@ -25,23 +25,27 @@ const programStorageMethod = xxhashAsHex('ProgramStorage', 128); const PROGRAM_STORAGE_PREFIX = gearProgramModule + programStorageMethod.slice(2); -function getServiceAndFn(payload: string) { - let service: string = null; - let name: string = null; +function getServiceAndFn(payload: string | null) { + if (payload === null) { + return [null, null]; + } + + let service: string | null = null; + let name: string | null = null; try { service = getServiceNamePrefix(payload as HexString) || null; - if (/[^\x20-\x7E]/.test(service)) { + if (service === null || /[^\x20-\x7E]/.test(service)) { return [null, null]; } name = getFnNamePrefix(payload as HexString) || null; - if (/[^\x20-\x7E]/.test(name)) { + if (name === null || /[^\x20-\x7E]/.test(name)) { return [null, null]; } } catch (_) { return [null, null]; } - return service === null || name === null ? [null, null] : [service, name]; + return [service, name]; } export class TempState { @@ -142,12 +146,12 @@ export class TempState { } } - async getProgram(id: string): Promise { + async getProgram(id: string): Promise { if (this.programs.has(id)) { - return this.programs.get(id); + return this.programs.get(id) ?? null; } try { - const program = await this._ctx.store.findOneBy(Program, { id }); + const program = (await this._ctx.store.findOneBy(Program, { id }))!; this.programs.set(program.id, program); return program; @@ -156,12 +160,12 @@ export class TempState { } } - async getCode(id: string): Promise { + async getCode(id: string): Promise { if (this.codes.has(id)) { - return this.codes.get(id); + return this.codes.get(id) ?? null; } try { - const code = await this._ctx.store.findOneBy(Code, { id }); + const code = (await this._ctx.store.findOneBy(Code, { id }))!; this.codes.set(code.id, code); return code; } catch (err) { @@ -169,12 +173,12 @@ export class TempState { } } - async getMsgToProgram(id: string): Promise { + async getMsgToProgram(id: string): Promise { if (this.messagesToProgram.has(id)) { - return this.messagesToProgram.get(id); + return this.messagesToProgram.get(id) ?? null; } try { - const msg = await this._ctx.store.findOneBy(MessageToProgram, { id }); + const msg = (await this._ctx.store.findOneBy(MessageToProgram, { id }))!; this.messagesToProgram.set(msg.id, msg); return msg; } catch (err) { @@ -182,12 +186,12 @@ export class TempState { } } - async getMsgFromProgram(id: string): Promise { + async getMsgFromProgram(id: string): Promise { if (this.messagesFromProgram.has(id)) { - return this.messagesFromProgram.get(id); + return this.messagesFromProgram.get(id) ?? null; } try { - const msg = await this._ctx.store.findOneBy(MessageFromProgram, { id }); + const msg = (await this._ctx.store.findOneBy(MessageFromProgram, { id }))!; this.messagesFromProgram.set(msg.id, msg); return msg; } catch (err) { @@ -252,14 +256,14 @@ export class TempState { this._metadata = new Metadata(this._registry, metadata); this._specVersion = block.specVersion; - const gearProgramPallet = this._metadata.asLatest.pallets.find(({ name }) => name.toString() === 'GearProgram'); + const gearProgramPallet = this._metadata.asLatest.pallets.find(({ name }) => name.toString() === 'GearProgram')!; const programStorage = gearProgramPallet.storage .unwrap() - .items.find(({ name }) => name.toString() === 'ProgramStorage'); + .items.find(({ name }) => name.toString() === 'ProgramStorage')!; const tydef = this._metadata.asLatest.lookup.getTypeDef(programStorage.type.asMap.value); - this._programStorageTy = tydef.lookupName; + this._programStorageTy = tydef.lookupName!; const types = getAllNeccesaryTypes(this._metadata, programStorage.type.asMap.value); @@ -281,7 +285,7 @@ export class TempState { if (p) { const code = await this.getCode(p.codeId); if (code) { - p.metahash = code.metahash; + p.metahash = code.metahash!; p.metaType = code.metaType; } } @@ -360,10 +364,10 @@ const getAllNeccesaryTypes = (metadata: Metadata, tyindex: SiLookupTypeId | numb if (tydef.sub) { if (Array.isArray(tydef.sub)) { for (const sub of tydef.sub) { - types = { ...types, ...getAllNeccesaryTypes(metadata, sub.lookupIndex) }; + types = { ...types, ...getAllNeccesaryTypes(metadata, sub.lookupIndex!) }; } } else { - types = getAllNeccesaryTypes(metadata, tydef.sub.lookupIndex); + types = getAllNeccesaryTypes(metadata, tydef.sub.lookupIndex!); } } diff --git a/idea/squid/tsconfig.json b/idea/squid/tsconfig.json index bc31f23382..562dbf9f88 100644 --- a/idea/squid/tsconfig.json +++ b/idea/squid/tsconfig.json @@ -6,6 +6,7 @@ "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "strict": false, + "strictNullChecks": true, "paths": { "@/*": ["./src/*"] }