Migrating the code
In Truffle, migration files are JavaScript files that help you deploy your contracts to a network, be it Ethereum's mainnet, a public testnet, or a personal test environment such as Ganache. For the purposes of our testing, we will be using Ganache, but later we will deploy our contracts to the Rinkeby public test network.
To connect with Ganache, we first have to download and install it from https://truffleframework.com/ganache. Once installed, running Ganache will create a local, in-memory blockchain instance for the purposes of testing.
Once Ganache is installed, we have to configure Truffle to be able to use it, and to do that we must edit the truffle.js file in the root of our project (Windows users must edit the accompanying ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access