September 2019
Beginner to intermediate
540 pages
13h 3m
English
The truffle migrate command is used to deploy our smart contracts. The migrations contract keeps track of the status of migrations on the current network, such as which contract has been completed and which contract is still pending migration. When running the migrate command, it will point to the project's migrations directory. To deploy the contract, the migration starts from the first migration file, migrations/1_initial_migration.js, as shown here:
var Migrations = artifacts.require("./Migrations.sol");module.exports = function(deployer) { deployer.deploy(Migrations);};
Add more new migrations by increasing the numbered prefixes to deploy other contracts. For example, in MyERC20Token, we will add a new migrations ...
Read now
Unlock full access