essential-eth 0.4.6 → 0.4.9-alpha.1
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/lib/cjs/classes/Contract.d.ts +2 -3
- package/lib/cjs/classes/Contract.js +9 -7
- package/lib/cjs/classes/utils/fetchers.d.ts +1 -1
- package/lib/cjs/classes/utils/fetchers.js +21 -3
- package/lib/cjs/providers/JsonRpcProvider.d.ts +7 -1
- package/lib/cjs/providers/JsonRpcProvider.js +25 -5
- package/lib/cjs/providers/test/rpc-urls.d.ts +3 -0
- package/lib/cjs/providers/test/rpc-urls.js +6 -0
- package/lib/cjs/providers/utils/chains-info.d.ts +41 -1
- package/lib/cjs/providers/utils/chains-info.js +124 -4
- package/lib/cjs/types/Contract.types.d.ts +3 -3
- package/lib/cjs/types/Network.types.d.ts +2 -2
- package/lib/esm/classes/Contract.d.ts +2 -3
- package/lib/esm/classes/Contract.js +9 -7
- package/lib/esm/classes/utils/fetchers.d.ts +1 -1
- package/lib/esm/classes/utils/fetchers.js +21 -3
- package/lib/esm/providers/JsonRpcProvider.d.ts +3 -1
- package/lib/esm/providers/JsonRpcProvider.js +21 -5
- package/lib/esm/providers/test/rpc-urls.d.ts +3 -0
- package/lib/esm/providers/test/rpc-urls.js +3 -0
- package/lib/esm/providers/utils/chains-info.d.ts +41 -1
- package/lib/esm/providers/utils/chains-info.js +124 -4
- package/lib/esm/types/Contract.types.d.ts +3 -3
- package/lib/esm/types/Network.types.d.ts +2 -2
- package/package.json +17 -21
- package/readme.md +36 -11
|
@@ -141,6 +141,9 @@ export default {
|
|
|
141
141
|
"53": [
|
|
142
142
|
"tcet"
|
|
143
143
|
],
|
|
144
|
+
"54": [
|
|
145
|
+
"OP"
|
|
146
|
+
],
|
|
144
147
|
"55": [
|
|
145
148
|
"ZYX"
|
|
146
149
|
],
|
|
@@ -256,7 +259,10 @@ export default {
|
|
|
256
259
|
"eti"
|
|
257
260
|
],
|
|
258
261
|
"102": [
|
|
259
|
-
"
|
|
262
|
+
"tw3g"
|
|
263
|
+
],
|
|
264
|
+
"105": [
|
|
265
|
+
"dw3g"
|
|
260
266
|
],
|
|
261
267
|
"106": [
|
|
262
268
|
"vlx"
|
|
@@ -297,6 +303,9 @@ export default {
|
|
|
297
303
|
"137": [
|
|
298
304
|
"MATIC"
|
|
299
305
|
],
|
|
306
|
+
"141": [
|
|
307
|
+
"OPtest"
|
|
308
|
+
],
|
|
300
309
|
"142": [
|
|
301
310
|
"dax"
|
|
302
311
|
],
|
|
@@ -306,6 +315,9 @@ export default {
|
|
|
306
315
|
"163": [
|
|
307
316
|
"pht"
|
|
308
317
|
],
|
|
318
|
+
"168": [
|
|
319
|
+
"aioz"
|
|
320
|
+
],
|
|
309
321
|
"170": [
|
|
310
322
|
"hoosmartchain"
|
|
311
323
|
],
|
|
@@ -330,9 +342,18 @@ export default {
|
|
|
330
342
|
"211": [
|
|
331
343
|
"EDI"
|
|
332
344
|
],
|
|
345
|
+
"218": [
|
|
346
|
+
"SO1-old"
|
|
347
|
+
],
|
|
333
348
|
"222": [
|
|
334
349
|
"ASK"
|
|
335
350
|
],
|
|
351
|
+
"225": [
|
|
352
|
+
"LA"
|
|
353
|
+
],
|
|
354
|
+
"226": [
|
|
355
|
+
"TLA"
|
|
356
|
+
],
|
|
336
357
|
"246": [
|
|
337
358
|
"ewt"
|
|
338
359
|
],
|
|
@@ -342,6 +363,9 @@ export default {
|
|
|
342
363
|
"256": [
|
|
343
364
|
"hecot"
|
|
344
365
|
],
|
|
366
|
+
"258": [
|
|
367
|
+
"setm"
|
|
368
|
+
],
|
|
345
369
|
"262": [
|
|
346
370
|
"SUR"
|
|
347
371
|
],
|
|
@@ -360,6 +384,9 @@ export default {
|
|
|
360
384
|
"333": [
|
|
361
385
|
"w3q"
|
|
362
386
|
],
|
|
387
|
+
"335": [
|
|
388
|
+
"DFKTEST"
|
|
389
|
+
],
|
|
363
390
|
"336": [
|
|
364
391
|
"sdn"
|
|
365
392
|
],
|
|
@@ -390,6 +417,12 @@ export default {
|
|
|
390
417
|
"499": [
|
|
391
418
|
"rupx"
|
|
392
419
|
],
|
|
420
|
+
"512": [
|
|
421
|
+
"aac"
|
|
422
|
+
],
|
|
423
|
+
"513": [
|
|
424
|
+
"aact"
|
|
425
|
+
],
|
|
393
426
|
"555": [
|
|
394
427
|
"CLASS"
|
|
395
428
|
],
|
|
@@ -426,6 +459,9 @@ export default {
|
|
|
426
459
|
"787": [
|
|
427
460
|
"aca"
|
|
428
461
|
],
|
|
462
|
+
"788": [
|
|
463
|
+
"taero"
|
|
464
|
+
],
|
|
429
465
|
"803": [
|
|
430
466
|
"haic"
|
|
431
467
|
],
|
|
@@ -456,6 +492,12 @@ export default {
|
|
|
456
492
|
"940": [
|
|
457
493
|
"tpls"
|
|
458
494
|
],
|
|
495
|
+
"941": [
|
|
496
|
+
"t2bpls"
|
|
497
|
+
],
|
|
498
|
+
"942": [
|
|
499
|
+
"t3pls"
|
|
500
|
+
],
|
|
459
501
|
"977": [
|
|
460
502
|
"yeti"
|
|
461
503
|
],
|
|
@@ -504,6 +546,9 @@ export default {
|
|
|
504
546
|
"1197": [
|
|
505
547
|
"iora"
|
|
506
548
|
],
|
|
549
|
+
"1201": [
|
|
550
|
+
"avis"
|
|
551
|
+
],
|
|
507
552
|
"1202": [
|
|
508
553
|
"wtt"
|
|
509
554
|
],
|
|
@@ -522,12 +567,18 @@ export default {
|
|
|
522
567
|
"1285": [
|
|
523
568
|
"mriver"
|
|
524
569
|
],
|
|
570
|
+
"1286": [
|
|
571
|
+
"mrock-old"
|
|
572
|
+
],
|
|
525
573
|
"1287": [
|
|
526
574
|
"mbase"
|
|
527
575
|
],
|
|
528
576
|
"1288": [
|
|
529
577
|
"mrock"
|
|
530
578
|
],
|
|
579
|
+
"1337": [
|
|
580
|
+
"cennz-a"
|
|
581
|
+
],
|
|
531
582
|
"1618": [
|
|
532
583
|
"cate"
|
|
533
584
|
],
|
|
@@ -537,12 +588,21 @@ export default {
|
|
|
537
588
|
"1657": [
|
|
538
589
|
"bta"
|
|
539
590
|
],
|
|
591
|
+
"1688": [
|
|
592
|
+
"LUDAN"
|
|
593
|
+
],
|
|
540
594
|
"1856": [
|
|
541
595
|
"tsf"
|
|
542
596
|
],
|
|
597
|
+
"1898": [
|
|
598
|
+
"boya"
|
|
599
|
+
],
|
|
543
600
|
"1987": [
|
|
544
601
|
"egem"
|
|
545
602
|
],
|
|
603
|
+
"2001": [
|
|
604
|
+
"milkAda"
|
|
605
|
+
],
|
|
546
606
|
"2020": [
|
|
547
607
|
"420"
|
|
548
608
|
],
|
|
@@ -561,27 +621,60 @@ export default {
|
|
|
561
621
|
"2101": [
|
|
562
622
|
"esp"
|
|
563
623
|
],
|
|
624
|
+
"2213": [
|
|
625
|
+
"evanesco"
|
|
626
|
+
],
|
|
627
|
+
"2221": [
|
|
628
|
+
"kava"
|
|
629
|
+
],
|
|
564
630
|
"2559": [
|
|
565
631
|
"ktoc"
|
|
566
632
|
],
|
|
633
|
+
"3000": [
|
|
634
|
+
"cennz-r"
|
|
635
|
+
],
|
|
636
|
+
"3001": [
|
|
637
|
+
"cennz-n"
|
|
638
|
+
],
|
|
567
639
|
"3331": [
|
|
568
640
|
"zcrbeach"
|
|
569
641
|
],
|
|
570
642
|
"3333": [
|
|
571
643
|
"w3q-t"
|
|
572
644
|
],
|
|
645
|
+
"3334": [
|
|
646
|
+
"w3q-g"
|
|
647
|
+
],
|
|
648
|
+
"3400": [
|
|
649
|
+
"prb"
|
|
650
|
+
],
|
|
651
|
+
"3500": [
|
|
652
|
+
"prbtestnet"
|
|
653
|
+
],
|
|
573
654
|
"3690": [
|
|
574
655
|
"btx"
|
|
575
656
|
],
|
|
657
|
+
"3966": [
|
|
658
|
+
"dyno"
|
|
659
|
+
],
|
|
660
|
+
"3967": [
|
|
661
|
+
"tdyno"
|
|
662
|
+
],
|
|
576
663
|
"4002": [
|
|
577
664
|
"tftm"
|
|
578
665
|
],
|
|
666
|
+
"4102": [
|
|
667
|
+
"aioz-testnet"
|
|
668
|
+
],
|
|
579
669
|
"4689": [
|
|
580
670
|
"iotex-mainnet"
|
|
581
671
|
],
|
|
582
672
|
"4690": [
|
|
583
673
|
"iotex-testnet"
|
|
584
674
|
],
|
|
675
|
+
"4918": [
|
|
676
|
+
"xvm"
|
|
677
|
+
],
|
|
585
678
|
"5197": [
|
|
586
679
|
"es"
|
|
587
680
|
],
|
|
@@ -591,6 +684,9 @@ export default {
|
|
|
591
684
|
"5700": [
|
|
592
685
|
"tsys"
|
|
593
686
|
],
|
|
687
|
+
"5777": [
|
|
688
|
+
"dgcc"
|
|
689
|
+
],
|
|
594
690
|
"5851": [
|
|
595
691
|
"Ontology Testnet"
|
|
596
692
|
],
|
|
@@ -660,6 +756,9 @@ export default {
|
|
|
660
756
|
"10101": [
|
|
661
757
|
"GEN"
|
|
662
758
|
],
|
|
759
|
+
"10823": [
|
|
760
|
+
"CCP"
|
|
761
|
+
],
|
|
663
762
|
"11111": [
|
|
664
763
|
"WAGMI"
|
|
665
764
|
],
|
|
@@ -684,6 +783,9 @@ export default {
|
|
|
684
783
|
"19845": [
|
|
685
784
|
"btcix"
|
|
686
785
|
],
|
|
786
|
+
"21816": [
|
|
787
|
+
"oml"
|
|
788
|
+
],
|
|
687
789
|
"24484": [
|
|
688
790
|
"web"
|
|
689
791
|
],
|
|
@@ -729,12 +831,18 @@ export default {
|
|
|
729
831
|
"44787": [
|
|
730
832
|
"ALFA"
|
|
731
833
|
],
|
|
834
|
+
"45000": [
|
|
835
|
+
"autobahn"
|
|
836
|
+
],
|
|
732
837
|
"47805": [
|
|
733
838
|
"REI"
|
|
734
839
|
],
|
|
735
840
|
"49797": [
|
|
736
841
|
"tnrg"
|
|
737
842
|
],
|
|
843
|
+
"53935": [
|
|
844
|
+
"DFK"
|
|
845
|
+
],
|
|
738
846
|
"55555": [
|
|
739
847
|
"rei"
|
|
740
848
|
],
|
|
@@ -849,6 +957,9 @@ export default {
|
|
|
849
957
|
"110008": [
|
|
850
958
|
"qkc-d-s7"
|
|
851
959
|
],
|
|
960
|
+
"200101": [
|
|
961
|
+
"milkTAda"
|
|
962
|
+
],
|
|
852
963
|
"200625": [
|
|
853
964
|
"aka"
|
|
854
965
|
],
|
|
@@ -858,12 +969,12 @@ export default {
|
|
|
858
969
|
"201030": [
|
|
859
970
|
"alayadev"
|
|
860
971
|
],
|
|
861
|
-
"210309": [
|
|
862
|
-
"platondev"
|
|
863
|
-
],
|
|
864
972
|
"210425": [
|
|
865
973
|
"platon"
|
|
866
974
|
],
|
|
975
|
+
"234666": [
|
|
976
|
+
"hym"
|
|
977
|
+
],
|
|
867
978
|
"246529": [
|
|
868
979
|
"ats"
|
|
869
980
|
],
|
|
@@ -882,6 +993,9 @@ export default {
|
|
|
882
993
|
"421611": [
|
|
883
994
|
"arb-rinkeby"
|
|
884
995
|
],
|
|
996
|
+
"444900": [
|
|
997
|
+
"wlkt"
|
|
998
|
+
],
|
|
885
999
|
"666666": [
|
|
886
1000
|
"vpioneer"
|
|
887
1001
|
],
|
|
@@ -900,6 +1014,9 @@ export default {
|
|
|
900
1014
|
"1337702": [
|
|
901
1015
|
"kintsugi"
|
|
902
1016
|
],
|
|
1017
|
+
"2203181": [
|
|
1018
|
+
"platondev"
|
|
1019
|
+
],
|
|
903
1020
|
"7762959": [
|
|
904
1021
|
"music"
|
|
905
1022
|
],
|
|
@@ -1007,5 +1124,8 @@ export default {
|
|
|
1007
1124
|
],
|
|
1008
1125
|
"6022140761023": [
|
|
1009
1126
|
"mole"
|
|
1127
|
+
],
|
|
1128
|
+
"868455272153094": [
|
|
1129
|
+
"gw-testnet-v1"
|
|
1010
1130
|
]
|
|
1011
1131
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare type ContractTypes = 'bool' | 'bytes1' | 'bytes2' | 'bytes3' | 'bytes4' | 'bytes5' | 'bytes6' | 'bytes7' | 'bytes8' | 'bytes9' | 'bytes10' | 'bytes11' | 'bytes12' | 'bytes13' | 'bytes14' | 'bytes15' | 'bytes16' | 'bytes17' | 'bytes18' | 'bytes19' | 'bytes20' | 'bytes21' | 'bytes22' | 'bytes23' | 'bytes24' | 'bytes25' | 'bytes26' | 'bytes27' | 'bytes28' | 'bytes29' | 'bytes30' | 'bytes31' | 'bytes32' | 'bytes32[]' | 'address' | 'address payable' | 'address[4]' | 'address[100]' | 'uint256' | 'uint256[100]' | 'uint8' | 'uint32' | string;
|
|
2
2
|
export declare type ContractInterface = JSONABI;
|
|
3
3
|
export declare type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
|
|
4
|
-
export
|
|
4
|
+
export interface JSONABIArgument {
|
|
5
5
|
anonymous?: false;
|
|
6
6
|
inputs: {
|
|
7
7
|
internalType?: ContractTypes | string;
|
|
@@ -16,9 +16,9 @@ export declare type JSONABIArgument = {
|
|
|
16
16
|
type: ContractTypes;
|
|
17
17
|
}[];
|
|
18
18
|
stateMutability?: 'view' | 'nonpayable' | string;
|
|
19
|
-
type: 'function' | 'event' | 'constructor' | 'error';
|
|
19
|
+
type: 'function' | 'event' | 'constructor' | 'error' | 'fallback';
|
|
20
20
|
gas?: number;
|
|
21
21
|
constant?: boolean;
|
|
22
22
|
payable?: boolean;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
export declare type JSONABI = JSONABIArgument[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "essential-eth",
|
|
3
3
|
"description": "Ultralight JS library for Ethereum utilities",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.9-alpha.01",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
@@ -22,11 +22,9 @@
|
|
|
22
22
|
"tsc:esm": "tsc -p tsconfig.json",
|
|
23
23
|
"tsc:cjs": "tsc -p tsconfig-cjs.json",
|
|
24
24
|
"build": "rm -rf lib && npm run compile",
|
|
25
|
-
"prepublishOnly": "npm run build
|
|
25
|
+
"prepublishOnly": "npm run build",
|
|
26
26
|
"jest": "jest",
|
|
27
27
|
"build:chains-info": "npx ts-node scripts/fetch-chains-info.ts # used in getNetwork()",
|
|
28
|
-
"build:website": "sh scripts/build-website.sh",
|
|
29
|
-
"build:website:new-version": "typedoc --options typedoc/options-new-version.js",
|
|
30
28
|
"pre-commit": "sh scripts/pre-commit.sh"
|
|
31
29
|
},
|
|
32
30
|
"devDependencies": {
|
|
@@ -37,40 +35,38 @@
|
|
|
37
35
|
"@types/jest": "^27.4.1",
|
|
38
36
|
"@types/jest-dev-server": "^5.0.0",
|
|
39
37
|
"@types/node": "^16.10.1",
|
|
40
|
-
"@types/prettier": "^2.4.
|
|
41
|
-
"@
|
|
42
|
-
"@typescript-eslint/
|
|
43
|
-
"@typescript-eslint/parser": "^5.12.1",
|
|
38
|
+
"@types/prettier": "^2.4.4",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
|
40
|
+
"@typescript-eslint/parser": "^5.17.0",
|
|
44
41
|
"body-parser": "^1.19.0",
|
|
45
42
|
"dotenv": "^16.0.0",
|
|
46
|
-
"eslint": "^8.
|
|
47
|
-
"eslint-plugin-jest": "^26.1.
|
|
48
|
-
"ethers": "^5.
|
|
43
|
+
"eslint": "^8.12.0",
|
|
44
|
+
"eslint-plugin-jest": "^26.1.3",
|
|
45
|
+
"ethers": "^5.6.2",
|
|
49
46
|
"express": "^4.17.1",
|
|
50
47
|
"husky": "^4.3.0",
|
|
51
48
|
"jest": "^27.5.1",
|
|
52
49
|
"jest-dev-server": "^6.0.3",
|
|
53
|
-
"just-omit": "^
|
|
54
|
-
"lint-staged": "^12.3.
|
|
50
|
+
"just-omit": "^2.0.1",
|
|
51
|
+
"lint-staged": "^12.3.7",
|
|
55
52
|
"npm-run-all": "^4.1.5",
|
|
56
|
-
"prettier": "^2.
|
|
53
|
+
"prettier": "^2.6.2",
|
|
57
54
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
58
|
-
"
|
|
59
|
-
"ts-jest": "^27.1.3",
|
|
55
|
+
"ts-jest": "^27.1.4",
|
|
60
56
|
"ts-node": "^10.2.1",
|
|
61
|
-
"typedoc": "^0.22.
|
|
62
|
-
"typescript": "^4.
|
|
63
|
-
"web3": "^1.7.
|
|
57
|
+
"typedoc": "^0.22.13",
|
|
58
|
+
"typescript": "^4.6.3",
|
|
59
|
+
"web3": "^1.7.1"
|
|
64
60
|
},
|
|
65
61
|
"dependencies": {
|
|
66
|
-
"@types/big.js": "^6.1.
|
|
62
|
+
"@types/big.js": "^6.1.3",
|
|
67
63
|
"big.js": "^6.1.1",
|
|
68
64
|
"isomorphic-unfetch": "^3.1.0",
|
|
69
65
|
"sha3": "^2.1.4"
|
|
70
66
|
},
|
|
71
67
|
"husky": {
|
|
72
68
|
"hooks": {
|
|
73
|
-
"pre-commit": "lint-staged && run-p pre-commit test build:
|
|
69
|
+
"pre-commit": "lint-staged && run-p pre-commit test build:chains-info"
|
|
74
70
|
}
|
|
75
71
|
},
|
|
76
72
|
"lint-staged": {
|
package/readme.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a><img src="https://
|
|
2
|
+
<a><img src="https://user-images.githubusercontent.com/3408480/161474132-ae95d289-2298-46f1-b48d-9c02d88f7e38.png" title="Logo" height="400" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
<p align="center">
|
|
5
5
|
<b>
|
|
6
6
|
Essential Eth
|
|
7
7
|
</b>
|
|
8
|
-
<br
|
|
9
|
-
<i>
|
|
10
|
-
<br
|
|
8
|
+
<br/>
|
|
9
|
+
<i>A replacement for ethers & web3 that's 50x smaller</i>
|
|
10
|
+
<br/>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
<br>
|
|
15
|
+
<br/>
|
|
17
16
|
|
|
18
17
|
## Why you should replace Ethers.js and web3
|
|
19
18
|
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
|
|
28
27
|
---
|
|
29
28
|
|
|
30
|
-
<br
|
|
29
|
+
<br/>
|
|
31
30
|
|
|
32
31
|
- ⚡️ A replacement for `web3` and `ethers`
|
|
33
32
|
- 🏎 [The TINIEST code size possible](https://bundlephobia.com/package/essential-eth)
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
- 🧪 Tested to match both `web3` and `ethers`
|
|
36
35
|
- 🌲 Tree-shaking and no side-effects
|
|
37
36
|
- 🙌 Supports multiple JS versions (CommonJS and ESM)
|
|
38
|
-
- ✅ Node 16, 14,
|
|
37
|
+
- ✅ Node 17, 16, 14, & 12
|
|
39
38
|
- ✅ Web
|
|
40
39
|
|
|
41
40
|
<br/>
|
|
@@ -189,12 +188,38 @@ const essentialEth = new JsonRpcProvider(
|
|
|
189
188
|
const essentialEth = new JsonRpcProvider();
|
|
190
189
|
```
|
|
191
190
|
|
|
191
|
+
#### `getGasPrice`
|
|
192
|
+
|
|
193
|
+
Returns the current gas price in gwei
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
// Same as ethers.providers.getGasPrice
|
|
197
|
+
getGasPrice(): Promise<TinyBig>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
<details>
|
|
201
|
+
<summary>View Example</summary>
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
import { JsonRpcProvider } from 'essential-eth';
|
|
205
|
+
|
|
206
|
+
const provider = new JsonRpcProvider('https://free-eth-node.com/api/eth');
|
|
207
|
+
provider.getGasPrice().toNumber();
|
|
208
|
+
/*
|
|
209
|
+
39695942769
|
|
210
|
+
*/
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
</details>
|
|
214
|
+
|
|
215
|
+
<br/>
|
|
216
|
+
|
|
192
217
|
#### `getNetwork`
|
|
193
218
|
|
|
194
|
-
Returns a
|
|
219
|
+
Returns a Network
|
|
195
220
|
|
|
196
221
|
```typescript
|
|
197
|
-
// Same API as ethers
|
|
222
|
+
// Same API as ethers.providers.getNetwork
|
|
198
223
|
getNetwork(): Promise<Network>
|
|
199
224
|
```
|
|
200
225
|
|
|
@@ -225,7 +250,7 @@ xdaiProvider.getNetwork();
|
|
|
225
250
|
|
|
226
251
|
#### `getBlock`
|
|
227
252
|
|
|
228
|
-
Returns a
|
|
253
|
+
Returns a Block
|
|
229
254
|
|
|
230
255
|
```typescript
|
|
231
256
|
// Same API as web3.eth.getBlock
|