-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.js
More file actions
28 lines (24 loc) · 915 Bytes
/
Copy pathdeploy.js
File metadata and controls
28 lines (24 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const {ethers, upgrades, network} = require("hardhat");
async function main() {
/**
* # dev
* b2dev: yarn hardhat run scripts/examples/erc721/deploy.js --network b2dev
* asdev: yarn hardhat run scripts/examples/erc721/deploy.js --network asdev
* # pord
* as: yarn hardhat run scripts/examples/erc721/deploy.js --network as
* b2: yarn hardhat run scripts/examples/erc721/deploy.js --network b2
*/
const [owner] = await ethers.getSigners()
console.log("Owner Address:", owner.address);
// deploy
const MyERC721 = await ethers.getContractFactory("MyERC721");
const instance = await upgrades.deployProxy(MyERC721, ["Test Dog", "TDT"]);
await instance.waitForDeployment();
console.log("MyERC721 Address:", instance.target);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error)
process.exit(1)
})