To simplify installation, add the following to Cargo.toml
[dependencies]
solidity-ast-rs = { git = "https://github.com/Cyfrin/solidity-ast-rs", branch = "main", package = "solidity-ast" }
Extract ASTs and other Evm Info
use std::path::Path;
use solidity_ast_rs::{
DerivedAstEvmInfo, ProjectConfigInputBuilder, Result, derive_ast_and_evm_info,
};
pub fn ast_info(root: &str) -> Result<DerivedAstEvmInfo> {
let config = ProjectConfigInputBuilder::new(Path::new(root)).build()?;
derive_ast_and_evm_info(&config)
}
To be the fastest AST generator for Aderyn
This project exists thanks to all the people who contribute.