@mycrypto/ganache-toolbox
v0.1.2
Published
A simple CLI to interact with MyCrypto Ganache
Downloads
1
Readme
Ganache Toolbox
Ganache Toolbox is a simple CLI to fund a Ganache test account with relevant tokens to execute tests on MyCrypto.
Installation
With npm
npm install -g @mycrypto/ganache-toolbox
Alternatively you can use npx
to use the CLI without installing it
npx @mycrypto/ganache-toolbox [...]
Usage
Basic usage
# To fund your account with 100 of each tokens the CLI support
@mycrypto/ganache-toolbox --address [ your_address ] --instance [ instance_url ]
Advanced usage
# To fund your account with one of the supported tokens
@mycrypto/ganache-toolbox -address [ your_address ] --instance [ instance_url ] --token [ DAI | REP | LEND | GNT ]
# Specify the amount of tokens you want to be funded.
@mycrypto/ganache-toolbox -address [ your_address ] --instance [ instance_url ] --amount [0...10000]
Skipping prompt
ganache-toolbox could ask you, if not used correctly, to correct your passed arguments. In order to use it inside a container pass the --yes
or -y
flag to avoid being prompted with questions.
# To disable prompting
@mycrypto/ganache-toolbox --yes -address [ your_address ] --instance [ instance_url ]
Available flags
--yes
/-y
: Disable prompt--instance
/-i
: URL of your ganache node--address
/-a
: The Ethereum address where the CLI will send the token(s)--token
/-t
: The available token you want to be found (Actually available:DAI, REP, LEND ,GNT
)--amount
/-m
: The amount of tokens you want
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Spin up the project
git clone https://github.com/MyCryptoHQ/ganache-toolbox.git
cd ganache-toolbox
yarn
yarn start
Build the project
yarn build
built application can be found in the dist
folder
Run tests
yarn test