Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Update Ganache docs #1264

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docs/ganache/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ layout: docs.hbs

[Ganache](/ganache) is a personal blockchain for rapid Ethereum and Corda distributed application development. You can use Ganache across the entire development cycle; enabling you to develop, deploy, and test your dApps in a safe and deterministic environment.

Ganache comes in two flavors: a UI and CLI. Ganache UI is a desktop application supporting both Ethereum and Corda technology. The command-line tool, [ganache-cli](https://github.com/trufflesuite/ganache-cli-archive) (formerly known as the TestRPC), is available for Ethereum development. Prefer using the command-line? This documentation will focus only on the UI flavor of Ganache. Please see the [Ganache CLI Readme](https://github.com/trufflesuite/ganache-cli-archive/blob/master/README.md) for command-line documentation.
Ganache comes in two flavors: a Ganache UI and Ganache v7. Ganache UI is a desktop application supporting both Ethereum and Corda technology. [Ganache v7](https://github.com/trufflesuite/ganache) is an Ethereum simulator and JSON-RPC provider that can be used in the command line, programmatically as a Node package, and in the browser. To see documentation on the UI flavor of Ganache, check out the [UI Reference Guide](https://trufflesuite.com/docs/ganache/reference/ganache-settings/). See [the Ganache Github](https://github.com/trufflesuite/ganache/#--) for documentation on Ganache v7.

All versions of Ganache are available for Windows, Mac, and Linux.

Expand Down
2 changes: 1 addition & 1 deletion src/docs/ganache/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This quickstart guide will walk you through installing Ganache and creating a pe
If this isn't your first time using Ganache, or you already know you'll need custom configuration options, check out the [Creating Workspaces documentation](/docs/ganache/workspaces/creating-workspaces).

<p class="alert alert-info">
<i class="far fa-info-circle"></i> <strong>Working with Ethereum and prefer using the command line?</strong>: This page will focus only on the graphical interface. Please see the <a href="https://github.com/trufflesuite/ganache-cli/blob/master/README.md">Ganache CLI Readme</a> for more information on the command line flavor of Ganache.
<i class="far fa-info-circle"></i> <strong>Working with Ethereum and prefer using the command line?</strong>: This page will focus only on the graphical interface. Please see the <a href="https://github.com/trufflesuite/ganache/#--">Ganache v7 Readme</a> for more information on the command line flavor of Ganache.
</p>

## 1. Install Ganache
Expand Down
6 changes: 3 additions & 3 deletions src/docs/truffle/getting-started/truffle-with-metamask.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ Using MetaMask with Truffle Develop is very similar to that of Ganache. The only

In MetaMask, when entering the "New RPC URL", enter `http://127.0.0.1:9545`.

## Using MetaMask with Ganache CLI
## Using MetaMask with Ganache v7

Using MetaMask with Ganache CLI is also very similar to that of Ganache. The only difference is that Ganache CLI runs by default on `http://127.0.0.1:8545` so you'll want to edit the above web3 code to say:
Using MetaMask with Ganache v7 is also very similar to that of Ganache. The only difference is that Ganache v7 runs by default on `http://127.0.0.1:8545` so you'll want to edit the above web3 code to say:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Using MetaMask with Ganache v7 is also very similar to that of Ganache. The only difference is that Ganache v7 runs by default on `http://127.0.0.1:8545` so you'll want to edit the above web3 code to say:
Using MetaMask with Ganache v7 is also very similar to that of Ganache UI. The only difference is that Ganache v7 runs by default on `http://127.0.0.1:8545` so you'll want to edit the above web3 code to say:


```javascript
// Is there is an injected web3 instance?
if (typeof web3 !== 'undefined') {
App.web3Provider = web3.currentProvider;
web3 = new Web3(web3.currentProvider);
} else {
// If no injected web3 instance is detected, fallback to Ganache CLI.
// If no injected web3 instance is detected, fallback to Ganache.
App.web3Provider = new web3.providers.HttpProvider('http://127.0.0.1:8545');
web3 = new Web3(App.web3Provider);
}
Expand Down
4 changes: 2 additions & 2 deletions src/docs/truffle/reference/choosing-an-ethereum-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Once launched, Truffle Develop will provide you with a console you can use to ru

To read more about interacting with the console, please see the [Using the Console](/docs/truffle/getting-started/using-truffle-develop-and-the-console) section.

### Ganache CLI
### Ganache v7

Ganache also has a command-line interface for those who aren't working from a graphical environment. Great for automated testing and continuous integration environments, Ganache CLI runs headless and can be configured to serve all your development needs. Ganache CLI processes transactions instantly instead of waiting for the default block time, so you can test that your code works quickly. It also tells you immediately when your smart contracts run into errors, and integrates directly with Truffle to reduce test runtime up to 90% compared to other clients. [Learn more about Ganache CLI](https://github.com/trufflesuite/ganache-cli/).
Ganache also has a command-line interface for those who aren't working from a graphical environment. Great for automated testing and continuous integration environments, Ganache v7 runs headless and can be configured to serve all your development needs. Ganache v7 processes transactions instantly instead of waiting for the default block time, so you can test that your code works quickly. It also tells you immediately when your smart contracts run into errors, and integrates directly with Truffle to reduce test runtime up to 90% compared to other clients. [Learn more about Ganache v7](https://github.com/trufflesuite/ganache).


## Deploying to live networks
Expand Down
2 changes: 1 addition & 1 deletion src/docs/vscode-ext/command-palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To access the Command Palette, you may choose _View, Command Palette_ from the V
| `Truffle: Build Contracts` | Build/compile all contracts in the `contracts` directory |
| `Truffle: Deploy Contracts` | Allows a developer to deploy a smart contract to local (Ganache), or a public Ethereum network |
| `Truffle: New Solidity Project` | This command will scaffold out a basic (default) Smart Contract folder structure. Includes simple contract (.sol), Truffle Migrate/config files and GitHub readiness (e.g., README etc). Optionally a developer can choose to unbox a Truffle box to get access to specific examples hosted by Truffle |
| `Truffle: Start Ganache Server` | This command will start a local Ethereum emulator - Truffle's Ganache command line server ([Ganache-cli](https://github.com/trufflesuite/ganache-cli/blob/master/README.md)). This server allows developers to deploy contracts to a local network which emulates a public blockchain node |
| `Truffle: Start Ganache Server` | This command will start a local Ethereum emulator - Truffle's Ganache command line server ([Ganache v7](https://github.com/trufflesuite/ganache/#--)). This server allows developers to deploy contracts to a local network which emulates a public blockchain node |
| `Truffle: Stop Ganache Server` | This command will stop the local Ganache, Ethereum, emulator |
| `Truffle: Show Welcome Page` | Will open the projects default Welcome Page which has simple examples and links to online-resources specific to this plugin. |

Expand Down
2 changes: 1 addition & 1 deletion src/docs/vscode-ext/debugging-smart-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Truffle for VSCode extension gives developers the ability to debug Solidity

### Local deployment

If a developer has not already connected to any other type of network, the default option will allow a developer to deploy their contract to an emulated Ethereum network. This local network is powered by [Truffle Ganache](https://trufflesuite.com/docs/ganache/) ([ganache-cli](https://github.com/trufflesuite/ganache/) specifically) and is enabled by default.
If a developer has not already connected to any other type of network, the default option will allow a developer to deploy their contract to an emulated Ethereum network. This local network is powered by [Truffle Ganache](https://trufflesuite.com/docs/ganache/) ([Ganache v7](https://github.com/trufflesuite/ganache/) specifically) and is enabled by default.

## Debug your contract

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Truffle for VSCode extension gives developers the ability to generate a simp

### Local deployment

If a developer has not already connected to an Infura Account or any other type of network, the default option will allow a developer to deploy their contract to an emulated Ethereum network. This local network is powered by [Truffle Ganache](https://trufflesuite.com/docs/ganache) ([ganache-cli](https://github.com/trufflesuite/ganache#readme) specifically) and is enabled by default
If a developer has not already connected to an Infura Account or any other type of network, the default option will allow a developer to deploy their contract to an emulated Ethereum network. This local network is powered by [Truffle Ganache](https://trufflesuite.com/docs/ganache) ([Ganache v7](https://github.com/trufflesuite/ganache#readme) specifically) and is enabled by default

![Smart contract deployment - local](./images/deployContractSelectDefault.png)

Expand Down