Expand description
Tree-sitter extraction of state variables and inheritance specifiers, mirroring
cg::extract_repo_contracts_functions but yielding storage-shaped records rather than
callgraph-shaped ones. The output is project-local: contract ids match
crate::cg::ExtractedContract::id and inheritance is resolved by name within the same
project. Names that don’t resolve (3rd-party imports, etc.) are dropped silently.
Structs§
- Extracted
Inheritance - One direct
is-spec edge captured per contract.parent_nameis the textual reference;parent_contract_idisNoneif it doesn’t resolve to any project-local contract. - Extracted
State Variable - One state variable declared inside a tree-sitter-extracted contract.
- Storage
Extraction Result - Bundled output of the tree-sitter storage extractor.
Functions§
- extract_
state_ variables_ and_ inheritance - Walk the same .sol files used by the call-graph extractor and pull out state variables and
inheritance specifiers. The caller is expected to have already parsed/extracted contracts
via
crate::cg::extract_repo_contracts_functions; we reuse the (id, name) mapping so the project-local ids stay consistent across the two passes.