consolechain
v0.1.8
Published
consolechain CLI
Downloads
24
Maintainers
Readme
ConsoleChain
ConsoleChain is a command-line interface (CLI) tool designed for seamless interaction with smart contracts on various blockchain networks.
Installation
Install ConsoleChain globally using npm:
npm install -g consolechain
How to Use
To utilize ConsoleChain, simply invoke the CLI by providing the contract address, the chain name, and the path to the contract's ABI file.
consolechain 0xB5AD8162a7E6DFBc1d12aF9A494779376B44ed1b --chain syscoin --abi /abi-path/abi.json
For ERC-721, ERC-1155, and ERC-20 type contracts, use the --standard
argument with values 721
, 1155
, or 20
. This loads a generic ABI with predefined methods for the selected standard.
consolechain 0xB5AD8162a7E6DFBc1d12aF9A494779376B44ed1b --chain syscoin --standard 721
To execute methods requiring a connected address, add a private key to the CLI. The key is stored in a file named consolechain.json
within the .config/
folder in your operating system's home directory.
consolechain set-pk your-private-key
The CLI features autocompletion; press the tab key to complete a function name or tab twice to view all contract ABI methods. To discover the parameters for function calls, type the function name with the -h
argument.
Finally, to execute a function, type the function name followed by the arguments separated by space.
License
This project is licensed under the MIT License - see the LICENSE file for details.