{"bin":{"ganache":"dist/node/cli.js","ganache-cli":"dist/node/cli.js"},"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"fa88a6e873b33c2e351ab9abc2e363201479608b","tarball":"https://registry.npmjs.org/ganache/-/ganache-7.0.0-alpha.2.tgz","fileCount":41,"integrity":"sha512-LWm0RNPBB5gy6Xem1/UoH9OAY6uWCcBVL1SjWVbG3X7ZcgzQvo+MecXkLqlYQUz8M0tkPS9Er4pKAPfywHg97A==","signatures":[{"sig":"MEQCIAZs9gwNSTPqIRTd+26cScc7cuL8jH2/L7pQUTMfGsRbAiA0TWV6h2tCkZmVmhk7r2xqiO1J7K939A8P6RGRsUOUFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87890438},"main":"dist/node/core.js","name":"ganache","author":{"name":"David Murdoch"},"readme":"<h3 align=\"center\">\n  ⚠ Notice: This documentation describes the alpha release of Ganache. If you are looking to install the stable version of Ganache you can find instructions at https://github.com/trufflesuite/ganache-cli-archive ⚠\n</h3>\n\n---\n\n<!-- Using h2 instead of h1 because npm doesn't support align=center on h1 tags -->\n<h2 align=\"center\">\n  <a href=\"#readme\" title=\"Ganache README.md\"><img alt=\"Ganache\" src=\"https://trufflesuite.github.io/ganache/assets/img/ganache-logo-dark.svg\" alt=\"Ganache\" width=\"160\"/></a>\n</h2>\n\n<h3 align=\"center\">\n  A tool for creating a local blockchain for fast Ethereum development.\n</h3>\n\n<p align=\"center\">\n  <a title=\"ganache on npm\" href=\"https://www.npmjs.com/ganache\"><img alt=\"\" src=\"https://img.shields.io/npm/v/ganache?label=npm&amp;color=b98b5b&amp;style=for-the-badge&amp;labelColor=3c2c30&amp;logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbD0iIzMzMjUyYSIgZD0iTTcgN2gyNnYyNmgtN1YxNGgtNnYxOUg3eiIvPjwvc3ZnPgo=\" /></a>\n  <a href=\"https://www.trufflesuite.com/dashboard\" title=\"Trufflesuite download dashboard\"><img alt=\"\" src=\"https://img.shields.io/npm/dm/ganache?color=b98b5b&amp;style=for-the-badge&amp;labelColor=3c2c30&amp;logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTAuMzEgMjE0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2U0YTY2Mzt9LmNscy0ye2ZpbGw6IzVlNDY0ZDt9LmNscy0ze2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmdhbmFjaGUtbG9nb21hcms8L3RpdGxlPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJMYXllcl84IiBkYXRhLW5hbWU9IkxheWVyIDgiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTE2NS4zOCwxNjAuMzFjMi4yNCwwLDMtLjUyLDQuMDYtMi4zM3MuNTUtNC43NS41MS01LjU1Yy0uMS0xLjc2LS42OS0zLjcyLS43Ni00LjctLjA1LS42LDAtNC40My4wOS02LDEuMzQtMjQuODQsMTItMzAuNzUsMTUuMDctMzEuNDJhOC41OSw4LjU5LDAsMCwxLDUuOTQuNGwwLTM4aDBsMC0uNTRWNjIuMDljMC01LjQ5LTMuOTEtMTIuMjQtOC42Ni0xNWwtNzcuODctNDVDOTktLjY5LDkxLjE5LS42OSw4Ni40MywyLjA2TDguNjUsNDdDMy44OSw0OS43MSwwLDU2LjQ2LDAsNjJ2OS44MnMwLC4xMSwwLC4xN1Y4Ni4zM2MuNDUuMjUuOTEuNTEsMS4zNi43OSwxLjUsMSwzLDEuNTUsNC41MSwyLjZhNjguND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5LjY1LDRjLS45LS44OS0xMC43OC03LjI5LTEwLjc4LTcuMjktNC43NS0yLjc1LTEyLjU0LTIuNzYtMTcuMywwLDAsMC0xNS43Nyw5LjI3LTE2LjY3LDEwLjE1WiIvPjwvZz48L2c+PC9zdmc+\" /></a>\n  <a title=\"Build status\" href=\"https://github.com/trufflesuite/ganache/actions?query=workflow%3ACommits+branch%3Adevelop+event%3Apush\"><img alt=\"\" src=\"https://img.shields.io/github/workflow/status/trufflesuite/ganache/Commits/develop?event=push&amp;style=for-the-badge&amp;labelColor=3c2c30&amp;logo=github&amp;color=b98b5b\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#features\">Features</a> •\n  <a href=\"#getting-started\">Getting Started</a> •\n  <a href=\"#documentation\">Documentation</a> •\n  <a href=\"#community\">Community</a> •\n  <a href=\"#contributing\">Contributing</a> •\n  <a href=\"#related\">Related</a>\n</p>\n\n---\n\n## Features\n\nGanache is an Ethereum simulator that makes developing Ethereum applications faster, easier, and safer. It includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.\n\n- Fork any Ethereum network without waiting to sync\n- Ethereum json-rpc support\n- Snapshot/revert state\n- Mine blocks instantly, on demand, or at an interval\n- Fast-forward time\n- Impersonate any account (no private keys required!)\n- Listens for JSON-RPC 2.0 requests over HTTP/WebSockets\n- Programmatic use in Node.js\n- Pending Transactions\n\n## Getting Started\n\nGanache can be used from the [command line](#command-line-use), [programmatically](#programmatic-use) via Node.js, or [in the browser](#browser-use).\n\n### Command line use\n\nYou must first install [Node.js](https://nodejs.org/) >= v10.13.0 and npm >= 6.4.1.\n\nTo install Ganache *alpha* globally, run:\n\n```console\n$ npm install ganache@alpha --global\n```\n\nFor the latest stable release of ganache-cli, run:\n\n```console\n$ npm install ganache-cli@latest --global\n```\n\nOnce installed globally, you can start ganache right from your command line:\n\n```console\n$ ganache-cli\nGanache CLI v6.12.1 (ganache-core: 2.13.1)\n\nAvailable Accounts\n==================\n(0) 0xe261e26aECcE52b3788Fac9625896FFbc6bb4424 (100 ETH)\n(1) 0xcE16e8eb8F4BF2E65BA9536C07E305b912BAFaCF (100 ETH)\n(2) 0x02f1c4C93AFEd946Cce5Ad7D34354A150bEfCFcF (100 ETH)\n(3) 0x0B75F0b70076Fab3F18F94700Ecaf3B00fE528E7 (100 ETH)\n(4) 0x7194d1F1d43c2c58302BB61a224D41B649e65C93 (100 ETH)\n(5) 0xC9A2d92c5913eDEAd9a7C936C96631F0F2241063 (100 ETH)\n(6) 0xD79BcDE5Cb11cECD1dfC6685B65690bE5b6a611e (100 ETH)\n(7) 0xb6D080353f40dEcA2E67108087c356d3A1AfcD64 (100 ETH)\n(8) 0x31A064DeeaD74DE7B9453beB4F780416D8859d3b (100 ETH)\n(9) 0x37524a360a40C682F201Fb011DB7bbC8c8A247c6 (100 ETH)\n\nPrivate Keys\n==================\n(0) 0x7f109a9e3b0d8ecfba9cc23a3614433ce0fa7ddcc80f2a8f10b222179a5a80d6\n(1) 0x6ec1f2e7d126a74a1d2ff9e1c5d90b92378c725e506651ff8bb8616a5c724628\n(2) 0xb4d7f7e82f61d81c95985771b8abf518f9328d019c36849d4214b5f995d13814\n(3) 0x941536648ac10d5734973e94df413c17809d6cc5e24cd11e947e685acfbd12ae\n(4) 0x5829cf333ef66b6bdd34950f096cb24e06ef041c5f63e577b4f3362309125863\n(5) 0x8fc4bffe2b40b2b7db7fd937736c4575a0925511d7a0a2dfc3274e8c17b41d20\n(6) 0xb6c10e2baaeba1fa4a8b73644db4f28f4bf0912cceb6e8959f73bb423c33bd84\n(7) 0xfe8875acb38f684b2025d5472445b8e4745705a9e7adc9b0485a05df790df700\n(8) 0xbdc6e0a69f2921a78e9af930111334a41d3fab44653c8de0775572c526feea2d\n(9) 0x3e215c3d2a59626a669ed04ec1700f36c05c9b216e592f58bbfd3d8aa6ea25f9\n\nHD Wallet\n==================\nMnemonic:      candy maple velvet cake sugar cream honey rich smooth crumble sweet treat\nBase HD Path:  m/44'/60'/0'/0/{account_index}\n\nDefault Gas Price\n==================\n20000000000\n\nGas Limit\n==================\n6721975\n\nCall Gas Limit\n==================\n9007199254740991\n\nListening on 127.0.0.1:8545\n```\n\nTo install Ganache alpha into an npm project, run:\n\n```console\n$ npm install ganache\n```\n\nYou can then add Ganache to your package.json scripts:\n\n```json\n\"scripts\": {\n  \"ganache\": \"ganache --wallet.seed myCustomSeed\"\n}\n```\n\n_See [Documentation](#documentation) for additional command line options._\n\nThen start it:\n\n```console\n$ npm run ganache\n```\n\n### Programmatic use\n\nYou can use Ganache programmatically from Node.js. Install Ganache into your npm package:\n\n```console\n$ npm install ganache\n```\n\nThen you can use ganache as an [EIP-1193 provider only](#as-an-eip-1193-provider-only), an [EIP-1193 provider and JSON-RPC web server](#as-an-eip-1193-provider-and-json-rpc-web-server), as a [Web3 provider](#as-a-web3js-provider), or an [ethers provider](#as-an-ethersjs-provider).\n\n#### As an EIP-1193 provider only:\n\n```javascript\nconst ganache = require(\"ganache\");\n\nconst options = {};\nconst provider = ganache.provider(options);\nconst accounts = await provider.request({ method: \"eth_accounts\", params: [] });\n```\n\n#### As an EIP-1193 provider and JSON-RPC web server:\n\n```javascript\nconst ganache = require(\"ganache\");\n\nconst options = {};\nconst server = ganache.server(options);\nconst PORT = 8545;\nserver.listen(PORT, err => {\n  if (err) throw err;\n\n  console.log(`ganache listening on port ${PORT}...`);\n  const provider = server.provider;\n  const accounts = await provider.request({ method: \"eth_accounts\", params:[] });\n});\n```\n\n#### As a [web3.js](https://www.npmjs.com/package/web3) provider:\n\nTo use ganache as a Web3 provider:\n\n```javascript\nconst Web3 = require(\"web3\");\nconst ganache = require(\"ganache\");\n\nconst web3 = new Web3(ganache.provider());\n```\n\nNOTE: depending on your web3 version, you may need to set a number of confirmation blocks\n\n```\nconst web3 = new Web3(ganache.provider(), null, { transactionConfirmationBlocks: 1 });\n```\n\n#### As an [ethers.js]() provider:\n\n```javascript\nconst ganache = require(\"ganache\");\n\nconst provider = new ethers.providers.Web3Provider(ganache.provider());\n```\n\n### Browser Use\n\nYou can also use Ganache in the browser by adding the following script to your HTML:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/ganache@{VERSION}/dist/web/ganache.min.js\"></script>\n```\n\nNOTE: the `{VERSION}` in the above path needs to be replaced with a version number or tag that is listed in [npm](https://www.npmjs.com/package/ganache?activeTab=versions).\n\nFrom there, Ganache is available in your browser for use:\n\n```javascript\nconst options = {};\nconst provider = Ganache.provider(options);\n```\n\n## Documentation\n\nNew RPC documentation coming soon! See https://github.com/trufflesuite/ganache/tree/master#options for Ganache v2 documentation.\n\n### Ganache Provider Events\n\nIn addition to [EIP-1193's](https://eips.ethereum.org/EIPS/eip-1193) `\"message\"` event and the legacy `\"data\"` event, Ganache emits 3 additional events: `\"ganache:vm:tx:before\"`, `\"ganache:vm:tx:step\"`, and `\"ganache:vm:tx:after\"`.\n\nThese events can be used to observe the lifecycle of any transaction executed via `*sendTransaction`, `eth_call`, `debug_traceTransaction`, or `debug_storageRangeAt`.\n\nThese share the [event paradigm that Truffle uses](https://www.trufflesuite.com/docs/truffle/advanced/event-system#how-to-define-your-event-handlers), but without any of the wildcard handling, i.e., no `\"vm:*\"` support (for now).\n\nEach of these events will emit a `context` object which is a unique object that can be used to identify a transaction over the course of its lifecycle. For example:\n\n```typescript\ninterface StepEvent {\n  account: {\n    nonce: bigint;\n    balance: bigint;\n    stateRoot: Buffer;\n    codeHash: Buffer;\n  };\n  address: Buffer;\n  codeAddress: Buffer;\n  depth: number;\n  gasLeft: bigint;\n  gasRefund: bigint;\n  memory: Buffer;\n  memoryWordCount: bigint;\n  opcode: {\n    name: string;\n    fee: number;\n  };\n  pc: number;\n  returnStack: Buffer[];\n  stack: Buffer[];\n}\n\nconst contexts = new Map();\nprovider.on(\"ganache:vm:tx:before\", (event: { context: {} }) => {\n  contexts.set(event.context, []);\n});\nprovider.on(\"ganache:vm:tx:step\", (event: StepEvent) => {\n  contexts.get(event.context).push(event.data);\n});\nprovider.on(\"ganache:vm:tx:after\", (event: { context: {} }) => {\n  doAThingWithThisTransactionsSteps(contexts.get(event.context));\n  contexts.delete(event.context);\n});\n```\n\nThe reason this `context` is necessary is that Ganache may run multiple transactions simultaneously, so `\"ganache:vm:tx:step\"` events from different transactions could be intermingled.\n\nThe above events will be emitted for `eth_call`, `*sendTransaction`, `debug_traceTransaction`, and `debug_storageRangeAt`.\n\nCurrently, we do not await the event listener's return value, however, we'll likely enable this in the future.\n\n## Community\n\n- [Discord](https://trfl.io/community)\n- [Reddit](https://www.reddit.com/r/Truffle/)\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/trufflesuite/ganache/blob/develop/CONTRIBUTING.md) for our guide to contributing to Ganache.\n\n## Related\n\n- [Truffle](https://www.github.com/trufflesuite/truffle)\n- [Drizzle](https://www.github.com/trufflesuite/drizzle)\n\n<br/>\n\n---\n\n<h4 align=\"center\">\n  <a href=\"https://www.trufflesuite.com\" title=\"Brought to you by Truffle\"><img alt=\"Truffle\" src=\"https://trufflesuite.github.io/ganache/assets/img/truffle-logo-dark.svg\" width=\"60\"/></a>\n</h4>\n","source":"index.ts","browser":"dist/web/ganache.min.js","gitHead":"41c2b97a0effe472841dea82de6b94f651182f2c","license":"MIT","scripts":{"tsc":"ttsc --build","test":"nyc npm run mocha","build":"npm run tsc && npx shx rm -rf ./dist && webpack","mocha":"cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'","start":"cross-env TS_NODE_COMPILER=ttypescript node --require ts-node/register --inspect src/cli.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},"homepage":"https://github.com/trufflesuite/ganache/tree/develop/src/packages/ganache#readme","keywords":["ganache","ethereum","evm","blockchain","smart contracts","dapps","solidity","vyper","fe","web3","tooling","truffle"],"deprecated":"Ganache v7 stable has been released. You should update to it!","repository":{"url":"git+https://github.com/trufflesuite/ganache.git","type":"git","directory":"src/packages/ganache"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","description":"A library and cli to create a local blockchain for fast Ethereum development.","directories":{"lib":"lib","test":"tests"},"maintainers":[{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"}],"_nodeVersion":"16.13.0","dependencies":{"keccak":"3.0.1","leveldown":"5.6.0","secp256k1":"4.0.2","bufferutil":"4.0.3","utf-8-validate":"5.0.4","@trufflesuite/bigint-buffer":"1.1.9"},"_hasShrinkwrap":true,"readmeFilename":"README.md","devDependencies":{"shx":"0.3.3","util":"0.12.3","mocha":"9.1.3","assert":"2.0.0","buffer":"6.0.1","events":"3.2.0","process":"0.11.10","ts-node":"9.0.0","webpack":"5.21.2","level-js":"5.0.2","mcl-wasm":"0.7.8","cross-env":"7.0.3","scrypt-js":"3.0.1","ts-loader":"8.0.7","typescript":"4.1.3","@types/node":"16.11.6","node-loader":"1.0.2","ttypescript":"1.5.12","webpack-cli":"4.5.0","@ganache/cli":"0.1.1-alpha.2","@types/mocha":"9.0.0","@ganache/core":"0.1.1-alpha.2","isomorphic-ws":"4.0.1","os-browserify":"0.3.0","browserify-aes":"1.2.0","shebang-loader":"0.0.1","path-browserify":"1.0.1","@ganache/flavors":"0.1.1-alpha.2","crypto-browserify":"3.12.0","stream-browserify":"3.0.0","terser-webpack-plugin":"5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/ganache_7.0.0-alpha.2_1636762217391_0.19079650151577354","host":"s3://npm-registry-packages"},"_id":"ganache@7.0.0-alpha.2","version":"7.0.0-alpha.2"}