@laborx/command-ganache-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

Ganache plugin for Command

Provides an extension of Ganache for Command.

Install

yarn add -D @laborx/command-ganache-plugin

Usage

  1. Create testrpc.json (or with other config filename) and specify ganache configuration, for example:
{
  "network_id": 666,
  "host": "127.0.0.1",
  "port": 8546,
  "db_path": "./data/blockchain",
  "gasPrice": 1,
  "gasLimit": 8000000,
  "account_keys_path": "./test-accounts.json",
  "mnemonic": "brave dry ride escape panther wave wife coin input come cash survey"
}

Other options from ganache-cli specification could be added as-is.

CLI

Run from command line with the following syntax

npx -p @laborx/command-ganache-plugin ganache-runner ganache --config=./testrpc.json

or in package.json

{
  "scripts": {
    "ganache-runner": "ganache-runner",
    "ganache": "yarn ganache-runner ganache --config=./testrpc.json"
  }
}

From code

import { runGanache } from "@laborx/command-ganache-plugin";

const server = runGanache({ config: "./testrpc.json" })

Readme

Keywords

none

Package Sidebar

Install

npm i @laborx/command-ganache-plugin

Weekly Downloads

2

Version

0.1.10

License

AGPL-3.0

Unpacked Size

44.4 kB

Total Files

12

Last publish

Collaborators

  • alesanro
  • aliaksei.hiatsevich
  • be1box
  • mike.chronobank
  • ozalexo