-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2-mint-bundle-nfts.js
58 lines (53 loc) · 1.42 KB
/
2-mint-bundle-nfts.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
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
54
55
56
57
58
import { readFileSync } from 'fs';
import { sdk } from './helpers.js';
async function main() {
const bundleModuleAddress = '0x51207eB947f6215ce6db5CEf24083c9A5d281f7b';
const bundleModule = sdk.getBundleModule(bundleModuleAddress);
console.log('Creating NFT batch...');
const created = await bundleModule.createAndMintBatch([
{
metadata: {
name: 'Dog 1',
description: 'Wont Shut the Fuck Up',
image: readFileSync('./assets/Dog-1.jpg'),
properties: {
rarity: 'not rare',
shedding: 10,
}
},
supply: 50,
},
{
metadata: {
name: 'Dog 2',
description: 'Never Tires',
image: readFileSync('./assets/dog-2.jpg'),
properties: {
rarity: 'a bit rare',
shedding: 6,
}
},
supply: 30,
},
{
metadata: {
name: 'Dog 3',
description: 'WuTang Killa Beez',
image: readFileSync ('./assets/dog-3.jpg'),
properties: {
rarity: 'rare',
shedding: 2,
}
},
supply: 10,
},
]);
console.log('NFT created!')
console.log(JSON.stringify(created, null, 2));
}
try {
await main()
} catch (error) {
console.error("Error minting the NFTS", error);
process.exit(1);
}