Starting a local blockchain

As mentioned earlier, you can start a local Ganache blockchain instance by just clicking on the QUICKSTART button. This starts the blockchain with a configured mnemonic phrase and initializes accounts by default with 100.00 ETH each, as shown in the following screenshot. By default, it opens the Accounts view:

QUICKSTART Ganache blockchain running

You can go through the different view options available in Ganache using the following top bar:

The Ganache top bar to switch to different views

As shown in the preceding screenshot, the top bar provides the following view options to choose from. Let's understand when these options can be used and what kind of information they show:

  • ACCOUNTS: Lists all accounts and their ETH balances, along with the number of transactions initiated from those accounts.
  • BLOCKS: Lists the number of blocks generated and gas used per block. This is similar to the online block explorer (http://etherscan.io), where each block generated is shown along with the transactions included in it.
  • TRANSACTIONS: Lists the transactions generated so far, along with their transaction ID, the gas used, and other details.
  • CONTRACTS: Lists of all contracts from the Truffle project and their contract addresses, along with their deployment statuses.
  • EVENTS: Lists all of the events triggered during transaction execution.
  • LOGS: Opens the console log of Ganache.

You can also see the status of the Ganache GUI on the status bar, as shown in the following screenshot:

Status of the Ganache blockchain

As shown in the preceding screenshot, the status bar of Ganache shows the following information:

  • CURRENT BLOCK: The number of blocks generated so far
  • GAS PRICE: The gas price per transaction in wei
  • GAS LIMIT: The gas limit per block
  • NETWORK ID: The network ID of the blockchain
  • RPC SERVER: The blockchain by default starts an RPC server on http://127.0.0.1 (localhost) and at port 7545
  • MINING STATUS: There are two types of mining—AUTOMINING means the transactions will be processed instantly when they are received at Ganache
  • WORKSPACE: The workspace name being used

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.103.15