diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 45652f18036..f77a9c2b71b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,41 +1,41 @@ # Default fallback, if no other path below this matches -* @iotaledger/l1-core @iotaledger/core-node @iotaledger/core-consensus +* @iotaledger/sc-platform @iotaledger/core-protocol # Everything within the SDK folder -/sdk/ @iotaledger/boxfish @iotaledger/l1-core @iotaledger/tooling +/sdk/ @iotaledger/tooling # Changes to the genesis builder should be approved by Konstantinos or Mirko at least /crates/iota-genesis-builder/ @kodemartin @miker83z # vm-language team -/iota-execution/ @miker83z @valeriyr -/external-crates/ @miker83z @valeriyr +/iota-execution/ @iotaledger/vm-language +/external-crates/ @iotaledger/vm-language -# l1-core-infra team -/docker/ @iotaledger/l1-core-infra @iotaledger/core-node @iotaledger/devops-admin -/crates/iota-json-rpc*/ @iotaledger/l1-core-infra -/crates/iota-graphql*/ @iotaledger/l1-core-infra -/crates/iota-indexer*/ @iotaledger/l1-core-infra -/crates/iota-data-ingestion*/ @iotaledger/l1-core-infra -/crates/iota-analytics-indexer/ @iotaledger/l1-core-infra +# infrastructure team +/docker/ @iotaledger/infrastructure @iotaledger/node @iotaledger/devops-admin +/crates/iota-json-rpc*/ @iotaledger/infrastructure +/crates/iota-graphql*/ @iotaledger/infrastructure +/crates/iota-indexer*/ @iotaledger/infrastructure +/crates/iota-data-ingestion*/ @iotaledger/infrastructure +/crates/iota-analytics-indexer/ @iotaledger/infrastructure -# core-node team -/crates/iota-archival/ @iotaledger/core-node -/crates/iota-authority-aggregation/ @iotaledger/core-node @iotaledger/core-consensus -/crates/iota-config/ @iotaledger/core-node -/crates/iota-core/ @iotaledger/core-node @iotaledger/core-consensus -/crates/iota-network/ @iotaledger/core-node -/crates/iota-network-stack/ @iotaledger/core-node -/crates/iota-node/ @iotaledger/core-node -/crates/iota-types/ @iotaledger/core-node @iotaledger/l1-core -/crates/iota-protocol-config/ @iotaledger/core-node @iotaledger/l1-core -/crates/iota-protocol-config-macros/ @iotaledger/core-node @iotaledger/l1-core -/crates/iota-rest-api/ @iotaledger/core-node @iotaledger/l1-core-infra -/crates/iota-snapshot/ @iotaledger/core-node -/crates/iota-storage/ @iotaledger/core-node +# node team +/crates/iota-archival/ @iotaledger/node +/crates/iota-authority-aggregation/ @iotaledger/node @iotaledger/consensus +/crates/iota-config/ @iotaledger/node +/crates/iota-core/ @iotaledger/node @iotaledger/consensus +/crates/iota-network/ @iotaledger/node +/crates/iota-network-stack/ @iotaledger/node +/crates/iota-node/ @iotaledger/node +/crates/iota-types/ @iotaledger/node @iotaledger/sc-platform +/crates/iota-protocol-config/ @iotaledger/node @iotaledger/sc-platform +/crates/iota-protocol-config-macros/ @iotaledger/node @iotaledger/sc-platform +/crates/iota-rest-api/ @iotaledger/node @iotaledger/infrastructure +/crates/iota-snapshot/ @iotaledger/node +/crates/iota-storage/ @iotaledger/node -# core-consensus team -/consensus/ @iotaledger/core-consensus +# consensus team +/consensus/ @iotaledger/consensus # dev-tools team /crates/iota/ @iotaledger/dev-tools @@ -45,21 +45,21 @@ /crates/iota-transaction-builder/ @iotaledger/dev-tools # Frontend apps to be looked after by Boxfish Studio or the tooling team -/apps/ @iotaledger/boxfish @iotaledger/tooling -/dapps/ @iotaledger/boxfish @iotaledger/tooling -/linting/ @iotaledger/boxfish @iotaledger/tooling -/.husky/ @iotaledger/boxfish @iotaledger/tooling -/.changeset/ @iotaledger/boxfish @iotaledger/tooling -.eslintrc.js @iotaledger/boxfish @iotaledger/tooling -.lintstagedrc.json @iotaledger/boxfish @iotaledger/tooling -.npmrc @iotaledger/boxfish @iotaledger/tooling -.prettierignore @iotaledger/boxfish @iotaledger/tooling -graphql.config.ts @iotaledger/boxfish @iotaledger/tooling -package.json @iotaledger/boxfish @iotaledger/tooling -pnpm-workspace.yaml @iotaledger/boxfish @iotaledger/tooling -prettier.config.js @iotaledger/boxfish @iotaledger/tooling -turbo.json @iotaledger/boxfish @iotaledger/tooling -vercel.json @iotaledger/boxfish @iotaledger/tooling +/apps/ @iotaledger/tooling +/dapps/ @iotaledger/tooling +/linting/ @iotaledger/tooling +/.husky/ @iotaledger/tooling +/.changeset/ @iotaledger/tooling +.eslintrc.js @iotaledger/tooling +.lintstagedrc.json @iotaledger/tooling +.npmrc @iotaledger/tooling +.prettierignore @iotaledger/tooling +graphql.config.ts @iotaledger/tooling +package.json @iotaledger/tooling +pnpm-workspace.yaml @iotaledger/tooling +prettier.config.js @iotaledger/tooling +turbo.json @iotaledger/tooling +vercel.json @iotaledger/tooling # Docs and examples are for DevEx to approve upon /docs/ @iotaledger/devx diff --git a/.github/actions/diffs/action.yml b/.github/actions/diffs/action.yml index 4e6922ba60f..c7bc240b392 100644 --- a/.github/actions/diffs/action.yml +++ b/.github/actions/diffs/action.yml @@ -10,6 +10,9 @@ outputs: isMove: description: True when changes happened to the Move code value: "${{ steps.diff.outputs.isMove }}" + isExternalCrates: + description: True when changes happened in external crates + value: "${{ steps.diff.outputs.isExternalCrates }}" isReleaseNotesEligible: description: True when changes happened in Release Notes eligible paths value: "${{ steps.diff.outputs.isReleaseNotesEligible }}" @@ -17,9 +20,9 @@ outputs: runs: using: composite steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Detect Changes - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: diff with: filters: | @@ -56,6 +59,8 @@ runs: - "examples/**" - "iota_programmability/**" - ".github/workflows/_move_tests.yml" + isExternalCrates: + - "external-crates/move/crates/**" isReleaseNotesEligible: - "consensus/**" - "crates/**" diff --git a/.github/actions/turbo-diffs/action.yml b/.github/actions/turbo-diffs/action.yml index 5ecf523d527..60e9302aca9 100644 --- a/.github/actions/turbo-diffs/action.yml +++ b/.github/actions/turbo-diffs/action.yml @@ -7,11 +7,11 @@ outputs: runs: using: composite steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 - - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 + - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" - id: changes diff --git a/.github/labeler.yml b/.github/labeler.yml index 83af79e05b4..9c85e15b9f1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,6 @@ -Documentation: +documentation: - changed-files: - any-glob-to-any-file: docs/content/**/* -iota-explorer: +explorer: - changed-files: - - any-glob-to-any-file: explorer/**/* + - any-glob-to-any-file: apps/explorer/**/* diff --git a/.github/workflows/_cargo_deny.yml b/.github/workflows/_cargo_deny.yml index 911cdca4016..aab5dac50a3 100644 --- a/.github/workflows/_cargo_deny.yml +++ b/.github/workflows/_cargo_deny.yml @@ -17,12 +17,12 @@ jobs: name: cargo deny (bans, licenses, sources) runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - run: cargo deny --manifest-path ${{ inputs.manifest-path || './Cargo.toml' }} check bans licenses sources advisories: name: cargo deny (advisories) runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - run: cargo deny --manifest-path ${{ inputs.manifest-path || './Cargo.toml' }} check advisories diff --git a/.github/workflows/_docs_lint.yml b/.github/workflows/_docs_lint.yml index 58435476537..35314d3f409 100644 --- a/.github/workflows/_docs_lint.yml +++ b/.github/workflows/_docs_lint.yml @@ -12,8 +12,8 @@ jobs: runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Spell Check Docs - uses: crate-ci/typos@945d407a5fc9097f020969446a16f581612ab4df # pin@v1.24.5 + uses: crate-ci/typos@945d407a5fc9097f020969446a16f581612ab4df # v1.24.5 with: files: ./docs/content diff --git a/.github/workflows/_docusaurus.yml b/.github/workflows/_docusaurus.yml index b62d6eb2f32..e13b4f0e13b 100644 --- a/.github/workflows/_docusaurus.yml +++ b/.github/workflows/_docusaurus.yml @@ -12,12 +12,12 @@ jobs: runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 2 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" diff --git a/.github/workflows/_e2e.yml b/.github/workflows/_e2e.yml index 21cccf3a81c..c68e7efb83f 100644 --- a/.github/workflows/_e2e.yml +++ b/.github/workflows/_e2e.yml @@ -48,11 +48,11 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - run: cargo build --bin iota --features indexer --profile dev - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -89,7 +89,7 @@ jobs: - name: Run Explorer e2e tests if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || github.ref_name == 'develop' run: pnpm --filter iota-explorer playwright test - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: always() with: name: playwright-report-explorer @@ -115,7 +115,7 @@ jobs: if: inputs.isWallet || inputs.isRust || inputs.isTypescriptSDK || github.ref_name == 'develop' run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm --filter iota-wallet playwright test - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: always() with: name: playwright-report-wallet diff --git a/.github/workflows/_execution_cut.yml b/.github/workflows/_execution_cut.yml index 14cf87f9679..9c231940a39 100644 --- a/.github/workflows/_execution_cut.yml +++ b/.github/workflows/_execution_cut.yml @@ -11,13 +11,13 @@ jobs: name: cutting a new execution layer runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Install cargo-hakari, and cache the binary - uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3 # pin@v3 + uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3 # v3.1.1 with: crate: cargo-hakari locked: true - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Make cut run: ./scripts/execution_layer.py cut for_ci_test - name: Check execution builds diff --git a/.github/workflows/_external_rust_tests.yml b/.github/workflows/_external_rust_tests.yml index 015ff4b7676..e787b85f668 100644 --- a/.github/workflows/_external_rust_tests.yml +++ b/.github/workflows/_external_rust_tests.yml @@ -27,8 +27,8 @@ jobs: IOTA_SKIP_SIMTESTS: 1 runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: Install python dependencies @@ -70,6 +70,6 @@ jobs: runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Run Cargo Udeps run: cargo +nightly ci-udeps-external ${{ matrix.flags }} diff --git a/.github/workflows/_ledgernano.yml b/.github/workflows/_ledgernano.yml index 0d9484caf47..316714d376e 100644 --- a/.github/workflows/_ledgernano.yml +++ b/.github/workflows/_ledgernano.yml @@ -11,11 +11,11 @@ jobs: name: Ledgernano runs-on: self-hosted steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4.0.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # pin@v4.0.2 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "20" cache: "pnpm" diff --git a/.github/workflows/_move_ide.yml b/.github/workflows/_move_ide.yml new file mode 100644 index 00000000000..d6fba17c64c --- /dev/null +++ b/.github/workflows/_move_ide.yml @@ -0,0 +1,96 @@ +name: Move IDE + +on: workflow_call + +concurrency: + group: move-ide-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + move-auto-formatter-test: + name: Move Auto-formatter Test + runs-on: [self-hosted] + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: "20" + + - name: Install dependencies + working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin + run: npm install && npm i web-tree-sitter + + - name: Run npm test + working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin + shell: bash + run: npm run test + + move-ide-test: + name: Move IDE Test + runs-on: [self-hosted] + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: "20" + + - name: Install dependencies and start Xvfb (emulate a display so VS Code can be started) + working-directory: ./external-crates/move/crates/move-analyzer/editors/code + run: | + sudo apt install libgtk-3-0 -y + sudo apt-get install -y xvfb x11-apps x11-xkb-utils libx11-6 libx11-xcb1 + set -eux + # Start server + /usr/bin/Xvfb :99 -screen 0 1024x768x24 & + sleep 1 + ps aux | grep Xvfb --color=always | grep -v grep + sudo add-apt-repository ppa:kisak/kisak-mesa -y + sudo apt update + sudo apt upgrade -y + npm install && npm install --save-dev @types/node @types/semver + + - name: Build move-analyzer + run: | + cargo build --bin move-analyzer + mkdir -p ~/.iota/bin + cp ./target/debug/move-analyzer* ~/.iota/bin + + - name: Run npm test + working-directory: ./external-crates/move/crates/move-analyzer/editors/code + shell: bash + run: npm run pretest && DISPLAY=:99.0 npm run test + + move-vscode-extension-build: + name: Move VSCode extension build + runs-on: [self-hosted] + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: "20" + + - name: Install dependencies + working-directory: ./external-crates/move/crates/move-analyzer/editors/code + run: npm install && npm install --save-dev @types/node @types/semver + + - name: Build VSCode extension + working-directory: ./external-crates/move/crates/move-analyzer/editors/code + run: npm run package diff --git a/.github/workflows/_move_tests.yml b/.github/workflows/_move_tests.yml index b2c2be4b930..a98c7ad8f3f 100644 --- a/.github/workflows/_move_tests.yml +++ b/.github/workflows/_move_tests.yml @@ -20,8 +20,8 @@ jobs: timeout-minutes: 10 runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: Run move tests diff --git a/.github/workflows/_rust.yml b/.github/workflows/_rust.yml index 806466ae426..f95a7642424 100644 --- a/.github/workflows/_rust.yml +++ b/.github/workflows/_rust.yml @@ -5,11 +5,6 @@ on: inputs: isRust: type: boolean - secrets: - SSH_PRIVATE_KEY_IOTA_CI: - required: true - SSH_GITHUB_KNOWN_HOSTS: - required: true env: CARGO_TERM_COLOR: always @@ -49,8 +44,8 @@ jobs: outputs: components: ${{ steps.filter.outputs.changes }} steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: filter with: list-files: "json" @@ -62,8 +57,8 @@ jobs: outputs: components: ${{ steps.filter.outputs.changes }} steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: filter with: list-files: "json" diff --git a/.github/workflows/_rust_lints.yml b/.github/workflows/_rust_lints.yml index e42b1b1eb76..43410a38234 100644 --- a/.github/workflows/_rust_lints.yml +++ b/.github/workflows/_rust_lints.yml @@ -21,7 +21,7 @@ jobs: if: (!cancelled() && inputs.isRust) runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Install latest nightly run: rustup toolchain install nightly --component rustfmt --allow-downgrade - name: Check Rust formatting @@ -31,7 +31,7 @@ jobs: if: (!cancelled() && inputs.isRust) runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Check Cargo.toml format and sorting run: | pushd "scripts/cargo_sort" @@ -51,11 +51,11 @@ jobs: - rustfmt runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 # TODO(bradh): debug and re-enable this; the caching is breaking the clippy build # Enable caching of the 'librocksdb-sys' crate by additionally caching the # 'librocksdb-sys' src directory which is managed by cargo - # - uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths + # - uses: bmwill/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # v1.4.0 # Fork of 'Swatinem/rust-cache' which allows caching additional paths # with: # path: ~/.cargo/registry/src/**/librocksdb-sys-* diff --git a/.github/workflows/_rust_tests.yml b/.github/workflows/_rust_tests.yml index 7b2857f27fc..da2303c56e4 100644 --- a/.github/workflows/_rust_tests.yml +++ b/.github/workflows/_rust_tests.yml @@ -36,8 +36,8 @@ jobs: IOTA_SKIP_SIMTESTS: 1 runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: cargo test @@ -72,7 +72,7 @@ jobs: runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Run Cargo Udeps run: cargo +nightly ci-udeps ${{ matrix.flags }} @@ -89,8 +89,8 @@ jobs: - [self-hosted] fail-fast: false steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # Pin v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: benchmark (smoke) @@ -103,7 +103,7 @@ jobs: run: | cargo doc --all-features --workspace --no-deps - name: Install cargo-hakari, and cache the binary - uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3 # pin@v3 + uses: baptiste0928/cargo-install@904927dbe77864e0f2281519fe9d5bd097a220b3 # v3.1.1 with: crate: cargo-hakari locked: true @@ -123,8 +123,8 @@ jobs: env: MSIM_WATCHDOG_TIMEOUT_MS: 60000 steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: setup filter @@ -159,39 +159,38 @@ jobs: eval ${command} - # # Disabled - # rosetta-validation: - # timeout-minutes: 45 - # runs-on: [self-hosted] - # steps: - # - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + rosetta-validation: + timeout-minutes: 45 + runs-on: [self-hosted] + steps: + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - # - name: Setup environment - # run: .github/scripts/rosetta/setup.sh - # shell: bash + - name: Setup environment + run: .github/scripts/rosetta/setup.sh + shell: bash - # - name: Start local IOTA network - # run: | - # iota start --no-full-node & - # shell: bash + - name: Start local IOTA network + run: | + iota start --no-full-node & + shell: bash - # - name: Start Rosetta servers - # run: .github/scripts/rosetta/start_rosetta.sh - # shell: bash + - name: Start Rosetta servers + run: .github/scripts/rosetta/start_rosetta.sh + shell: bash - # - name: Sleep for 20 seconds - # run: sleep 20s - # shell: bash + - name: Sleep for 20 seconds + run: sleep 20s + shell: bash - # - name: Run check:construction test - # run: | - # ./bin/rosetta-cli --configuration-file rosetta_cli.json check:construction - # shell: bash + - name: Run check:construction test + run: | + ./bin/rosetta-cli --configuration-file rosetta_cli.json check:construction + shell: bash - # - name: Run check:data test - # run: | - # ./bin/rosetta-cli --configuration-file rosetta_cli.json check:data - # shell: bash + - name: Run check:data test + run: | + ./bin/rosetta-cli --configuration-file rosetta_cli.json check:data + shell: bash graphql-rpc: name: graphql-rpc @@ -216,8 +215,8 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest - name: Install postgresql-client diff --git a/.github/workflows/_turborepo.yml b/.github/workflows/_turborepo.yml index 4e1742f79b1..7d4c7d6142b 100644 --- a/.github/workflows/_turborepo.yml +++ b/.github/workflows/_turborepo.yml @@ -12,10 +12,10 @@ jobs: runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" - name: Run audit @@ -26,12 +26,12 @@ jobs: runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 2 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -41,7 +41,7 @@ jobs: run: pnpm manypkg check - name: Turbo Cache id: turbo-cache - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: .turbo key: turbo-${{ runner.os }}-${{ github.sha }} @@ -50,7 +50,7 @@ jobs: - name: Lint run: pnpm turbo lint - name: Install wasm-pack for mbf package - uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # pin@v0.4.0 + uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # v0.4.0 with: version: "latest" - name: Build @@ -66,7 +66,7 @@ jobs: - name: Wallet Extension Preview Package if: steps.wallet-diff.outcome == 'failure' run: pnpm --filter iota-wallet pack:zip - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: steps.wallet-diff.outcome == 'failure' with: name: wallet-extension diff --git a/.github/workflows/_typos.yml b/.github/workflows/_typos.yml index 05f6a69030f..1747c0ca15a 100644 --- a/.github/workflows/_typos.yml +++ b/.github/workflows/_typos.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Check spelling - uses: crate-ci/typos@945d407a5fc9097f020969446a16f581612ab4df # pin@v1.24.5 + uses: crate-ci/typos@945d407a5fc9097f020969446a16f581612ab4df # v1.24.5 with: config: ./.typos.toml diff --git a/.github/workflows/apps_backend_deploy.yml b/.github/workflows/apps_backend_deploy.yml index 38c919e73f5..63c5b01a9e6 100644 --- a/.github/workflows/apps_backend_deploy.yml +++ b/.github/workflows/apps_backend_deploy.yml @@ -19,10 +19,10 @@ jobs: pull-requests: write runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -42,7 +42,7 @@ jobs: fi - name: Turbo Cache id: turbo-cache - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: node_modules/.cache/turbo key: turbo-${{ runner.os }}-${{ github.sha }} @@ -64,7 +64,7 @@ jobs: run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT - name: Comment on pull request if: ${{ inputs.isProd == false }} - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/apps_explorer_deploy.yml b/.github/workflows/apps_explorer_deploy.yml index 10badc709fc..0b57bb6b97c 100644 --- a/.github/workflows/apps_explorer_deploy.yml +++ b/.github/workflows/apps_explorer_deploy.yml @@ -30,10 +30,10 @@ jobs: pull-requests: write runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -53,7 +53,7 @@ jobs: fi - name: Turbo Cache id: turbo-cache - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: node_modules/.cache/turbo key: turbo-${{ runner.os }}-${{ github.sha }} @@ -80,7 +80,7 @@ jobs: run: vercel alias ${{ steps.deploy_url.outputs.DEPLOY_URL }} $EXPLORER_VERCEL_PROJECT_STAGING_URL --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_SCOPE }} - name: Comment on pull request if: ${{ inputs.isProd == false && inputs.isStaging == false }} - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/apps_ui_kit_deploy.yml b/.github/workflows/apps_ui_kit_deploy.yml index bbb003fb875..3c2f4e753f5 100644 --- a/.github/workflows/apps_ui_kit_deploy.yml +++ b/.github/workflows/apps_ui_kit_deploy.yml @@ -19,10 +19,10 @@ jobs: pull-requests: write runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -54,7 +54,7 @@ jobs: run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT - name: Comment on pull request if: ${{ inputs.isProd == false }} - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/apps_wallet_dashboard_deploy.yml b/.github/workflows/apps_wallet_dashboard_deploy.yml index 97bd8ae6670..d3ae3f5f284 100644 --- a/.github/workflows/apps_wallet_dashboard_deploy.yml +++ b/.github/workflows/apps_wallet_dashboard_deploy.yml @@ -19,10 +19,10 @@ jobs: pull-requests: write runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -42,7 +42,7 @@ jobs: fi - name: Turbo Cache id: turbo-cache - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: node_modules/.cache/turbo key: turbo-${{ runner.os }}-${{ github.sha }} @@ -66,7 +66,7 @@ jobs: run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT - name: Comment on pull request if: ${{ inputs.isProd == false }} - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/apps_wallet_nightly_build.yml b/.github/workflows/apps_wallet_nightly_build.yml index 267b940df18..32c5e429273 100644 --- a/.github/workflows/apps_wallet_nightly_build.yml +++ b/.github/workflows/apps_wallet_nightly_build.yml @@ -25,10 +25,10 @@ jobs: export artifact_name="wallet-nightly-$(date -Idate)" echo "artifact_name=${artifact_name}" >> $GITHUB_ENV - name: Checking out - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -36,7 +36,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Turbo Cache id: turbo-cache - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: node_modules/.cache/turbo key: turbo-${{ runner.os }}-${{ github.sha }} @@ -45,7 +45,7 @@ jobs: - name: Build Wallet run: pnpm wallet build:nightly - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ env.artifact_name }} path: | diff --git a/.github/workflows/apps_wallet_prod_build.yml b/.github/workflows/apps_wallet_prod_build.yml index 964ee7d1411..3deb10ac329 100644 --- a/.github/workflows/apps_wallet_prod_build.yml +++ b/.github/workflows/apps_wallet_prod_build.yml @@ -1,6 +1,7 @@ name: Build Wallet App (Prod) on: + workflow_dispatch: push: tags: - "wallet-v[0-9]+.[0-9]+.[0-9]+" @@ -18,10 +19,10 @@ jobs: runs-on: [self-hosted] steps: - name: Checking out the repository - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4.0.0 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # pin@v4.0.2 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "20" cache: "pnpm" @@ -29,7 +30,7 @@ jobs: run: pnpm install --frozen-lockfile - name: get-npm-version id: package-version - uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # pin@v1.3.1 + uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1 with: path: apps/wallet - name: Create artifact name @@ -39,8 +40,50 @@ jobs: echo "artifact_name=${artifact_name}" >> $GITHUB_ENV - name: Build Wallet run: pnpm wallet build + - name: Get Previous Tag + id: prev_tag + run: | + tags=$(git tag --list 'wallet-v*.*.*' --sort=-creatordate) + current_tag=$(echo "$tags" | sed -n 1p) + prev_tag=$(echo "$tags" | sed -n 2p) + if [ -z "$prev_tag" ]; then + echo "No previous tag found. Skipping changelog generation." + echo "PREV_TAG=none" >> $GITHUB_ENV + else + echo "PREV_TAG=$prev_tag" >> $GITHUB_ENV + fi + echo "CURRENT_TAG=$current_tag" >> $GITHUB_ENV + + - name: Generate Changelog + id: generate_changelog + run: | + if [ "${{ env.PREV_TAG }}" = "none" ]; then + echo "No previous tag found. Skipping changelog generation." + echo "changelog=No previous tag found. Changelog generation skipped." >> $GITHUB_ENV + else + git log ${{ env.PREV_TAG }}..${{ env.CURRENT_TAG }} --pretty=format:"- %s by @%an in #%h" -- ./apps/wallet > CHANGELOG.md + changelog=$(cat CHANGELOG.md) + echo "changelog=$changelog" >> $GITHUB_ENV + fi + + - name: Get version from tag + id: version + run: echo "::set-output name=version::${GITHUB_REF#refs/tags/wallet-v}" + + - name: Create GitHub Release + uses: elgohr/Github-Release-Action@c5ea99036abb741a89f8bf1f2cd7fba845e3313a # v5.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.CURRENT_TAG }} + release_name: IOTA Wallet v${{ steps.version.outputs.version }} + body: | + ## Changelog + {{ env.changelog }} + draft: true + prerelease: false - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ env.artifact_name }} path: | diff --git a/.github/workflows/apps_wallet_rc_build.yml b/.github/workflows/apps_wallet_rc_build.yml index 625c6cbc23f..bfbf13ac1f3 100644 --- a/.github/workflows/apps_wallet_rc_build.yml +++ b/.github/workflows/apps_wallet_rc_build.yml @@ -21,10 +21,10 @@ jobs: runs-on: [self-hosted] steps: - name: Checking out ${{ env.iota_branch }} - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4.0.0 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # pin@v4.0.2 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "20" cache: "pnpm" @@ -32,7 +32,7 @@ jobs: run: pnpm install --frozen-lockfile - name: get-npm-version id: package-version - uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # pin@v1.3.1 + uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1 with: path: apps/wallet - name: Create artifact name @@ -43,7 +43,7 @@ jobs: - name: Build Wallet run: pnpm wallet build:rc - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ env.artifact_name }} path: | diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 15f9a91e015..23e1dd3c61f 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -53,7 +53,7 @@ jobs: echo "artifact_name=${artifact_name}" >> $GITHUB_ENV - name: Install Foundry - uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # pin@v1 + uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0 - name: Install PostgreSQL library headers shell: bash @@ -69,7 +69,7 @@ jobs: echo "os_type=${system_os}-${arch}" >> $GITHUB_ENV - name: Checking out ${{ env.iota_branch }} - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: ref: ${{ env.iota_branch }} @@ -79,7 +79,7 @@ jobs: [ -f ~/.cargo/env ] && source ~/.cargo/env ; cargo build --release --bin iota --bin iota-indexer --features indexer - name: Upload artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ env.artifact_name }} path: | diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 73737505b89..6c01337fad6 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -14,19 +14,19 @@ jobs: runs-on: self-hosted steps: - name: checkout code repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" - name: Install dependencies run: pnpm install --frozen-lockfile - name: Create Release Pull Request - uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 # pin@v1 + uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 # v1.4.5 with: # Generates src/version.ts file using genVersion # https://github.com/changesets/action#with-version-script diff --git a/.github/workflows/changesets_ci.yml b/.github/workflows/changesets_ci.yml index 59449264009..ba30a3e6a97 100644 --- a/.github/workflows/changesets_ci.yml +++ b/.github/workflows/changesets_ci.yml @@ -10,12 +10,12 @@ jobs: runs-on: self-hosted steps: - name: checkout code repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" @@ -26,7 +26,7 @@ jobs: run: echo "hasChanges=$(pnpm list --filter "...[$(git rev-parse HEAD^1)]" --depth -1 --json | jq "any(.[] | select(.private != true) ; length > 0)")" >> $GITHUB_OUTPUT - name: Get changed files in the changesets folder id: has-changesets - uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # pin@v45 + uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # v45.0.3 with: files: | .changeset/** @@ -35,7 +35,7 @@ jobs: run: | echo "true" > missing-changeset.txt - name: Upload missing changeset artifact - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: steps.has-changesets.outputs.any_changed != 'true' && steps.diff.outputs.hasChanges == 'true' with: name: missing-changeset diff --git a/.github/workflows/changesets_ci_comment.yml b/.github/workflows/changesets_ci_comment.yml index 5bdac435ed9..3deda7d99e4 100644 --- a/.github/workflows/changesets_ci_comment.yml +++ b/.github/workflows/changesets_ci_comment.yml @@ -16,14 +16,14 @@ jobs: github.event.workflow_run.conclusion == 'success' steps: - name: Get workflow run information - uses: potiuk/get-workflow-origin@c657bb36aef4a7402bbe9b2e09a820320f8ff447 # pin@v1 + uses: potiuk/get-workflow-origin@c657bb36aef4a7402bbe9b2e09a820320f8ff447 # v1.0.0 id: source-run-info with: token: ${{ secrets.GITHUB_TOKEN }} sourceRunId: ${{ github.event.workflow_run.id }} - name: "Download artifact" - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 id: get-artifact if: steps.source-run-info.outputs.pullRequestNumber with: @@ -46,7 +46,7 @@ jobs: return 'true'; - name: Comment PR - uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # pin@v2 + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 if: steps.get-artifact.outputs.result == 'true' && steps.source-run-info.outputs.pullRequestNumber with: pr_number: ${{ steps.source-run-info.outputs.pullRequestNumber }} @@ -58,7 +58,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Remove outdated comments - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 if: steps.get-artifact.outputs.result == 'false' && steps.source-run-info.outputs.pullRequestNumber env: ISSUE_NUMBER: ${{ steps.source-run-info.outputs.pullRequestNumber }} diff --git a/.github/workflows/changesets_publish.yml b/.github/workflows/changesets_publish.yml index 61d8bdf7870..42c0d958f58 100644 --- a/.github/workflows/changesets_publish.yml +++ b/.github/workflows/changesets_publish.yml @@ -10,12 +10,12 @@ jobs: runs-on: self-hosted steps: - name: checkout code repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 - - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 - name: Install Nodejs - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "20" cache: "pnpm" diff --git a/.github/workflows/crate_docs.yml b/.github/workflows/crate_docs.yml index 427fa9dea15..8fb8baf1d59 100644 --- a/.github/workflows/crate_docs.yml +++ b/.github/workflows/crate_docs.yml @@ -16,16 +16,16 @@ jobs: runs-on: self-hosted steps: - name: Checkout sources - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Generate documentation - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # pin@v1.0.3 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1 with: command: doc args: --workspace --exclude "iota-benchmark" --no-deps - name: Deploy documentation - uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # pin@v3 + uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: gh-pages diff --git a/.github/workflows/develop_ci_slack_report.yml b/.github/workflows/develop_ci_slack_report.yml index b024aa65b33..1dc6c0561e1 100644 --- a/.github/workflows/develop_ci_slack_report.yml +++ b/.github/workflows/develop_ci_slack_report.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' steps: - - uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # pin@v2 + - uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2.5.0 with: status: ${{ github.event.workflow_run.conclusion }} notification_title: " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}}" diff --git a/.github/workflows/hierarchy.yml b/.github/workflows/hierarchy.yml index 309d1e93e72..9c61f02a77d 100644 --- a/.github/workflows/hierarchy.yml +++ b/.github/workflows/hierarchy.yml @@ -22,6 +22,7 @@ jobs: isMove: ${{ steps.diff.outputs.isMove }} isDoc: ${{ steps.diff.outputs.isDoc }} isReleaseNotesEligible: ${{ steps.diff.outputs.isReleaseNotesEligible }} + isExternalCrates: ${{ steps.diff.outputs.isExternalCrates }} isWallet: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-wallet')) }} isExplorer: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-explorer')) }} isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }} @@ -31,7 +32,7 @@ jobs: isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }} isLedgerjs: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/ledgerjs-hw-app-iota')) }} steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Detect Changes (turbo) uses: "./.github/actions/turbo-diffs" id: turbo @@ -45,7 +46,7 @@ jobs: group: dprint-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Check dprint formatting run: dprint check @@ -61,7 +62,7 @@ jobs: if: (!cancelled() && needs.diff.outputs.isRust == 'true') runs-on: [self-hosted] steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Run license check run: cargo ci-license @@ -75,33 +76,6 @@ jobs: if: (!cancelled() && needs.diff.outputs.isDoc == 'true') uses: ./.github/workflows/_docs_lint.yml - release-notes-description-check: - name: release-notes-check - concurrency: - group: release-notes-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - needs: diff - if: (!cancelled() && needs.diff.outputs.isReleaseNotesEligible == 'true') - runs-on: [self-hosted] - steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - name: Check Pull Request Description - shell: bash - run: | - export PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - export DESCRIPTION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/iotaledger/iota/pulls/${PR_NUMBER}" \ - | jq --raw-output .body) - - if [[ "${DESCRIPTION}" == *"[x]"* ]]; then - if [[ "${DESCRIPTION}" =~ Release[[:space:]]notes[[:space:]]+.* ]]; then - exit 0 - else - echo "At least one '[x]' was checked under 'Type of Change (Check all that apply)', you need to add a blob under the 'Release Notes' section." - exit 1 - fi - fi - turborepo: needs: - dprint-format @@ -175,3 +149,12 @@ jobs: - typos uses: ./.github/workflows/_ledgernano.yml secrets: inherit + + move-ide: + if: (!cancelled() && !failure()) && needs.diff.outputs.isExternalCrates == 'true' && github.event.pull_request.draft == false + needs: + - diff + - dprint-format + - license-check + - typos + uses: ./.github/workflows/_move_ide.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b58d4fefc37..c2931635e82 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,16 +1,25 @@ name: Pull Request Labeler -on: - - pull_request_target +on: pull_request_target jobs: triage: permissions: contents: read pull-requests: write - runs-on: self-hosted + runs-on: ubuntu-latest steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 - - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # pin@v5 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + + team-label: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: equitybee/team-label-action@732147c0a9129eb90b16261d14860954fe5ce42a # v1.0.3 + with: + repo-token: ${{ secrets.TEAM_LABELER_TOKEN }} + organization-name: iotaledger + ignore-labels: devs, iota-foundation, iota-sdk, hornet, boxfish diff --git a/.github/workflows/links_checker.yml b/.github/workflows/links_checker.yml index 3d17cbeed50..96ee42b70a7 100644 --- a/.github/workflows/links_checker.yml +++ b/.github/workflows/links_checker.yml @@ -16,11 +16,11 @@ jobs: LYCHEE_OUT: ./lychee/links-report steps: ## Check out code using Git - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Check all links at *.md and doc files id: lychee - uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # pin@v1.10.0 + uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0 with: token: ${{ secrets.GITHUB_TOKEN }} output: ${{ env.LYCHEE_OUT }} @@ -38,14 +38,14 @@ jobs: './**/*.md' - name: Find the last report issue open - uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # pin@v2.3 + uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0 id: last-issue with: state: open labels: broken-links - name: Create or update report - uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # pin@v4 + uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1 with: title: Link checker report content-filepath: ${{ env.LYCHEE_OUT }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 60f3267e804..27268340ad9 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -51,10 +51,10 @@ jobs: run: | brew install postgresql - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: cargo build - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # pin@v1.0.3 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.1 with: command: build args: --all-targets --all-features --release diff --git a/.github/workflows/preview_wiki.yml b/.github/workflows/preview_wiki.yml index 9057346f314..fa9b9733b3a 100644 --- a/.github/workflows/preview_wiki.yml +++ b/.github/workflows/preview_wiki.yml @@ -24,15 +24,15 @@ jobs: runs-on: self-hosted if: github.event.pull_request.draft == false steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Install pnpm - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 with: run_install: false - name: Set up Node.js - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: 20 cache: "pnpm" @@ -61,7 +61,7 @@ jobs: working-directory: ./docs/site - name: Update PR with Deployment URL - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d63f45ebb51..7addd9967a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: echo "iota_version=${iota_version}" >> $GITHUB_ENV - name: Check out ${{ env.iota_tag }} - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: ref: ${{ env.iota_tag }} @@ -96,11 +96,11 @@ jobs: - name: Setup caching # Fork of 'Swatinem/rust-cache' which allows caching additional paths - uses: bmwill/rust-cache@fb63fcd7a959767755b88b5af2f5cbf65fb8a127 # pin@v1 + uses: bmwill/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # v1.4.0 - name: Install nexttest (Windows) if: ${{ matrix.os == 'windows-latest' }} - uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # pin@v2 + uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38 with: tool: nextest @@ -187,7 +187,7 @@ jobs: # choco push iota.${{ env.iota_version }}.nupkg --source https://push.chocolatey.org/ - name: Upload release artifacts for ${{ matrix.os }} platform - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: iota-binaries-${{ matrix.os }} if-no-files-found: error @@ -195,7 +195,7 @@ jobs: ./tmp/iota-${{ env.iota_tag }}-${{ env.os_type }}.tgz - name: Attach artifacts to ${{ env.iota_tag }} release in GH - uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # pin@v2 + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 with: tag_name: ${{ env.iota_tag }} files: | @@ -213,7 +213,7 @@ jobs: # run: | # echo "iota_tag=$(echo ${{ env.TAG_NAME }} | sed s/'refs\/tags\/'//)" >> $GITHUB_ENV # echo "versionless_tag=$(echo ${{ env.TAG_NAME }} | sed s/'refs\/tags\/'// | sed s/'testnet\-v'//)" >> $GITHUB_ENV -# - uses: mislav/bump-homebrew-formula-action@b3327118b2153c82da63fd9cbf58942146ee99f0 # pin@v3 +# - uses: mislav/bump-homebrew-formula-action@b3327118b2153c82da63fd9cbf58942146ee99f0 # v3.1.0 # with: # formula-name: iota # create-pullrequest: true @@ -233,7 +233,7 @@ jobs: # runs-on: ubuntu-latest # steps: # - name: Dispatch Tagging of images in DockerHub, in MystenLabs/sui-operations -# uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # pin@v3.0.0 +# uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 # with: # repository: iotaledger/iota # token: ${{ secrets.DOCKER_BINARY_BUILDS_DISPATCH }} diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 0a729c2e815..ba9cb957cad 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -33,17 +33,17 @@ jobs: environment: release steps: - name: Checkout code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # pin@v3 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Docker meta for iota-node id: meta-node - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: iotaledger/iota-node # mapping semver tags to networks @@ -61,7 +61,7 @@ jobs: type=raw,value=mainnet,enable=${{ github.event_name == 'release' && !contains(github.ref, '-alpha') && !contains(github.ref, '-beta') && !contains(github.ref, '-rc') }} - name: Login to Docker Registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} @@ -74,7 +74,7 @@ jobs: echo "BUILD_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV - name: Build and push Docker image for iota-node - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: context: . file: docker/iota-node/Dockerfile @@ -92,17 +92,17 @@ jobs: environment: release steps: - name: Checkout code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # pin@v3 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Docker meta for iota-indexer id: meta-indexer - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: iotaledger/iota-indexer # mapping semver tags to networks @@ -120,7 +120,7 @@ jobs: type=raw,value=mainnet,enable=${{ github.event_name == 'release' && !contains(github.ref, '-alpha') && !contains(github.ref, '-beta') && !contains(github.ref, '-rc') }} - name: Login to Docker Registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} @@ -133,7 +133,7 @@ jobs: echo "BUILD_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV - name: Build and push Docker image for iota-indexer - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: context: . file: docker/iota-indexer/Dockerfile @@ -151,17 +151,17 @@ jobs: environment: release steps: - name: Checkout code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # pin@v3 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Docker meta for iota-tools id: meta-tools - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: iotaledger/iota-tools # mapping semver tags to networks @@ -179,7 +179,7 @@ jobs: type=raw,value=mainnet,enable=${{ github.event_name == 'release' && !contains(github.ref, '-alpha') && !contains(github.ref, '-beta') && !contains(github.ref, '-rc') }} - name: Login to Docker Registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} @@ -192,7 +192,7 @@ jobs: echo "BUILD_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV - name: Build and push Docker image for iota-tools - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: context: . file: docker/iota-tools/Dockerfile @@ -210,17 +210,17 @@ jobs: environment: release steps: - name: Checkout code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # pin@v3 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Docker meta for iota-graphql-rpc id: meta-tools - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: iotaledger/iota-graphql-rpc # mapping semver tags to networks @@ -238,7 +238,7 @@ jobs: type=raw,value=mainnet,enable=${{ github.event_name == 'release' && !contains(github.ref, '-alpha') && !contains(github.ref, '-beta') && !contains(github.ref, '-rc') }} - name: Login to Docker Registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} @@ -251,7 +251,7 @@ jobs: echo "BUILD_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV - name: Build and push Docker image for iota-graphql-rpc - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: context: . file: docker/iota-graphql-rpc/Dockerfile diff --git a/.github/workflows/release_notes_monitor.yml b/.github/workflows/release_notes_monitor.yml index f19fc19bb40..c3c18d815f1 100644 --- a/.github/workflows/release_notes_monitor.yml +++ b/.github/workflows/release_notes_monitor.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout iota repo develop branch - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 ref: develop @@ -63,7 +63,7 @@ jobs: echo "release_notes=${rel_notes}" >> $GITHUB_ENV - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # pin@v4 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -78,7 +78,7 @@ jobs: echo "slack_id=$(echo ${slack_id} | tr -d '"')" >> $GITHUB_ENV - name: Post to a Slack channel - uses: slackapi/slack-github-action@34c3fd73326693ef04728f8611669d918a2d781d # pin@v1.19.0 + uses: slackapi/slack-github-action@34c3fd73326693ef04728f8611669d918a2d781d # v1.19.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: diff --git a/.github/workflows/release_wiki.yml b/.github/workflows/release_wiki.yml index a62173cd58a..84570f0c164 100644 --- a/.github/workflows/release_wiki.yml +++ b/.github/workflows/release_wiki.yml @@ -13,15 +13,15 @@ jobs: wiki-release: runs-on: self-hosted steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Install pnpm - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 + uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 with: run_install: false - name: Set up Node.js - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: 20 cache: "pnpm" diff --git a/.github/workflows/simulator_nightly.yml b/.github/workflows/simulator_nightly.yml index 55c4ceeee16..234a9013788 100644 --- a/.github/workflows/simulator_nightly.yml +++ b/.github/workflows/simulator_nightly.yml @@ -35,12 +35,12 @@ jobs: steps: - name: Install Teleport - uses: teleport-actions/setup@176c25dfcd19cd31a252f275d579822b243e7b9c # pin@v1 + uses: teleport-actions/setup@176c25dfcd19cd31a252f275d579822b243e7b9c # v1.0.6 with: version: 11.3.1 - name: Authorize against Teleport id: auth - uses: teleport-actions/auth@685adaf480dc79262a99220eb158a92136d5abd9 # pin@v2 + uses: teleport-actions/auth@685adaf480dc79262a99220eb158a92136d5abd9 # v2.0.3 with: # Specify the publically accessible address of your Teleport proxy. proxy: proxy.iota-int.com:443 @@ -84,10 +84,10 @@ jobs: if: github.event_name == 'schedule' && failure() steps: - - uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # pin@v3 + - uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3.0.3 - name: Checkout iota repo develop branch - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Get iota commit env: @@ -122,7 +122,7 @@ jobs: echo "oncall_name=$(echo ${oncall_name})" >> $GITHUB_ENV - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # pin@v4 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -134,7 +134,7 @@ jobs: echo "slack_id=$(echo ${slack_id} | tr -d '"')" >> $GITHUB_ENV - name: Post to slack - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # pin@v1 + uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} IOTA_SHA: ${{ env.iota_sha }} diff --git a/.github/workflows/split_cluster.yml b/.github/workflows/split_cluster.yml index 31ce2cc9389..3c45c361d91 100644 --- a/.github/workflows/split_cluster.yml +++ b/.github/workflows/split_cluster.yml @@ -18,7 +18,7 @@ jobs: # runs-on: self-hosted # steps: # - name: Checkout code repository - # uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + # uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 # with: # fetch-depth: 0 # - name: Run split cluster check script @@ -31,7 +31,7 @@ jobs: runs-on: self-hosted steps: - name: Checkout code repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: fetch-depth: 0 - name: Run split cluster check script diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 35b73fe7bb7..f0c82a67fa7 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,7 +11,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # pin@v9 + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 60 diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9063759a502..62b3c8d8943 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -36,10 +36,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Tag - uses: julbme/gh-action-manage-tag@8daf6387badea2c6b8f989bd0f82b5a9ef1d84e6 # pin@v1 + uses: julbme/gh-action-manage-tag@8daf6387badea2c6b8f989bd0f82b5a9ef1d84e6 # v1.0.1 with: name: ${{ env.TAG_NAME }} state: present diff --git a/.typos.toml b/.typos.toml index 37b1921004d..73f51059184 100644 --- a/.typos.toml +++ b/.typos.toml @@ -29,7 +29,10 @@ strat = "strat" mistic = "mistic" # Identity AAS = "AAS" -# actual typos purposedly used in tests +# actual typos purposely used in tests assing = "assing" tring = "tring" Thi = "Thi" + +[files] +extend-exclude = ["pnpm-lock.yaml", "external-crates/*"] diff --git a/Cargo.lock b/Cargo.lock index 029a587e761..a6985400c04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -191,7 +191,7 @@ dependencies = [ "rand 0.8.5", "rcgen", "ring 0.17.8", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-webpki 0.102.8", "serde", "serde_json", @@ -1625,7 +1625,7 @@ dependencies = [ "hyper 1.4.1", "hyper-util", "pin-project-lite", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-pemfile 2.1.3", "rustls-pki-types", "tokio", @@ -2708,7 +2708,7 @@ dependencies = [ "quinn-proto", "rand 0.8.5", "rstest", - "rustls 0.23.13", + "rustls 0.23.18", "serde", "shared-crypto", "strum_macros 0.26.4", @@ -5436,7 +5436,7 @@ dependencies = [ "hyper 1.4.1", "hyper-util", "log", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", @@ -7655,7 +7655,7 @@ dependencies = [ "move-core-types", "rand 0.8.5", "reqwest 0.12.7", - "rustls 0.23.13", + "rustls 0.23.18", "serde", "serde_json", "serde_with", @@ -7903,7 +7903,7 @@ dependencies = [ "percent-encoding", "prometheus", "reqwest 0.12.7", - "rustls 0.23.13", + "rustls 0.23.18", "serde", "serde_json", "tap", @@ -8023,7 +8023,7 @@ dependencies = [ "rand 0.8.5", "rcgen", "reqwest 0.12.7", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-webpki 0.102.8", "tokio", "tokio-rustls 0.26.0", @@ -8510,7 +8510,7 @@ dependencies = [ "http 1.1.0", "jsonrpsee-core", "pin-project", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-pki-types", "rustls-platform-verifier", "soketto", @@ -8563,7 +8563,7 @@ dependencies = [ "hyper-util", "jsonrpsee-core", "jsonrpsee-types", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-platform-verifier", "serde", "serde_json", @@ -11949,7 +11949,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.13", + "rustls 0.23.18", "socket2", "thiserror", "tokio", @@ -11966,7 +11966,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.0.0", - "rustls 0.23.13", + "rustls 0.23.18", "slab", "thiserror", "tinyvec", @@ -12397,7 +12397,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-native-certs 0.7.3", "rustls-pemfile 2.1.3", "rustls-pki-types", @@ -12865,9 +12865,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "aws-lc-rs", "log", @@ -12938,9 +12938,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-platform-verifier" @@ -12953,7 +12953,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-native-certs 0.7.3", "rustls-platform-verifier-android", "rustls-webpki 0.102.8", @@ -14790,7 +14790,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.13", + "rustls 0.23.18", "rustls-pki-types", "tokio", ] @@ -15554,7 +15554,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.13", + "rustls 0.23.18", "rustls-pki-types", "url", "webpki-roots 0.26.6", diff --git a/Cargo.toml b/Cargo.toml index 55279866086..d9a5cb5b76b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -302,7 +302,7 @@ reqwest = { version = "0.12", default-features = false, features = ["http2", "js roaring = "0.10.6" rocksdb = { version = "0.21.0", default-features = false, features = ["snappy", "lz4", "zstd", "zlib", "multi-threaded-cf"] } rstest = "0.16.0" -rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "ring"] } +rustls = { version = "0.23.18", default-features = false, features = ["std", "tls12", "ring"] } schemars = { version = "0.8.21", features = ["either"] } scopeguard = "1.1" serde = { version = "1.0.144", features = ["derive", "rc"] } diff --git a/apps/core/src/components/Inputs/SendTokenFormInput.tsx b/apps/core/src/components/Inputs/SendTokenFormInput.tsx index 5c49038945b..3e97b41c707 100644 --- a/apps/core/src/components/Inputs/SendTokenFormInput.tsx +++ b/apps/core/src/components/Inputs/SendTokenFormInput.tsx @@ -19,6 +19,7 @@ export interface SendTokenInputProps { onActionClick: () => Promise; isMaxActionDisabled?: boolean; name: string; + isPayAllIota: boolean; } export function SendTokenFormInput({ @@ -30,6 +31,7 @@ export function SendTokenFormInput({ onActionClick, isMaxActionDisabled, name, + isPayAllIota, }: SendTokenInputProps) { const { values, setFieldValue, isSubmitting, validateField } = useFormikContext(); const { data: gasBudgetEstimation } = useGasBudgetEstimation({ @@ -38,7 +40,7 @@ export function SendTokenFormInput({ activeAddress, to: to, amount: values.amount, - isPayAllIota: values.isPayAllIota, + isPayAllIota, }); const [formattedGasBudgetEstimation, gasToken] = useFormatCoin( gasBudgetEstimation, @@ -61,8 +63,8 @@ export function SendTokenFormInput({ // gasBudgetEstimation should change when the amount above changes useEffect(() => { - setFieldValue('gasBudgetEst', formattedGasBudgetEstimation, false); - }, [formattedGasBudgetEstimation, setFieldValue, values.amount]); + setFieldValue('gasBudgetEst', gasBudgetEstimation, false); + }, [gasBudgetEstimation, setFieldValue, values.amount]); return ( +
-
+
diff --git a/apps/core/src/components/coin/CoinItem.tsx b/apps/core/src/components/coin/CoinItem.tsx index a7d82afe1ba..8e2062efa26 100644 --- a/apps/core/src/components/coin/CoinItem.tsx +++ b/apps/core/src/components/coin/CoinItem.tsx @@ -39,13 +39,8 @@ export function CoinItem({ return ( -
- +
+
- + {isIota ? (coinMeta?.name || '').toUpperCase() : coinMeta?.name || symbol}
diff --git a/apps/core/src/components/icon/ImageIcon.tsx b/apps/core/src/components/icon/ImageIcon.tsx index 6b58dbf715a..3f1e76a6d31 100644 --- a/apps/core/src/components/icon/ImageIcon.tsx +++ b/apps/core/src/components/icon/ImageIcon.tsx @@ -42,9 +42,8 @@ function FallBackAvatar({ str, rounded, size = ImageIconSize.Large }: FallBackAv return (
diff --git a/apps/core/src/components/index.ts b/apps/core/src/components/index.ts index 0a8093eeadb..a2aa837dfc6 100644 --- a/apps/core/src/components/index.ts +++ b/apps/core/src/components/index.ts @@ -1,9 +1,9 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './KioskClientProvider'; - export * from './coin'; export * from './icon'; export * from './Inputs'; export * from './QR'; + +export * from './providers'; diff --git a/apps/core/src/components/KioskClientProvider.tsx b/apps/core/src/components/providers/KioskClientProvider.tsx similarity index 100% rename from apps/core/src/components/KioskClientProvider.tsx rename to apps/core/src/components/providers/KioskClientProvider.tsx diff --git a/apps/core/src/components/providers/ThemeProvider.tsx b/apps/core/src/components/providers/ThemeProvider.tsx new file mode 100644 index 00000000000..c69bbf78e13 --- /dev/null +++ b/apps/core/src/components/providers/ThemeProvider.tsx @@ -0,0 +1,83 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { PropsWithChildren, useState, useEffect } from 'react'; +import { Theme, ThemePreference } from '../../enums'; +import { ThemeContext } from '../../contexts'; + +interface ThemeProviderProps { + appId: string; +} + +export function ThemeProvider({ children, appId }: PropsWithChildren) { + const storageKey = `theme_${appId}`; + + const getSystemTheme = () => { + return window.matchMedia('(prefers-color-scheme: dark)').matches ? Theme.Dark : Theme.Light; + }; + + const getThemePreference = () => { + const storedTheme = localStorage?.getItem(storageKey) as ThemePreference | null; + return storedTheme ? storedTheme : ThemePreference.System; + }; + + const [systemTheme, setSystemTheme] = useState(Theme.Light); + const [themePreference, setThemePreference] = useState(ThemePreference.System); + const [isLoadingPreference, setIsLoadingPreference] = useState(true); + + // Load the theme values on client + useEffect(() => { + if (typeof window === 'undefined') return; + + setSystemTheme(getSystemTheme()); + setThemePreference(getThemePreference()); + + // Make the theme preference listener wait + // until the preference is loaded in the next render + setIsLoadingPreference(false); + }, []); + + // When the theme preference changes.. + useEffect(() => { + if (typeof window === 'undefined' || isLoadingPreference) return; + + // Update localStorage with the new preference + localStorage.setItem(storageKey, themePreference); + + // In case of SystemPreference, listen for system theme changes + if (themePreference === ThemePreference.System) { + const handleSystemThemeChange = () => { + const systemTheme = getSystemTheme(); + setSystemTheme(systemTheme); + }; + const systemThemeMatcher = window.matchMedia('(prefers-color-scheme: dark)'); + systemThemeMatcher.addEventListener('change', handleSystemThemeChange); + return () => systemThemeMatcher.removeEventListener('change', handleSystemThemeChange); + } + }, [themePreference, storageKey, isLoadingPreference]); + + // Derive the active theme from the preference + const theme = (() => { + switch (themePreference) { + case ThemePreference.Dark: + return Theme.Dark; + case ThemePreference.Light: + return Theme.Light; + case ThemePreference.System: + return systemTheme; + } + })(); + + // When the theme (preference or derived) changes update the CSS class + useEffect(() => { + const documentElement = document.documentElement.classList; + documentElement.toggle(Theme.Dark, theme === Theme.Dark); + documentElement.toggle(Theme.Light, theme === Theme.Light); + }, [theme]); + + return ( + + {children} + + ); +} diff --git a/apps/wallet-dashboard/components/Dialogs/StakeDetails/views/index.ts b/apps/core/src/components/providers/index.ts similarity index 51% rename from apps/wallet-dashboard/components/Dialogs/StakeDetails/views/index.ts rename to apps/core/src/components/providers/index.ts index 145902b67d8..5bbf1329e64 100644 --- a/apps/wallet-dashboard/components/Dialogs/StakeDetails/views/index.ts +++ b/apps/core/src/components/providers/index.ts @@ -1,4 +1,5 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './StakeDetailsView'; +export * from './KioskClientProvider'; +export * from './ThemeProvider'; diff --git a/apps/core/src/constants/staking.constants.ts b/apps/core/src/constants/staking.constants.ts index e79939eee60..5c1a2ea2b7e 100644 --- a/apps/core/src/constants/staking.constants.ts +++ b/apps/core/src/constants/staking.constants.ts @@ -6,3 +6,6 @@ export const UNSTAKING_REQUEST_EVENT = '0x3::validator::UnstakingRequestEvent'; export const DELEGATED_STAKES_QUERY_STALE_TIME = 10_000; export const DELEGATED_STAKES_QUERY_REFETCH_INTERVAL = 30_000; + +export const NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_REDEEMABLE = 2; +export const NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_STARTS = 1; diff --git a/apps/core/src/contexts/ThemeContext.tsx b/apps/core/src/contexts/ThemeContext.tsx new file mode 100644 index 00000000000..b24c0de824d --- /dev/null +++ b/apps/core/src/contexts/ThemeContext.tsx @@ -0,0 +1,17 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { createContext } from 'react'; +import { Theme, ThemePreference } from '../enums'; + +export interface ThemeContextType { + theme: Theme; + themePreference: ThemePreference; + setThemePreference: (theme: ThemePreference) => void; +} + +export const ThemeContext = createContext({ + theme: Theme.Light, + themePreference: ThemePreference.System, + setThemePreference: () => {}, +}); diff --git a/apps/wallet-dashboard/components/Dialogs/Unstake/index.ts b/apps/core/src/contexts/index.ts similarity index 70% rename from apps/wallet-dashboard/components/Dialogs/Unstake/index.ts rename to apps/core/src/contexts/index.ts index 4a9444c3b5b..c592171afa8 100644 --- a/apps/wallet-dashboard/components/Dialogs/Unstake/index.ts +++ b/apps/core/src/contexts/index.ts @@ -1,4 +1,4 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './views'; +export * from './ThemeContext'; diff --git a/apps/core/src/enums/ExplorerLinkType.ts b/apps/core/src/enums/explorer-link-type.enums.ts similarity index 100% rename from apps/core/src/enums/ExplorerLinkType.ts rename to apps/core/src/enums/explorer-link-type.enums.ts diff --git a/apps/core/src/enums/index.ts b/apps/core/src/enums/index.ts index 6dcfd1bcf7b..7c01aed335d 100644 --- a/apps/core/src/enums/index.ts +++ b/apps/core/src/enums/index.ts @@ -1,4 +1,5 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './ExplorerLinkType'; +export * from './theme.enums'; +export * from './explorer-link-type.enums'; diff --git a/apps/core/src/enums/theme.enums.ts b/apps/core/src/enums/theme.enums.ts new file mode 100644 index 00000000000..1225b1eb403 --- /dev/null +++ b/apps/core/src/enums/theme.enums.ts @@ -0,0 +1,13 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +export enum Theme { + Light = 'light', + Dark = 'dark', +} + +export enum ThemePreference { + Light = 'light', + Dark = 'dark', + System = 'system', +} diff --git a/apps/core/src/forms/token.ts b/apps/core/src/forms/token.ts index abad79c1100..264c74b87f1 100644 --- a/apps/core/src/forms/token.ts +++ b/apps/core/src/forms/token.ts @@ -4,6 +4,5 @@ export type TokenForm = { amount: string; to: string; - isPayAllIota: boolean; gasBudgetEst: string; }; diff --git a/apps/core/src/hooks/index.ts b/apps/core/src/hooks/index.ts index 544c59c8a30..026f01c6656 100644 --- a/apps/core/src/hooks/index.ts +++ b/apps/core/src/hooks/index.ts @@ -24,6 +24,7 @@ export * from './useGetKioskContents'; export * from './useZodForm'; export * from './useElementDimensions'; export * from './useIotaCoinData'; +export * from './useIsAssetTransferable'; export * from './useLocalStorage'; export * from './useTokenPrice'; export * from './useKioskClient'; @@ -41,5 +42,6 @@ export * from './useGasBudgetEstimation'; export * from './useTransactionData'; export * from './useGetStakingValidatorDetails'; export * from './useCursorPagination'; +export * from './useTheme'; export * from './stake'; diff --git a/apps/core/src/hooks/stake/index.ts b/apps/core/src/hooks/stake/index.ts index 53e1fc44806..2477e671351 100644 --- a/apps/core/src/hooks/stake/index.ts +++ b/apps/core/src/hooks/stake/index.ts @@ -4,3 +4,5 @@ export * from './useGetDelegatedStake'; export * from './useTotalDelegatedRewards'; export * from './useTotalDelegatedStake'; +export * from './useValidatorInfo'; +export * from './useStakeTxnInfo'; diff --git a/apps/core/src/hooks/stake/useStakeTxnInfo.ts b/apps/core/src/hooks/stake/useStakeTxnInfo.ts new file mode 100644 index 00000000000..a1ea1fcd53a --- /dev/null +++ b/apps/core/src/hooks/stake/useStakeTxnInfo.ts @@ -0,0 +1,52 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 +import { + useGetTimeBeforeEpochNumber, + useTimeAgo, + TimeUnit, + NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_REDEEMABLE, + NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_STARTS, +} from '../../'; + +export function useStakeTxnInfo(startEpoch?: string | number) { + const startEarningRewardsEpoch = + Number(startEpoch || 0) + NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_STARTS; + + const redeemableRewardsEpoch = + Number(startEpoch || 0) + NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_REDEEMABLE; + + const { data: timeBeforeStakeRewardsStarts } = + useGetTimeBeforeEpochNumber(startEarningRewardsEpoch); + const timeBeforeStakeRewardsStartsAgo = useTimeAgo({ + timeFrom: timeBeforeStakeRewardsStarts, + shortedTimeLabel: false, + shouldEnd: true, + maxTimeUnit: TimeUnit.ONE_HOUR, + }); + const stakedRewardsStartEpoch = + timeBeforeStakeRewardsStarts > 0 + ? `in ${timeBeforeStakeRewardsStartsAgo}` + : startEpoch + ? `Epoch #${Number(startEarningRewardsEpoch)}` + : '--'; + + const { data: timeBeforeStakeRewardsRedeemable } = + useGetTimeBeforeEpochNumber(redeemableRewardsEpoch); + const timeBeforeStakeRewardsRedeemableAgo = useTimeAgo({ + timeFrom: timeBeforeStakeRewardsRedeemable, + shortedTimeLabel: false, + shouldEnd: true, + maxTimeUnit: TimeUnit.ONE_HOUR, + }); + const timeBeforeStakeRewardsRedeemableAgoDisplay = + timeBeforeStakeRewardsRedeemable > 0 + ? `in ${timeBeforeStakeRewardsRedeemableAgo}` + : startEpoch + ? `Epoch #${Number(redeemableRewardsEpoch)}` + : '--'; + + return { + stakedRewardsStartEpoch, + timeBeforeStakeRewardsRedeemableAgoDisplay, + }; +} diff --git a/apps/core/src/hooks/stake/useValidatorInfo.tsx b/apps/core/src/hooks/stake/useValidatorInfo.tsx new file mode 100644 index 00000000000..2ae4d23c933 --- /dev/null +++ b/apps/core/src/hooks/stake/useValidatorInfo.tsx @@ -0,0 +1,50 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 +import { useIotaClientQuery } from '@iota/dapp-kit'; +import { useGetValidatorsApy } from '../'; + +export function useValidatorInfo({ validatorAddress }: { validatorAddress: string }) { + const { + data: system, + isPending: isPendingValidators, + isError: errorValidators, + } = useIotaClientQuery('getLatestIotaSystemState'); + const { data: rollingAverageApys } = useGetValidatorsApy(); + + const validatorSummary = + system?.activeValidators.find((validator) => validator.iotaAddress === validatorAddress) || + null; + + const currentEpoch = Number(system?.epoch || 0); + + const stakingPoolActivationEpoch = Number(validatorSummary?.stakingPoolActivationEpoch || 0); + + // flag as new validator if the validator was activated in the last epoch + // for genesis validators, this will be false + const newValidator = currentEpoch - stakingPoolActivationEpoch <= 1 && currentEpoch !== 0; + + // flag if the validator is at risk of being removed from the active set + const isAtRisk = system?.atRiskValidators.some((item) => item[0] === validatorAddress); + + const { apy, isApyApproxZero } = rollingAverageApys?.[validatorAddress] ?? { + apy: null, + }; + + const commission = validatorSummary ? Number(validatorSummary.commissionRate) / 100 : 0; + + return { + system, + isPendingValidators, + errorValidators, + + currentEpoch, + validatorSummary, + name: validatorSummary?.name || '', + stakingPoolActivationEpoch, + commission, + newValidator, + isAtRisk, + apy, + isApyApproxZero, + }; +} diff --git a/apps/core/src/hooks/useGetStakingValidatorDetails.ts b/apps/core/src/hooks/useGetStakingValidatorDetails.ts index 70a6fe36b74..f77ee897e53 100644 --- a/apps/core/src/hooks/useGetStakingValidatorDetails.ts +++ b/apps/core/src/hooks/useGetStakingValidatorDetails.ts @@ -75,6 +75,7 @@ export function useGetStakingValidatorDetails({ return { epoch: Number(system?.epoch) || 0, totalStake: totalStakeFormatted, + totalStakeOriginal: totalStake, totalValidatorsStake: totalValidatorsStakeFormatted, totalStakePercentage, validatorApy, diff --git a/apps/core/src/hooks/useGetValidatorsEvents.ts b/apps/core/src/hooks/useGetValidatorsEvents.ts index c0511d73aae..7be52ae4227 100644 --- a/apps/core/src/hooks/useGetValidatorsEvents.ts +++ b/apps/core/src/hooks/useGetValidatorsEvents.ts @@ -12,7 +12,7 @@ type GetValidatorsEvent = { // NOTE: This copies the query limit from our Rust JSON RPC backend, this needs to be kept in sync! const QUERY_MAX_RESULT_LIMIT = 50; -const VALIDATORS_EVENTS_QUERY = '0x3::validator_set::ValidatorEpochInfoEventV2'; +const VALIDATORS_EVENTS_QUERY = '0x3::validator_set::ValidatorEpochInfoEventV1'; //TODO: get validatorEvents by validator address export function useGetValidatorsEvents({ limit, order }: GetValidatorsEvent) { diff --git a/apps/core/src/hooks/useIsAssetTransferable.ts b/apps/core/src/hooks/useIsAssetTransferable.ts new file mode 100644 index 00000000000..7f5e75890a8 --- /dev/null +++ b/apps/core/src/hooks/useIsAssetTransferable.ts @@ -0,0 +1,50 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { useIotaClient } from '@iota/dapp-kit'; +import { IotaMoveNormalizedStruct, IotaObjectData } from '@iota/iota-sdk/client'; +import { useQuery } from '@tanstack/react-query'; + +function getObjectTypeParams(obj: IotaObjectData | null | undefined) { + const objectType = + obj?.type ?? + (obj?.content?.dataType === 'package' ? 'package' : obj?.content?.type) ?? + null; + + return objectType?.split('<')[0]?.split('::') || []; +} + +export function useIsAssetTransferable(obj: IotaObjectData | null | undefined) { + const client = useIotaClient(); + const [packageId, moduleName, functionName] = getObjectTypeParams(obj); + + return useQuery({ + // eslint-disable-next-line @tanstack/query/exhaustive-deps + queryKey: ['is-asset-transferable', packageId, moduleName, functionName], + queryFn: async () => { + if (!packageId || !moduleName || !functionName) { + return undefined; + } + + return await client.getNormalizedMoveStruct({ + package: packageId, + module: moduleName, + struct: functionName, + }); + }, + select: (moveNormalizedStruct: IotaMoveNormalizedStruct | undefined): boolean => { + if (!moveNormalizedStruct) { + return false; + } + + const structAbilities = moveNormalizedStruct?.abilities?.abilities ?? null; + + if (!structAbilities) { + return false; + } + + return structAbilities.includes('Store'); + }, + enabled: !!packageId && !!moduleName && !!functionName, + }); +} diff --git a/apps/core/src/hooks/useTheme.ts b/apps/core/src/hooks/useTheme.ts new file mode 100644 index 00000000000..72cddc121c3 --- /dev/null +++ b/apps/core/src/hooks/useTheme.ts @@ -0,0 +1,12 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 +import { useContext } from 'react'; +import { ThemeContext, ThemeContextType } from '../contexts'; + +export const useTheme = (): ThemeContextType => { + const context = useContext(ThemeContext); + if (!context) { + throw new Error('useTheme must be used within a ThemeProvider'); + } + return context; +}; diff --git a/apps/core/src/index.ts b/apps/core/src/index.ts index 6d113bf483b..a9aadd0b1e5 100644 --- a/apps/core/src/index.ts +++ b/apps/core/src/index.ts @@ -8,4 +8,6 @@ export * from './components'; export * from './utils'; export * from './hooks'; export * from './constants'; +export * from './contexts'; +export * from './enums'; export * from './forms'; diff --git a/apps/core/src/utils/index.ts b/apps/core/src/utils/index.ts index 8cbb31afa73..4d57564fa92 100644 --- a/apps/core/src/utils/index.ts +++ b/apps/core/src/utils/index.ts @@ -1,7 +1,6 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './isAssetTransferable'; export * from './calculateStakeShare'; export * from './chunkArray'; export * from './formatAmount'; diff --git a/apps/core/src/utils/isAssetTransferable.ts b/apps/core/src/utils/isAssetTransferable.ts deleted file mode 100644 index 4dad0779706..00000000000 --- a/apps/core/src/utils/isAssetTransferable.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { IotaObjectData } from '@iota/iota-sdk/client'; - -export const isAssetTransferable = (obj: IotaObjectData | null | undefined): boolean => - // TODO: Either the type abilities will be added to 'IotaParsedData' and - // we need to check if the object has the 'store' ability or there will be a new endpoint - // that returns the "transferable" status of a MoveType. - !!obj && obj.content?.dataType === 'moveObject'; // && obj.content.hasPublicTransfer; diff --git a/apps/wallet/src/ui/app/staking/stake/utils/validation.ts b/apps/core/src/utils/stake/createValidationSchema.ts similarity index 97% rename from apps/wallet/src/ui/app/staking/stake/utils/validation.ts rename to apps/core/src/utils/stake/createValidationSchema.ts index 198efb8a941..b051585f943 100644 --- a/apps/wallet/src/ui/app/staking/stake/utils/validation.ts +++ b/apps/core/src/utils/stake/createValidationSchema.ts @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { CoinFormat, formatBalance } from '@iota/core'; +import { CoinFormat, formatBalance } from '../../'; import BigNumber from 'bignumber.js'; import { mixed, object } from 'yup'; diff --git a/apps/core/src/utils/stake/index.ts b/apps/core/src/utils/stake/index.ts index 5f7d694c839..6ecca7353f6 100644 --- a/apps/core/src/utils/stake/index.ts +++ b/apps/core/src/utils/stake/index.ts @@ -6,3 +6,4 @@ export * from './formatDelegatedStake'; export * from './createStakeTransaction'; export * from './createTimelockedUnstakeTransaction'; export * from './createTimelockedStakeTransaction'; +export * from './createValidationSchema'; diff --git a/apps/explorer/src/components/AddressesCardGraph.tsx b/apps/explorer/src/components/AddressesCardGraph.tsx index 3258b556573..0c5ba23db08 100644 --- a/apps/explorer/src/components/AddressesCardGraph.tsx +++ b/apps/explorer/src/components/AddressesCardGraph.tsx @@ -8,7 +8,8 @@ import { useMemo } from 'react'; import { useGetAddressMetrics } from '~/hooks/useGetAddressMetrics'; import { useGetAllEpochAddressMetrics } from '~/hooks/useGetAllEpochAddressMetrics'; import { LabelTextSize, TooltipPosition } from '@iota/apps-ui-kit'; -import { StatisticsPanel, GraphTooltip } from './StatisticsPanel'; +import { StatisticsPanel } from './StatisticsPanel'; +import { GraphTooltipContent } from './GraphTooltipContent'; const GRAPH_DATA_FIELD = 'cumulativeAddresses'; const GRAPH_DATA_TEXT = 'Total addresses'; @@ -18,7 +19,13 @@ function TooltipContent({ data }: { data: AllEpochsAddressMetrics[number] }): JS const totalFormatted = formatAmount(data[GRAPH_DATA_FIELD]); const overline = `${dateFormatted}, Epoch ${data.epoch}`; - return ; + return ( + + ); } const FALLBACK = '--'; diff --git a/apps/explorer/src/components/AreaGraph.tsx b/apps/explorer/src/components/AreaGraph.tsx index ebfc5f690f5..dd3723c03d0 100644 --- a/apps/explorer/src/components/AreaGraph.tsx +++ b/apps/explorer/src/components/AreaGraph.tsx @@ -13,7 +13,7 @@ import { bisector, extent } from 'd3-array'; import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'; import { throttle } from 'throttle-debounce'; -import { GraphTooltipContent } from './GraphTooltipContent'; +import { GraphTooltipContainer } from './GraphTooltipContent'; let idCounter = 0; @@ -129,21 +129,33 @@ export function AreaGraph({ offsetTop={0} left={tooltipLeft} top={tooltipTopAdj} - className="pointer-events-none absolute z-10 h-0 w-max overflow-visible" + className="pointer-events-none absolute z-10 h-0 w-max overflow-visible bg-black" unstyled detectBounds > - {tooltipContent(tooltipContentProps)} + + {tooltipContent(tooltipContentProps)} + ) : null} - - + + - + diff --git a/apps/explorer/src/components/GraphTooltipContent.tsx b/apps/explorer/src/components/GraphTooltipContent.tsx index ddceab1776c..515c04990b7 100644 --- a/apps/explorer/src/components/GraphTooltipContent.tsx +++ b/apps/explorer/src/components/GraphTooltipContent.tsx @@ -4,18 +4,13 @@ import { useTooltipPosition } from '@visx/tooltip'; import clsx from 'clsx'; -import { type ReactNode } from 'react'; -type GraphTooltipContentProps = { - children: ReactNode; -}; - -export function GraphTooltipContent({ children }: GraphTooltipContentProps): JSX.Element { +export function GraphTooltipContainer({ children }: React.PropsWithChildren): JSX.Element { const { isFlippedHorizontally } = useTooltipPosition(); return (
); } + +interface GraphTooltipContentProps { + title: string; + overline: string; + subtitle: string; +} +export function GraphTooltipContent({ title, overline, subtitle }: GraphTooltipContentProps) { + return ( +
+ {overline} + {title} + {subtitle} +
+ ); +} diff --git a/apps/explorer/src/components/StatisticsPanel.tsx b/apps/explorer/src/components/StatisticsPanel.tsx index b2701d4b6d6..b30be733170 100644 --- a/apps/explorer/src/components/StatisticsPanel.tsx +++ b/apps/explorer/src/components/StatisticsPanel.tsx @@ -69,18 +69,3 @@ export function StatisticsPanel({ ); } - -interface GraphTooltipProps { - title: string; - overline: string; - subtitle: string; -} -export function GraphTooltip({ title, overline, subtitle }: GraphTooltipProps) { - return ( -
- {overline} - {title} - {subtitle} -
- ); -} diff --git a/apps/explorer/src/components/ThemedIotaLogo.tsx b/apps/explorer/src/components/ThemedIotaLogo.tsx new file mode 100644 index 00000000000..71a42a49a8d --- /dev/null +++ b/apps/explorer/src/components/ThemedIotaLogo.tsx @@ -0,0 +1,8 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { IotaLogoWeb } from '@iota/ui-icons'; + +export function ThemedIotaLogo(): React.JSX.Element { + return ; +} diff --git a/apps/explorer/src/components/TransactionsCardGraph.tsx b/apps/explorer/src/components/TransactionsCardGraph.tsx index 510f5785b7c..ee9f1a8679a 100644 --- a/apps/explorer/src/components/TransactionsCardGraph.tsx +++ b/apps/explorer/src/components/TransactionsCardGraph.tsx @@ -5,7 +5,8 @@ import { CoinFormat, formatAmount, formatBalance, formatDate } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { LabelTextSize, TooltipPosition } from '@iota/apps-ui-kit'; -import { GraphTooltip, StatisticsPanel } from './StatisticsPanel'; +import { StatisticsPanel } from './StatisticsPanel'; +import { GraphTooltipContent } from './GraphTooltipContent'; interface TooltipContentProps { data: { @@ -24,7 +25,11 @@ function TooltipContent({ const overline = `${dateFormatted}, Epoch ${epoch}`; return ( - + ); } diff --git a/apps/explorer/src/components/footer/Footer.tsx b/apps/explorer/src/components/footer/Footer.tsx index e5f17ca794f..d4f43153c63 100644 --- a/apps/explorer/src/components/footer/Footer.tsx +++ b/apps/explorer/src/components/footer/Footer.tsx @@ -4,9 +4,9 @@ import { Divider } from '@iota/apps-ui-kit'; import { LegalLinks, LegalText } from './Legal'; -import { IotaLogoWeb } from '@iota/ui-icons'; import { Link } from '~/components/ui'; import { FOOTER_LINKS } from '~/lib/constants'; +import { ThemedIotaLogo } from '../ThemedIotaLogo'; function FooterLinks(): JSX.Element { return ( @@ -14,7 +14,11 @@ function FooterLinks(): JSX.Element {
    {FOOTER_LINKS.map(({ title, href }) => (
  • - + {title}
  • @@ -26,11 +30,11 @@ function FooterLinks(): JSX.Element { function Footer(): JSX.Element { return ( -