Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/Basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.87.0
toolchain: 1.88.0
target: wasm32-unknown-unknown
override: true

- name: Run all Rust tests
uses: actions-rs/cargo@v1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify all outdated actions-rs usages in workflows
rg -n --iglob '*.yml' --iglob '*.yaml' 'uses:\s*actions-rs/cargo@v1|uses:\s*actions-rs/toolchain@v1' .github/workflows

# Re-run actionlint after migration (if available in your CI/dev env)
# actionlint

Repository: InjectiveLabs/cw-injective

Length of output: 606


🏁 Script executed:

cat -n .github/workflows/Basic.yml | head -100

Repository: InjectiveLabs/cw-injective

Length of output: 3805


🌐 Web query:

actions-rs/cargo deprecated GitHub Actions

💡 Result:

Yes, the GitHub Action actions-rs/cargo is deprecated and unmaintained. The repository https://github.com/actions-rs/cargo was archived on October 13, 2023, and is now read-only. It used Node.js 12, which is deprecated, causing warnings and potential failures in workflows. The recommended replacement is to run cargo commands directly using the 'run:' step after setting up the Rust toolchain. GitHub-hosted runners have Rust preinstalled, and the official GitHub Rust workflow template uses: - actions/checkout@v4 - dtolnay/rust-toolchain@stable (or similar for toolchain setup) - actions/cache@v4 for Cargo registry, git, and target directories - Then 'run: cargo check', 'run: cargo test', etc. This approach is simpler, faster, and maintained. For toolchain management, use dtolnay/rust-toolchain or actions-rust-lang/setup-rust-toolchain. Many projects have migrated by removing actions-rs/cargo and using direct cargo runs, as GitHub runners include cargo by default.

Citations:


🌐 Web query:

actions-rs/toolchain deprecated GitHub Actions

💡 Result:

actions-rs/toolchain is effectively deprecated/unmaintained: it’s referenced by projects as “unmaintained” and people have moved away from it; additionally the broader actions-rs organization repositories were archived (read-only) starting Oct 13, 2023. What to do instead (recommended). 1) Prefer using rustup directly (often no action is needed on GitHub-hosted runners). Pin your toolchain in rust-toolchain.toml (or rust-toolchain) and run cargo commands; rustup supports toolchain overrides via rust-toolchain.toml. 2) If you want a dedicated GitHub Action to install the toolchain, use actions-rust-lang/setup-rust-toolchain or dtolnay/rust-toolchain. Both are designed to install a Rust toolchain via rustup; dtolnay/rust-toolchain documents a concise “uses: dtolnay/rust-toolchain@” pattern. Practical examples. - Use rust-toolchain.toml in your repo (then just run cargo in CI; rustup will pick the pinned toolchain as overrides). - Or in workflow: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: dtolnay/rust-toolchain@stable Notes. - The actions-rs/toolchain project also had issues unrelated to maintenance status (e.g., it surfaced GitHub Actions deprecation warnings like set-output / Node 12), and users report switching away from it to other actions.

Citations:


Replace all deprecated actions-rs actions (CI blocker).

Both actions-rs/cargo@v1 and actions-rs/toolchain@v1 are archived and unmaintained since October 2023. They use deprecated Node.js 12 and will cause CI failures. Migrate to standard Rust tooling:

  • Toolchain setup (lines 18, 42, 57, 81): Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable (or pin specific version).
  • Cargo commands (lines 26, 64, 89, 96): Replace actions-rs/cargo@v1 with plain run: cargo <command> steps after toolchain installation.
Migration example
-      - name: Install stable toolchain
-        uses: actions-rs/toolchain@v1
-        with:
-          profile: minimal
-          toolchain: 1.88.0
-          target: wasm32-unknown-unknown
-          override: true
+      - name: Install stable toolchain
+        uses: dtolnay/rust-toolchain@1.88.0
+        with:
+          targets: wasm32-unknown-unknown

-      - name: Run all Rust tests
-        uses: actions-rs/cargo@v1
-        with:
-          command: test
-          toolchain: 1.88.0
-          args: --workspace --all-targets --locked
+      - name: Run all Rust tests
+        run: cargo test --workspace --all-targets --locked
         env:
           RUST_BACKTRACE: 1

Apply to all 8 affected steps: toolchain install steps (18, 42, 57, 81) and cargo command steps (26, 64, 89, 96).

🧰 Tools
🪛 actionlint (1.7.12)

