- Create and store migration scripts in the ./mirations directory. You can find the directory at the root of your project.
- Each file follows a naming convention that includes a number and description. The number denotes the order of execution and is used to record the status of migration. The suffix includes a human-readable description of the scripts:
2_token_migration.js
- In the migration script file, include the required import statements followed by the deployment steps:
// Import statementvar contract = artifacts.require("contract"); module.exports = function(deployer) { // Deployment statement deployer.deploy(contract); };
-
Reference the contract using artifacts.require(). It is similar to require and import in JavaScript, ...