truffle tutorial
- Create a new directory for your Truffle project:
mkdir MetaCoin
cd MetaCoin - truffle init
- ganache-cli
truffle compile
# Recompile, overwriting all previously compiled files
truffle compile --allFilename: 4_example_migration.js
var MyContract = artifacts.require("MyContract");
module.exports = function(deployer) {
// deployment steps
deployer.deploy(MyContract);
};truffle migrate
# run all your migrations from the beginning
truffle migrate --resetNote that the filename is prefixed with a number and is suffixed by a description. The numbered prefix is required in order to record whether the migration ran successfully.