diff --git a/eth-contracts/migrations/1_initial_migration.js b/eth-contracts/migrations/1_initial_migration.js deleted file mode 100644 index 3804c05..0000000 --- a/eth-contracts/migrations/1_initial_migration.js +++ /dev/null @@ -1,18 +0,0 @@ -const DioneToken = artifacts.require("DioneToken"); -const DioneOracle = artifacts.require("DioneOracle"); -const DioneDispute = artifacts.require("DioneDispute"); -const DioneStaking = artifacts.require("DioneStaking"); - -module.exports = function (deployer) { - return deployer - .then(() => { - return deployer.deploy(DioneToken); - }) - .then(() => { - return deployer.deploy(DioneStaking, DioneToken.address, web3.utils.toBN("10000000000000000000"), 0, web3.utils.toBN("5000000000000000000000")); - }).then(() => { - return deployer.deploy(DioneOracle, DioneStaking.address); - }).then(() => { - return deployer.deploy(DioneDispute, DioneStaking.address); - }); -}; diff --git a/eth-contracts/package.json b/eth-contracts/package.json index 8504646..9c719f1 100644 --- a/eth-contracts/package.json +++ b/eth-contracts/package.json @@ -4,7 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "deployLocal": "npx hardhat --network localhost run scripts/deploy.ts" }, "author": "", "license": "ISC", diff --git a/eth-contracts/scripts/deploy.ts b/eth-contracts/scripts/deploy.ts index b83f7ef..e877cf4 100644 --- a/eth-contracts/scripts/deploy.ts +++ b/eth-contracts/scripts/deploy.ts @@ -1,4 +1,5 @@ import { run, ethers } from "hardhat"; +import "@nomiclabs/hardhat-ethers"; async function main() { await run("compile");