solidity-parser-sc is an unmaintained JavaScript parser for Solidity, built using PEG.js. Last published in June 2018 with version 0.4.12, it is based on an older version of the `consensys/solidity-parser` with specific grammar rules, notably adding support for Gnosis-style interpolation (e.g., `{{Variable}}`) to defer address assignments. Due to its age and lack of maintenance (last update over 8 years ago), it does not support modern Solidity syntax or language features, and its parsing behavior may not conform to the current official Solidity specification. There is no active release cadence, and it is considered abandoned. For any current or new projects requiring robust and up-to-date Solidity parsing, developers are strongly advised to use `@solidity-parser/parser` (latest version 0.20.2), which is an actively maintained ANTLR4-based parser that provides comprehensive support for the evolving Solidity language.
npm install solidity-parser-scVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse a simple Solidity contract using `solidity-parser-sc` and extract a contract definition from the resulting Abstract Syntax Tree (AST).
Migrate to an actively maintained Solidity parser such as `@solidity-parser/parser`. Install it via `npm install @solidity-parser/parser` and update your import statements and parsing logic accordingly.
Evaluate if the Gnosis interpolation is still critical. If so, consider a pre-parsing step to resolve these interpolations before feeding the code to a standard Solidity parser. If not, remove the non-standard syntax from your contracts.
Transition to a parser based on a modern grammar parsing framework like ANTLR4 to ensure compatibility and ongoing support with Solidity language evolution. `@solidity-parser/parser` is the recommended successor.
Ensure the Solidity code adheres to a very old Solidity standard (e.g., 0.4.x). For modern Solidity, this parser is inadequate; switch to `@solidity-parser/parser`.
Verify the import statement is `const parser = require('solidity-parser-sc');` and that `parser.parse()` is being called. If the error persists, the installation might be corrupted or the package structure differs from common patterns.No dependency data recorded yet.