Ganache first try
Install
https://www.trufflesuite.com/ganache
Click to enter the official website to download.
Downloading is relatively simple, just click DOWNLOAD (normally the operating system of the current computer will be recognized).
The following installation takes WINDOWS as an example:
Open it directly after downloading:
Then the installation interface will be displayed, just click to install. Then wait for the installation process. If "Start when ready" is checked, Ganache will start automatically after the installation is complete.
Start and create a local blockchain
After startup, there will be a statement about data collection and analysis, saying that it will collect some usage data to help Ganache improve. Due to my screen ratio problem, I found that there are no buttons here and I can't move the screen inside. The button will appear normally only after the window is enlarged.
After the window is enlarged, you can see the options in the lower left corner and CONTINUE in the lower right corner. In the lower left corner, you can choose whether to agree to the collection of analysis information to help developers improve.
Click CONTINUE to continue. The following interface will appear. There are two main buttons, one is QUICK START and the other is NEW WORKSPACE. They are all used to create Ethereum private chains. If you select QUICK START, they will be generated directly without entering any configuration. Selecting WORKSPACE will first pop up an interface for you to make some configurations (of course, you can also directly confirm and continue without entering any configuration).
There is also a downward arrow on the right side of the button. Click to select the type of blockchain to create. There are two options: ETHEREUM and FILECOIN.
Here we click QUICKSTART and wait for the ETHEREUM blockchain to be created.
official use
After the blockchain is created, the following interface will appear.
You can see that there are six functional areas above: ACCOUNT, BLOCKS, TRANSACTIONS, CONTRACTS, EVENTS, LOGS
ACCOUNTS ACCOUNTS
The accounts functional area displays the account information of the current blockchain, and 10 accounts will be created by default. In this interface, you can directly see the address (ADDRESS), balance (BALANCE), transaction number (TX COUNT), and serial number (INDEX) of each account.
There is also a small key button on the right. When clicked, the address and private key of the corresponding account will be displayed, which is very convenient.
BLOCKS blocks
BLOCKS partition, now only the genesis block BLOCK 0. Click to view further detailed information about the block.
TRANSACTIONS
Since the newly created blockchain does not have any transactions yet, no transactions are displayed here (NO TRANSACTION)
CONTRACTS smart contracts
EVENTS
Some operations on the upper sidebar
You will find that there is a column above that does not change when switching functional partitions.
This column provides some key information about blockchain networks.
Click on the rightSAVE to save the current blockchain network. At the same time, the SAVE button will disappear, and Ganache will automatically assign you a WORKSPACE name.
ClickSWITCH will exit the current WORKSPACE. If there is no SAVE current WORKSPACE, it will be equivalent to a one-click destruction effect.
Click thesmall gear on the right to enter more advanced settings.
For example, you can set the name of WORKSPACE, etc.
Or set the hard fork type in the CHAIN settings section (actually select the type of Ethereum blockchain).
For more functions and interpretations, you can directly view the official documents and explore by yourself:
Ganache | Overview - Truffle Suite
For interpretation, you can directly view the official documents and explore by yourself:
Ganache | Overview - Truffle Suite
Ganache is indeed a powerful tool for Dapp development.