-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdeployNestable.ts
51 lines (47 loc) · 1.34 KB
/
deployNestable.ts
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { ethers } from "hardhat";
import { SimpleNestable } from "../typechain-types";
import { ContractTransaction } from "ethers";
async function main() {
const pricePerMint = ethers.utils.parseEther("0.0001");
const totalTokens = 5;
const [owner] = await ethers.getSigners();
const contractFactory = await ethers.getContractFactory("SimpleNestable");
const parent: SimpleNestable = await contractFactory.deploy(
"Kanaria",
"KAN",
"ipfs://collectionMeta",
"ipfs://tokenMeta",
{
erc20TokenAddress: ethers.constants.AddressZero,
tokenUriIsEnumerable: true,
royaltyRecipient: await owner.getAddress(),
royaltyPercentageBps: 10,
maxSupply: 1000,
pricePerMint: pricePerMint
}
);
const child: SimpleNestable = await contractFactory.deploy(
"Chunky",
"CHN",
"ipfs://collectionMeta",
"ipfs://tokenMeta",
{
erc20TokenAddress: ethers.constants.AddressZero,
tokenUriIsEnumerable: true,
royaltyRecipient: await owner.getAddress(),
royaltyPercentageBps: 10,
maxSupply: 1000,
pricePerMint: pricePerMint
}
);
await parent.deployed();
await child.deployed();
console.log(
`Sample contracts deployed to ${parent.address} and ${child.address}`
);
}
// main2();
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});