The SolidityPreprocessor generates a JSON
summary of a Solidity contract that is used by Vanguard.
The SolidityPreprocessor has the following requirements:
- Typescript (Version 4.6.3)
- Node.js (Version 17.8.0)
- solc-typed-ast (install with command:
npm install --save solc-typed-ast
notnpm install -g solc-typed-ast
)
Run tsc
from src/
directory.
To generate a summary, run the following command:
node preprocess.js <PATH_TO_SOL_CONTRACT>
where preprocess.js
is a javascript file generated by the call to tsc
, which will be in the src/
directory and <PATH_TO_CONTRACT>
is the path to the contract for which you would like a summary. This will print the JSON
summary to STDOUT
, which you can easily redirect to a file using this command:
node preprocess.js <PATH_TO_SOL_CONTRACT> > <SUMMARY_PATH>