1. 基本介绍
目录功能:存放用于将合约(批量)部署上链的 js 脚本代码
命名习惯:Id_FileName_migration.js
执行顺序:按文件名 Id 由小到大依次执行
2. js 脚本解析
Case 1 : 合约构造函数无需传参
//Case1.1:独立合约 不import其他合约文件 也不继承其他合约
// 导入部署合约
const contractName = artifacts.require(“./contractName”);
//Exports a function that accepts an object called deployer as a parameter.
//This object acts as an interface between you (the developer) and Truffle's deployment engine
module