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,370 @@
1
+ {
2
+ "contractName": "QVTXNFT",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {"internalType": "string", "name": "name_", "type": "string"},
7
+ {"internalType": "string", "name": "symbol_", "type": "string"},
8
+ {"internalType": "string", "name": "baseURI_", "type": "string"},
9
+ {"internalType": "uint256", "name": "_maxSupply", "type": "uint256"},
10
+ {"internalType": "uint256", "name": "_mintPrice", "type": "uint256"}
11
+ ],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "anonymous": false,
17
+ "inputs": [
18
+ {"indexed": true, "internalType": "address", "name": "owner", "type": "address"},
19
+ {"indexed": true, "internalType": "address", "name": "approved", "type": "address"},
20
+ {"indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256"}
21
+ ],
22
+ "name": "Approval",
23
+ "type": "event"
24
+ },
25
+ {
26
+ "anonymous": false,
27
+ "inputs": [
28
+ {"indexed": true, "internalType": "address", "name": "owner", "type": "address"},
29
+ {"indexed": true, "internalType": "address", "name": "operator", "type": "address"},
30
+ {"indexed": false, "internalType": "bool", "name": "approved", "type": "bool"}
31
+ ],
32
+ "name": "ApprovalForAll",
33
+ "type": "event"
34
+ },
35
+ {
36
+ "anonymous": false,
37
+ "inputs": [{"indexed": false, "internalType": "string", "name": "newBaseURI", "type": "string"}],
38
+ "name": "BaseURIUpdated",
39
+ "type": "event"
40
+ },
41
+ {
42
+ "anonymous": false,
43
+ "inputs": [{"indexed": false, "internalType": "bool", "name": "enabled", "type": "bool"}],
44
+ "name": "MintingToggled",
45
+ "type": "event"
46
+ },
47
+ {
48
+ "anonymous": false,
49
+ "inputs": [
50
+ {"indexed": true, "internalType": "address", "name": "previousOwner", "type": "address"},
51
+ {"indexed": true, "internalType": "address", "name": "newOwner", "type": "address"}
52
+ ],
53
+ "name": "OwnershipTransferred",
54
+ "type": "event"
55
+ },
56
+ {
57
+ "anonymous": false,
58
+ "inputs": [
59
+ {"indexed": false, "internalType": "address", "name": "receiver", "type": "address"},
60
+ {"indexed": false, "internalType": "uint96", "name": "bps", "type": "uint96"}
61
+ ],
62
+ "name": "RoyaltyUpdated",
63
+ "type": "event"
64
+ },
65
+ {
66
+ "anonymous": false,
67
+ "inputs": [
68
+ {"indexed": true, "internalType": "address", "name": "from", "type": "address"},
69
+ {"indexed": true, "internalType": "address", "name": "to", "type": "address"},
70
+ {"indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256"}
71
+ ],
72
+ "name": "Transfer",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "anonymous": false,
77
+ "inputs": [
78
+ {"indexed": true, "internalType": "address", "name": "account", "type": "address"},
79
+ {"indexed": false, "internalType": "bool", "name": "status", "type": "bool"}
80
+ ],
81
+ "name": "WhitelistUpdated",
82
+ "type": "event"
83
+ },
84
+ {
85
+ "inputs": [{"internalType": "address[]", "name": "recipients", "type": "address[]"}],
86
+ "name": "airdrop",
87
+ "outputs": [],
88
+ "stateMutability": "nonpayable",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "inputs": [
93
+ {"internalType": "address", "name": "to", "type": "address"},
94
+ {"internalType": "uint256", "name": "tokenId", "type": "uint256"}
95
+ ],
96
+ "name": "approve",
97
+ "outputs": [],
98
+ "stateMutability": "nonpayable",
99
+ "type": "function"
100
+ },
101
+ {
102
+ "inputs": [{"internalType": "address", "name": "tokenOwner", "type": "address"}],
103
+ "name": "balanceOf",
104
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
105
+ "stateMutability": "view",
106
+ "type": "function"
107
+ },
108
+ {
109
+ "inputs": [{"internalType": "uint256", "name": "tokenId", "type": "uint256"}],
110
+ "name": "burn",
111
+ "outputs": [],
112
+ "stateMutability": "nonpayable",
113
+ "type": "function"
114
+ },
115
+ {
116
+ "inputs": [{"internalType": "uint256", "name": "tokenId", "type": "uint256"}],
117
+ "name": "getApproved",
118
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
119
+ "stateMutability": "view",
120
+ "type": "function"
121
+ },
122
+ {
123
+ "inputs": [
124
+ {"internalType": "address", "name": "tokenOwner", "type": "address"},
125
+ {"internalType": "address", "name": "operator", "type": "address"}
126
+ ],
127
+ "name": "isApprovedForAll",
128
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
129
+ "stateMutability": "view",
130
+ "type": "function"
131
+ },
132
+ {
133
+ "inputs": [],
134
+ "name": "maxPerWallet",
135
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
136
+ "stateMutability": "view",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [],
141
+ "name": "maxSupply",
142
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
143
+ "stateMutability": "view",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [{"internalType": "uint256", "name": "quantity", "type": "uint256"}],
148
+ "name": "mint",
149
+ "outputs": [],
150
+ "stateMutability": "payable",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "inputs": [],
155
+ "name": "mintPrice",
156
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
157
+ "stateMutability": "view",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "inputs": [],
162
+ "name": "mintingEnabled",
163
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
164
+ "stateMutability": "view",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [],
169
+ "name": "name",
170
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
171
+ "stateMutability": "view",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [],
176
+ "name": "owner",
177
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
178
+ "stateMutability": "view",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [
183
+ {"internalType": "address", "name": "to", "type": "address"},
184
+ {"internalType": "uint256", "name": "quantity", "type": "uint256"}
185
+ ],
186
+ "name": "ownerMint",
187
+ "outputs": [],
188
+ "stateMutability": "nonpayable",
189
+ "type": "function"
190
+ },
191
+ {
192
+ "inputs": [{"internalType": "uint256", "name": "tokenId", "type": "uint256"}],
193
+ "name": "ownerOf",
194
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
195
+ "stateMutability": "view",
196
+ "type": "function"
197
+ },
198
+ {
199
+ "inputs": [
200
+ {"internalType": "uint256", "name": "", "type": "uint256"},
201
+ {"internalType": "uint256", "name": "salePrice", "type": "uint256"}
202
+ ],
203
+ "name": "royaltyInfo",
204
+ "outputs": [
205
+ {"internalType": "address", "name": "", "type": "address"},
206
+ {"internalType": "uint256", "name": "", "type": "uint256"}
207
+ ],
208
+ "stateMutability": "view",
209
+ "type": "function"
210
+ },
211
+ {
212
+ "inputs": [
213
+ {"internalType": "address", "name": "from", "type": "address"},
214
+ {"internalType": "address", "name": "to", "type": "address"},
215
+ {"internalType": "uint256", "name": "tokenId", "type": "uint256"}
216
+ ],
217
+ "name": "safeTransferFrom",
218
+ "outputs": [],
219
+ "stateMutability": "nonpayable",
220
+ "type": "function"
221
+ },
222
+ {
223
+ "inputs": [
224
+ {"internalType": "address", "name": "from", "type": "address"},
225
+ {"internalType": "address", "name": "to", "type": "address"},
226
+ {"internalType": "uint256", "name": "tokenId", "type": "uint256"},
227
+ {"internalType": "bytes", "name": "data", "type": "bytes"}
228
+ ],
229
+ "name": "safeTransferFrom",
230
+ "outputs": [],
231
+ "stateMutability": "nonpayable",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [
236
+ {"internalType": "address", "name": "operator", "type": "address"},
237
+ {"internalType": "bool", "name": "approved", "type": "bool"}
238
+ ],
239
+ "name": "setApprovalForAll",
240
+ "outputs": [],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [{"internalType": "string", "name": "baseURI_", "type": "string"}],
246
+ "name": "setBaseURI",
247
+ "outputs": [],
248
+ "stateMutability": "nonpayable",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [{"internalType": "uint256", "name": "_max", "type": "uint256"}],
253
+ "name": "setMaxPerWallet",
254
+ "outputs": [],
255
+ "stateMutability": "nonpayable",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [{"internalType": "uint256", "name": "_price", "type": "uint256"}],
260
+ "name": "setMintPrice",
261
+ "outputs": [],
262
+ "stateMutability": "nonpayable",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "inputs": [
267
+ {"internalType": "address", "name": "receiver", "type": "address"},
268
+ {"internalType": "uint96", "name": "bps", "type": "uint96"}
269
+ ],
270
+ "name": "setRoyalty",
271
+ "outputs": [],
272
+ "stateMutability": "nonpayable",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {"internalType": "uint256", "name": "tokenId", "type": "uint256"},
278
+ {"internalType": "string", "name": "_tokenURI", "type": "string"}
279
+ ],
280
+ "name": "setTokenURI",
281
+ "outputs": [],
282
+ "stateMutability": "nonpayable",
283
+ "type": "function"
284
+ },
285
+ {
286
+ "inputs": [{"internalType": "bool", "name": "_whitelistOnly", "type": "bool"}],
287
+ "name": "setWhitelistOnly",
288
+ "outputs": [],
289
+ "stateMutability": "nonpayable",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "inputs": [{"internalType": "bytes4", "name": "interfaceId", "type": "bytes4"}],
294
+ "name": "supportsInterface",
295
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
296
+ "stateMutability": "pure",
297
+ "type": "function"
298
+ },
299
+ {
300
+ "inputs": [],
301
+ "name": "symbol",
302
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
303
+ "stateMutability": "view",
304
+ "type": "function"
305
+ },
306
+ {
307
+ "inputs": [{"internalType": "bool", "name": "_enabled", "type": "bool"}],
308
+ "name": "toggleMinting",
309
+ "outputs": [],
310
+ "stateMutability": "nonpayable",
311
+ "type": "function"
312
+ },
313
+ {
314
+ "inputs": [{"internalType": "uint256", "name": "tokenId", "type": "uint256"}],
315
+ "name": "tokenURI",
316
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
317
+ "stateMutability": "view",
318
+ "type": "function"
319
+ },
320
+ {
321
+ "inputs": [],
322
+ "name": "totalSupply",
323
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {"internalType": "address", "name": "from", "type": "address"},
330
+ {"internalType": "address", "name": "to", "type": "address"},
331
+ {"internalType": "uint256", "name": "tokenId", "type": "uint256"}
332
+ ],
333
+ "name": "transferFrom",
334
+ "outputs": [],
335
+ "stateMutability": "nonpayable",
336
+ "type": "function"
337
+ },
338
+ {
339
+ "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
340
+ "name": "transferOwnership",
341
+ "outputs": [],
342
+ "stateMutability": "nonpayable",
343
+ "type": "function"
344
+ },
345
+ {
346
+ "inputs": [
347
+ {"internalType": "address[]", "name": "accounts", "type": "address[]"},
348
+ {"internalType": "bool", "name": "status", "type": "bool"}
349
+ ],
350
+ "name": "updateWhitelist",
351
+ "outputs": [],
352
+ "stateMutability": "nonpayable",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "inputs": [],
357
+ "name": "whitelistOnly",
358
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [],
364
+ "name": "withdraw",
365
+ "outputs": [],
366
+ "stateMutability": "nonpayable",
367
+ "type": "function"
368
+ }
369
+ ]
370
+ }
@@ -0,0 +1,155 @@
1
+ {
2
+ "contractName": "QVTXRewards",
3
+ "abi": [
4
+ {
5
+ "inputs": [{"internalType": "address", "name": "_rewardToken", "type": "address"}],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "anonymous": false,
11
+ "inputs": [
12
+ {"indexed": true, "internalType": "address", "name": "user", "type": "address"},
13
+ {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}
14
+ ],
15
+ "name": "RewardPaid",
16
+ "type": "event"
17
+ },
18
+ {
19
+ "anonymous": false,
20
+ "inputs": [{"indexed": false, "internalType": "uint256", "name": "newRate", "type": "uint256"}],
21
+ "name": "RewardRateUpdated",
22
+ "type": "event"
23
+ },
24
+ {
25
+ "anonymous": false,
26
+ "inputs": [
27
+ {"indexed": true, "internalType": "address", "name": "user", "type": "address"},
28
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
29
+ ],
30
+ "name": "Staked",
31
+ "type": "event"
32
+ },
33
+ {
34
+ "anonymous": false,
35
+ "inputs": [
36
+ {"indexed": true, "internalType": "address", "name": "user", "type": "address"},
37
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
38
+ ],
39
+ "name": "Withdrawn",
40
+ "type": "event"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "claimReward",
45
+ "outputs": [],
46
+ "stateMutability": "nonpayable",
47
+ "type": "function"
48
+ },
49
+ {
50
+ "inputs": [{"internalType": "address", "name": "account", "type": "address"}],
51
+ "name": "earned",
52
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
53
+ "stateMutability": "view",
54
+ "type": "function"
55
+ },
56
+ {
57
+ "inputs": [],
58
+ "name": "emergencyWithdraw",
59
+ "outputs": [],
60
+ "stateMutability": "nonpayable",
61
+ "type": "function"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "lastUpdateBlock",
66
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
67
+ "stateMutability": "view",
68
+ "type": "function"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "owner",
73
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
74
+ "stateMutability": "view",
75
+ "type": "function"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "rewardPerToken",
80
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
81
+ "stateMutability": "view",
82
+ "type": "function"
83
+ },
84
+ {
85
+ "inputs": [],
86
+ "name": "rewardPerTokenStored",
87
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
88
+ "stateMutability": "view",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "inputs": [],
93
+ "name": "rewardRate",
94
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
95
+ "stateMutability": "view",
96
+ "type": "function"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "rewardToken",
101
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
102
+ "stateMutability": "view",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [{"internalType": "address", "name": "", "type": "address"}],
107
+ "name": "rewards",
108
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
109
+ "stateMutability": "view",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [{"internalType": "uint256", "name": "_rate", "type": "uint256"}],
114
+ "name": "setRewardRate",
115
+ "outputs": [],
116
+ "stateMutability": "nonpayable",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}],
121
+ "name": "stake",
122
+ "outputs": [],
123
+ "stateMutability": "nonpayable",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "inputs": [{"internalType": "address", "name": "", "type": "address"}],
128
+ "name": "stakes",
129
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
130
+ "stateMutability": "view",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [],
135
+ "name": "totalStaked",
136
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
137
+ "stateMutability": "view",
138
+ "type": "function"
139
+ },
140
+ {
141
+ "inputs": [{"internalType": "address", "name": "", "type": "address"}],
142
+ "name": "userRewardPerTokenPaid",
143
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
144
+ "stateMutability": "view",
145
+ "type": "function"
146
+ },
147
+ {
148
+ "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}],
149
+ "name": "withdraw",
150
+ "outputs": [],
151
+ "stateMutability": "nonpayable",
152
+ "type": "function"
153
+ }
154
+ ]
155
+ }