{"bin":{"ganache-cli":"./build/cli.node.js"},"bugs":{"url":"https://github.com/trufflesuite/ganache-cli/issues"},"dist":{"shasum":"d1efc42e8509d7bd9d145d5ee79b835219c8625a","tarball":"https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.1.0-beta.1.tgz","fileCount":26,"integrity":"sha512-UaR7XW66EyGF0O82Zt7AxFwvmM/f+zwqxSrSWz38qUD6+61nsfDDKaYLIp4HYTdmozUwFAY7K6I9OPYtRz0fbA==","signatures":[{"sig":"MEUCIGgXF3JhIufhxRXREiO4BFCw9YvAGipXvnm9DDwBCn/6AiEA1W/AQOBOXccPw4SctI0VwBUN441OlYKo1dU0u7nHrdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66991610},"main":"./build/lib.node.js","name":"ganache-cli","readme":"[![npm](https://img.shields.io/npm/v/ganache-cli.svg)]()\n[![npm](https://img.shields.io/npm/dm/ganache-cli.svg)]()\n[![Build Status](https://travis-ci.org/trufflesuite/ganache-cli.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-cli)\n\n<p align=\"center\">\n  <img src=\"https://github.com/ethereumjs/testrpc/blob/ganache-cli/resources/icons/ganache-cli-128x128.png?raw=true\">\n</p>\n\n## Welcome to Ganache CLI\nGanache CLI, part of the Truffle suite of Ethereum development tools, is the command line version of [Ganache](https://github.com/trufflesuite/ganache), your personal blockchain for Ethereum development.\n\nGanache CLI uses ethereumjs to simulate full client behavior and make developing Ethereum applications faster, easier, and safer. It also includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.\n\n### Looking for TestRPC?\n\nIf you came here expecting to find the TestRPC, you're in the right place! Truffle has taken the TestRPC under its wing and made it part of the Truffle suite of tools. From now on you can expect better support along with tons of new features that help make Ethereum development safer, easier, and more enjoyable.\n\n### Installation\n\n`ganache-cli` is written in Javascript and distributed as a Node package via `npm`. Make sure you have Node.js (>= v6.11.5) installed.\n\n```Bash\nnpm install -g ganache-cli\n```\n\nHaving problems? Be sure to check out the [FAQ](https://github.com/trufflesuite/ganache-cli/wiki/FAQ) and if you're still having issues and you're sure its a problem with `ganache-cli` please open an issue.\n\n### Using Ganache CLI\n\n#### Command Line\n\n```Bash\n$ ganache-cli <options>\n```\n\nOptions:\n\n* `-a` or `--accounts`: Specify the number of accounts to generate at startup.\n* `-e` or `--defaultBalanceEther`: Amount of ether to assign each test account. Default is 100.\n* `-b` or `--blocktime`: Specify blocktime in seconds for automatic mining. Default is 0 and no auto-mining.\n* `-d` or `--deterministic`: Generate deterministic addresses based on a pre-defined mnemonic.\n* `-n` or `--secure`: Lock available accounts by default (good for third party transaction signing)\n* `-m` or `--mnemonic`: Use a specific HD wallet mnemonic to generate initial addresses.\n* `-p` or `--port`: Port number to listen on. Defaults to 8545.\n* `-h` or `--hostname`: Hostname to listen on. Defaults to Node's `server.listen()` [default](https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback).\n* `-s` or `--seed`: Use arbitrary data to generate the HD wallet mnemonic to be used.\n* `-g` or `--gasPrice`: Use a custom Gas Price (defaults to 20000000000)\n* `-l` or `--gasLimit`: Use a custom Gas Limit (defaults to 90000)\n* `-f` or `--fork`: Fork from another currently running Ethereum client at a given block. Input should be the HTTP location and port of the other client, e.g. `http://localhost:8545`. You can optionally specify the block to fork from using an `@` sign: `http://localhost:8545@1599200`.\n* `-i` or `--networkId`: Specify the network id the ganache-cli will use to identify itself (defaults to the current time or the network id of the forked blockchain if configured)\n* `--db`: Specify a path to a directory to save the chain database. If a database already exists, ganache-cli will initialize that chain instead of creating a new one.\n* `--debug`: Output VM opcodes for debugging\n* `--mem`: Output ganache-cli memory usage statistics. This replaces normal output.\n* '--noVMErrorsOnRPCResponse': Do not transmit transaction failures as RPC errors. Enable this flag for error reporting behaviour which is compatible with other clients such as geth and Parity.\n\nSpecial Options:\n\n* `--account`: Specify `--account=...` (no 's') any number of times passing arbitrary private keys and their associated balances to generate initial addresses:\n\n  ```\n  $ ganache-cli --account=\"<privatekey>,balance\" [--account=\"<privatekey>,balance\"]\n  ```\n\n  Note that private keys are 64 characters long, and must be input as a 0x-prefixed hex string. Balance can either be input as an integer or 0x-prefixed hex value specifying the amount of wei in that account.\n\n  An HD wallet will not be created for you when using `--account`.\n\n* `-u` or `--unlock`: Specify `--unlock ...` any number of times passing either an address or an account index to unlock specific accounts. When used in conjunction with `--secure`, `--unlock` will override the locked state of specified accounts.\n\n  ```\n  $ ganache-cli --secure --unlock \"0x1234...\" --unlock \"0xabcd...\"\n  ```\n\n  You can also specify a number, unlocking accounts by their index:\n\n  ```\n  $ ganache-cli --secure -u 0 -u 1\n  ```\n\n  This feature can also be used to impersonate accounts and unlock addresses you wouldn't otherwise have access to. When used with the `--fork` feature, you can use ganache-cli to make transactions as any address on the blockchain, which is very useful for testing and dynamic analysis.\n\n#### Library\n\nAs a Web3 provider:\n\n```javascript\nvar ganache = require(\"ganache-cli\");\nweb3.setProvider(ganache.provider());\n```\n\nAs a general http server:\n\n```javascript\nvar ganache = require(\"ganache-cli\");\nvar server = ganache.server();\nserver.listen(port, function(err, blockchain) {...});\n```\n\nBoth `.provider()` and `.server()` take a single object which allows you to specify behavior of `ganache-cli`. This parameter is optional. Available options are:\n\n* `\"accounts\"`: `Array` of `Object`'s. Each object should have a balance key with a hexadecimal value. The key `secretKey` can also be specified, which represents the account's private key. If no `secretKey`, the address is auto-generated with the given balance. If specified, the key is used to determine the account's address.\n* `\"debug\"`: `boolean` - Output VM opcodes for debugging\n* `\"logger\"`: `Object` - Object, like `console`, that implements a `log()` function.\n* `\"mnemonic\"`: Use a specific HD wallet mnemonic to generate initial addresses.\n* `\"port\"`: Port number to listen on when running as a server.\n* `\"seed\"`: Use arbitrary data to generate the HD wallet mnemonic to be used.\n* `\"total_accounts\"`: `number` - Number of accounts to generate at startup.\n* `\"fork\"`: `string` - Same as `--fork` option above.\n* `\"network_id\"`: `integer` - Same as `--networkId` option above.\n* `\"time\"`: `Date` - Date that the first block should start. Use this feature, along with the `evm_increaseTime` method to test time-dependent code.\n* `\"locked\"`: `boolean` - whether or not accounts are locked by default.\n* `\"unlocked_accounts\"`: `Array` - array of addresses or address indexes specifying which accounts should be unlocked.\n* `\"db_path\"`: `String` - Specify a path to a directory to save the chain database. If a database already exists, `ganache-cli` will initialize that chain instead of creating a new one.\n* `\"account_keys_path\"`: `String` - Specifies a file to save accounts and private keys to, for testing.\n* `\"vmErrorsOnRPCResponse\"`: `boolean` - Whether or not to transmit transaction failures as RPC errors. Set to `false` for error reporting behaviour which is compatible with other clients such as geth and Parity.\n\n### Implemented Methods\n\nThe RPC methods currently implemented are:\n\n* `bzz_hive` (stub)\n* `bzz_info` (stub)\n* `debug_traceTransaction`\n* `eth_accounts`\n* `eth_blockNumber`\n* `eth_call`\n* `eth_coinbase`\n* `eth_estimateGas`\n* `eth_gasPrice`\n* `eth_getBalance`\n* `eth_getBlockByNumber`\n* `eth_getBlockByHash`\n* `eth_getBlockTransactionCountByHash`\n* `eth_getBlockTransactionCountByNumber`\n* `eth_getCode` (only supports block number “latest”)\n* `eth_getCompilers`\n* `eth_getFilterChanges`\n* `eth_getFilterLogs`\n* `eth_getLogs`\n* `eth_getStorageAt`\n* `eth_getTransactionByHash`\n* `eth_getTransactionByBlockHashAndIndex`\n* `eth_getTransactionByBlockNumberAndIndex`\n* `eth_getTransactionCount`\n* `eth_getTransactionReceipt`\n* `eth_hashrate`\n* `eth_mining`\n* `eth_newBlockFilter`\n* `eth_newFilter` (includes log/event filters)\n* `eth_protocolVersion`\n* `eth_sendTransaction`\n* `eth_sendRawTransaction`\n* `eth_sign`\n* `eth_syncing`\n* `eth_uninstallFilter`\n* `net_listening`\n* `net_peerCount`\n* `net_version`\n* `miner_start`\n* `miner_stop`\n* `personal_listAccounts`\n* `personal_lockAccount`\n* `personal_newAccount`\n* `personal_unlockAccount`\n* `personal_sendTransaction`\n* `shh_version`\n* `rpc_modules`\n* `web3_clientVersion`\n* `web3_sha3`\n\nThere’s also special non-standard methods that aren’t included within the original RPC specification:\n\n* `evm_snapshot` : Snapshot the state of the blockchain at the current block. Takes no parameters. Returns the integer id of the snapshot created.\n* `evm_revert` : Revert the state of the blockchain to a previous snapshot. Takes a single parameter, which is the snapshot id to revert to. If no snapshot id is passed it will revert to the latest snapshot. Returns `true`.\n* `evm_increaseTime` : Jump forward in time. Takes one parameter, which is the amount of time to increase in seconds. Returns the total time adjustment, in seconds.\n* `evm_mine` : Force a block to be mined. Takes no parameters. Mines a block independent of whether or not mining is started or stopped.\n\n### Unsupported Methods\n\n* `eth_compileSolidity`: If you'd like Solidity compilation in Javascript, please see the [solc-js project](https://github.com/ethereum/solc-js).\n\n### Docker\n\nThe Simplest way to get started with the Docker image:\n\n```Bash\ndocker run -d -p 8545:8545 trufflesuite/ganache-cli:latest\n```\n\nTo pass options to ganache-cli through Docker simply add the arguments to\nthe run command:\n\n```Bash\ndocker run -d -p 8545:8545 trufflesuite/ganache-cli:latest -a 10 --debug\n```\n\nTo build the Docker container from source:\n\n```Bash\ngit clone https://github.com/trufflesuite/ganache-cli.git && cd ganache-cli\ndocker build -t trufflesuite/ganache-cli .\n```\n\n\n### Contributing to Ganache CLI\n\nThis is a distribution package where the core code is bundled to support browsers and reduce installation issues on all platforms. You can contribute to the core code via [ganache-core](https://github.com/trufflesuite/ganache-core).\n\n","gitHead":"06153f7098a7991d1a051e24f351245fd28a5a4e","scripts":{"build":"npm run build-cli && npm run build-server && npm run build-provider && npm run build-lib","start":"./build/cli.node.js","build-cli":"webpack --config ./webpack/cli.webpack.config.js","build-lib":"webpack --config ./webpack/lib.webpack.config.js","prepublish":"npm run build","build-server":"webpack --config ./webpack/server.webpack.config.js","build-provider":"webpack --config ./webpack/provider.webpack.config.js"},"_npmUser":{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},"homepage":"https://github.com/trufflesuite/ganache-cli#readme","deprecated":"Please update ganache-cli to @latest.","repository":{"url":"git+https://github.com/trufflesuite/ganache-cli.git","type":"git"},"_npmVersion":"5.5.1","description":"[![npm](https://img.shields.io/npm/v/ganache-cli.svg)]() [![npm](https://img.shields.io/npm/dm/ganache-cli.svg)]() [![Build Status](https://travis-ci.org/trufflesuite/ganache-cli.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-cli)","directories":{"lib":"./lib"},"maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"}],"_nodeVersion":"9.3.0","dependencies":{"webpack":"^3.10.0","source-map-support":"^0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"yargs":"^7.0.2","electron":"^1.7.10","ganache-core":"2.1.0-beta.1","prepend-file":"^1.3.1"},"_npmOperationalInternal":{"tmp":"tmp/ganache-cli_6.1.0-beta.1_1518581601911_0.25077773545883253","host":"s3://npm-registry-packages"},"_id":"ganache-cli@6.1.0-beta.1","version":"6.1.0-beta.1"}