@certik/skynet 0.10.16 → 0.10.19

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 0.10.16
3
+ ## 0.10.19
4
+
5
+ - Added Heco chain support in const.js
6
+
7
+ ## 0.10.18
8
+
9
+ - Added ERC721 abi definition to abi.js
10
+
11
+ ## 0.10.16 & 0.10.17
4
12
 
5
13
  - Removed verbose dev mode log for distributed lock
6
14
 
package/abi.js CHANGED
@@ -221,6 +221,353 @@ const ERC20 = [
221
221
  },
222
222
  ];
223
223
 
224
+ const ERC721 = [
225
+ {
226
+ "anonymous": false,
227
+ "inputs": [
228
+ {
229
+ "indexed": true,
230
+ "internalType": "address",
231
+ "name": "owner",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "indexed": true,
236
+ "internalType": "address",
237
+ "name": "approved",
238
+ "type": "address"
239
+ },
240
+ {
241
+ "indexed": true,
242
+ "internalType": "uint256",
243
+ "name": "tokenId",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "name": "Approval",
248
+ "type": "event"
249
+ },
250
+ {
251
+ "anonymous": false,
252
+ "inputs": [
253
+ {
254
+ "indexed": true,
255
+ "internalType": "address",
256
+ "name": "owner",
257
+ "type": "address"
258
+ },
259
+ {
260
+ "indexed": true,
261
+ "internalType": "address",
262
+ "name": "operator",
263
+ "type": "address"
264
+ },
265
+ {
266
+ "indexed": false,
267
+ "internalType": "bool",
268
+ "name": "approved",
269
+ "type": "bool"
270
+ }
271
+ ],
272
+ "name": "ApprovalForAll",
273
+ "type": "event"
274
+ },
275
+ {
276
+ "anonymous": false,
277
+ "inputs": [
278
+ {
279
+ "indexed": true,
280
+ "internalType": "address",
281
+ "name": "from",
282
+ "type": "address"
283
+ },
284
+ {
285
+ "indexed": true,
286
+ "internalType": "address",
287
+ "name": "to",
288
+ "type": "address"
289
+ },
290
+ {
291
+ "indexed": true,
292
+ "internalType": "uint256",
293
+ "name": "tokenId",
294
+ "type": "uint256"
295
+ }
296
+ ],
297
+ "name": "Transfer",
298
+ "type": "event"
299
+ },
300
+ {
301
+ "inputs": [
302
+ {
303
+ "internalType": "address",
304
+ "name": "to",
305
+ "type": "address"
306
+ },
307
+ {
308
+ "internalType": "uint256",
309
+ "name": "tokenId",
310
+ "type": "uint256"
311
+ }
312
+ ],
313
+ "name": "approve",
314
+ "outputs": [],
315
+ "stateMutability": "nonpayable",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "constant": true,
320
+ "inputs": [],
321
+ "name": "totalSupply",
322
+ "outputs": [
323
+ {
324
+ "name": "",
325
+ "type": "uint256"
326
+ }
327
+ ],
328
+ "payable": false,
329
+ "stateMutability": "view",
330
+ "type": "function"
331
+ },
332
+ {
333
+ "inputs": [
334
+ {
335
+ "internalType": "address",
336
+ "name": "owner",
337
+ "type": "address"
338
+ }
339
+ ],
340
+ "name": "balanceOf",
341
+ "outputs": [
342
+ {
343
+ "internalType": "uint256",
344
+ "name": "balance",
345
+ "type": "uint256"
346
+ }
347
+ ],
348
+ "stateMutability": "view",
349
+ "type": "function"
350
+ },
351
+ {
352
+ "inputs": [
353
+ {
354
+ "internalType": "uint256",
355
+ "name": "tokenId",
356
+ "type": "uint256"
357
+ }
358
+ ],
359
+ "name": "getApproved",
360
+ "outputs": [
361
+ {
362
+ "internalType": "address",
363
+ "name": "operator",
364
+ "type": "address"
365
+ }
366
+ ],
367
+ "stateMutability": "view",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "inputs": [
372
+ {
373
+ "internalType": "address",
374
+ "name": "owner",
375
+ "type": "address"
376
+ },
377
+ {
378
+ "internalType": "address",
379
+ "name": "operator",
380
+ "type": "address"
381
+ }
382
+ ],
383
+ "name": "isApprovedForAll",
384
+ "outputs": [
385
+ {
386
+ "internalType": "bool",
387
+ "name": "",
388
+ "type": "bool"
389
+ }
390
+ ],
391
+ "stateMutability": "view",
392
+ "type": "function"
393
+ },
394
+ {
395
+ "inputs": [],
396
+ "name": "name",
397
+ "outputs": [
398
+ {
399
+ "internalType": "string",
400
+ "name": "",
401
+ "type": "string"
402
+ }
403
+ ],
404
+ "stateMutability": "view",
405
+ "type": "function"
406
+ },
407
+ {
408
+ "inputs": [
409
+ {
410
+ "internalType": "uint256",
411
+ "name": "tokenId",
412
+ "type": "uint256"
413
+ }
414
+ ],
415
+ "name": "ownerOf",
416
+ "outputs": [
417
+ {
418
+ "internalType": "address",
419
+ "name": "owner",
420
+ "type": "address"
421
+ }
422
+ ],
423
+ "stateMutability": "view",
424
+ "type": "function"
425
+ },
426
+ {
427
+ "inputs": [
428
+ {
429
+ "internalType": "address",
430
+ "name": "from",
431
+ "type": "address"
432
+ },
433
+ {
434
+ "internalType": "address",
435
+ "name": "to",
436
+ "type": "address"
437
+ },
438
+ {
439
+ "internalType": "uint256",
440
+ "name": "tokenId",
441
+ "type": "uint256"
442
+ }
443
+ ],
444
+ "name": "safeTransferFrom",
445
+ "outputs": [],
446
+ "stateMutability": "nonpayable",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "from",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "address",
458
+ "name": "to",
459
+ "type": "address"
460
+ },
461
+ {
462
+ "internalType": "uint256",
463
+ "name": "tokenId",
464
+ "type": "uint256"
465
+ },
466
+ {
467
+ "internalType": "bytes",
468
+ "name": "data",
469
+ "type": "bytes"
470
+ }
471
+ ],
472
+ "name": "safeTransferFrom",
473
+ "outputs": [],
474
+ "stateMutability": "nonpayable",
475
+ "type": "function"
476
+ },
477
+ {
478
+ "inputs": [
479
+ {
480
+ "internalType": "address",
481
+ "name": "operator",
482
+ "type": "address"
483
+ },
484
+ {
485
+ "internalType": "bool",
486
+ "name": "_approved",
487
+ "type": "bool"
488
+ }
489
+ ],
490
+ "name": "setApprovalForAll",
491
+ "outputs": [],
492
+ "stateMutability": "nonpayable",
493
+ "type": "function"
494
+ },
495
+ {
496
+ "inputs": [
497
+ {
498
+ "internalType": "bytes4",
499
+ "name": "interfaceId",
500
+ "type": "bytes4"
501
+ }
502
+ ],
503
+ "name": "supportsInterface",
504
+ "outputs": [
505
+ {
506
+ "internalType": "bool",
507
+ "name": "",
508
+ "type": "bool"
509
+ }
510
+ ],
511
+ "stateMutability": "view",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [],
516
+ "name": "symbol",
517
+ "outputs": [
518
+ {
519
+ "internalType": "string",
520
+ "name": "",
521
+ "type": "string"
522
+ }
523
+ ],
524
+ "stateMutability": "view",
525
+ "type": "function"
526
+ },
527
+ {
528
+ "inputs": [
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "tokenId",
532
+ "type": "uint256"
533
+ }
534
+ ],
535
+ "name": "tokenURI",
536
+ "outputs": [
537
+ {
538
+ "internalType": "string",
539
+ "name": "",
540
+ "type": "string"
541
+ }
542
+ ],
543
+ "stateMutability": "view",
544
+ "type": "function"
545
+ },
546
+ {
547
+ "inputs": [
548
+ {
549
+ "internalType": "address",
550
+ "name": "from",
551
+ "type": "address"
552
+ },
553
+ {
554
+ "internalType": "address",
555
+ "name": "to",
556
+ "type": "address"
557
+ },
558
+ {
559
+ "internalType": "uint256",
560
+ "name": "tokenId",
561
+ "type": "uint256"
562
+ }
563
+ ],
564
+ "name": "transferFrom",
565
+ "outputs": [],
566
+ "stateMutability": "nonpayable",
567
+ "type": "function"
568
+ }
569
+ ];
570
+
224
571
  const MULTICALL = [
225
572
  {
226
573
  inputs: [{ internalType: "address", name: "_addr", type: "address" }],
@@ -349,5 +696,6 @@ const MULTICALL = [
349
696
  module.exports = {
350
697
  MULTICALL,
351
698
  ERC20,
699
+ ERC721,
352
700
  BEP20: ERC20,
353
701
  };
package/const.js CHANGED
@@ -65,6 +65,16 @@ const PROTOCOLS = {
65
65
  multiCallProvider: "0x8eC86392e0aDB57d00fDffbA39b8870e107c0757",
66
66
  scanUrl: "https://polygonscan.com/",
67
67
  },
68
+ heco: {
69
+ nativeTokenName: "Heco",
70
+ nativeTokenSymbol: "HT",
71
+ nativeTokenDecimals: 18,
72
+ nativeTokenAddress: "heco:0x0000000000000000000000000000000000000000",
73
+ endpoint: `https://http-mainnet.hecochain.com`, // use heco public RPC node
74
+ tokenStandard: "HRC20",
75
+ multiCallProvider: "0xe7144e57d832c9005d252f415d205b4b8d78228e",
76
+ scanUrl: "https://hecoinfo.com/"
77
+ }
68
78
  };
69
79
 
70
80
  const TIME = {
@@ -41,7 +41,7 @@ async function renewLock(uid) {
41
41
  return null;
42
42
  }
43
43
  } catch (fetchErr) {
44
- console.log("error fetching", fetchErr);
44
+ // console.log("error fetching", fetchErr);
45
45
 
46
46
  return null;
47
47
  }
@@ -72,7 +72,7 @@ async function hasLock(name, uid = null) {
72
72
  return true;
73
73
  }
74
74
  } catch (fetchErr) {
75
- console.log("error fetching", fetchErr);
75
+ // console.log("error fetching", fetchErr);
76
76
 
77
77
  return true;
78
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.10.16",
3
+ "version": "0.10.19",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",