:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
We don't have any documentation detailing how to use all Ganache options programmatically. Instead, we list the CLI options in detail and say:
The following options are listed for command line use, but can also be used when running Ganache programatically in your project.
However, there are some differences between CLI and programmatic use for particular options*. We should fully document options both for CLI and programmatic use.
*See #2571 and specifically this comment for one instance of these differences.
Thing could be made clearer specifically for programmatic use:
Was looking through README and docs and most was for UI and CLI tools
One of the only sources of documentation was the README, but limited examples (it’s only basic setup)
Fleshing out set up docs - snaps I had forking with the provider, db layer, configuration
In ganache, things are given for free (magic):
Example: it’s not obvious that when you fork a call to eth_sendTransaction is going to happen on a fork. It feels unsafe to do this! (even though using it on the CLI feels safer… programmatically is a bit scarier)
To drive the point home: you can give window.ethereum to a ganache fork… which makes it seem like it could do dangerous things.
We don't have any documentation detailing how to use all Ganache options programmatically. Instead, we list the CLI options in detail and say:
However, there are some differences between CLI and programmatic use for particular options*. We should fully document options both for CLI and programmatic use.
*See #2571 and specifically this comment for one instance of these differences.