-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
58 lines (48 loc) · 1.29 KB
/
index.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
const {
// txChecker
mint,
transfer,
// getTransferlogs,
// mintlogs
} = require("./input/config.js");
// const { NftConnector } = require("Nftconnector");
const console = require("console");
const parseArgs = require("minimist")
const startNftScript = async () => {
console.log('##################');
console.log('# - Mint your OLtac NFT collection');
console.log('##################');
console.log();
console.log('start creating NFTs.');
// console.log(txChecker.oltac);
const argv = parseArgs(process.argv.slice(2))
const cmd = argv._[0]
if (process.env.DEBUG) {
console.log("argv", argv)
console.log("cmd", cmd)
}
switch (cmd) {
case "mint":
const foldername = argv._[1]
await mint(foldername)
break
case "transfer":
const filename = argv._[1]
const fromAddr = argv._[2]
const toAddr = argv._[3]
await transfer(filename, fromAddr, toAddr)
break
// case "mintlogs":
// const myAddr = argv._[1]
// await mintlogs(myAddr)
// break
// case "getTransferlogs":
// const fromAddr = argv._[1]
// const toAddr = argv._[2]
// await getTransferlogs( fromAddr, toAddr)
// break
default:
console.log("unrecognized command", cmd)
}
};
startNftScript();