1.0.1 • Published 5 years ago
ast-functions v1.0.1
AST Functions
This is a simple collection of utilities intended to read in the properties found in an AST as generated by a Solidity compiler.
There are times when the definitions provided by the ABI are too limited, specifically that it doesn't contain the struct or enum definitions because they're not considered part of the interface.
Usage
Usage will typically be to import either loadAll
or specific functions.
const { loadAll } = require('ast-functions');
const astObject = loadAll(astFromWherever);
Output
This will create an object that contains an array of the input parameters (name and type), output parameters (name and type) and the stateMutability
. The latter includes whether it's public, payable, etc.