Skip to content

briansoule/truffle-export-abi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

truffle-export-abi

Simple tool to extract ABI from truffle build/ directory to a single file. This is a trivial tool but it can be handy when you're debugging your contract.

Install

$ npm install -g truffle-export-abi

Usage

Run it from your truffle project directory:

$ truffle-export-abi
notice: ABI extracted and output file wrote to: build/ABI.json

Run it from anywhere:

$ truffle-export-abi -d /home/user/myproject/build/contracts/ -o /home/user/myproject/build/abi.json -v
notice: ABI extracted and output file wrote to: /home/user/myproject/build/abi.json

Options:

  • -d / --directory: location of the build files, [build/contracts] by default
  • -o / --output: output file, [build/ABI.json] by default
  • -v / --verbose

Build, run, example

# Setup the project
$ npm install

I included a stripped example of a ERC721 token files, you can ru

$ node index.js -v -d example/ -o abi.json

About

Simple tool to extract ABI from truffle build/ directory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%