From 2702fb266765c119487ed721d5fa8a3c74f3885c Mon Sep 17 00:00:00 2001 From: wigy <1888808+wigy-opensource-developer@users.noreply.github.com> Date: Tue, 21 May 2024 22:52:00 +0200 Subject: [PATCH 1/8] Add Mosaic Chain and its Testnet (#207) * Add Mosaic Chain and its Testnet * fix: Only Kusama chains deserve a non-42 prefix --- Cargo.toml | 2 +- ss58-registry.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index aeea26d..da797fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ss58-registry" authors = ["Parity Technologies "] -version = "1.47.0" +version = "1.48.0" edition = "2021" description = "Registry of known SS58 address types" license = "Apache-2.0" diff --git a/ss58-registry.json b/ss58-registry.json index 71a860d..8addc4d 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -1307,6 +1307,15 @@ "website": "https://goro.network" }, { + "prefix": 14998, + "network": "mosaic-chain", + "displayName": "Mosaic Chain", + "symbols": ["MOS"], + "decimals": [18], + "standardAccount": "*25519", + "website": "https://mosaicchain.io" + }, + { "prefix": 29972, "network": "mythos", "displayName": "Mythos", From 30a523d08e35caf660314b4b078fd5a919baaea9 Mon Sep 17 00:00:00 2001 From: CJ13th <48095175+CJ13th@users.noreply.github.com> Date: Wed, 29 May 2024 10:49:11 +0100 Subject: [PATCH 2/8] Add Xcavate Protocol (#208) --- ss58-registry.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ss58-registry.json b/ss58-registry.json index 8addc4d..f804c59 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -1323,6 +1323,15 @@ "decimals": [18], "standardAccount": "secp256k1", "website": "https://mythos.foundation" + }, + { + "prefix": 8888, + "network": "xcavate", + "displayName": "Xcavate Protocol", + "symbols": ["XCAV"], + "decimals": [12], + "standardAccount": "*25519", + "website": "https://xcavate.io/" } ] } From f54e1ea030a48404a20dca48db3dd5f671ba2cc1 Mon Sep 17 00:00:00 2001 From: Florian Franzen Date: Fri, 21 Jun 2024 15:52:19 +0200 Subject: [PATCH 3/8] add analog timechain (#204) --- Cargo.toml | 2 +- ss58-registry.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index da797fe..0073bca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ss58-registry" authors = ["Parity Technologies "] -version = "1.48.0" +version = "1.49.0" edition = "2021" description = "Registry of known SS58 address types" license = "Apache-2.0" diff --git a/ss58-registry.json b/ss58-registry.json index f804c59..72f02b1 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -1288,6 +1288,15 @@ "standardAccount": "*25519", "website": "https://nftmart.io" }, + { + "prefix": 12850, + "network": "analog-timechain", + "displayName": "Analog Timechain", + "symbols": ["ANLOG"], + "decimals": [12], + "standardAccount": "*25519", + "website": "https://analog.one" + }, { "prefix": 13116, "network": "bittensor", From 4f9590d941a9ba34d6f38f2b7d1d6c4cd561edd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20P=C3=A1nik?= Date: Tue, 13 Aug 2024 13:23:51 +0200 Subject: [PATCH 4/8] Rebrand HydraDX -> Hydration (#218) * Update ss58-registry.json Rebranded HydraDX to Hydration and added hydration chain to keep the compatibility * Update ss58-registry.json --- ss58-registry.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ss58-registry.json b/ss58-registry.json index 72f02b1..55bb1a6 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -544,11 +544,11 @@ { "prefix": 63, "network": "hydradx", - "displayName": "HydraDX", + "displayName": "Hydration", "symbols": ["HDX"], "decimals": [12], "standardAccount": "*25519", - "website": "https://hydradx.io" + "website": "https://hydration.net" }, { "prefix": 65, From 0e88f87b185cdee829f624b88d3cfc47eaaf2161 Mon Sep 17 00:00:00 2001 From: Thanos Doukoudakis <56822898+thadouk@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:11:45 +0100 Subject: [PATCH 5/8] feat: Adds VOW chain prefix (#217) --- Cargo.toml | 2 +- ss58-registry.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0073bca..4e336d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ss58-registry" authors = ["Parity Technologies "] -version = "1.49.0" +version = "1.50.0" edition = "2021" description = "Registry of known SS58 address types" license = "Apache-2.0" diff --git a/ss58-registry.json b/ss58-registry.json index 55bb1a6..64bf316 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -1018,6 +1018,15 @@ "standardAccount": "*25519", "website": "https://logion.network" }, + { + "prefix": 2024, + "network": "vow-chain", + "displayName": "Enigmatic Smile", + "symbols": ["VOW"], + "decimals": [18], + "standardAccount": "*25519", + "website": "https://www.vow.foundation/" + }, { "prefix": 2032, "network": "interlay", From b6f5ca9b4203ad293e487476cf711cb5f2793a76 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:24:06 +0200 Subject: [PATCH 6/8] [ci] Fix publish (#223) --- .gitlab-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1afd77a..88bac63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,7 +139,13 @@ tag-job: #### stage: publish -unleash-to-crates-io: +publish-crates-dry: + stage: publish + <<: *docker-env + script: + - cargo publish --dry-run + +publish-crates: stage: publish <<: *docker-env <<: *publish-refs @@ -148,8 +154,7 @@ unleash-to-crates-io: - if [ $TAG == "new" ]; then echo "Publishing to crates.io"; - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}; - cargo unleash em-dragons --no-check --owner github:paritytech:core-devs ${CARGO_UNLEASH_PKG_DEF}; + cargo publish; else echo "Tag was not updated. Not releasing."; fi From 85679a7f2b2f03b531d46b8a070b816f35d826e9 Mon Sep 17 00:00:00 2001 From: Evgeny Snitko Date: Wed, 2 Oct 2024 15:36:30 +0400 Subject: [PATCH 7/8] Gha migration (#228) gh workflow --- .github/workflows/gitspiegel-trigger.yml | 22 --- .github/workflows/tag-publish.yml | 231 +++++++++++++++++++++++ .gitlab-ci.yml | 197 ------------------- scripts/ci/deny.toml | 8 +- 4 files changed, 235 insertions(+), 223 deletions(-) delete mode 100644 .github/workflows/gitspiegel-trigger.yml create mode 100644 .github/workflows/tag-publish.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/gitspiegel-trigger.yml b/.github/workflows/gitspiegel-trigger.yml deleted file mode 100644 index dce3aaf..0000000 --- a/.github/workflows/gitspiegel-trigger.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: gitspiegel sync - -# This workflow doesn't do anything, it's only use is to trigger "workflow_run" -# webhook, that'll be consumed by gitspiegel -# This way, gitspiegel won't do mirroring, unless this workflow runs, -# and running the workflow is protected by GitHub - -on: - pull_request: - types: - - opened - - synchronize - - unlocked - - ready_for_review - - reopened - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Do nothing - run: echo "let's go" diff --git a/.github/workflows/tag-publish.yml b/.github/workflows/tag-publish.yml new file mode 100644 index 0000000..58b8a3b --- /dev/null +++ b/.github/workflows/tag-publish.yml @@ -0,0 +1,231 @@ +name: CI +run-name: CI for ${{ github.ref_name }} +on: + push: + branches: + - 'main' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +env: + CARGO_INCREMENTAL: 0 + RUST_TOOLCHAIN: "1.70.0" + RUST_TOOLCHAIN_NIGHTLY: "nightly-2023-05-23" + + +jobs: + + # + # + # + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: "${{ env.RUST_TOOLCHAIN_NIGHTLY }}, ${{ env.RUST_TOOLCHAIN }}" + components: "rustfmt, clippy" + + - name: fmt + run: cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} fmt --all -- --check + - name: clippy + run: cargo clippy --all --verbose + + # + # + # + deny: + runs-on: ubuntu-latest + needs: [lint] + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: "${{ env.RUST_TOOLCHAIN }}, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}" + components: "rustfmt, clippy" + + - name: Deny + run: | + cargo install cargo-deny@0.13.9 --locked + cargo deny check --hide-inclusion-graph -c scripts/ci/deny.toml + mkdir -p ./artifacts + echo "___Complete logs can be found in the artifacts___" + cargo deny check --hide-inclusion-graph -c scripts/ci/deny.toml 2> artifacts/cargo_deny.log + + - name: upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ github.sha }} + path: artifacts + retention-days: 7 + + # + # + # + test: + runs-on: ubuntu-latest + needs: [lint] + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: "${{ env.RUST_TOOLCHAIN }}, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}" + components: "rustfmt, clippy" + + - name: Test + run: cargo test --all --verbose + + # + # + # + tag: + runs-on: ubuntu-latest + permissions: + contents: write + needs: [deny, test] + if: ${{ github.event_name != 'pull_request' }} + outputs: + TAG: ${{ steps.versions.outputs.TAG }} + PKG_VER: ${{ steps.versions.outputs.PKG_VER }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-tags: 'true' + fetch-depth: 0 + + - name: Versions + id: versions + run: | + export CURRENT_TAG=$(git describe --tags --abbrev=0) + export PKG_VER=v$(cat Cargo.toml | grep -A 5 package] | grep version | cut -d '=' -f 2 | tr -d '"' | tr -d " ") + echo "Current tag $CURRENT_TAG" + echo "Package version $PKG_VER" + # + echo "PKG_VER=$PKG_VER" >> $GITHUB_OUTPUT + if [ $CURRENT_TAG == $PKG_VER ]; + then + echo "Tag is up to date. Nothing to do."; + export TAG=old; + else + echo "Tag was updated."; + export TAG=new; + fi + echo "TAG=$TAG" >> $GITHUB_OUTPUT + + - name: Create/update tag + id: tag + if: ${{ steps.versions.outputs.TAG == 'new' }} + uses: actions/github-script@v7 + with: + result-encoding: string + script: | + try { + await github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'refs/tags/${{ steps.versions.outputs.PKG_VER }}', + sha: context.sha + }) + } catch (err) { + if (err.status !== 422) throw err; + console.log("Tag already exists, updating") + await github.rest.git.updateRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'tags/${{ steps.versions.outputs.PKG_VER }}', + sha: context.sha + }); + } + + # + # Dry run + # + + cargo-publish-dry-run: + runs-on: ubuntu-latest + needs: [deny, test] + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: "${{ env.RUST_TOOLCHAIN }}, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}" + components: "rustfmt, clippy" + + - name: cargo publish + run: cargo publish --dry-run + + npm-publish-dry-run: + runs-on: ubuntu-latest + needs: [deny, test] + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '16' + + - name: npm publish + run: | + ls -al + npm install + npm run build + cd npm_dist/ + ls -al + npm publish --dry-run + + # + # Publish + # + + cargo-publish: + runs-on: ubuntu-latest + environment: Main + needs: [tag] + if: ${{ needs.tag.outputs.TAG == 'new' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: "${{ env.RUST_TOOLCHAIN }}, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}" + components: "rustfmt, clippy" + + - name: Publish + run: | + echo "tag result: ${{ needs.tag.outputs.TAG }}" + echo "pkg version: ${{ needs.tag.outputs.PKG_VER }}" + echo "Publishing to crates.io"; + cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}; + + npm-publish: + runs-on: ubuntu-latest + environment: Main + needs: [tag] + if: ${{ needs.tag.outputs.TAG == 'new' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '16' + + - name: Publish + run: | + echo "tag result: ${{ needs.tag.outputs.TAG }}" + echo "pkg version: ${{ needs.tag.outputs.PKG_VER }}" + npm install; + npm run build; + cd npm_dist/; + ls -al + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc; + npm publish --access public; \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 88bac63..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,197 +0,0 @@ -default: - interruptible: true - retry: - max: 2 - when: - - runner_system_failure - - unknown_failure - - api_failure - -stages: - - lint - - test - - build - - tag - - publish - -variables: - GIT_STRATEGY: fetch - GIT_DEPTH: 100 - CARGO_INCREMENTAL: 0 - CI_IMAGE: "paritytech/ci-linux:production" - CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.13" - CARGO_UNLEASH_PKG_DEF: "" - -.publish-refs: &publish-refs - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME == "main" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - -.rust-info-script: &rust-info-script - - rustup show - - cargo --version - - rustup +nightly show - - cargo +nightly --version - - bash --version - -.docker-env: &docker-env - image: "${CI_IMAGE}" - before_script: - - *rust-info-script - tags: - - linux-docker-vm-c2 - -.kubernetes-env: &kubernetes-env - image: "${CI_IMAGE}" - tags: - - kubernetes-parity-build - -.collect-artifacts: &collect-artifacts - artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: on_success - expire_in: 7 days - paths: - - ./artifacts/ - -#### stage: lint - -fmt: - stage: lint - <<: *docker-env - script: - - cargo +nightly fmt --all -- --check - -clippy: - stage: lint - <<: *docker-env - script: - - cargo clippy --all --verbose - -#### stage: test - -deny: - stage: test - <<: *docker-env - <<: *collect-artifacts - script: - - cargo deny check --hide-inclusion-graph -c scripts/ci/deny.toml - after_script: - - mkdir -p ./artifacts - - echo "___Complete logs can be found in the artifacts___" - - cargo deny check --hide-inclusion-graph 2> cargo_deny.log - -test: - stage: test - <<: *docker-env - script: - - cargo test --all --verbose - -#### stage: build - -build: - stage: build - <<: *docker-env - script: - - cargo build --no-default-features --target wasm32-unknown-unknown --verbose - - -#### stage: tag -# this stage will only create a tag in the repo, not release - -tag-job: - stage: tag - <<: *kubernetes-env - <<: *publish-refs - script: - #FIXME: remove after ssh added to base image - - apt-get update && apt-get install -y ssh - - eval $(ssh-agent) - - ssh-add - <<< ${GITHUB_SSH_PRIV_KEY} - - mkdir ~/.ssh && touch ~/.ssh/known_hosts - - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - - export CURRENT_TAG=$(git describe --tags --abbrev=0) - - export PKG_VER=v$(cat Cargo.toml | grep -A 5 package] | grep version | cut -d '=' -f 2 | tr -d '"' | tr -d " ") - - echo "Current tag $CURRENT_TAG" - - echo "Package version $PKG_VER" - - git config user.name "${GITHUB_USER}" - - git config user.email "devops-team@parity.io" - - git config remote.origin.url "git@github.com:/paritytech/${CI_PROJECT_NAME}.git" - - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - - if [ $CURRENT_TAG == $PKG_VER ]; - then - echo "Tag is up to date. Nothing to do."; - export TAG=old; - else - echo "Tag was updated."; - git tag -a $PKG_VER -m "new tag"; - git log --tags --simplify-by-decoration --pretty="format:%ci %d"; - git push origin --tags; - export TAG=new; - fi - - echo "TAG=$TAG" > tag.env; - artifacts: - reports: - dotenv: tag.env - -#### stage: publish - -publish-crates-dry: - stage: publish - <<: *docker-env - script: - - cargo publish --dry-run - -publish-crates: - stage: publish - <<: *docker-env - <<: *publish-refs - script: - - echo $TAG - - if [ $TAG == "new" ]; - then - echo "Publishing to crates.io"; - cargo publish; - else - echo "Tag was not updated. Not releasing."; - fi - -publish-npmjs: - stage: publish - <<: *kubernetes-env - <<: *publish-refs - variables: - CI_IMAGE: "node:16" - script: - - echo $TAG - - if [ $TAG == "new" ]; - then - echo "------------Publishing to npmjs------------"; - npm install; - npm run build; - cd npm_dist/; - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc; - npm publish --access public; - cd ..; - echo "------------Configuring git------------"; - eval $(ssh-agent); - ssh-add - <<< ${GITHUB_SSH_PRIV_KEY}; - mkdir ~/.ssh && touch ~/.ssh/known_hosts; - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts; - git config user.name "${GITHUB_USER}"; - git config user.email "devops-team@parity.io"; - git config remote.origin.url "git@github.com:/paritytech/${CI_PROJECT_NAME}.git"; - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; - echo "------------Pushing package.json and package-lock.json to github------------"; - git branch tmp; - git checkout main || git checkout master; - git add package.json; - git add package-lock.json; - git commit -m "[skip ci] Update package.json and package-lock.json"; - git push; - else - echo "Tag was not updated. Not publishing."; - fi diff --git a/scripts/ci/deny.toml b/scripts/ci/deny.toml index 8cc7635..e66ff68 100644 --- a/scripts/ci/deny.toml +++ b/scripts/ci/deny.toml @@ -58,7 +58,7 @@ ignore = [ # * Medium - CVSS Score 4.0 - 6.9 # * High - CVSS Score 7.0 - 8.9 # * Critical - CVSS Score 9.0 - 10.0 -#severity-threshold = +#severity-threshold = # This section is considered when running `cargo deny check licenses` # More documentation for the licenses section can be found here: @@ -168,8 +168,8 @@ deny = [ skip = [ #{ name = "ansi_term", version = "=0.11.0" }, ] -# Similarly to `skip` allows you to skip certain crates during duplicate -# detection. Unlike skip, it also includes the entire tree of transitive +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive # dependencies starting at the specified crate, up to a certain depth, which is # by default infinite skip-tree = [ @@ -190,4 +190,4 @@ unknown-git = "warn" # if not specified. If it is specified but empty, no registries are allowed. allow-registry = ["https://github.com/rust-lang/crates.io-index"] # List of URLs for allowed Git repositories -allow-git = [] +allow-git = [] \ No newline at end of file From 57344a5258f1abff8fdb4689e91ff594ca54f02d Mon Sep 17 00:00:00 2001 From: Dariia Porechna <35382599+dariolina@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:52:25 +0200 Subject: [PATCH 8/8] add Autonomys network (#227) * add Autonomys network * Remove outdated Subspace entry --- Cargo.toml | 2 +- ss58-registry.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4e336d7..74d493d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ss58-registry" authors = ["Parity Technologies "] -version = "1.50.0" +version = "1.51.0" edition = "2021" description = "Registry of known SS58 address types" license = "Apache-2.0" diff --git a/ss58-registry.json b/ss58-registry.json index 64bf316..f888c55 100644 --- a/ss58-registry.json +++ b/ss58-registry.json @@ -1137,12 +1137,12 @@ }, { "prefix": 6094, - "network": "subspace", - "displayName": "Subspace", - "symbols": ["SSC"], + "network": "autonomys", + "displayName": "Autonomys", + "symbols": ["AI3"], "decimals": [18], "standardAccount": "*25519", - "website": "https://subspace.network" + "website": "https://autonomys.xyz" }, { "prefix": 7007,