September 2019
Beginner to intermediate
540 pages
13h 3m
English
The Truffle console provides a command-line interface to connect external clients, such as Ganache and Ethereum Testnet. When you run the Truffle console under the Truffle project, it will point to the network definition under the develop section in the Truffle config, as shown in the following code. The default Truffle port is 7545, and our Ganache server default port is 8545. Since we use Ganache as our local blockchain environment, we need to update the Truffle config (truffle.js) port number to 8545:
networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id }}
Let's connect the local Ganache network through the Truffle console:
Read now
Unlock full access