simplify migrate script

This commit is contained in:
mingda
2020-06-26 17:05:22 +08:00
parent 8de5d8f1ab
commit ee88b6c358
4 changed files with 1190 additions and 52 deletions

2
.env
View File

@@ -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

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();
}
};

View File

@@ -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",

1217
yarn.lock

File diff suppressed because it is too large Load Diff