Skip to content

feat: Implement AST parser for Soroban#148

Merged
Gbangbolaoluwagbemiga merged 1 commit intoHyperSafeD:mainfrom
KingFRANKHOOD:feat/soroban-storage-ast-parser
Feb 26, 2026
Merged

feat: Implement AST parser for Soroban#148
Gbangbolaoluwagbemiga merged 1 commit intoHyperSafeD:mainfrom
KingFRANKHOOD:feat/soroban-storage-ast-parser

Conversation

@KingFRANKHOOD
Copy link
Copy Markdown
Contributor

Parse Soroban storage types for collision analysis Closes #94

Description

This PR upgrades the static analyzer to understand Soroban storage scopes (instance, persistent, temporary) when detecting storage key collisions.
Before this change, identical keys could be flagged even when used across different storage scopes. Now collisions are reported only when key reuse happens within the same scope.

What changed

  • Implemented AST parsing for Soroban storage type chains in storage operations.
  • Added storage scope classification: Instance, Persistent, Temporary, and fallback Unknown.
  • Changed collision grouping from key-only to (storage_type, key_value).
  • Improved collision messages to include storage scope context.
  • Added regression tests for:
    • collision detection within the same storage scope,
    • no collision for cross-scope key reuse.

Additional fixes included to satisfy CI

  • Resolved Cargo.lock merge-conflict markers.
  • Fixed strict Clippy -D warnings issues across rule modules (default impls, unused import/variable, simplification).
  • Fixed CLI size warning severity comparison to use SizeWarningLevel enum.
  • Applied rustfmt formatting updates required by workspace checks.

Checklist

  • Implement AST parser for Soroban storage types
  • Integrate parser into storage collision analysis
  • Add regression tests
  • Run CI-equivalent checks locally

@KingFRANKHOOD
Copy link
Copy Markdown
Contributor Author

@Gbangbolaoluwagbemiga Please, review PR

@Gbangbolaoluwagbemiga Gbangbolaoluwagbemiga merged commit 09c1364 into HyperSafeD:main Feb 26, 2026
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.

feat: Implement AST parser for Soroban storage types

2 participants