qvtx-developer-kit 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.env.example +108 -0
  2. package/README.md +0 -0
  3. package/abis/QVTXBridge.json +273 -0
  4. package/abis/QVTXGovernance.json +267 -0
  5. package/abis/QVTXNFT.json +370 -0
  6. package/abis/QVTXRewards.json +155 -0
  7. package/abis/QVTXToken.json +311 -0
  8. package/abis/QVTXVesting.json +216 -0
  9. package/abis/index.js +15 -0
  10. package/bin/qvtx-developer-cli.js +99 -0
  11. package/config/index.js +108 -0
  12. package/config/networks.js +247 -0
  13. package/examples/basic-usage.js +39 -0
  14. package/examples/bridge-example.js +123 -0
  15. package/examples/governance-example.js +140 -0
  16. package/examples/nft-example.js +141 -0
  17. package/examples/staking-example.js +96 -0
  18. package/index.js +145 -0
  19. package/languages/blockchain_ai_sdk.js +0 -0
  20. package/languages/node_sdk.js +0 -0
  21. package/languages/solana_sdk.js +383 -0
  22. package/package.json +28 -3
  23. package/rewards/index.js +71 -0
  24. package/smart-contracts/QVTXBridge.sol +305 -0
  25. package/smart-contracts/QVTXGovernance.sol +325 -0
  26. package/smart-contracts/QVTXNFT.sol +338 -0
  27. package/smart-contracts/QVTXRewards.sol +102 -0
  28. package/smart-contracts/QVTXToken.sol +227 -0
  29. package/smart-contracts/QVTXVesting.sol +411 -0
  30. package/smart-contracts/interfaces/IERC20.sol +14 -0
  31. package/smart-contracts/interfaces/IERC20Metadata.sol +8 -0
  32. package/smart-contracts/interfaces/IERC721.sol +18 -0
  33. package/smart-contracts/interfaces/IERC721Metadata.sol +8 -0
  34. package/smart-contracts/interfaces/IERC721Receiver.sol +11 -0
  35. package/storage/index.js +112 -0
  36. package/templates/contract/ERC20Token.sol +116 -0
  37. package/templates/dapp/index.html +93 -0
  38. package/test/index.js +182 -0
  39. package/tools/build-tool.js +63 -0
  40. package/tools/create-template.js +116 -0
  41. package/tools/deploy-tool.js +55 -0
  42. package/tools/generate-docs.js +149 -0
  43. package/tools/init-project.js +138 -0
  44. package/tools/run-tests.js +64 -0
  45. package/types/index.d.ts +264 -0