[error] 26-26: the runner of "actions-rs/cargo@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/Basic.yml at line 26, Replace all uses of the archived
actions-rs actions: for each step that uses actions-rs/toolchain@v1 (toolchain
setup steps) swap it to dtolnay/rust-toolchain@stable (or pin a specific
toolchain), and for each step that uses actions-rs/cargo@v1 (cargo command
steps) remove the action and convert the step to a plain run step that invokes
the appropriate cargo command (e.g., run: cargo build/test/check/..."matching
the original intent") after the toolchain install; update all 8 affected steps
so toolchain installation uses dtolnay/rust-toolchain@stable and cargo
invocations are plain run: cargo ... steps.

with:
command: test
toolchain: 1.87.0
toolchain: 1.88.0
args: --workspace --all-targets --locked
env:
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -57,14 +57,14 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.87.0
toolchain: 1.88.0
target: wasm32-unknown-unknown
override: true
- name: Run all integration tests
uses: actions-rs/cargo@v1
with:
command: test
toolchain: 1.87.0
toolchain: 1.88.0
args: --workspace --all-targets --locked --features=integration
env:
RUST_BACKTRACE: 1
Expand All @@ -81,20 +81,20 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.87.0
toolchain: 1.88.0
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
toolchain: 1.87.0
toolchain: 1.88.0
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
toolchain: 1.87.0
toolchain: 1.88.0
args: -- -D warnings
112 changes: 74 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ anyhow = { version = "1.0.66" }
base64 = { version = "0.21.5" }
cosmos-sdk-proto = { version = "0.20.0", default-features = false }
cosmwasm-schema = { version = "1.5.0" }
cosmwasm-std = { version = "3.0.2", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
cosmwasm-std = { version = "3.0.5", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
Comment on lines 13 to +14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Find the Cargo.toml file and examine the workspace dependencies
find . -name "Cargo.toml" -type f | head -20

Repository: InjectiveLabs/cw-injective

Length of output: 380


🏁 Script executed:

# Check the root Cargo.toml to see the workspace and dependency declarations
cat -n Cargo.toml | head -30

Repository: InjectiveLabs/cw-injective

Length of output: 1669


🌐 Web query:

cosmwasm-std 3.0.5 Cargo.toml dev-dependencies cosmwasm-schema

💡 Result:

In the Cargo.toml for cosmwasm-std version 3.0.5, the [dev-dependencies] section includes cosmwasm-schema = { workspace = true }, along with cosmwasm-core = { workspace = true }, chrono = { version = "0.4", default-features = false, features = ["alloc", "std"] }, crc32fast = "1.3.2", hex-literal = "0.4.1", paste = "1.0.15", and proptest = { version = "1.5.0", default-features = false, features = ["attr-macro", "std"] }. This is confirmed directly from the original Cargo.toml source on docs.rs for version 3.0.5, which shows cosmwasm-schema referenced via workspace inheritance in the dev-dependencies.

Citations:


🌐 Web query:

cosmwasm-schema latest release version 2024 2025

💡 Result:

The latest release version of cosmwasm-schema is 3.0.4, released on 2026-02-10.

Citations:


Bump cosmwasm-schema to match current releases.

contracts/* inherit cosmwasm-schema from the workspace, but it is pinned to 1.5.0 while cosmwasm-std is at 3.0.5. The current stable release of cosmwasm-schema is 3.0.4, and schema generation tooling should align with the runtime library version to avoid compatibility issues.

🔧 Proposed fix
-cosmwasm-schema     = { version = "1.5.0" }
+cosmwasm-schema     = { version = "3.0.4" }
 cosmwasm-std        = { version = "3.0.5", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cosmwasm-schema = { version = "1.5.0" }
cosmwasm-std = { version = "3.0.2", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
cosmwasm-std = { version = "3.0.5", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
cosmwasm-schema = { version = "3.0.4" }
cosmwasm-std = { version = "3.0.5", features = [ "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Cargo.toml` around lines 13 - 14, The workspace Cargo.toml pins
cosmwasm-schema to 1.5.0 which is incompatible with cosmwasm-std 3.0.5; update
the cosmwasm-schema dependency entry in Cargo.toml to the current stable release
(3.0.4) so schema tooling aligns with the runtime library (change the
cosmwasm-schema = { version = "1.5.0" } line to use version "3.0.4"); ensure any
workspace inheritance for contracts/* continues to reference this updated
cosmwasm-schema version.

cw-multi-test = { version = "3.0.0" }
cw-storage-plus = { version = "3.0.1" }
cw2 = { version = "3.0.0" }
ethereum-types = { version = "0.5.2" }
hex = { version = "0.4.3", features = [ "serde" ] }
injective-cosmwasm = { version = "0.3.5-1" }
injective-math = { version = "0.3.5-1" }
injective-std = { version = "1.18.0" }
injective-test-tube = { version = "1.18.0" }
injective-testing = { path = "./packages/injective-testing" }
injective-cosmwasm = { version = "0.3.6" }
injective-math = { version = "0.3.6" }
injective-std = { version = "1.19.0" }
injective-test-tube = { version = "1.19.0" }
injective-testing = { version = "1.19.0", path = "./packages/injective-testing" }
primitive-types = { version = "0.12.2", default-features = false }
prost = { version = "0.13.5", features = [ "prost-derive" ] }
rand = { version = "0.4.6" }
Expand All @@ -47,9 +47,3 @@ opt-level = 3
overflow-checks = true
panic = 'abort'
rpath = false

[patch.crates-io]
# injective-cosmwasm = { path = "./packages/injective-cosmwasm" }
# injective-math = { path = "./packages/injective-math" }
# injective-protobuf = { path = "./packages/injective-protobuf" }
# injective-testing = { path = "./packages/injective-testing" }
Loading
Loading