forked from BuildOnViction/tomoissuer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmd.js
24 lines (21 loc) · 829 Bytes
/
cmd.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
const commander = require('commander')
const { deployToken } = require('./commands/deployToken')
commander
.version('0.1.0')
.description('TomoIssuer Management Commands')
commander
.command('deploy-token')
.description('Deploy a token, apply tomoz, x')
.option('-n, --name <name>', 'Token name')
.option('-s, --symbol <symbol>', 'Token symbol')
.option('-t, --totalSupply <totalSupply>', 'Total supply')
.option('-d, --decimals <decimals>', 'Decimals')
.action(async (input) => {
const name = input.name || null
const symbol = input.symbol || null
const totalSupply = input.totalSupply || null
const decimals = input.decimals || null
await deployToken(name, symbol, totalSupply, decimals)
process.exit()
})
commander.parse(process.argv)