Skip to content

chore: bump near crates to 0.35.0#580

Merged
r-near merged 8 commits into
mainfrom
bump-near-crates-0.35
Apr 8, 2026
Merged

chore: bump near crates to 0.35.0#580
r-near merged 8 commits into
mainfrom
bump-near-crates-0.35

Conversation

@r-near

@r-near r-near commented Mar 31, 2026

Copy link
Copy Markdown
Contributor
  • Bump near-crypto, near-primitives, near-jsonrpc-primitives from 0.34 to 0.35 for the 2.11.0 mainnet release
  • Use published crates.io versions: near-jsonrpc-client 0.21, near-socialdb-client 0.15
  • Handle all new PGas types introduced in near-primitives 0.35:
    • AccessKeyPermissionView::GasKeyFunctionCall / GasKeyFullAccess — display gas key info in account summaries and key listings
    • Action::TransferToGasKey / WithdrawFromGasKey — display in transaction previews
    • ActionView::TransferToGasKey / WithdrawFromGasKey — display in successful transaction output
    • New error variants for ActionErrorKind, InvalidTxError, ActionsValidationError — user-friendly error messages
    • TransactionNonce enum replacing raw u64 nonce — extract inner nonce for delegate actions and display formatting

r-near added 3 commits March 31, 2026 12:51
…TTP calls

Tests were failing because prepare_tests() used unsafe set_var() to set
HOME/XDG_CONFIG_HOME across parallel test threads (undefined behavior).
Combined with blocking HTTP calls to nearblocks API added at startup in

- Pass env vars explicitly to subprocess Command instead of set_var
- Pre-create ft_contracts.json in test setup to skip startup HTTP calls
- Simplify is_used_ft_contract_account_list_exist to just check file existence
- Write valid empty JSON ("[]") instead of empty file on API failure
…t config

- Remove else branch that wrote empty [] on fetch failure, so the CLI
  retries on the next run instead of caching an empty list permanently
- Place test config at the correct platform-specific path for macOS
- Bump near-crypto, near-primitives, near-jsonrpc-primitives to 0.35.0-rc.5
- Use git dep for near-jsonrpc-client (pending near/near-jsonrpc-client-rs#186)
- Use path dep for near-socialdb-client (pending crate bump)
- Add match arms for new PGas enum variants:
  - AccessKeyPermissionView::GasKeyFunctionCall/GasKeyFullAccess
  - Action::TransferToGasKey/WithdrawFromGasKey
  - ActionView::TransferToGasKey/WithdrawFromGasKey
  - ActionErrorKind gas key error variants
  - InvalidTxError gas key error variants
  - ActionsValidationError gas key validation variants
- Handle TransactionNonce type (replacing raw u64 nonce)
Points to r-near/near-socialdb-client-rs#bump-near-crates-0.35
pending near/near-socialdb-client-rs#39.
r-near added a commit to near/cargo-near that referenced this pull request Mar 31, 2026
- Bump near-primitives from 0.34 to 0.35.0-rc.5
- Use git dep for near-cli-rs pending near/near-cli-rs#580
- Adapt random_account_id to accept GlobalContext (near-cli-rs API change)
@r-near r-near changed the title chore: bump near crates to 0.35.0-rc.5 chore: bump near crates to 0.35.0 Apr 1, 2026
@vsavchyn-dev vsavchyn-dev marked this pull request as ready for review April 6, 2026 14:48
@vsavchyn-dev vsavchyn-dev requested a review from a team as a code owner April 6, 2026 14:48
Comment thread src/transaction_signature_options/sign_with_ledger/mod.rs
vsavchyn-dev
vsavchyn-dev previously approved these changes Apr 6, 2026
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
@vsavchyn-dev vsavchyn-dev dismissed their stale review April 6, 2026 15:16

Cargo.toml needs pointing to the release of jsonrpc

Co-authored-by: Vladyslav Savchyn <[email protected]>
Copilot AI review requested due to automatic review settings April 7, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Bumps NEAR-related Rust crates to 0.35.0 (and related deps) and updates the CLI to handle new “gas key” transaction/action/permission types introduced in near-primitives 0.35, including updated transaction nonce handling.

Changes:

  • Update nonce handling to support TransactionNonce (extract inner nonce for legacy u64 fields, especially delegate actions).
  • Add CLI rendering for new gas key actions/permissions and map new error variants to user-friendly messages.
  • Bump NEAR crate versions and introduce temporary git dependencies for unreleased upstream changes.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/types/transaction.rs Extract inner nonce when converting to legacy TransactionV0.
src/transaction_signature_options/sign_with_legacy_keychain/mod.rs Refactor access-key filtering logic for keychain selection.
src/transaction_signature_options/sign_with_ledger/mod.rs Extract inner nonce for delegate-action signing paths (USB/BLE).
src/transaction_signature_options/mod.rs Extract inner nonce when creating DelegateAction.
src/common.rs Add gas-key action output, gas-key permission display, and new error mappings; adjust nonce formatting.
src/commands/transaction/reconstruct_transaction/mod.rs Explicitly reject gas-key actions/permissions during reconstruction (not yet supported).
src/commands/account/get_public_key/from_legacy_keychain/mod.rs Refactor access-key filtering logic for keychain selection.
src/commands/account/export_account/mod.rs Exclude gas-key permissions from exportable key selection.
src/commands/account/delete_key/public_keys_to_delete.rs Add display formatting for gas-key permissions in delete-key selection UI.
Cargo.toml Bump NEAR crates to 0.35 and switch near-socialdb-client to a temporary git dependency.
Cargo.lock Lockfile updates reflecting dependency bumps and git-sourced crates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml
Comment thread src/common.rs Outdated
@r-near r-near enabled auto-merge (squash) April 7, 2026 18:12
@r-near r-near merged commit f45388b into main Apr 8, 2026
13 checks passed
@r-near r-near deleted the bump-near-crates-0.35 branch April 8, 2026 16:00
@github-project-automation github-project-automation Bot moved this from NEW❗ to Shipped 🚀 in DevTools Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped 🚀

Development

Successfully merging this pull request may close these issues.

4 participants