-
Notifications
You must be signed in to change notification settings - Fork 27
/
deploy.js
21 lines (18 loc) · 1005 Bytes
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const main = async () => {
const NftToken = await ethers.getContractFactory("NFT"); // NFT token contract
const nftToken = await NftToken.deploy(); // NFT token contract instance
await nftToken.deployed(); // wait for contract to be deployed
const nftTokenAddress = await nftToken.address; // NFT token contract address
const AuctionManager = await ethers.getContractFactory("AuctionManager"); // Auction Manager contract
const auctionManager = await AuctionManager.deploy(); // Auction Manager contract instance
await auctionManager.deployed(); // wait for contract to be deployed
const auctionManagerAddress = await auctionManager.address; // Auction Manager contract address
console.log(`NFT deployed to: ${nftTokenAddress}`); // NFT token contract address
console.log(`Auction Manager deployed to: ${auctionManagerAddress}`); // Auction Manager contract address
};
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});