Skip to content

Aptos Rust SDK specs#14

Merged
gregnazario merged 5 commits intomainfrom
cursor/aptos-rust-sdk-specs-319b
Feb 5, 2026
Merged

Aptos Rust SDK specs#14
gregnazario merged 5 commits intomainfrom
cursor/aptos-rust-sdk-specs-319b

Conversation

@gregnazario
Copy link
Copy Markdown
Collaborator

Migrate Rust behavioral specs to use the new aptos-rust-sdk from GitHub.

This change replaces the deprecated local path dependency (aptos-rust-sdk-v2) with the official aptos-labs/aptos-rust-sdk repository, ensuring tests run against the latest SDK. This involved updating Cargo.toml to a git dependency, performing a global find-and-replace of aptos_rust_sdk_v2 with aptos_sdk across all Rust source files, and making minor API compatibility adjustments (e.g., FaucetClient::new signature, TypeTag enum variants). All relevant documentation and project references have also been updated.


Open in Cursor Open in Web

cursoragent and others added 3 commits February 5, 2026 20:14
- Update Cargo.toml to use aptos-sdk from GitHub (not yet on crates.io)
- Replace all aptos_rust_sdk_v2 imports with aptos_sdk
- Add sha3 dependency for hashing support
- Update README, SDK_STATUS.md, Makefile, and project docs
- Update CLAUDE.md, AGENTS.md, FEATURE_COVERAGE.md references
- Remove stale Cargo.lock for regeneration

Co-authored-by: Greg Nazario <greg@gnazar.io>
- FaucetClient::new now takes &AptosConfig instead of AptosConfig
- TypeTag enum now includes signed integer variants (I8-I256)

Co-authored-by: Greg Nazario <greg@gnazar.io>
Co-authored-by: Greg Nazario <greg@gnazar.io>
@cursor
Copy link
Copy Markdown

cursor bot commented Feb 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@gregnazario gregnazario marked this pull request as ready for review February 5, 2026 20:19
Prettier (docs/features):
- Format FEATURE_COVERAGE.md, tests/rust/README.md, tests/rust/SDK_STATUS.md

Rust (cargo fmt + clippy):
- Run cargo fmt on all Rust source files
- Remove unused imports (Account, Signer, Verifier, etc.) across step definitions
- Remove unused trait imports that shadowed inherent methods
- Apply clippy auto-fixes where possible

Python (black + flake8):
- Run black formatter on all 53 Python step/support files (28 reformatted)
- Remove unused imports with autoflake (F401)
- Fix f-string without placeholders (F541)
- Fix redefined function name step_tx_hashes_different (F811)

Go:
- Run go fmt on all Go source files
- Passes go vet cleanly

Co-authored-by: Greg Nazario <greg@gnazar.io>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates Rust behavioral specification tests from the deprecated local path dependency aptos-rust-sdk-v2 to the official aptos-sdk from the GitHub repository. The migration includes updating all import statements, adapting to minor API changes in the new SDK, and improving code formatting.

Changes:

  • Replaced local path dependency with Git dependency from https://github.com/aptos-labs/aptos-rust-sdk
  • Global rename of aptos_rust_sdk_v2 to aptos_sdk across all Rust source files
  • Updated FaucetClient::new to accept a reference parameter instead of owned value
  • Added missing TypeTag enum variants (I8, I16, I32, I64, I128, I256) for integer type support
  • Applied rustfmt formatting improvements throughout Rust test files
  • Cleaned up unused imports in Python test files
  • Updated documentation (README, SDK_STATUS, FEATURE_COVERAGE) to reflect the new dependency

Reviewed changes

Copilot reviewed 82 out of 83 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/rust/Cargo.toml Changed from local path to Git dependency with full features
tests/rust/src/**/*.rs Renamed imports from aptos_rust_sdk_v2 to aptos_sdk
tests/rust/src/steps/client_steps.rs Updated FaucetClient::new to use reference parameter
tests/rust/src/steps/type_tags_steps.rs Added I8-I256 TypeTag variant handling
tests/rust/SDK_STATUS.md Updated package name, version, and feature documentation
tests/python/steps/**/*.py Removed unused imports (cleanup)
Various .md files Updated references to new SDK name

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

Comment on lines 15 to 16
pass

Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Unnecessary 'pass' statement.

Suggested change
pass

Copilot uses AI. Check for mistakes.
Comment on lines 25 to 26
pass

Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Unnecessary 'pass' statement.

Suggested change
pass

Copilot uses AI. Check for mistakes.
@given("a devnet client")
def step_devnet_client(context):
from aptos_sdk.async_client import RestClient
pass
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Unnecessary 'pass' statement.

Copilot uses AI. Check for mistakes.
Comment on lines 28 to 32
pass

context.world.test_vectors["fee_payer_address"] = "A"


Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Unnecessary 'pass' statement.

Suggested change
pass
context.world.test_vectors["fee_payer_address"] = "A"
context.world.test_vectors["fee_payer_address"] = "A"

Copilot uses AI. Check for mistakes.
Comment on lines 216 to 217
pass

Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

Unnecessary 'pass' statement.

Suggested change
pass

Copilot uses AI. Check for mistakes.
Address PR review comments: remove pass statements that were left
behind by autoflake when it stripped unused imports from try blocks
and function bodies that had real code following the pass.

Co-authored-by: Greg Nazario <greg@gnazar.io>
@gregnazario gregnazario merged commit 724d6a1 into main Feb 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants