Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

ganache

Package Overview
Dependencies
Maintainers
10
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ganache - npm Package Compare versions

Comparing version 7.5.0 to 7.6.0

dist/node/4.js.LICENSE.txt

2

dist/node/cli.js
#!/usr/bin/env node
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):"function"==typeof define&&define.amd?define(["@trufflesuite/bigint-buffer","keccak","emittery","secp256k1","leveldown","bufferutil","utf-8-validate"],t):"object"==typeof exports?exports.Ganache=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):e.Ganache=t(e["@trufflesuite/bigint-buffer"],e.keccak,e.emittery,e.secp256k1,e.leveldown,e.bufferutil,e["utf-8-validate"])}(global,(function(e,t,r,o,s,i,n){return(()=>{var a,c,u={953:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=953,e.exports=webpackEmptyContext},951:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=951,e.exports=webpackEmptyContext},722:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=722,e.exports=webpackEmptyContext},952:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=952,e.exports=webpackEmptyContext},409:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(113),i=o(r(666)),n=r(56),a=o(r(104)),c=r(40),u=o(r(677)),l=o(r(681)),p=r(115);u.default.setOptions({renderer:new l.default({codespan:a.default.hex(s.TruffleColors.porsche),unescape:!1})});const _=Math.min(120,i.default.terminalWidth());const center=e=>" ".repeat(Math.max(0,Math.floor((_-e.length)/2)))+e;function processOption(e,t,r,o,s,i,n){if(!0!==s.disableInCLI){const p=[],_=[];let f=(l=s.cliDescription||"",function unescapeEntities(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\*\#COLON\|\*/g,":")}(u.default.parseInline(l)));s.cliAliases&&(s.cliAliases.forEach((e=>{1===e.length?p.push(e):_.push(e)})),f=a.default`${f}${c.EOL}{dim deprecated aliases: ${_.map((e=>`--${e}`)).join(", ")}}`);const generateDefaultDescription=()=>e[o]=s.default?s.default(e,n).toString():void 0,d="defaultDescription"in s?s.defaultDescription:generateDefaultDescription(),{cliType:h}=s,b=h&&h.startsWith("array:"),w=b?h.slice(6):h,k={group:r,description:f,alias:p,defaultDescription:d,array:b,type:w,choices:s.cliChoices,coerce:s.cliCoerce,implies:s.implies},m=`${t}.${o}`;i=(i=((e,t,r)=>{const o={hidden:!0,alias:r};return t.reduce(((e,t)=>e.option(t,o)),e)})(i,_,m)).option(m,k)}var l}function applyDefaults(e,t,r){for(const o in e){const s=`${o[0].toUpperCase()}${o.slice(1)}:`,i=e[o],n={};for(const e in i){processOption(n,o,s,e,i[e],t,r)}}}t.default=function default_1(e,t){const r=a.default`{hex("${s.TruffleColors.porsche}").bold ${center(e)}}`;let o,u=i.default.parserConfiguration({"dot-notation":!1}).strict().usage(r).epilogue(r+c.EOL+c.EOL+a.default`{hex("${s.TruffleColors.porsche}").bold ${center("Need more help? Reach out to the Truffle community at")}}`+c.EOL+a.default`{hex("${s.TruffleColors.turquoise}") ${center("https://trfl.io/support")}}`);for(o in n.DefaultOptionsByName){const e=n.DefaultOptionsByName[o];let r,s;switch(o){case n.FilecoinFlavorName:r=o,s=7777;break;case n.DefaultFlavor:r=["$0",o],s=8545;break;default:r=o,s=8545}u=u.command(r,a.default`Use the {bold ${o}} flavor of Ganache`,(r=>{applyDefaults(e,r,o),applyDefaults(p._DefaultServerOptions,r,o),r=r.option("server.host",{group:"Server:",description:a.default`Hostname to listen on.${c.EOL}{dim deprecated aliases: --host, --hostname}${c.EOL}`,alias:["h","host","hostname"],type:"string",default:t?"0.0.0.0":"127.0.0.1"}).option("server.port",{group:"Server:",description:a.default`Port to listen on.${c.EOL}{dim deprecated aliases: --port}${c.EOL}`,alias:["p","port"],type:"number",default:s}).check((e=>{const{"server.port":t,"server.host":r}=e;if(t<1||t>65535)throw new Error(`Invalid port number '${t}'`);if(""===r.trim())throw new Error("Cannot leave host blank; please provide a host");return!0}))}))}u=u.showHelpOnFail(!1,"Specify -? or --help for available options").alias("help","?").wrap(_).version(e);const l=u.argv,f={flavor:l._.length>0?l._[0]:n.DefaultFlavor};for(let e in l){const[t,r]=e.split(/\.(.+)/);r&&(f[t]||(f[t]={}),f[t][r]=l[e])}return f}},412:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(104)),i=r(113),n=r(1),a=r(0);function color(e){return s.default`{hex("${i.TruffleColors.porsche}") ${e}}`}t.default=function default_1(e,t){const r=e.getOptions(),o=e.getInitialAccounts(),c=Object.keys(o),u=[];if(u.push(""),u.push("Available Accounts"),u.push("=================="),c.length>0?(c.forEach((function(e,t){const r=o[e].balance,s=r/n.WEI,i=r%n.WEI===0n?"":"~";let c=`(${t}) ${(0,a.toChecksumAddress)(e)} (${i}${s} ETH)`;o[e].unlocked||(c+=" \u{1f512}"),u.push(c)})),u.push(""),u.push("Private Keys"),u.push("=================="),c.forEach((function(e,t){u.push(`(${t}) ${o[e].secretKey}`)})),null!=r.wallet.accountKeysPath&&(u.push(""),u.push(`Accounts and keys saved to ${r.wallet.accountKeysPath}`))):u.push("(no accounts unlocked)"),null==r.wallet.accounts&&(u.push(""),u.push("HD Wallet"),u.push("=================="),u.push(`Mnemonic: ${color(r.wallet.mnemonic)}`),u.push(`Base HD Path: ${color(r.wallet.hdPath.join("/")+"/{account_index}")}`)),r.miner.defaultGasPrice&&(u.push(""),u.push("Default Gas Price"),u.push("=================="),u.push(color(r.miner.defaultGasPrice.toBigInt().toString()))),r.miner.blockGasLimit&&(u.push(""),u.push("BlockGas Limit"),u.push("=================="),u.push(color(r.miner.blockGasLimit.toBigInt().toString()))),r.miner.callGasLimit&&(u.push(""),u.push("Call Gas Limit"),u.push("=================="),u.push(color(r.miner.callGasLimit.toBigInt().toString()))),r.fork.network||r.fork.url){let e;u.push(""),u.push("Forked Chain"),u.push("=================="),e=r.fork.network?`Ethereum ${function capitalizeFirstLetter(e){return e[0].toUpperCase()+e.slice(1)}(r.fork.network.replace("goerli","g\xf6rli"))}, via ${s.default`{hex("${i.TruffleColors.infura}") δΈ•Infura}`}`:r.fork.url.toString(),u.push(`Location: ${color(e)}`),u.push(`Block: ${color(r.fork.blockNumber.toString())}`),u.push(`Network ID: ${color(r.chain.networkId.toString())}`),u.push(`Time: ${color(r.chain.time.toString())}`),0!==r.fork.requestsPerSecond&&u.push(`Requests/Second: ${color(r.fork.requestsPerSecond.toString())}`)}u.push(""),u.push("Chain Id"),u.push("=================="),u.push(color(r.chain.chainId.toString())),u.push(""),u.push("RPC Listening on "+t.host+":"+t.port),console.log(u.join("\n"))}},957:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function default_1(e,t){const r=e.getOptions(),o=await e.getInitialAccounts();console.log(""),console.log("Available Accounts"),console.log("==================");const s=Object.keys(o),i=1000000000000000000n;s.forEach((function(e,t){const r=o[e].balance;let s=`(${t}) ${e} (${r%i===0n?"":"~"}${r/i} FIL)`;o[e].unlocked||(s+=" \u{1f512}"),console.log(s)})),console.log(""),console.log("Private Keys"),console.log("=================="),s.forEach((function(e,t){console.log(`(${t}) ${o[e].secretKey}`)})),console.log(""),console.log(`Lotus RPC listening on ${t.host}:${t.port}`),console.log(`IPFS RPC listening on ${r.chain.ipfsHost}:${r.chain.ipfsPort}`)}},311:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,s)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return s(t,e),t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(r(115)),c=n(r(409)),u=r(56),l=n(r(412)),p=n(r(957)),logAndForceExit=(e,t=0)=>{process.stdout._handle&&process.stdout._handle.setBlocking(!0);try{e.forEach((e=>console.log(e)))}catch(e){console.log(e)}process.exit(t)},_="ganache v7.5.0 (@ganache/cli: 0.6.0, @ganache/core: 0.6.0)",f="DOCKER"in process.env&&"true"===process.env.DOCKER.toLowerCase(),d=(0,c.default)(_,f),h=d.flavor,b=d.server;let w;console.log(_);try{w=a.default.server(d)}catch(e){console.error(e.message),process.exit(1)}let k=!1;process.on("uncaughtException",(function(e){logAndForceExit(k?[e]:[e.stack],1)}));let m=!1;const handleSignal=async e=>{console.log(`\nReceived shutdown signal: ${e}`),closeHandler()},closeHandler=async()=>{try{switch(w.status){case a.ServerStatus.opening:return m=!0,void console.log("Server is currently starting; waiting\u2026");case a.ServerStatus.open:console.log("Shutting down\u2026"),await w.close(),console.log("Server has been shut down")}process.exitCode=0}catch(e){logAndForceExit(["\nReceived an error while attempting to shut down the server: ",e.stack||e],1)}};if("win32"===process.platform){const e=r(958).createInterface({input:process.stdin,output:process.stdout}).on("SIGINT",(()=>{e.close(),handleSignal("SIGINT")}))}process.on("SIGINT",handleSignal),process.on("SIGTERM",handleSignal),process.on("SIGHUP",handleSignal),console.log("Starting RPC server"),w.listen(b.port,b.host,(async function startGanache(e){if(e)return console.log(e),void(process.exitCode=1);if(m)closeHandler();else switch(k=!0,h){case u.FilecoinFlavorName:await(0,p.default)(w.provider,b);break;case u.EthereumFlavorName:default:(0,l.default)(w.provider,b)}}))},950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(311)},2:e=>{"use strict";e.exports=require("assert")},19:e=>{"use strict";e.exports=require("buffer")},13:e=>{"use strict";e.exports=require("crypto")},31:e=>{"use strict";e.exports=require("events")},12:e=>{"use strict";e.exports=require("fs")},101:e=>{"use strict";e.exports=require("http")},168:e=>{"use strict";e.exports=require("https")},169:e=>{"use strict";e.exports=require("net")},40:e=>{"use strict";e.exports=require("os")},11:e=>{"use strict";e.exports=require("path")},649:e=>{"use strict";e.exports=require("querystring")},958:e=>{"use strict";e.exports=require("readline")},67:e=>{"use strict";e.exports=require("stream")},170:e=>{"use strict";e.exports=require("tls")},597:e=>{"use strict";e.exports=require("tty")},90:e=>{"use strict";e.exports=require("url")},10:e=>{"use strict";e.exports=require("util")},585:e=>{"use strict";e.exports=require("zlib")},84:t=>{"use strict";t.exports=e},586:e=>{"use strict";if(void 0===i){var t=new Error("Cannot find module 'bufferutil'");throw t.code="MODULE_NOT_FOUND",t}e.exports=i},24:e=>{"use strict";e.exports=r},85:e=>{"use strict";e.exports=t},236:e=>{"use strict";e.exports=s},360:e=>{"use strict";e.exports=o},588:e=>{"use strict";if(void 0===n){var t=new Error("Cannot find module 'utf-8-validate'");throw t.code="MODULE_NOT_FOUND",t}e.exports=n}},l={};function __webpack_require__(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={id:e,loaded:!1,exports:{}};return u[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}return __webpack_require__.m=u,__webpack_require__.c=l,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[0,4,1],(()=>__webpack_require__(__webpack_require__.s=950)));return e=__webpack_require__.O(e)},__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},a=[],__webpack_require__.O=(e,t,r,o)=>{if(!t){var s=1/0;for(u=0;u<a.length;u++){for(var[t,r,o]=a[u],i=!0,n=0;n<t.length;n++)(!1&o||s>=o)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](t[n])))?t.splice(n--,1):(i=!1,o<s&&(s=o));if(i){a.splice(u--,1);var c=r();void 0!==c&&(e=c)}}return e}o=o||0;for(var u=a.length;u>0&&a[u-1][2]>o;u--)a[u]=a[u-1];a[u]=[t,r,o]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="",(()=>{var e={2:1};__webpack_require__.O.require=t=>e[t];__webpack_require__.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,s=t.runtime;for(var i in r)__webpack_require__.o(r,i)&&(__webpack_require__.m[i]=r[i]);s&&s(__webpack_require__);for(var n=0;n<o.length;n++)e[o[n]]=1;__webpack_require__.O()})(require("./"+__webpack_require__.u(t)))}})(),c=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(0),__webpack_require__.e(4),__webpack_require__.e(1),c()),__webpack_require__.x()})()}));
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):"function"==typeof define&&define.amd?define(["@trufflesuite/bigint-buffer","keccak","emittery","secp256k1","leveldown","bufferutil","utf-8-validate"],t):"object"==typeof exports?exports.Ganache=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):e.Ganache=t(e["@trufflesuite/bigint-buffer"],e.keccak,e.emittery,e.secp256k1,e.leveldown,e.bufferutil,e["utf-8-validate"])}(global,(function(e,t,r,o,n,a,s){return(()=>{var i,c,u={989:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=989,e.exports=webpackEmptyContext},987:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=987,e.exports=webpackEmptyContext},758:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=758,e.exports=webpackEmptyContext},988:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=988,e.exports=webpackEmptyContext},422:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expandArgs=void 0;const n=r(78),a=o(r(681)),s=r(57),i=o(r(73)),c=r(41),u=o(r(692)),l=o(r(696)),p=r(119);u.default.setOptions({renderer:new l.default({codespan:i.default.hex(n.TruffleColors.porsche),unescape:!1})});const d=Math.min(120,a.default.terminalWidth());const highlight=e=>function unescapeEntities(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\*\#COLON\|\*/g,":")}(u.default.parseInline(e)),center=e=>" ".repeat(Math.max(0,Math.floor((d-e.length)/2)))+e;function processOption(e,t,r,o,n,a,s){if(!0!==n.disableInCLI){const u=[],l=[];let p=highlight(n.cliDescription||"");n.cliAliases&&(n.cliAliases.forEach((e=>{1===e.length?u.push(e):l.push(e)})),p=i.default`${p}${c.EOL}{dim deprecated aliases: ${l.map((e=>`--${e}`)).join(", ")}}`);const generateDefaultDescription=()=>e[o]=n.default?n.default(e,s).toString():void 0,d="defaultDescription"in n?n.defaultDescription:generateDefaultDescription(),{cliType:f}=n,h=f&&f.startsWith("array:"),_=h?f.slice(6):f,m={group:r,description:p,alias:u,defaultDescription:d,array:h,type:_,choices:n.cliChoices,coerce:n.cliCoerce,implies:n.implies},w=`${t}.${o}`;a=(a=((e,t,r)=>{const o={hidden:!0,alias:r};return t.reduce(((e,t)=>e.option(t,o)),e)})(a,l,w)).option(w,m)}}function applyDefaults(e,t,r){for(const o in e){const n=`${o[0].toUpperCase()}${o.slice(1)}:`,a=e[o],s={};for(const e in a){processOption(s,o,n,e,a[e],t,r)}}}function expandArgs(e){const t={};for(const r in e)if(-1===r.indexOf("-")){const[o,n]=r.split(/\.(.+)/);n&&(t[o]||(t[o]={}),t[o][n]=e[r])}return t}t.default=function default_1(e,t,r=process.argv.slice(2)){const o=i.default`{hex("${n.TruffleColors.porsche}").bold ${center(e)}}`;let u;for(u in a.default.parserConfiguration({"dot-notation":!1}).strict().usage(o).epilogue(o+c.EOL+c.EOL+i.default`{hex("${n.TruffleColors.porsche}").bold ${center("Need more help? Reach out to the Truffle community at")}}`+c.EOL+i.default`{hex("${n.TruffleColors.turquoise}") ${center("https://trfl.io/support")}}`),s.DefaultOptionsByName){const e=s.DefaultOptionsByName[u];let r,o;switch(u){case s.FilecoinFlavorName:r=u,o=7777;break;case s.DefaultFlavor:r=["$0",u],o=8545;break;default:r=u,o=8545}a.default.command(r,i.default`Use the {bold ${u}} flavor of Ganache`,(r=>{applyDefaults(e,r,u),applyDefaults(p._DefaultServerOptions,r,u),r=r.option("server.host",{group:"Server:",description:i.default`Hostname to listen on.${c.EOL}{dim deprecated aliases: --host, --hostname}${c.EOL}`,alias:["h","host","hostname"],type:"string",default:t?"0.0.0.0":"127.0.0.1"}).option("server.port",{group:"Server:",description:i.default`Port to listen on.${c.EOL}{dim deprecated aliases: --port}${c.EOL}`,alias:["p","port"],type:"number",default:o}).check((e=>{const{"server.port":t,"server.host":r}=e;if(t<1||t>65535)throw new Error(`Invalid port number '${t}'`);if(""===r.trim())throw new Error("Cannot leave host blank; please provide a host");return!0})).option("detach",{description:highlight("Run Ganache in detached (daemon) mode."+c.EOL+"See `ganache instances --help` for information on managing detached instances."),type:"boolean",alias:["D","\u{1f608}"]})}),(e=>{e.action=e.detach?"start-detached":"start"}))}a.default.command("instances",highlight("Manage instances of Ganache running in detached mode."+c.EOL+"(Ganache can be run in detached mode by providing the `--detach` flag)"),(e=>{e.command("list","List instances running in detached mode",(e=>{}),(e=>{e.action="list"})).command("stop <name>","Stop the instance specified by <name>",(e=>{e.positional("name",{type:"string"})}),(e=>{e.action="stop"})).version(!1)})).showHelpOnFail(!1,"Specify -? or --help for available options").alias("help","?").wrap(d).version(e);const l=a.default.parse(r);let f;if("stop"===l.action)f={action:"stop",name:l.name};else if("list"===l.action)f={action:"list"};else{if("start"!==l.action&&"start-detached"!==l.action)throw new Error(`Unknown action: ${l.action}`);{const e=l.action;f={flavor:l._.length>0?l._[0]:s.DefaultFlavor,action:e,...expandArgs(l)}}}return f},t.expandArgs=expandArgs},426:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.formatUptime=t.getDetachedInstances=t.startDetachedInstance=t.stopDetachedInstance=t.removeDetachedInstanceFile=t.notifyDetachedInstanceReady=void 0;const n=r(300),a=o(r(994)),s=o(r(271)),i=o(r(736)),c=r(12),{readFile:u,mkdir:l,readdir:p,rmdir:d,writeFile:f,unlink:h}=c.promises,_=o(r(10)),m="utf8",w="ready",b="An error occurred spawning a detached instance of Ganache:",g=(0,s.default)("Ganache/instances",{suffix:""}).data;function getInstanceFilePath(e){return _.default.join(g,`${e}.json`)}async function removeDetachedInstanceFile(e){const t=getInstanceFilePath(e);try{return await h(t),!0}catch{}return!1}async function getDetachedInstanceByName(e){const t=getInstanceFilePath(e),r=await u(t,m);return JSON.parse(r)}t.notifyDetachedInstanceReady=function notifyDetachedInstanceReady(){process.send(w)},t.removeDetachedInstanceFile=removeDetachedInstanceFile,t.stopDetachedInstance=async function stopDetachedInstance(e){try{const t=await getDetachedInstanceByName(e);process.kill(t.pid,"SIGTERM")}catch(e){return!1}finally{await removeDetachedInstanceFile(e)}return!0},t.startDetachedInstance=async function startDetachedInstance(e,t,r){const[o,s,...i]=e,c=[...i,"--no-detach"],u=(0,n.fork)(s,c,{stdio:["ignore","ignore","pipe","ipc"],detached:!0});u.stderr.pipe(process.stderr),await new Promise(((e,t)=>{u.on("message",(t=>{t===w&&e()})),u.on("error",(e=>{console.error(`${b}\n${e.message}`),process.exitCode=1,t(e)})),u.on("exit",(e=>{process.exitCode=0===e?1:e,t(new Error(`${b}\nThe detached instance exited with error code: ${e}`))}))})),u.stderr.destroy(),u.unref(),u.disconnect();const p=t.flavor,{host:d,port:h}=t.server,k="win32"===process.platform?_.default.basename(process.execPath):[process.execPath,...process.execArgv,s,...c].join(" "),y=u.pid,v={startTime:Date.now(),pid:y,name:(0,a.default)(),host:d,port:h,flavor:p,cmd:k,version:r};for(;;){const e=getInstanceFilePath(v.name);try{await f(e,JSON.stringify(v),{flag:"wx",encoding:m});break}catch(e){switch(e.code){case"EEXIST":v.name=(0,a.default)();break;case"ENOENT":await l(g,{recursive:!0});break;default:throw e}}}return v},t.getDetachedInstances=async function getDetachedInstances(){let e,t,r=!1;try{[e,t]=await Promise.all([p(g,{withFileTypes:!0}),(0,i.default)()])}catch(e){if("ENOENT"!==e.code)throw e;return[]}const o=[],n=e.map((async e=>{const n=e.name,{name:a,ext:s}=_.default.parse(n);let i;if(".json"!==s)i=`"${n}" does not have a .json extension`;else{let e;try{e=await getDetachedInstanceByName(a)}catch(e){i=e.message}if(e){const r=t.find((t=>t.pid===e.pid));r?r.cmd!==e.cmd?i=`Process with PID ${e.pid} does not match ${a}`:o.push(e):i=`Process with PID ${e.pid} could not be found`}}if(void 0!==i){r=!0;const t=_.default.join(g,n);let o;if(e.isDirectory()){const e=`"${n}" is a directory`;try{await d(t,{recursive:!0}),i=e}catch{o=`"${n}" could not be removed`}}else try{await h(t)}catch{o=`"${n}" could not be removed`}console.warn(`Failed to load instance data. ${i}. ${o||`"${n}" has been removed`}.`)}}));return await Promise.all(n),r&&console.warn("If this keeps happening, please open an issue at https://github.com/trufflesuite/ganache/issues/new\n"),o},t.formatUptime=function formatUptime(e){if(e>-1e3&&e<1e3)return"Just started";const t=e<0;e=Math.abs(e);const r={d:Math.floor(e/864e5),h:Math.floor(e/36e5)%24,m:Math.floor(e/6e4)%60,s:Math.floor(e/1e3)%60},o=Object.entries(r).filter((e=>0!==e[1])).map((([e,t])=>`${t}${e}`)).join(" ");return t?`In ${o}`:o}},425:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(r(73)),a=r(78),s=r(1),i=r(0);function color(e){return n.default`{hex("${a.TruffleColors.porsche}") ${e}}`}t.default=function default_1(e,t){const r=e.getOptions(),o=e.getInitialAccounts(),c=Object.keys(o),u=[];if(u.push(""),u.push("Available Accounts"),u.push("=================="),c.length>0?(c.forEach((function(e,t){const r=o[e].balance,n=r/s.WEI,a=r%s.WEI===0n?"":"~";let c=`(${t}) ${(0,i.toChecksumAddress)(e)} (${a}${n} ETH)`;o[e].unlocked||(c+=" \u{1f512}"),u.push(c)})),u.push(""),u.push("Private Keys"),u.push("=================="),c.forEach((function(e,t){u.push(`(${t}) ${o[e].secretKey}`)})),null!=r.wallet.accountKeysPath&&(u.push(""),u.push(`Accounts and keys saved to ${r.wallet.accountKeysPath}`))):u.push("(no accounts unlocked)"),null==r.wallet.accounts&&(u.push(""),u.push("HD Wallet"),u.push("=================="),u.push(`Mnemonic: ${color(r.wallet.mnemonic)}`),u.push(`Base HD Path: ${color(r.wallet.hdPath.join("/")+"/{account_index}")}`)),r.miner.defaultGasPrice&&(u.push(""),u.push("Default Gas Price"),u.push("=================="),u.push(color(r.miner.defaultGasPrice.toBigInt().toString()))),r.miner.blockGasLimit&&(u.push(""),u.push("BlockGas Limit"),u.push("=================="),u.push(color(r.miner.blockGasLimit.toBigInt().toString()))),r.miner.callGasLimit&&(u.push(""),u.push("Call Gas Limit"),u.push("=================="),u.push(color(r.miner.callGasLimit.toBigInt().toString()))),r.fork.network||r.fork.url){let e;u.push(""),u.push("Forked Chain"),u.push("=================="),e=r.fork.network?`Ethereum ${function capitalizeFirstLetter(e){return e[0].toUpperCase()+e.slice(1)}(r.fork.network.replace("goerli","g\xf6rli"))}, via ${n.default`{hex("${a.TruffleColors.infura}") δΈ•Infura}`}`:r.fork.url.toString(),u.push(`Location: ${color(e)}`),u.push(`Block: ${color(r.fork.blockNumber.toString())}`),u.push(`Network ID: ${color(r.chain.networkId.toString())}`),u.push(`Time: ${color(r.chain.time.toString())}`),0!==r.fork.requestsPerSecond&&u.push(`Requests/Second: ${color(r.fork.requestsPerSecond.toString())}`)}u.push(""),u.push("Chain Id"),u.push("=================="),u.push(color(r.chain.chainId.toString())),u.push(""),u.push("RPC Listening on "+t.host+":"+t.port),console.log(u.join("\n"))}},993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function default_1(e,t){const r=e.getOptions(),o=await e.getInitialAccounts();console.log(""),console.log("Available Accounts"),console.log("==================");const n=Object.keys(o),a=1000000000000000000n;n.forEach((function(e,t){const r=o[e].balance;let n=`(${t}) ${e} (${r%a===0n?"":"~"}${r/a} FIL)`;o[e].unlocked||(n+=" \u{1f512}"),console.log(n)})),console.log(""),console.log("Private Keys"),console.log("=================="),n.forEach((function(e,t){console.log(`(${t}) ${o[e].secretKey}`)})),console.log(""),console.log(`Lotus RPC listening on ${t.host}:${t.port}`),console.log(`IPFS RPC listening on ${r.chain.ipfsHost}:${r.chain.ipfsPort}`)}},994:(e,t)=>{"use strict";function pick(e){return e[Math.floor(Math.random()*e.length)]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function createInstanceName(){return`${pick(r)}_${pick(o)}_${pick(n)}`};const r=["baked","candied","deepfried","frozen","hot","molten","pureed","salted","spiced","sticky"],o=["almond","apple","banana","blackforest","caramel","cherry","chocolate","cinnamon","coconut","coffee","cream","custard","fruit","ginger","gingerbread","jelly","lemon","lime","milk","nut","orange","peanut","plum","poppyseed","rhubarb","strawberry","sugar","tiramisu"],n=["bar","biscuit","brownie","cake","cheesecake","cookie","crumble","cupcake","doughnut","drizzle","dumpling","friand","ganache","loaf","macaroon","mousse","muffin","pastry","pie","pudding","sponge","strudel","tart","torte","trifle","truffle","waffle"]},323:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return n(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=a(r(119)),c=s(r(422)),u=r(57),l=s(r(425)),p=s(r(993)),d=r(426),f=r(78),h=s(r(297)),_=s(r(73)),m=_.default.hex(f.TruffleColors.porsche),logAndForceExit=(e,t=0)=>{process.stdout._handle&&process.stdout._handle.setBlocking(!0);try{e.forEach((e=>console.log(e)))}catch(e){console.log(e)}process.exit(t)},w="7.6.0",b="ganache v7.6.0 (@ganache/cli: 0.7.0, @ganache/core: 0.7.0)",g="DOCKER"in process.env&&"true"===process.env.DOCKER.toLowerCase(),k=(0,c.default)(b,g);if("start"===k.action){const e=k.flavor,t=k.server;let o;console.log(b);try{o=i.default.server(k)}catch(e){console.error(e.message),process.exit(1)}let n=!1;process.on("uncaughtException",(function(e){logAndForceExit(n?[e]:[e.stack],1)}));let a=!1;const handleSignal=async e=>{console.log(`\nReceived shutdown signal: ${e}`),closeHandler()},closeHandler=async()=>{try{switch(o.status){case i.ServerStatus.opening:return a=!0,void console.log("Server is currently starting; waiting\u2026");case i.ServerStatus.open:console.log("Shutting down\u2026"),await o.close(),console.log("Server has been shut down")}process.exitCode=0}catch(e){logAndForceExit(["\nReceived an error while attempting to shut down the server: ",e.stack||e],1)}};if("win32"===process.platform){const e=r(996).createInterface({input:process.stdin,output:process.stdout}).on("SIGINT",(()=>{e.close(),handleSignal("SIGINT")}))}process.on("SIGINT",handleSignal),process.on("SIGTERM",handleSignal),process.on("SIGHUP",handleSignal),console.log("Starting RPC server"),o.listen(t.port,t.host,(async r=>{if(r)return console.error(r),void(process.exitCode=1);if(a)return void closeHandler();switch(n=!0,e){case u.FilecoinFlavorName:await(0,p.default)(o.provider,t);break;case u.EthereumFlavorName:default:(0,l.default)(o.provider,t)}void 0!==process.send&&(0,d.notifyDetachedInstanceReady)()}))}else if("stop"===k.action){const e=k.name;(0,d.stopDetachedInstance)(e).then((e=>{e?console.log("Instance stopped"):console.error("Instance not found")}))}else"start-detached"===k.action?(0,d.startDetachedInstance)(process.argv,k,w).then((e=>{const t=m(e.name);console.log(t)})).catch((e=>{})):"list"===k.action&&(0,d.getDetachedInstances)().then((e=>{if(0===e.length)console.log(`No detached instances found - try ${m("ganache --detach")} to start a detached instance`);else{const t=Date.now(),r=new h.default({head:[_.default.bold("PID"),_.default.bold("Name"),_.default.bold("Flavor"),_.default.bold("Version"),_.default.bold("Host"),_.default.bold("Uptime")],colAligns:["right","left","left","left","left","right"],style:{head:["white","white","white","white","white","white"]}});e.sort(((e,t)=>t.startTime-e.startTime));for(let o=0;o<e.length;o++){const n=e[o],a=t-n.startTime;r.push([n.pid.toString(),m(n.name),n.flavor,n.version,`${n.host}:${n.port.toString()}`,(0,d.formatUptime)(a)])}console.log(r.toString())}}))},986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(323)},2:e=>{"use strict";e.exports=require("assert")},17:e=>{"use strict";e.exports=require("buffer")},300:e=>{"use strict";e.exports=require("child_process")},13:e=>{"use strict";e.exports=require("crypto")},29:e=>{"use strict";e.exports=require("events")},12:e=>{"use strict";e.exports=require("fs")},106:e=>{"use strict";e.exports=require("http")},172:e=>{"use strict";e.exports=require("https")},173:e=>{"use strict";e.exports=require("net")},41:e=>{"use strict";e.exports=require("os")},10:e=>{"use strict";e.exports=require("path")},995:e=>{"use strict";e.exports=require("process")},664:e=>{"use strict";e.exports=require("querystring")},996:e=>{"use strict";e.exports=require("readline")},30:e=>{"use strict";e.exports=require("stream")},174:e=>{"use strict";e.exports=require("tls")},612:e=>{"use strict";e.exports=require("tty")},95:e=>{"use strict";e.exports=require("url")},8:e=>{"use strict";e.exports=require("util")},601:e=>{"use strict";e.exports=require("zlib")},89:t=>{"use strict";t.exports=e},602:e=>{"use strict";if(void 0===a){var t=new Error("Cannot find module 'bufferutil'");throw t.code="MODULE_NOT_FOUND",t}e.exports=a},24:e=>{"use strict";e.exports=r},90:e=>{"use strict";e.exports=t},240:e=>{"use strict";e.exports=n},373:e=>{"use strict";e.exports=o},604:e=>{"use strict";if(void 0===s){var t=new Error("Cannot find module 'utf-8-validate'");throw t.code="MODULE_NOT_FOUND",t}e.exports=s}},l={};function __webpack_require__(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={id:e,loaded:!1,exports:{}};return u[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}return __webpack_require__.m=u,__webpack_require__.c=l,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[0,4,1],(()=>__webpack_require__(__webpack_require__.s=986)));return e=__webpack_require__.O(e)},__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},i=[],__webpack_require__.O=(e,t,r,o)=>{if(!t){var n=1/0;for(u=0;u<i.length;u++){for(var[t,r,o]=i[u],a=!0,s=0;s<t.length;s++)(!1&o||n>=o)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](t[s])))?t.splice(s--,1):(a=!1,o<n&&(n=o));if(a){i.splice(u--,1);var c=r();void 0!==c&&(e=c)}}return e}o=o||0;for(var u=i.length;u>0&&i[u-1][2]>o;u--)i[u]=i[u-1];i[u]=[t,r,o]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="",(()=>{var e={2:1};__webpack_require__.O.require=t=>e[t];__webpack_require__.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,n=t.runtime;for(var a in r)__webpack_require__.o(r,a)&&(__webpack_require__.m[a]=r[a]);n&&n(__webpack_require__);for(var s=0;s<o.length;s++)e[o[s]]=1;__webpack_require__.O()})(require("./"+__webpack_require__.u(t)))}})(),c=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(0),__webpack_require__.e(4),__webpack_require__.e(1),c()),__webpack_require__.x()})()}));
//# sourceMappingURL=cli.js.map

@@ -1,2 +0,2 @@

!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):"function"==typeof define&&define.amd?define(["@trufflesuite/bigint-buffer","keccak","emittery","secp256k1","leveldown","bufferutil","utf-8-validate"],r):"object"==typeof exports?exports.Ganache=r(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):e.Ganache=r(e["@trufflesuite/bigint-buffer"],e.keccak,e.emittery,e.secp256k1,e.leveldown,e.bufferutil,e["utf-8-validate"])}(global,(function(e,r,t,i,_,u,o){return(()=>{var c,s,a={351:function(e,r,t){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.__experimental_info=r.provider=r.server=void 0,t(731);var _=t(115);Object.defineProperty(r,"server",{enumerable:!0,get:function(){return _.server}}),Object.defineProperty(r,"provider",{enumerable:!0,get:function(){return _.provider}}),Object.defineProperty(r,"__experimental_info",{enumerable:!0,get:function(){return _.__experimental_info}});const u=i(t(115));r.default=u.default},2:e=>{"use strict";e.exports=require("assert")},19:e=>{"use strict";e.exports=require("buffer")},13:e=>{"use strict";e.exports=require("crypto")},31:e=>{"use strict";e.exports=require("events")},12:e=>{"use strict";e.exports=require("fs")},101:e=>{"use strict";e.exports=require("http")},168:e=>{"use strict";e.exports=require("https")},169:e=>{"use strict";e.exports=require("net")},40:e=>{"use strict";e.exports=require("os")},11:e=>{"use strict";e.exports=require("path")},649:e=>{"use strict";e.exports=require("querystring")},67:e=>{"use strict";e.exports=require("stream")},170:e=>{"use strict";e.exports=require("tls")},597:e=>{"use strict";e.exports=require("tty")},90:e=>{"use strict";e.exports=require("url")},10:e=>{"use strict";e.exports=require("util")},585:e=>{"use strict";e.exports=require("zlib")},84:r=>{"use strict";r.exports=e},586:e=>{"use strict";if(void 0===u){var r=new Error("Cannot find module 'bufferutil'");throw r.code="MODULE_NOT_FOUND",r}e.exports=u},24:e=>{"use strict";e.exports=t},85:e=>{"use strict";e.exports=r},236:e=>{"use strict";e.exports=_},360:e=>{"use strict";e.exports=i},588:e=>{"use strict";if(void 0===o){var r=new Error("Cannot find module 'utf-8-validate'");throw r.code="MODULE_NOT_FOUND",r}e.exports=o},731:()=>{}},n={};function __webpack_require__(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return a[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}return __webpack_require__.m=a,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[0,1],(()=>__webpack_require__(351)));return e=__webpack_require__.O(e)},__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},c=[],__webpack_require__.O=(e,r,t,i)=>{if(!r){var _=1/0;for(a=0;a<c.length;a++){for(var[r,t,i]=c[a],u=!0,o=0;o<r.length;o++)(!1&i||_>=i)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](r[o])))?r.splice(o--,1):(u=!1,i<_&&(_=i));if(u){c.splice(a--,1);var s=t();void 0!==s&&(e=s)}}return e}i=i||0;for(var a=c.length;a>0&&c[a-1][2]>i;a--)c[a]=c[a-1];c[a]=[r,t,i]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((r,t)=>(__webpack_require__.f[t](e,r),r)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="",(()=>{var e={3:1};__webpack_require__.O.require=r=>e[r];__webpack_require__.f.require=(r,t)=>{e[r]||(r=>{var t=r.modules,i=r.ids,_=r.runtime;for(var u in t)__webpack_require__.o(t,u)&&(__webpack_require__.m[u]=t[u]);_&&_(__webpack_require__);for(var o=0;o<i.length;o++)e[i[o]]=1;__webpack_require__.O()})(require("./"+__webpack_require__.u(r)))}})(),s=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(0),__webpack_require__.e(1),s()),__webpack_require__.x()})()}));
!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):"function"==typeof define&&define.amd?define(["@trufflesuite/bigint-buffer","keccak","emittery","secp256k1","leveldown","bufferutil","utf-8-validate"],r):"object"==typeof exports?exports.Ganache=r(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("leveldown"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):e.Ganache=r(e["@trufflesuite/bigint-buffer"],e.keccak,e.emittery,e.secp256k1,e.leveldown,e.bufferutil,e["utf-8-validate"])}(global,(function(e,r,t,i,_,u,o){return(()=>{var c,s,a={364:function(e,r,t){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.__experimental_info=r.provider=r.server=void 0,t(768);var _=t(119);Object.defineProperty(r,"server",{enumerable:!0,get:function(){return _.server}}),Object.defineProperty(r,"provider",{enumerable:!0,get:function(){return _.provider}}),Object.defineProperty(r,"__experimental_info",{enumerable:!0,get:function(){return _.__experimental_info}});const u=i(t(119));r.default=u.default},2:e=>{"use strict";e.exports=require("assert")},17:e=>{"use strict";e.exports=require("buffer")},13:e=>{"use strict";e.exports=require("crypto")},29:e=>{"use strict";e.exports=require("events")},12:e=>{"use strict";e.exports=require("fs")},106:e=>{"use strict";e.exports=require("http")},172:e=>{"use strict";e.exports=require("https")},173:e=>{"use strict";e.exports=require("net")},41:e=>{"use strict";e.exports=require("os")},10:e=>{"use strict";e.exports=require("path")},664:e=>{"use strict";e.exports=require("querystring")},30:e=>{"use strict";e.exports=require("stream")},174:e=>{"use strict";e.exports=require("tls")},612:e=>{"use strict";e.exports=require("tty")},95:e=>{"use strict";e.exports=require("url")},8:e=>{"use strict";e.exports=require("util")},601:e=>{"use strict";e.exports=require("zlib")},89:r=>{"use strict";r.exports=e},602:e=>{"use strict";if(void 0===u){var r=new Error("Cannot find module 'bufferutil'");throw r.code="MODULE_NOT_FOUND",r}e.exports=u},24:e=>{"use strict";e.exports=t},90:e=>{"use strict";e.exports=r},240:e=>{"use strict";e.exports=_},373:e=>{"use strict";e.exports=i},604:e=>{"use strict";if(void 0===o){var r=new Error("Cannot find module 'utf-8-validate'");throw r.code="MODULE_NOT_FOUND",r}e.exports=o},768:()=>{}},n={};function __webpack_require__(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={id:e,loaded:!1,exports:{}};return a[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}return __webpack_require__.m=a,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[0,1],(()=>__webpack_require__(364)));return e=__webpack_require__.O(e)},__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},c=[],__webpack_require__.O=(e,r,t,i)=>{if(!r){var _=1/0;for(a=0;a<c.length;a++){for(var[r,t,i]=c[a],u=!0,o=0;o<r.length;o++)(!1&i||_>=i)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](r[o])))?r.splice(o--,1):(u=!1,i<_&&(_=i));if(u){c.splice(a--,1);var s=t();void 0!==s&&(e=s)}}return e}i=i||0;for(var a=c.length;a>0&&c[a-1][2]>i;a--)c[a]=c[a-1];c[a]=[r,t,i]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((r,t)=>(__webpack_require__.f[t](e,r),r)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="",(()=>{var e={3:1};__webpack_require__.O.require=r=>e[r];__webpack_require__.f.require=(r,t)=>{e[r]||(r=>{var t=r.modules,i=r.ids,_=r.runtime;for(var u in t)__webpack_require__.o(t,u)&&(__webpack_require__.m[u]=t[u]);_&&_(__webpack_require__);for(var o=0;o<i.length;o++)e[i[o]]=1;__webpack_require__.O()})(require("./"+__webpack_require__.u(r)))}})(),s=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(0),__webpack_require__.e(1),s()),__webpack_require__.x()})()}));
//# sourceMappingURL=core.js.map
{
"name": "ganache",
"version": "7.5.0",
"version": "7.6.0",
"description": "A library and cli to create a local blockchain for fast Ethereum development.",

@@ -59,5 +59,5 @@ "author": "David Murdoch",

"devDependencies": {
"@ganache/cli": "0.6.0",
"@ganache/core": "0.6.0",
"@ganache/flavors": "0.6.0",
"@ganache/cli": "0.7.0",
"@ganache/core": "0.7.0",
"@ganache/flavors": "0.7.0",
"@microsoft/api-extractor": "7.20.1",

@@ -118,3 +118,3 @@ "@types/mocha": "9.0.0",

],
"gitHead": "d8cfb81e279993ea6b2fc0f70854cac8a56aa706"
"gitHead": "d267903d9a308f1e90c771de94c14bfe086431ec"
}

