-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy pathdeployAll.js
More file actions
53 lines (38 loc) · 1.61 KB
/
deployAll.js
File metadata and controls
53 lines (38 loc) · 1.61 KB
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
52
53
const { ethers } = require('hardhat');
// Deploy function
async function deployAll() {
[account, account2] = await ethers.getSigners();
deployerAddress = account.address;
console.log(`Deploying contracts using ${deployerAddress}`);
const token = await ethers.getContractFactory('Token');
const tokenInstance = await token.deploy(1000);
await tokenInstance.deployed();
const simpleStorage = await ethers.getContractFactory('SimpleStorage');
const simpleStorageInstance = await simpleStorage.deploy(
);
await simpleStorageInstance.deployed();
const greeter = await ethers.getContractFactory('Greeter');
const greeterInstance = await greeter.deploy(
);
await greeterInstance.deployed();
const gameitem = await ethers.getContractFactory('GameItem');
const gameitemInstance = await gameitem.deploy(
);
await gameitemInstance.deployed();
const artwork = await ethers.getContractFactory('Artwork');
const artworkInstance = await artwork.deploy("Artwork Contract", "ART");
await artworkInstance.deployed();
const multiSigWallet = await ethers.getContractFactory('MultiSigWallet');
const multiSigWalletInstance = await multiSigWallet.deploy([account.address, account2.address], 2, 1111);
await multiSigWalletInstance.deployed();
const TestERC1155 = await ethers.getContractFactory('TestERC1155');
const testERC1155Instance = await TestERC1155.deploy(
);
await testERC1155Instance.deployed();
}
deployAll()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});