@@ -0,0 +1,311 @@
1
+ {
2
+ "contractName": "QVTXToken",
3
+ "abi": [
4
+ {
5
+ "inputs": [{"internalType": "uint256", "name": "initialSupply", "type": "uint256"}],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "anonymous": false,
11
+ "inputs": [
12
+ {"indexed": true, "internalType": "address", "name": "owner", "type": "address"},
13
+ {"indexed": true, "internalType": "address", "name": "spender", "type": "address"},
14
+ {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}
15
+ ],
16
+ "name": "Approval",
17
+ "type": "event"
18
+ },
19
+ {
20
+ "anonymous": false,
21
+ "inputs": [
22
+ {"indexed": true, "internalType": "address", "name": "account", "type": "address"},
23
+ {"indexed": false, "internalType": "bool", "name": "status", "type": "bool"}
24
+ ],
25
+ "name": "Blacklisted",
26
+ "type": "event"
27
+ },
28
+ {
29
+ "anonymous": false,
30
+ "inputs": [{"indexed": true, "internalType": "address", "name": "newBridge", "type": "address"}],
31
+ "name": "BridgeContractUpdated",
32
+ "type": "event"
33
+ },
34
+ {
35
+ "anonymous": false,
36
+ "inputs": [
37
+ {"indexed": true, "internalType": "uint256", "name": "targetChain", "type": "uint256"},
38
+ {"indexed": true, "internalType": "address", "name": "from", "type": "address"},
39
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
40
+ ],
41
+ "name": "CrossChainBurn",
42
+ "type": "event"
43
+ },
44
+ {
45
+ "anonymous": false,
46
+ "inputs": [
47
+ {"indexed": true, "internalType": "uint256", "name": "sourceChain", "type": "uint256"},
48
+ {"indexed": true, "internalType": "address", "name": "to", "type": "address"},
49
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
50
+ ],
51
+ "name": "CrossChainMint",
52
+ "type": "event"
53
+ },
54
+ {
55
+ "anonymous": false,
56
+ "inputs": [{"indexed": true, "internalType": "address", "name": "minter", "type": "address"}],
57
+ "name": "MinterAdded",
58
+ "type": "event"
59
+ },
60
+ {
61
+ "anonymous": false,
62
+ "inputs": [{"indexed": true, "internalType": "address", "name": "minter", "type": "address"}],
63
+ "name": "MinterRemoved",
64
+ "type": "event"
65
+ },
66
+ {
67
+ "anonymous": false,
68
+ "inputs": [
69
+ {"indexed": true, "internalType": "address", "name": "previousOwner", "type": "address"},
70
+ {"indexed": true, "internalType": "address", "name": "newOwner", "type": "address"}
71
+ ],
72
+ "name": "OwnershipTransferred",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "anonymous": false,
77
+ "inputs": [
78
+ {"indexed": true, "internalType": "address", "name": "from", "type": "address"},
79
+ {"indexed": true, "internalType": "address", "name": "to", "type": "address"},
80
+ {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}
81
+ ],
82
+ "name": "Transfer",
83
+ "type": "event"
84
+ },
85
+ {
86
+ "inputs": [],
87
+ "name": "MAX_SUPPLY",
88
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
89
+ "stateMutability": "view",
90
+ "type": "function"
91
+ },
92
+ {
93
+ "inputs": [{"internalType": "address", "name": "minter", "type": "address"}],
94
+ "name": "addMinter",
95
+ "outputs": [],
96
+ "stateMutability": "nonpayable",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [
101
+ {"internalType": "address", "name": "tokenOwner", "type": "address"},
102
+ {"internalType": "address", "name": "spender", "type": "address"}
103
+ ],
104
+ "name": "allowance",
105
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
106
+ "stateMutability": "view",
107
+ "type": "function"
108
+ },
109
+ {
110
+ "inputs": [
111
+ {"internalType": "address", "name": "spender", "type": "address"},
112
+ {"internalType": "uint256", "name": "amount", "type": "uint256"}
113
+ ],
114
+ "name": "approve",
115
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
116
+ "stateMutability": "nonpayable",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [{"internalType": "address", "name": "account", "type": "address"}],
121
+ "name": "balanceOf",
122
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
123
+ "stateMutability": "view",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "inputs": [{"internalType": "address", "name": "", "type": "address"}],
128
+ "name": "blacklisted",
129
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
130
+ "stateMutability": "view",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [],
135
+ "name": "bridgeContract",
136
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
137
+ "stateMutability": "view",
138
+ "type": "function"
139
+ },
140
+ {
141
+ "inputs": [
142
+ {"internalType": "address", "name": "from", "type": "address"},
143
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
144
+ {"internalType": "uint256", "name": "targetChain", "type": "uint256"}
145
+ ],
146
+ "name": "bridgeBurn",
147
+ "outputs": [],
148
+ "stateMutability": "nonpayable",
149
+ "type": "function"
150
+ },
151
+ {
152
+ "inputs": [
153
+ {"internalType": "address", "name": "to", "type": "address"},
154
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
155
+ {"internalType": "uint256", "name": "sourceChain", "type": "uint256"}
156
+ ],
157
+ "name": "bridgeMint",
158
+ "outputs": [],
159
+ "stateMutability": "nonpayable",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}],
164
+ "name": "burn",
165
+ "outputs": [],
166
+ "stateMutability": "nonpayable",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [
171
+ {"internalType": "address", "name": "account", "type": "address"},
172
+ {"internalType": "uint256", "name": "amount", "type": "uint256"}
173
+ ],
174
+ "name": "burnFrom",
175
+ "outputs": [],
176
+ "stateMutability": "nonpayable",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
181
+ "name": "chainSupply",
182
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
183
+ "stateMutability": "view",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "inputs": [],
188
+ "name": "decimals",
189
+ "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}],
190
+ "stateMutability": "pure",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [
195
+ {"internalType": "address", "name": "spender", "type": "address"},
196
+ {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}
197
+ ],
198
+ "name": "decreaseAllowance",
199
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
200
+ "stateMutability": "nonpayable",
201
+ "type": "function"
202
+ },
203
+ {
204
+ "inputs": [
205
+ {"internalType": "address", "name": "spender", "type": "address"},
206
+ {"internalType": "uint256", "name": "addedValue", "type": "uint256"}
207
+ ],
208
+ "name": "increaseAllowance",
209
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
210
+ "stateMutability": "nonpayable",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {"internalType": "address", "name": "to", "type": "address"},
216
+ {"internalType": "uint256", "name": "amount", "type": "uint256"}
217
+ ],
218
+ "name": "mint",
219
+ "outputs": [],
220
+ "stateMutability": "nonpayable",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "inputs": [{"internalType": "address", "name": "", "type": "address"}],
225
+ "name": "minters",
226
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
227
+ "stateMutability": "view",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [],
232
+ "name": "name",
233
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
234
+ "stateMutability": "pure",
235
+ "type": "function"
236
+ },
237
+ {
238
+ "inputs": [],
239
+ "name": "owner",
240
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [{"internalType": "address", "name": "minter", "type": "address"}],
246
+ "name": "removeMinter",
247
+ "outputs": [],
248
+ "stateMutability": "nonpayable",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [
253
+ {"internalType": "address", "name": "account", "type": "address"},
254
+ {"internalType": "bool", "name": "status", "type": "bool"}
255
+ ],
256
+ "name": "setBlacklist",
257
+ "outputs": [],
258
+ "stateMutability": "nonpayable",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [{"internalType": "address", "name": "_bridge", "type": "address"}],
263
+ "name": "setBridgeContract",
264
+ "outputs": [],
265
+ "stateMutability": "nonpayable",
266
+ "type": "function"
267
+ },
268
+ {
269
+ "inputs": [],
270
+ "name": "symbol",
271
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
272
+ "stateMutability": "pure",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [],
277
+ "name": "totalSupply",
278
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
279
+ "stateMutability": "view",
280
+ "type": "function"
281
+ },
282
+ {
283
+ "inputs": [
284
+ {"internalType": "address", "name": "to", "type": "address"},
285
+ {"internalType": "uint256", "name": "amount", "type": "uint256"}
286
+ ],
287
+ "name": "transfer",
288
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
289
+ "stateMutability": "nonpayable",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "inputs": [
294
+ {"internalType": "address", "name": "from", "type": "address"},
295
+ {"internalType": "address", "name": "to", "type": "address"},
296
+ {"internalType": "uint256", "name": "amount", "type": "uint256"}
297
+ ],
298
+ "name": "transferFrom",
299
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
300
+ "stateMutability": "nonpayable",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
305
+ "name": "transferOwnership",
306
+ "outputs": [],
307
+ "stateMutability": "nonpayable",
308
+ "type": "function"
309
+ }
310
+ ]
311
+ }
@@ -0,0 +1,216 @@
1
+ {
2
+ "contractName": "QVTXVesting",
3
+ "abi": [
4
+ {
5
+ "inputs": [{"internalType": "address", "name": "_qvtxToken", "type": "address"}],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "anonymous": false,
11
+ "inputs": [
12
+ {"indexed": true, "internalType": "address", "name": "previousOwner", "type": "address"},
13
+ {"indexed": true, "internalType": "address", "name": "newOwner", "type": "address"}
14
+ ],
15
+ "name": "OwnershipTransferred",
16
+ "type": "event"
17
+ },
18
+ {
19
+ "anonymous": false,
20
+ "inputs": [
21
+ {"indexed": true, "internalType": "uint256", "name": "scheduleId", "type": "uint256"},
22
+ {"indexed": true, "internalType": "address", "name": "beneficiary", "type": "address"},
23
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
24
+ ],
25
+ "name": "TokensReleased",
26
+ "type": "event"
27
+ },
28
+ {
29
+ "anonymous": false,
30
+ "inputs": [
31
+ {"indexed": true, "internalType": "uint256", "name": "scheduleId", "type": "uint256"},
32
+ {"indexed": false, "internalType": "uint256", "name": "refundAmount", "type": "uint256"}
33
+ ],
34
+ "name": "VestingRevoked",
35
+ "type": "event"
36
+ },
37
+ {
38
+ "anonymous": false,
39
+ "inputs": [
40
+ {"indexed": true, "internalType": "uint256", "name": "scheduleId", "type": "uint256"},
41
+ {"indexed": true, "internalType": "address", "name": "beneficiary", "type": "address"},
42
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"},
43
+ {"indexed": false, "internalType": "uint8", "name": "vestingType", "type": "uint8"}
44
+ ],
45
+ "name": "VestingScheduleCreated",
46
+ "type": "event"
47
+ },
48
+ {
49
+ "inputs": [
50
+ {"internalType": "address[]", "name": "beneficiaries", "type": "address[]"},
51
+ {"internalType": "uint256[]", "name": "amounts", "type": "uint256[]"},
52
+ {"internalType": "uint8", "name": "vestingType", "type": "uint8"}
53
+ ],
54
+ "name": "batchCreateVestingSchedules",
55
+ "outputs": [{"internalType": "uint256[]", "name": "", "type": "uint256[]"}],
56
+ "stateMutability": "nonpayable",
57
+ "type": "function"
58
+ },
59
+ {
60
+ "inputs": [
61
+ {"internalType": "address", "name": "beneficiary", "type": "address"},
62
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
63
+ {"internalType": "uint256", "name": "startTime", "type": "uint256"},
64
+ {"internalType": "uint256", "name": "cliffDuration", "type": "uint256"},
65
+ {"internalType": "uint256", "name": "vestingDuration", "type": "uint256"},
66
+ {"internalType": "uint256", "name": "slicePeriod", "type": "uint256"},
67
+ {"internalType": "bool", "name": "revocable", "type": "bool"}
68
+ ],
69
+ "name": "createCustomVestingSchedule",
70
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
71
+ "stateMutability": "nonpayable",
72
+ "type": "function"
73
+ },
74
+ {
75
+ "inputs": [
76
+ {"internalType": "address", "name": "beneficiary", "type": "address"},
77
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
78
+ {"internalType": "uint8", "name": "vestingType", "type": "uint8"}
79
+ ],
80
+ "name": "createVestingSchedule",
81
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
82
+ "stateMutability": "nonpayable",
83
+ "type": "function"
84
+ },
85
+ {
86
+ "inputs": [],
87
+ "name": "emergencyWithdraw",
88
+ "outputs": [],
89
+ "stateMutability": "nonpayable",
90
+ "type": "function"
91
+ },
92
+ {
93
+ "inputs": [{"internalType": "address", "name": "beneficiary", "type": "address"}],
94
+ "name": "getBeneficiarySchedules",
95
+ "outputs": [{"internalType": "uint256[]", "name": "", "type": "uint256[]"}],
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [{"internalType": "uint256", "name": "scheduleId", "type": "uint256"}],
101
+ "name": "getReleasableAmount",
102
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [{"internalType": "address", "name": "beneficiary", "type": "address"}],
108
+ "name": "getTotalReleasable",
109
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
110
+ "stateMutability": "view",
111
+ "type": "function"
112
+ },
113
+ {
114
+ "inputs": [{"internalType": "uint256", "name": "scheduleId", "type": "uint256"}],
115
+ "name": "getVestedAmount",
116
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
117
+ "stateMutability": "view",
118
+ "type": "function"
119
+ },
120
+ {
121
+ "inputs": [{"internalType": "uint256", "name": "scheduleId", "type": "uint256"}],
122
+ "name": "getVestingSchedule",
123
+ "outputs": [
124
+ {
125
+ "components": [
126
+ {"internalType": "uint256", "name": "id", "type": "uint256"},
127
+ {"internalType": "address", "name": "beneficiary", "type": "address"},
128
+ {"internalType": "uint256", "name": "totalAmount", "type": "uint256"},
129
+ {"internalType": "uint256", "name": "releasedAmount", "type": "uint256"},
130
+ {"internalType": "uint256", "name": "startTime", "type": "uint256"},
131
+ {"internalType": "uint256", "name": "cliffDuration", "type": "uint256"},
132
+ {"internalType": "uint256", "name": "vestingDuration", "type": "uint256"},
133
+ {"internalType": "uint256", "name": "slicePeriod", "type": "uint256"},
134
+ {"internalType": "bool", "name": "revocable", "type": "bool"},
135
+ {"internalType": "bool", "name": "revoked", "type": "bool"},
136
+ {"internalType": "uint8", "name": "vestingType", "type": "uint8"}
137
+ ],
138
+ "internalType": "struct QVTXVesting.VestingSchedule",
139
+ "name": "",
140
+ "type": "tuple"
141
+ }
142
+ ],
143
+ "stateMutability": "view",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [],
148
+ "name": "owner",
149
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
150
+ "stateMutability": "view",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "inputs": [{"internalType": "uint256", "name": "scheduleId", "type": "uint256"}],
155
+ "name": "release",
156
+ "outputs": [],
157
+ "stateMutability": "nonpayable",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "inputs": [],
162
+ "name": "releaseAll",
163
+ "outputs": [],
164
+ "stateMutability": "nonpayable",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [{"internalType": "uint256", "name": "scheduleId", "type": "uint256"}],
169
+ "name": "revoke",
170
+ "outputs": [],
171
+ "stateMutability": "nonpayable",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [],
176
+ "name": "scheduleCount",
177
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
178
+ "stateMutability": "view",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [],
183
+ "name": "totalReleased",
184
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
185
+ "stateMutability": "view",
186
+ "type": "function"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "totalVested",
191
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
197
+ "name": "transferOwnership",
198
+ "outputs": [],
199
+ "stateMutability": "nonpayable",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {"internalType": "uint8", "name": "vestingType", "type": "uint8"},
205
+ {"internalType": "uint256", "name": "cliffDuration", "type": "uint256"},
206
+ {"internalType": "uint256", "name": "vestingDuration", "type": "uint256"},
207
+ {"internalType": "uint256", "name": "slicePeriod", "type": "uint256"},
208
+ {"internalType": "bool", "name": "revocable", "type": "bool"}
209
+ ],
210
+ "name": "updatePresetConfig",
211
+ "outputs": [],
212
+ "stateMutability": "nonpayable",
213
+ "type": "function"
214
+ }
215
+ ]
216
+ }
package/abis/index.js ADDED
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * QVTX Contract ABIs
5
+ * Export all contract ABIs for easy importing
6
+ */
7
+
8
+ module.exports = {
9
+ QVTXToken: require('./QVTXToken.json'),
10
+ QVTXGovernance: require('./QVTXGovernance.json'),
11
+ QVTXBridge: require('./QVTXBridge.json'),
12
+ QVTXNFT: require('./QVTXNFT.json'),
13
+ QVTXVesting: require('./QVTXVesting.json'),
14
+ QVTXRewards: require('./QVTXRewards.json')
15
+ };
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { Command } = require('commander');
5
+ const path = require('path');
6
+ const fs = require('fs');
7
+
8
+ const program = new Command();
9
+
10
+ program
11
+ .name('qvtx')
12
+ .description('QVTX Developer Kit CLI - Build infinite throughput blockchain applications')
13
+ .version('1.0.0');
14
+
15
+ program
16
+ .command('init [project-name]')
17
+ .description('Initialize a new QVTX project')
18
+ .option('-t, --template <type>', 'Project template (dapp, contract, full)', 'dapp')
19
+ .action(async (projectName, options) => {
20
+ const initScript = require('../tools/init-project');
21
+ await initScript.run(projectName, options);
22
+ });
23
+
24
+ program
25
+ .command('create <type> [name]')
26
+ .description('Create a new component (dapp, contract)')
27
+ .action(async (type, name) => {
28
+ const createScript = require('../tools/create-template');
29
+ await createScript.run(type, name);
30
+ });
31
+
32
+ program
33
+ .command('deploy [contract]')
34
+ .description('Deploy smart contract')
35
+ .option('-n, --network <network>', 'Target network', 'ethereum')
36
+ .option('-e, --env <environment>', 'Environment (mainnet, testnet)', 'testnet')
37
+ .action(async (contract, options) => {
38
+ const deployScript = require('../tools/deploy-tool');
39
+ await deployScript.run(contract, options);
40
+ });
41
+
42
+ program
43
+ .command('test [pattern]')
44
+ .description('Run tests')
45
+ .option('-v, --verbose', 'Verbose output')
46
+ .action(async (pattern, options) => {
47
+ const testScript = require('../tools/run-tests');
48
+ await testScript.run(pattern, options);
49
+ });
50
+
51
+ program
52
+ .command('build')
53
+ .description('Build the project')
54
+ .option('-p, --production', 'Production build')
55
+ .action(async (options) => {
56
+ const buildScript = require('../tools/build-tool');
57
+ await buildScript.run(options);
58
+ });
59
+
60
+ program
61
+ .command('docs')
62
+ .description('Generate documentation')
63
+ .action(async () => {
64
+ const docsScript = require('../tools/generate-docs');
65
+ await docsScript.run();
66
+ });
67
+
68
+ program
69
+ .command('networks')
70
+ .description('List supported networks')
71
+ .action(() => {
72
+ const QVTX = require('../index');
73
+ const kit = new QVTX();
74
+ console.log('\nSupported Networks:\n');
75
+ const networks = kit.getNetworks();
76
+ Object.entries(networks).forEach(([name, envs]) => {
77
+ console.log(` ${name}:`);
78
+ Object.keys(envs).forEach(env => {
79
+ console.log(` - ${env}`);
80
+ });
81
+ });
82
+ console.log('');
83
+ });
84
+
85
+ program
86
+ .command('info')
87
+ .description('Show QVTX token info')
88
+ .action(() => {
89
+ const QVTX = require('../index');
90
+ const kit = new QVTX();
91
+ const info = kit.getTokenInfo();
92
+ console.log('\nQVTX Token Info:\n');
93
+ console.log(` Name: ${info.name}`);
94
+ console.log(` Symbol: ${info.symbol}`);
95
+ console.log(` Decimals: ${info.decimals}`);
96
+ console.log(` Total Supply: 1,000,000,000 QVTX\n`);
97
+ });
98
+
99
+ program.parse();