Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxme/truffle-export-abi
Simple tool to extract ABI from truffle build/ directory
https://github.com/maxme/truffle-export-abi
Last synced: 4 days ago
JSON representation
Simple tool to extract ABI from truffle build/ directory
- Host: GitHub
- URL: https://github.com/maxme/truffle-export-abi
- Owner: maxme
- License: mit
- Created: 2018-10-04T07:31:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-04T09:22:49.000Z (about 6 years ago)
- Last Synced: 2024-10-31T22:42:13.321Z (11 days ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 18
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```shell
$ npm install -g truffle-export-abi
```# Usage
Run it from your truffle project directory:
```shell
$ truffle-export-abi
notice: ABI extracted and output file wrote to: build/ABI.json
```Run it from anywhere:
```shell
$ 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
```shell
# Setup the project
$ npm install
```I included a stripped example of a ERC721 token files, you can ru
```shell
$ node index.js -v -d example/ -o abi.json
```