-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.js
24 lines (19 loc) · 814 Bytes
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
//
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat
// will compile your contracts, add the Hardhat Runtime Environment's members to the
// global scope, and execute the script.
const hre = require("hardhat");
async function main() {
// Deploy AMM
const AMM = await hre.ethers.getContractFactory('AMM')
const amm = await AMM.deploy(dapp.address, usd.address)
console.log(`AMM contract deployed to: ${amm.address}\n`)
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});