Suppose that I have a token contract as follow. How can i write the new migration.js
file in truffle to deploy the contract?
TestCoin.sol
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
contract ERC20 is IERC20 {
}
contract TestCoin is ERC20 {
}
1_initial_migration.js
var Migrations = artifacts.require("./Migrations.sol");
module.exports = function(deployer) {
deployer.deploy(Migrations);
};
I am thinking of something like this but not sure if it is correct
var SafeMath = artifacts.require("./SafeMath.sol");
var TestCoin = artifacts.require("./TestCoin.sol");
module.exports = function(deployer) {
deployer.deploy(SafeMath);
deployer.link(SafeMath, TestCoin);
deployer.deploy(TestCoin);
};