simplify migrate script

This commit is contained in:
mingda
2020-06-26 17:05:22 +08:00
parent 9f0642f0e0
commit d74964085d
5 changed files with 1190 additions and 77 deletions

View File

@@ -1,27 +1,11 @@
const DecimalMath = artifacts.require("DecimalMath");
const SafeERC20 = artifacts.require("SafeERC20");
const DODOMath = artifacts.require("DODOMath");
const DODO = artifacts.require("DODO");
const DODOZoo = artifacts.require("DODOZoo");
module.exports = async (deployer, network) => {
const deployDODO = async () => {
await deployer.deploy(DecimalMath);
await deployer.deploy(SafeERC20);
await deployer.deploy(DODOMath);
await deployer.link(SafeERC20, DODO);
await deployer.link(DecimalMath, DODO);
await deployer.link(DODOMath, DODO);
await deployer.deploy(DODO);
const deployDODOZoo = async () => {
await deployer.deploy(DODOZoo);
};
if (network == "production") {
} else if (network == "kovan") {
} else {
// for development & test
await deployDODO();
if (network == "development") {
await deployDODOZoo();
}
};