truffle-abi

1.0.3 • Public • Published

truffle-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-abi

Usage

Run it from your truffle project directory:

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

Run it from anywhere:

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

Options:

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

Build, run, example

# Setup the project 
$ npm install

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

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

Package Sidebar

Install

npm i truffle-abi

Weekly Downloads

36

Version

1.0.3

License

MIT

Unpacked Size

20.7 kB

Total Files

6

Last publish

Collaborators

  • bruce.meerkat