Skip to content

smallbatch-apps/ast-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Split apart an AST to extract contents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published