Add hearty bash commands to contracts what be stowed in ye's truffle project:
truffle-contract USDC.balanceOf \ --at 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \ --address 0xdfcb116732ebc9ae2c8939b053363bcf48a37a99 \ --network mainnet
CLI Standalone
npm install -g truffle-yargs
truffle-contract --dir path-to-your/truffle-project
Install
npm install --save truffle-yargs
Quick Usage
Roll your own CLI within your own truffle project.
For example, create a cli.js
with your truffle project:
#!/usr/bin/env node const path = ;const yargs = ;const truffleYargs = yargs; // by default, this will scan truffle default contracts location argv;
Programmatic Usage
Run the methods as commands with the same validation and parsing:
const yargs = ;const truffleYargs = yargs; try ;
Options
provider (optional)
Manually configure a Web3 provider instead of detecting from truffle config
const customProvider = 'http://localhost:8545';;
contracts (optional)
String glob pattern of contracts
;
Array of contracts
;
Object hash map of contracts
;
TODO
- Detect deployed address from JSON using truffle config network ID
- Document overrides of commands and options
Credits
- Hook by Alena Artemova from the Noun Project
- Eye Patch by Javier Sánchez from the Noun Project
- Bone by TS Graphics from the Noun Project
- Pirate Hat by Nakesha Upshaw from the Noun Project