From c93603c3eba04cc78dcc203978f9fee40b1a37ee Mon Sep 17 00:00:00 2001 From: alecdwm Date: Thu, 11 Apr 2024 00:11:19 +0000 Subject: [PATCH] feat: build new miniMetadatas into `pub/v1` dir --- .github/workflows/build-jobs.yml | 2 +- README.md | 10 +- package.json | 12 +- pnpm-lock.yaml | 245 ++++++++++++++------------ scripts/build/steps/addEvmNetworks.ts | 2 +- scripts/fetch-external.ts | 2 +- scripts/fetch-external/coingecko.ts | 4 +- scripts/find-missing-coingeckoIds.ts | 12 +- scripts/shared/constants.ts | 2 +- 9 files changed, 159 insertions(+), 132 deletions(-) diff --git a/.github/workflows/build-jobs.yml b/.github/workflows/build-jobs.yml index bcb58c6bc9..34ee172275 100644 --- a/.github/workflows/build-jobs.yml +++ b/.github/workflows/build-jobs.yml @@ -9,7 +9,7 @@ on: jobs: publish: - name: 'Build & publish chaindata to dist folder' + name: 'Build & publish chaindata to pub folder' timeout-minutes: 15 runs-on: ubuntu-latest environment: ${{ inputs.environment }} diff --git a/README.md b/README.md index 584227aca5..d89b685f04 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Talisman -[![api-link](https://img.shields.io/website?label=api&logo=github&logoColor=white&style=flat-square&up_message=online&down_message=offline&url=https%3A%2F%2Fraw.githubusercontent.com%2FTalismanSociety%2Fchaindata%2Fmain%2Fdist%2Findex.txt)](https://raw.githubusercontent.com/TalismanSociety/chaindata/main/dist/index.txt) +[![api-link](https://img.shields.io/website?label=api&logo=github&logoColor=white&style=flat-square&up_message=online&down_message=offline&url=https%3A%2F%2Fraw.githubusercontent.com%2FTalismanSociety%2Fchaindata%2Fmain%2Fpub%2Fv1%2Findex.txt)](https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v1/index.txt) A **community controlled** repository of [relay](https://wiki.polkadot.network/docs/learn-architecture#relay-chain) and [parachain](https://wiki.polkadot.network/docs/learn-architecture#parachain-and-parathread-slots) information in the [Polkadot ecosystem](https://polkadot.network/). @@ -15,14 +15,14 @@ The goals of this repo are: ## Usage -The files in this repo, `data/chaindata.json`, `data/testnets-chaindata.json` and `data/evm-networks.json` are used to configure a GitHub workflow which scrapes information from each chain and publishes it as a collection of JSON files in the `dist` directory of this repo. +The files in this repo, `data/chaindata.json`, `data/testnets-chaindata.json` and `data/evm-networks.json` are used to configure a GitHub workflow which scrapes information from each chain and publishes it as a collection of JSON files in the `pub` directory of this repo. -The published files can be browsed at this URL: https://raw.githubusercontent.com/TalismanSociety/chaindata/main/dist/index.txt +The published files can be browsed at this URL: https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v1/index.txt As an example, you could use this request to get a summary of all chains including the the names, logos, [genesisHashes](## 'the hash of the first block on the chain') and [address type prefixes](https://wiki.polkadot.network/docs/learn-account-advanced#address-format): ```ts -const chainsSummaryUrl = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/dist/chains/summary.json" +const chainsSummaryUrl = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v1/chains/summary.json" const summary = await fetch(chainsSummaryUrl).then(result => result.json()) ``` @@ -51,7 +51,7 @@ To make a contribution, please fork this repo and make your changes in your fork 1. Identify the token symbol (e.g. `KSM`) 1. Add your logo (in `svg` format) to `assets/tokens/${symbol}.svg` -### To build the dist directory locally: +### To build the pub directory locally: 1. Install [pnpm](pnpm.io) 1. Clone the repo via diff --git a/package.json b/package.json index 77ca63e931..c138504b02 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "typecheck": "tsc --noEmit", "fetch-external": "tsx scripts/fetch-external.ts", "build": "pnpm run validate && tsx scripts/build.ts", - "clean": "rm -rf dist" + "clean": "rm -rf pub" }, "dependencies": { "@polkadot/api": "^10.11.2", @@ -33,11 +33,11 @@ "@polkadot/util": "^12.6.2", "@polkadot/util-crypto": "^12.6.2", "@supercharge/promise-pool": "^3.1.0", - "@talismn/balances": "0.0.0-pr1348-20240308055042", - "@talismn/chain-connector": "0.0.0-pr1348-20240308055042", - "@talismn/chain-connector-evm": "0.0.0-pr1348-20240308055042", - "@talismn/chaindata-provider": "0.0.0-pr1348-20240308055042", - "@talismn/scale": "0.0.0-pr1348-20240308055042", + "@talismn/balances": "0.0.0-pr1394-20240411002942", + "@talismn/chain-connector": "0.0.0-pr1394-20240411002942", + "@talismn/chain-connector-evm": "0.0.0-pr1394-20240411002942", + "@talismn/chaindata-provider": "0.0.0-pr1394-20240411002942", + "@talismn/scale": "0.0.0-pr1394-20240411002942", "axios": "^1.6.2", "dotenv": "^16.3.1", "extract-colors": "^2.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77fb7b3bd0..21af988a74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,20 +24,20 @@ dependencies: specifier: ^3.1.0 version: 3.1.0 '@talismn/balances': - specifier: 0.0.0-pr1348-20240308055042 - version: 0.0.0-pr1348-20240308055042(@polkadot/api-contract@10.11.2)(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/types@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(@substrate/txwrapper-core@4.1.0)(typescript@5.3.2) + specifier: 0.0.0-pr1394-20240411002942 + version: 0.0.0-pr1394-20240411002942(@polkadot/api-contract@10.11.2)(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/types@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(@substrate/txwrapper-core@4.1.0)(typescript@5.3.2) '@talismn/chain-connector': - specifier: 0.0.0-pr1348-20240308055042 - version: 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2) + specifier: 0.0.0-pr1394-20240411002942 + version: 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(rxjs@7.8.1) '@talismn/chain-connector-evm': - specifier: 0.0.0-pr1348-20240308055042 - version: 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(typescript@5.3.2) + specifier: 0.0.0-pr1394-20240411002942 + version: 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1)(typescript@5.3.2) '@talismn/chaindata-provider': - specifier: 0.0.0-pr1348-20240308055042 - version: 0.0.0-pr1348-20240308055042 + specifier: 0.0.0-pr1394-20240411002942 + version: 0.0.0-pr1394-20240411002942 '@talismn/scale': - specifier: 0.0.0-pr1348-20240308055042 - version: 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + specifier: 0.0.0-pr1394-20240411002942 + version: 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) axios: specifier: ^1.6.2 version: 1.6.2 @@ -846,15 +846,15 @@ packages: - supports-color - utf-8-validate - /@polkadot/api-augment@10.12.4: - resolution: {integrity: sha512-ZKKeA8OnB1kkqBlvMhTw7QpPsRxpf/OE2UGhuCabQmU+MysYaWTPGssqAFEBqUZ+iyvTk83s+ssoMlXxdIhblA==} + /@polkadot/api-augment@10.12.6: + resolution: {integrity: sha512-CZHaFAd6zexk3JCm1mY5doE1E634xNpKaTGpbs61Ch285d5EqBY25GdzGNiMprNl4VyRFT4N7dXKfwEdsM6Z9w==} engines: {node: '>=18'} dependencies: - '@polkadot/api-base': 10.12.4 - '@polkadot/rpc-augment': 10.12.4 - '@polkadot/types': 10.12.4 - '@polkadot/types-augment': 10.12.4 - '@polkadot/types-codec': 10.12.4 + '@polkadot/api-base': 10.12.6 + '@polkadot/rpc-augment': 10.12.6 + '@polkadot/types': 10.12.6 + '@polkadot/types-augment': 10.12.6 + '@polkadot/types-codec': 10.12.6 '@polkadot/util': 12.6.2 tslib: 2.6.2 transitivePeerDependencies: @@ -927,12 +927,12 @@ packages: - supports-color - utf-8-validate - /@polkadot/api-base@10.12.4: - resolution: {integrity: sha512-e9s5rW9KgR+xs3sTI3B38KKQnd+D0WZ3PyNm66Q9aqIZDgDmpe9LIdmKfrqsX/rH74132Fq90mt3aN//DpwgBg==} + /@polkadot/api-base@10.12.6: + resolution: {integrity: sha512-6EzMettffiadB5j0X2nValtrEZJ2dKZMArfWHbSCV1QRSPOaMO3Phf/idqtF8HgBHD3FCHJ+JsZEns6xpkpteg==} engines: {node: '>=18'} dependencies: - '@polkadot/rpc-core': 10.12.4 - '@polkadot/types': 10.12.4 + '@polkadot/rpc-core': 10.12.6 + '@polkadot/types': 10.12.6 '@polkadot/util': 12.6.2 rxjs: 7.8.1 tslib: 2.6.2 @@ -1024,16 +1024,16 @@ packages: - supports-color - utf-8-validate - /@polkadot/api-derive@10.12.4: - resolution: {integrity: sha512-V5DogVPWoMw8U6V5hCkxDZP2qpashLUruyWVDcGhQmMb0f5d5PG/dPlZ3CzvAars6G2ypJ8ciSNKDdApP5JWaQ==} + /@polkadot/api-derive@10.12.6: + resolution: {integrity: sha512-stjciYU9caSvPrcPo40zwPu15O7Q9OK9ldMFyyQkDdUT4cCE0LHuCmTNwcm4XhQq3XXJn+e7WNdhBfquwvkuhw==} engines: {node: '>=18'} dependencies: - '@polkadot/api': 10.12.4 - '@polkadot/api-augment': 10.12.4 - '@polkadot/api-base': 10.12.4 - '@polkadot/rpc-core': 10.12.4 - '@polkadot/types': 10.12.4 - '@polkadot/types-codec': 10.12.4 + '@polkadot/api': 10.12.6 + '@polkadot/api-augment': 10.12.6 + '@polkadot/api-base': 10.12.6 + '@polkadot/rpc-core': 10.12.6 + '@polkadot/types': 10.12.6 + '@polkadot/types-codec': 10.12.6 '@polkadot/util': 12.6.2 '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) rxjs: 7.8.1 @@ -1129,22 +1129,22 @@ packages: - supports-color - utf-8-validate - /@polkadot/api@10.12.4: - resolution: {integrity: sha512-bCWF1ciMqvy2XusHRk2AGKgOmod2dk/4WqQu43F8OSUXuazDOXeYJgJTv/oDznU6xQASW7awntp3JpSvsxviaA==} + /@polkadot/api@10.12.6: + resolution: {integrity: sha512-qWF7qFLZtpSILuPeZcvz0oCBXe89XndDjzgCnflvEVIUkQvxtFM8mDXpzI4bz8klrLYHlyFbP7HJl/xLi+XTew==} engines: {node: '>=18'} dependencies: - '@polkadot/api-augment': 10.12.4 - '@polkadot/api-base': 10.12.4 - '@polkadot/api-derive': 10.12.4 + '@polkadot/api-augment': 10.12.6 + '@polkadot/api-base': 10.12.6 + '@polkadot/api-derive': 10.12.6 '@polkadot/keyring': 12.6.2(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) - '@polkadot/rpc-augment': 10.12.4 - '@polkadot/rpc-core': 10.12.4 - '@polkadot/rpc-provider': 10.12.4 - '@polkadot/types': 10.12.4 - '@polkadot/types-augment': 10.12.4 - '@polkadot/types-codec': 10.12.4 - '@polkadot/types-create': 10.12.4 - '@polkadot/types-known': 10.12.4 + '@polkadot/rpc-augment': 10.12.6 + '@polkadot/rpc-core': 10.12.6 + '@polkadot/rpc-provider': 10.12.6 + '@polkadot/types': 10.12.6 + '@polkadot/types-augment': 10.12.6 + '@polkadot/types-codec': 10.12.6 + '@polkadot/types-create': 10.12.6 + '@polkadot/types-known': 10.12.6 '@polkadot/util': 12.6.2 '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) eventemitter3: 5.0.1 @@ -1464,13 +1464,13 @@ packages: - supports-color - utf-8-validate - /@polkadot/rpc-augment@10.12.4: - resolution: {integrity: sha512-GELqgtpoxmvFdXREYhrTGAFJ+xnQp8IYHFFtixfLM3SeV/F5FF0T7c1jSJ4PlEgK1tYg/KQ/DLl21fF7aWaInA==} + /@polkadot/rpc-augment@10.12.6: + resolution: {integrity: sha512-MMZgdZtVygHqgsmCdKhfaN9ywf6im72xJzc9H8fkqyoJ+cGVy36uI3e8YwEM9vV6g/nallFmz4mU46u8/TjGlw==} engines: {node: '>=18'} dependencies: - '@polkadot/rpc-core': 10.12.4 - '@polkadot/types': 10.12.4 - '@polkadot/types-codec': 10.12.4 + '@polkadot/rpc-core': 10.12.6 + '@polkadot/types': 10.12.6 + '@polkadot/types-codec': 10.12.6 '@polkadot/util': 12.6.2 tslib: 2.6.2 transitivePeerDependencies: @@ -1538,13 +1538,13 @@ packages: - supports-color - utf-8-validate - /@polkadot/rpc-core@10.12.4: - resolution: {integrity: sha512-OtOW3AQyvDR+0G7VylfwEyE5XnYhHrcRtGULT9NzjZTVHnDFghNIYoDcu6ucHBuMsvx5mbyaXsRtWDDZdr4trw==} + /@polkadot/rpc-core@10.12.6: + resolution: {integrity: sha512-aBXhkryv2NMNg+cWajn/G0DF13inXIW+6iZV9cGc6lfsYT9Di/sasO0EIx7UUZW3ILYQ6Gh9jRgNLkwSNlAV9Q==} engines: {node: '>=18'} dependencies: - '@polkadot/rpc-augment': 10.12.4 - '@polkadot/rpc-provider': 10.12.4 - '@polkadot/types': 10.12.4 + '@polkadot/rpc-augment': 10.12.6 + '@polkadot/rpc-provider': 10.12.6 + '@polkadot/types': 10.12.6 '@polkadot/util': 12.6.2 rxjs: 7.8.1 tslib: 2.6.2 @@ -1624,13 +1624,13 @@ packages: - supports-color - utf-8-validate - /@polkadot/rpc-provider@10.12.4: - resolution: {integrity: sha512-awXLK28nt6BvOwoTnOVPtz+Qu5sx40Al1yb5lzKG6jYFQrEmqrENufHNOCLU3Uspfqmc6eJmNluZOmVtJKDCPg==} + /@polkadot/rpc-provider@10.12.6: + resolution: {integrity: sha512-xLmzb2rMQXEWQlrIDY3E3IXo1jcV9+Vy3A8zMw/s/UIrwXZ3I0TefP8+mXcqEjLkkz7zwldDQvHfdmtnxdE14g==} engines: {node: '>=18'} dependencies: '@polkadot/keyring': 12.6.2(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) - '@polkadot/types': 10.12.4 - '@polkadot/types-support': 10.12.4 + '@polkadot/types': 10.12.6 + '@polkadot/types-support': 10.12.6 '@polkadot/util': 12.6.2 '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) '@polkadot/x-fetch': 12.6.2 @@ -1726,12 +1726,12 @@ packages: '@polkadot/util': 12.6.2 tslib: 2.6.2 - /@polkadot/types-augment@10.12.4: - resolution: {integrity: sha512-BS7uMd5WzbpcXimYcbwQGJFjsZikVW1XXPS3FHAkcdPOKm1qWZ/r3V18XH9G4DKj0O0s4VrdVTl0nMcOZurKKg==} + /@polkadot/types-augment@10.12.6: + resolution: {integrity: sha512-eUNanLs0w7SQLlsjFs7kTPfOTclfjllJxghwRqWZFHWjUbVcGcPwr8ITv/mfx1WTCqUqLMe6K8CPJ7BSggAWBA==} engines: {node: '>=18'} dependencies: - '@polkadot/types': 10.12.4 - '@polkadot/types-codec': 10.12.4 + '@polkadot/types': 10.12.6 + '@polkadot/types-codec': 10.12.6 '@polkadot/util': 12.6.2 tslib: 2.6.2 dev: true @@ -1774,8 +1774,8 @@ packages: '@polkadot/x-bigint': 12.6.2 tslib: 2.6.2 - /@polkadot/types-codec@10.12.4: - resolution: {integrity: sha512-8SEwgQT+JfmI62C9MZisA/1oQFuQW1OySvZFZlSqkaoRooK+JMl7Sp9fnRhCuiHMiz08YO4lX16O+aAu0/bmmw==} + /@polkadot/types-codec@10.12.6: + resolution: {integrity: sha512-yCzKdj/mLhjSG3mR1XhQdzzpAy0Exv9UuEhGQHPpdjkF0CCfVgsFoOAF3ScsSzwacJxGgxPWvlk849DfTrBYGA==} engines: {node: '>=18'} dependencies: '@polkadot/util': 12.6.2 @@ -1817,11 +1817,11 @@ packages: '@polkadot/util': 12.6.2 tslib: 2.6.2 - /@polkadot/types-create@10.12.4: - resolution: {integrity: sha512-K3a6q+q+as/FfxrbXgFdgK8aqrsUgAkH5c0KQS+nt6xMs+Yf2ctpqiLPOjOEVEw8kHRpYtjx1db8Namegk51ig==} + /@polkadot/types-create@10.12.6: + resolution: {integrity: sha512-byuPy7IUFjzoxG3qrP4kEScfR92KFOAkaJksNT4kDZILPCeZSPPN7cLqdejypwDBqJthTJM0LqKK4g+eHGKdvw==} engines: {node: '>=18'} dependencies: - '@polkadot/types-codec': 10.12.4 + '@polkadot/types-codec': 10.12.6 '@polkadot/util': 12.6.2 tslib: 2.6.2 dev: true @@ -1864,14 +1864,14 @@ packages: '@polkadot/util': 12.6.2 tslib: 2.6.2 - /@polkadot/types-known@10.12.4: - resolution: {integrity: sha512-fiS26ep9QwHIUn/N0X9R3DIFP8ar4cEG/oJyxs5uBNtIEiAZdWucEZAZFxJnNp6Lib0PGYaz9T9ph0+UbnKKEg==} + /@polkadot/types-known@10.12.6: + resolution: {integrity: sha512-E/LWfOAPUW7YKAiioY7Ax/s+G4cuNQop3U/TPPM7sxXOv9hSia2hgFjtiU4NyTRVwf1O07YASXtYSecdSgcCuQ==} engines: {node: '>=18'} dependencies: '@polkadot/networks': 12.6.2 - '@polkadot/types': 10.12.4 - '@polkadot/types-codec': 10.12.4 - '@polkadot/types-create': 10.12.4 + '@polkadot/types': 10.12.6 + '@polkadot/types-codec': 10.12.6 + '@polkadot/types-create': 10.12.6 '@polkadot/util': 12.6.2 tslib: 2.6.2 dev: true @@ -1939,8 +1939,8 @@ packages: '@polkadot/util': 12.6.2 tslib: 2.6.2 - /@polkadot/types-support@10.12.4: - resolution: {integrity: sha512-uK0AoxzbuFEwlR3eoTKdWuZxAKYOn2B67Xo+swwRL0/VTZvEc6mGnFUd1RfVM+cWKfH3eqwKQCYhjvFRlOkA8g==} + /@polkadot/types-support@10.12.6: + resolution: {integrity: sha512-SMq/hUZJLCZXq26pNDaxgXNJqAJD8YhVXWXulCg0YvbIoVwEkFE66TEkUbtoRLKcsZXbPdxJ3JfSoa9r6Ewhnw==} engines: {node: '>=18'} dependencies: '@polkadot/util': 12.6.2 @@ -1984,14 +1984,14 @@ packages: rxjs: 7.8.1 tslib: 2.6.2 - /@polkadot/types@10.12.4: - resolution: {integrity: sha512-KJfxAdOyA/ZmGzRpRWojZx6hOU4iFHiwmerAZQzxELMCUCSsAd4joiXWQX7leSrlJCvvk8/VecnXGTqRe8jtGw==} + /@polkadot/types@10.12.6: + resolution: {integrity: sha512-ByjvZkKJclHSWEETk1m9HPYn/IdIyjWONOdy7Ih+/Nd0wVIahvXDYbV4CXe25xO0RhfFJzkGIZP+LFHL5F63Uw==} engines: {node: '>=18'} dependencies: '@polkadot/keyring': 12.6.2(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) - '@polkadot/types-augment': 10.12.4 - '@polkadot/types-codec': 10.12.4 - '@polkadot/types-create': 10.12.4 + '@polkadot/types-augment': 10.12.6 + '@polkadot/types-codec': 10.12.6 + '@polkadot/types-create': 10.12.6 '@polkadot/util': 12.6.2 '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) rxjs: 7.8.1 @@ -2695,7 +2695,7 @@ packages: /@subsocial/definitions@0.8.13: resolution: {integrity: sha512-P6uCfkdsvlg3kqk+31UfvGFshZGBGtZqfemLVzpZIR6YNwXutKuII6oAwgWTDg36owjP6pHLCKxI5nDk89uKew==} dependencies: - '@polkadot/api': 10.12.4 + '@polkadot/api': 10.12.6 lodash.camelcase: 4.3.0 transitivePeerDependencies: - bufferutil @@ -2848,8 +2848,8 @@ packages: engines: {node: '>=8'} dev: false - /@talismn/balances@0.0.0-pr1348-20240308055042(@polkadot/api-contract@10.11.2)(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/types@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(@substrate/txwrapper-core@4.1.0)(typescript@5.3.2): - resolution: {integrity: sha512-UvZjCXey0HgUj7+f+CsDHJMgTC511Vqo0d2AbT+p5r7di5OzaaoVaPEqUMu0aELDFXCaGCqajSng2PMY+RXzgQ==} + /@talismn/balances@0.0.0-pr1394-20240411002942(@polkadot/api-contract@10.11.2)(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/types@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(@substrate/txwrapper-core@4.1.0)(typescript@5.3.2): + resolution: {integrity: sha512-voFDzMzdC3KCJNJTLX47/LBX00I5ha9nH58FUH7dWUpuNxRoOd6G4hhJNJExEpDLgThUxqw1F/pBc+OlmV1udw==} engines: {node: '>=18'} peerDependencies: '@polkadot/api-contract': 10.x @@ -2864,18 +2864,18 @@ packages: '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) '@substrate/txwrapper-core': 4.1.0(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) '@supercharge/promise-pool': 3.1.0 - '@talismn/chain-connector': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2) - '@talismn/chain-connector-evm': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(typescript@5.3.2) - '@talismn/chaindata-provider': 0.0.0-pr1348-20240308055042 - '@talismn/scale': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + '@talismn/chain-connector': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(rxjs@7.8.1) + '@talismn/chain-connector-evm': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1)(typescript@5.3.2) + '@talismn/chaindata-provider': 0.0.0-pr1394-20240411002942 + '@talismn/scale': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) '@talismn/subshape-fork': 0.0.2 - '@talismn/token-rates': 0.0.0-pr1348-20240308055042 - '@talismn/util': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + '@talismn/token-rates': 0.0.0-pr1394-20240411002942 + '@talismn/util': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) anylogger: 1.0.11 dexie: 3.2.4 lodash: 4.17.21 rxjs: 7.8.1 - viem: 1.21.4(typescript@5.3.2) + viem: 2.9.15(typescript@5.3.2) transitivePeerDependencies: - '@polkadot/keyring' - '@polkadot/rpc-provider' @@ -2888,27 +2888,28 @@ packages: - zod dev: false - /@talismn/chain-connector-evm@0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(typescript@5.3.2): - resolution: {integrity: sha512-LcanAwziAWTbVYKTiTwngWqIJ6T8bSE0OAyiXiw3/i6srt+5+CE1VqGp6ojq0aVJ3977/mNwj4iMp69XXRWZig==} + /@talismn/chain-connector-evm@0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1)(typescript@5.3.2): + resolution: {integrity: sha512-nm/SjdPH2MYT0MghAn1FAycNlF5K8+DhL13gIMyF5+u5Ht3f4EjIdOTyRD6n7S7NgKjt5wJpQkO2nQa8cjBJhg==} engines: {node: '>=18'} dependencies: - '@talismn/chaindata-provider': 0.0.0-pr1348-20240308055042 - '@talismn/util': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + '@talismn/chaindata-provider': 0.0.0-pr1394-20240411002942 + '@talismn/util': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) anylogger: 1.0.11 lodash: 4.17.21 - viem: 1.21.4(typescript@5.3.2) + viem: 2.9.15(typescript@5.3.2) transitivePeerDependencies: - '@polkadot/keyring' - '@polkadot/util' - '@polkadot/util-crypto' - bufferutil + - rxjs - typescript - utf-8-validate - zod dev: false - /@talismn/chain-connector@0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2): - resolution: {integrity: sha512-rzmguT+0gVg0QRBKt3IXw9kXfNUAR2geMg5tIClb3FHFZCJ14GZM2Tn4zQNnAMMtG971JTeQXeywfjPPGb5NNw==} + /@talismn/chain-connector@0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/rpc-provider@10.11.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(@polkadot/x-global@12.6.2)(@polkadot/x-ws@12.6.2)(rxjs@7.8.1): + resolution: {integrity: sha512-lf65MjVpJq1iKLKkf2d3TfA/pjwQTERqpnOSSxMY5mR2XVGn7SxiRHqttI+K4PEtF19XA++3ic1nYv5zNHoj+g==} engines: {node: '>=18'} peerDependencies: '@polkadot/rpc-provider': 10.x @@ -2920,18 +2921,19 @@ packages: '@polkadot/util': 12.6.2 '@polkadot/x-global': 12.6.2 '@polkadot/x-ws': 12.6.2 - '@talismn/chaindata-provider': 0.0.0-pr1348-20240308055042 - '@talismn/connection-meta': 0.0.0-pr1348-20240308055042 - '@talismn/util': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + '@talismn/chaindata-provider': 0.0.0-pr1394-20240411002942 + '@talismn/connection-meta': 0.0.0-pr1394-20240411002942 + '@talismn/util': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) anylogger: 1.0.11 eventemitter3: 5.0.1 transitivePeerDependencies: - '@polkadot/keyring' - '@polkadot/util-crypto' + - rxjs dev: false - /@talismn/chaindata-provider@0.0.0-pr1348-20240308055042: - resolution: {integrity: sha512-jYgkdBNebEwxeJKWYmrodgm94NgLXnNdhBU106m3Kyca8ayE7JBqQ7HZo8aNAwyHIdUaIEO1+2+3gjBg8yToow==} + /@talismn/chaindata-provider@0.0.0-pr1394-20240411002942: + resolution: {integrity: sha512-zB6NDenU8pjJHyBjKumlgvoqU+pwLWXZ5t7LqdCjQQ/EuXmtg0oPRzMzaPoWV78ZhriIGNHmEBbBdY4d/WMP4g==} engines: {node: '>=18'} dependencies: anylogger: 1.0.11 @@ -2939,58 +2941,61 @@ packages: rxjs: 7.8.1 dev: false - /@talismn/connection-meta@0.0.0-pr1348-20240308055042: - resolution: {integrity: sha512-MLnE8gDN6t7wBLCPekOHCQzbjayCaVhVIhAKSSV4PbyvlYEXlv42MJ6j3IKvHNTdULOLb2oJDVnSfZtDykIgDw==} + /@talismn/connection-meta@0.0.0-pr1394-20240411002942: + resolution: {integrity: sha512-5mAlxTYtWU56lNWOAiU2+QoeZPIUa12pjHurvRKiuA53pgJSpjXSc+7OZPBuBcA5Y6a9Gk8TiINVZ8kNOpIiWA==} engines: {node: '>=14'} dependencies: - '@talismn/chaindata-provider': 0.0.0-pr1348-20240308055042 + '@talismn/chaindata-provider': 0.0.0-pr1394-20240411002942 dexie: 3.2.4 dev: false - /@talismn/scale@0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2): - resolution: {integrity: sha512-Y14ZpuWxhewQBf7pbxLg6gWf+b8+U5OyZNPtuTcwgR+QOglJW2wFdoVRpID69MgJ6qldeWxdE30qC+VhC+jrSw==} + /@talismn/scale@0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1): + resolution: {integrity: sha512-7vfB+BVDJ7Fxvg4sv2X2sGVYkkngwRNDjj/DOv17k9kBVWJfuQBlw0qtL0ibfLa19QFAal+sz9UirX+CtcN+mg==} engines: {node: '>=18'} peerDependencies: '@polkadot/util-crypto': 12.x dependencies: '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) '@talismn/subshape-fork': 0.0.2 - '@talismn/util': 0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) + '@talismn/util': 0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1) anylogger: 1.0.11 wasm-feature-detect: 1.6.1 wat-the-crypto: 0.0.3 transitivePeerDependencies: - '@polkadot/keyring' - '@polkadot/util' + - rxjs dev: false /@talismn/subshape-fork@0.0.2: resolution: {integrity: sha512-TnVzQX76RWiJd7AwGvCRnyhrrSC/Azut4APIHLSFyZe6wlqVacA1npU1klYihqE+/pcLPfj5j2yaiVIgYR1w6A==} dev: false - /@talismn/token-rates@0.0.0-pr1348-20240308055042: - resolution: {integrity: sha512-HnZc1AXZbhl6UPZ4VGnEoFBFk2ketVK/C0I4kQu4yeJ66N+BSHlnXEHmHlVEnrMbdVitqrbxlhk07DP0TDB0og==} + /@talismn/token-rates@0.0.0-pr1394-20240411002942: + resolution: {integrity: sha512-gmbDEDQrTfXse8HDfKwy8PQDLHxOBAViVgcAFDaRuEmzfHQdwJkjkgtHRwudNUEa4BmZ9UgOUCIM/j4ibO46oQ==} engines: {node: '>=18'} dependencies: - '@talismn/chaindata-provider': 0.0.0-pr1348-20240308055042 + '@talismn/chaindata-provider': 0.0.0-pr1394-20240411002942 axios: 0.27.2 dexie: 3.2.4 transitivePeerDependencies: - debug dev: false - /@talismn/util@0.0.0-pr1348-20240308055042(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2): - resolution: {integrity: sha512-Sk/3J5Dyo9z47Dgn5mlaUgh4+de2yytY95cTohYEB2gVy28RIC6HGvznWPlvWEwjXHByRkrRzH1VSEaEUoo6Gw==} + /@talismn/util@0.0.0-pr1394-20240411002942(@polkadot/keyring@12.6.2)(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2)(rxjs@7.8.1): + resolution: {integrity: sha512-L80Qeuim/CPDtwg43rV/KGb2FdFcrobxfeLt4bGIbdjW5vfT5rd6LvuQcyvTQmZSgRXRgUdArS4xMecUqE+SyQ==} engines: {node: '>=18'} peerDependencies: '@polkadot/keyring': 12.x '@polkadot/util': 12.x '@polkadot/util-crypto': 12.x + rxjs: '>= 7.8.1' dependencies: '@polkadot/keyring': 12.6.2(@polkadot/util-crypto@12.6.2)(@polkadot/util@12.6.2) '@polkadot/util': 12.6.2 '@polkadot/util-crypto': 12.6.2(@polkadot/util@12.6.2) bignumber.js: 9.1.2 + rxjs: 7.8.1 tailwind-merge: 1.14.0 dev: false @@ -3099,6 +3104,20 @@ packages: typescript: 5.3.2 dev: false + /abitype@1.0.0(typescript@5.3.2): + resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + dependencies: + typescript: 5.3.2 + dev: false + /ajv-cli@5.0.0: resolution: {integrity: sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==} hasBin: true @@ -4721,8 +4740,8 @@ packages: - zod dev: false - /viem@1.21.4(typescript@5.3.2): - resolution: {integrity: sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ==} + /viem@2.9.15(typescript@5.3.2): + resolution: {integrity: sha512-7kcmHqybc3JhpjL8gKY7YxBYpZt1//qhoTZIU5Ez9JdyRCnYMMnJu20s7wd7Gv6a3zPbq8jV8dCp94a/NLJJcA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -4734,7 +4753,7 @@ packages: '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.3.2) + abitype: 1.0.0(typescript@5.3.2) isows: 1.0.3(ws@8.13.0) typescript: 5.3.2 ws: 8.13.0 diff --git a/scripts/build/steps/addEvmNetworks.ts b/scripts/build/steps/addEvmNetworks.ts index ea791ff4ca..2fb119112d 100644 --- a/scripts/build/steps/addEvmNetworks.ts +++ b/scripts/build/steps/addEvmNetworks.ts @@ -85,7 +85,7 @@ export const addEvmNetworks = async () => { sortIndex: null, name: configEvmNetwork.name ?? substrateChain?.name ?? substrateConfig?.name ?? null, themeColor: configEvmNetwork.themeColor ?? substrateChain?.themeColor ?? substrateChain?.themeColor ?? null, - logo: substrateChain?.logo ?? configEvmNetwork.logo ?? null, // TODO: Copy chain & token assets into dist output + logo: substrateChain?.logo ?? configEvmNetwork.logo ?? null, // TODO: Copy chain & token assets into pub output nativeToken: null, tokens: [], explorerUrl: configEvmNetwork.explorerUrl ?? null, diff --git a/scripts/fetch-external.ts b/scripts/fetch-external.ts index 64e3fc45dc..fc8a1a0650 100644 --- a/scripts/fetch-external.ts +++ b/scripts/fetch-external.ts @@ -9,7 +9,7 @@ import { fetchExternalSteps } from './fetch-external/steps' // // update local data // ...fetchExternalSteps, -// // update dist folder (use only for local testing, on github this will be run by the build script) +// // update pub folder (use only for local testing, on github this will be run by the build script) // ...buildSteps // ] diff --git a/scripts/fetch-external/coingecko.ts b/scripts/fetch-external/coingecko.ts index 7a0273a538..f60377a07a 100644 --- a/scripts/fetch-external/coingecko.ts +++ b/scripts/fetch-external/coingecko.ts @@ -7,7 +7,7 @@ export const fetchAssetPlatforms = async () => { // // TODO for debugging only, remove when ready // await writeFile( - // 'dist/assetPlatforms.json', + // `${DIR_OUTPUT}/assetPlatforms.json`, // await prettier.format(JSON.stringify(assetPlatforms, null, 2), { // ...PRETTIER_CONFIG, // parser: 'json', @@ -26,7 +26,7 @@ export const fetchCoins = async () => { // // TODO for debugging only, remove when ready // await writeFile( - // 'dist/coins.json', + // `${DIR_OUTPUT}/coins.json`, // await prettier.format(JSON.stringify(coins, null, 2), { // ...PRETTIER_CONFIG, // parser: 'json', diff --git a/scripts/find-missing-coingeckoIds.ts b/scripts/find-missing-coingeckoIds.ts index 0ab4335238..cfae15b4fd 100644 --- a/scripts/find-missing-coingeckoIds.ts +++ b/scripts/find-missing-coingeckoIds.ts @@ -2,12 +2,20 @@ import { readFile, writeFile } from 'node:fs/promises' import groupBy from 'lodash/groupBy' +import { DIR_OUTPUT } from './shared/constants' + const main = async () => { const allChains = new Map( - JSON.parse((await readFile('dist/chains/all.json')).toString('utf8')).map((chain: any) => [chain.id, chain]), + JSON.parse((await readFile(`${DIR_OUTPUT}/chains/all.json`)).toString('utf8')).map((chain: any) => [ + chain.id, + chain, + ]), ) const allTokens = new Map( - JSON.parse((await readFile('dist/tokens/all.json')).toString('utf8')).map((token: any) => [token.id, token]), + JSON.parse((await readFile(`${DIR_OUTPUT}/tokens/all.json`)).toString('utf8')).map((token: any) => [ + token.id, + token, + ]), ) const missing = [...allTokens.values()] .filter((token) => (token.coingeckoId === undefined ? true : false)) diff --git a/scripts/shared/constants.ts b/scripts/shared/constants.ts index eaaa38e899..63219f4bce 100644 --- a/scripts/shared/constants.ts +++ b/scripts/shared/constants.ts @@ -8,7 +8,7 @@ export const GITHUB_REPO = 'chaindata' export const GITHUB_BRANCH = 'main' export const DIR_ASSETS_CHAINS = 'assets/chains' -export const DIR_OUTPUT = 'dist' +export const DIR_OUTPUT = 'pub/v1' export const NOVASAMA_METADATA_PORTAL_CONFIG = 'https://raw.githubusercontent.com/novasamatech/metadata-portal/master/config.toml'