@@ -63,3 +63,8 @@ <!-- Using h2 instead of h1 because npm doesn't support align=center on h1 tags -->

```console
$ ganache
ganache
```
Your output should look something like this:
```
Ganache CLI v6.12.1 (ganache-core: 2.13.1)

@@ -113,4 +118,6 @@

To install Ganache into an npm project, run:
### NPM project use
If you want to install Ganache into an npm project, run:
```console

@@ -225,3 +232,3 @@ $ npm install ganache

The startup options are grouped in the `chain`, `database`, `fork`, `logging`, `miner`, and `wallet` namespaces, and should be used as such on startup, i.e.
The startup options are grouped in the `chain`, `database`, `fork`, `logging`, `miner`, `wallet`, and `server` namespaces, and should be used as such on startup, i.e.

@@ -475,5 +482,52 @@ ```console

[number] [default: 8545]
```
### Detached Instances
Ganache can be started as a background instance via the CLI by providing the following argument (along with any valid combination
of the Ganache startup arguments above):
```console
-D, --detach, --😈 Run Ganache in detached (daemon) mode. [boolean]
```
This will start Ganache as a background process, and return to the console as soon as Ganache has started and is ready to
receive requests. A friendly name will be returned to STDOUT which can then be used to interact with the instance via
the `ganache instances` command with the following arguments:
```console
Commands:
ganache instances list List instances running in detached mode
ganache instances stop <name> Stop the instance specified by <name>
```
E.g., start Ganache on port 8544, with a block time of 10 seconds, and then stop the instance.
```console
$ ganache --port=8544 --miner.blockTime=10 --detach
salted_caramel_ganache
$ ganache instances list
β”Œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PID β”‚ Name β”‚ Flavor β”‚ Version β”‚ Host β”‚ Uptime β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 12182 β”‚ salted_caramel_ganache β”‚ ethereum β”‚ 7.6.0 β”‚ 127.0.0.1:8545 β”‚ 36s β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜
$ ganache instances stop salted_caramel_ganache
Process stopped
```
With the following command, you can start Ganache, run your tests, and stop Ganache when you are finished.
```console
GANACHE=$(ganache --detach) && npm run test; ganache instances stop $GANACHE
```
Or if you are running PowerShell on Windows, you can do:
```PowerShell
$GANACHE=ganache --detach; npm run test; ganache instances stop $GANACHE
```
### Ganache Provider Events

@@ -480,0 +534,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc