simplify migrate script
This commit is contained in:
2
.env
2
.env
@@ -1,4 +1,4 @@
|
||||
RPC_NODE_URI=http://127.0.0.1:8545
|
||||
RESET_SNAPSHOT_ID=0x2
|
||||
NETWORK_ID=5777
|
||||
GAS_PRICE=1
|
||||
GAS_PRICE=1
|
||||
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
"web3-eth-contract": "^1.2.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@truffle/hdwallet-provider": "^1.0.36",
|
||||
"ganache-cli": "^6.9.1",
|
||||
"prettier": "^2.0.5",
|
||||
"prettier-plugin-solidity": "^1.0.0-alpha.52",
|
||||
|
||||
Reference in New Issue
Block a user