essential-eth 0.4.11 โ 0.5.4-alpha.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.
- package/lib/cjs/classes/Contract.d.ts +3 -2
- package/lib/cjs/classes/Contract.js +3 -2
- package/lib/cjs/classes/utils/clean-block.d.ts +3 -3
- package/lib/cjs/classes/utils/clean-block.js +3 -2
- package/lib/cjs/classes/utils/clean-transaction.d.ts +3 -3
- package/lib/cjs/classes/utils/clean-transaction.js +10 -6
- package/lib/cjs/classes/utils/encode-decode-transaction.d.ts +1 -0
- package/lib/cjs/classes/utils/encode-decode-transaction.js +4 -4
- package/lib/cjs/classes/utils/fetchers.d.ts +1 -1
- package/lib/cjs/index.d.ts +6 -3
- package/lib/cjs/index.js +19 -1
- package/lib/cjs/logger/logger.d.ts +11 -0
- package/lib/cjs/logger/logger.js +36 -0
- package/lib/cjs/logger/package-version.d.ts +1 -0
- package/lib/cjs/logger/package-version.js +5 -0
- package/lib/cjs/providers/BaseProvider.d.ts +261 -0
- package/lib/cjs/providers/BaseProvider.js +340 -0
- package/lib/cjs/providers/FallthroughProvider.d.ts +25 -0
- package/lib/cjs/providers/FallthroughProvider.js +65 -0
- package/lib/cjs/providers/JsonRpcProvider.d.ts +7 -33
- package/lib/cjs/providers/JsonRpcProvider.js +11 -93
- package/lib/cjs/providers/test/rpc-urls.d.ts +1 -0
- package/lib/cjs/providers/test/rpc-urls.js +1 -0
- package/lib/cjs/providers/utils/chains-info.d.ts +14 -0
- package/lib/cjs/providers/utils/chains-info.js +42 -0
- package/lib/cjs/shared/tiny-big/tiny-big.d.ts +9 -2
- package/lib/cjs/shared/tiny-big/tiny-big.js +26 -2
- package/lib/cjs/types/Block.types.d.ts +8 -19
- package/lib/cjs/types/Transaction.types.d.ts +23 -14
- package/lib/cjs/utils/bytes.d.ts +171 -0
- package/lib/cjs/utils/bytes.js +564 -0
- package/lib/cjs/utils/solidity-keccak256.d.ts +30 -0
- package/lib/cjs/utils/solidity-keccak256.js +125 -0
- package/lib/esm/classes/Contract.js +1 -1
- package/lib/esm/classes/utils/clean-block.d.ts +2 -2
- package/lib/esm/classes/utils/clean-block.js +2 -1
- package/lib/esm/classes/utils/clean-transaction.d.ts +2 -2
- package/lib/esm/classes/utils/clean-transaction.js +10 -6
- package/lib/esm/classes/utils/encode-decode-transaction.d.ts +1 -0
- package/lib/esm/classes/utils/encode-decode-transaction.js +2 -2
- package/lib/esm/classes/utils/fetchers.d.ts +1 -1
- package/lib/esm/index.d.ts +6 -3
- package/lib/esm/index.js +4 -1
- package/lib/esm/logger/logger.d.ts +11 -0
- package/lib/esm/logger/logger.js +33 -0
- package/lib/esm/logger/package-version.d.ts +1 -0
- package/lib/esm/logger/package-version.js +1 -0
- package/lib/esm/providers/BaseProvider.d.ts +17 -0
- package/lib/esm/providers/BaseProvider.js +88 -0
- package/lib/esm/providers/FallthroughProvider.d.ts +12 -0
- package/lib/esm/providers/FallthroughProvider.js +41 -0
- package/lib/esm/providers/JsonRpcProvider.d.ts +4 -9
- package/lib/esm/providers/JsonRpcProvider.js +8 -67
- package/lib/esm/providers/test/rpc-urls.d.ts +1 -0
- package/lib/esm/providers/test/rpc-urls.js +1 -0
- package/lib/esm/providers/utils/chains-info.d.ts +14 -0
- package/lib/esm/providers/utils/chains-info.js +42 -0
- package/lib/esm/shared/tiny-big/tiny-big.d.ts +2 -0
- package/lib/esm/shared/tiny-big/tiny-big.js +19 -0
- package/lib/esm/types/Block.types.d.ts +7 -19
- package/lib/esm/types/Transaction.types.d.ts +22 -14
- package/lib/esm/utils/bytes.d.ts +39 -0
- package/lib/esm/utils/bytes.js +245 -0
- package/lib/esm/utils/solidity-keccak256.d.ts +3 -0
- package/lib/esm/utils/solidity-keccak256.js +91 -0
- package/package.json +19 -19
- package/readme.md +251 -61
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.5.4-alpha.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
@@ -17,18 +17,21 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"test": "npm-run-all --parallel jest compile lint",
|
|
19
19
|
"test:all-node-versions": "npx trevor",
|
|
20
|
-
"lint": "eslint .",
|
|
20
|
+
"lint": "eslint --cache --fix .",
|
|
21
21
|
"compile": "npm-run-all --parallel tsc:esm tsc:cjs",
|
|
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",
|
|
26
25
|
"jest": "jest",
|
|
27
26
|
"build:chains-info": "npx ts-node scripts/fetch-chains-info.ts # used in getNetwork()",
|
|
28
|
-
"
|
|
27
|
+
"update-deps": "sh ./scripts/pre-commit.sh",
|
|
28
|
+
"pre-commit": "run-p build:chains-info update-deps",
|
|
29
|
+
"prepare": "husky install",
|
|
30
|
+
"version": "npx genversion --es6 src/logger/package-version.ts && git add src/logger/package-version.ts",
|
|
31
|
+
"postversion": "git push --follow-tags",
|
|
32
|
+
"prepublishOnly": "npm run build"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
|
-
"@ethersproject/keccak256": "^5.4.0",
|
|
32
35
|
"@types/body-parser": "^1.19.1",
|
|
33
36
|
"@types/eslint": "^8.4.1",
|
|
34
37
|
"@types/express": "^4.17.13",
|
|
@@ -36,27 +39,28 @@
|
|
|
36
39
|
"@types/jest-dev-server": "^5.0.0",
|
|
37
40
|
"@types/node": "^16.10.1",
|
|
38
41
|
"@types/prettier": "^2.4.4",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
40
|
-
"@typescript-eslint/parser": "^5.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
41
44
|
"body-parser": "^1.19.0",
|
|
42
45
|
"dotenv": "^16.0.0",
|
|
43
|
-
"eslint": "^8.
|
|
44
|
-
"eslint-plugin-jest": "^26.1.
|
|
45
|
-
"ethers": "^5.6.
|
|
46
|
+
"eslint": "^8.14.0",
|
|
47
|
+
"eslint-plugin-jest": "^26.1.5",
|
|
48
|
+
"ethers": "^5.6.4",
|
|
46
49
|
"express": "^4.17.1",
|
|
47
|
-
"husky": "^
|
|
50
|
+
"husky": "^7.0.4",
|
|
48
51
|
"jest": "^27.5.1",
|
|
49
52
|
"jest-dev-server": "^6.0.3",
|
|
50
53
|
"just-omit": "^2.0.1",
|
|
51
|
-
"lint-staged": "^12.
|
|
54
|
+
"lint-staged": "^12.4.1",
|
|
52
55
|
"npm-run-all": "^4.1.5",
|
|
56
|
+
"perf_hooks": "^0.0.1",
|
|
53
57
|
"prettier": "^2.6.2",
|
|
54
58
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
55
59
|
"ts-jest": "^27.1.4",
|
|
56
60
|
"ts-node": "^10.2.1",
|
|
57
61
|
"typedoc": "^0.22.13",
|
|
58
62
|
"typescript": "^4.6.3",
|
|
59
|
-
"web3": "^1.7.
|
|
63
|
+
"web3": "^1.7.3"
|
|
60
64
|
},
|
|
61
65
|
"dependencies": {
|
|
62
66
|
"@types/big.js": "^6.1.3",
|
|
@@ -64,15 +68,11 @@
|
|
|
64
68
|
"isomorphic-unfetch": "^3.1.0",
|
|
65
69
|
"sha3": "^2.1.4"
|
|
66
70
|
},
|
|
67
|
-
"husky": {
|
|
68
|
-
"hooks": {
|
|
69
|
-
"pre-commit": "lint-staged && run-p pre-commit test build:chains-info"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
71
|
"lint-staged": {
|
|
73
72
|
"*.{js,jsx,ts,tsx,css,scss,md,json,html,yml,yaml}": [
|
|
74
73
|
"prettier --write"
|
|
75
|
-
]
|
|
74
|
+
],
|
|
75
|
+
"*.{ts,tsx}": "eslint --cache --fix"
|
|
76
76
|
},
|
|
77
77
|
"prettier": {
|
|
78
78
|
"trailingComma": "all",
|
package/readme.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<img src="https://user-images.githubusercontent.com/3408480/163274699-ae4fb0f4-fca0-4745-bcd7-4868f80deaf6.png" height="220" title="Logo"/>
|
|
3
|
+
|
|
3
4
|
</p>
|
|
4
5
|
<p align="center">
|
|
6
|
+
|
|
5
7
|
<b>
|
|
6
|
-
Essential Eth
|
|
8
|
+
๐ชถ Essential Eth ๐ชถ
|
|
7
9
|
</b>
|
|
8
10
|
<br/>
|
|
9
|
-
<i>A replacement for ethers & web3 that's
|
|
11
|
+
<i>A replacement for ethers & web3 that's 20x smaller</i>
|
|
10
12
|
<br/>
|
|
11
13
|
</p>
|
|
12
14
|
|
|
@@ -20,18 +22,14 @@
|
|
|
20
22
|
<img src="https://user-images.githubusercontent.com/3408480/133322814-f3d18424-4ba8-4a37-8cbc-c5e6828354a3.png" title="Import size comparison" width="900"/>
|
|
21
23
|
</p>
|
|
22
24
|
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-

|
|
26
|
-
|
|
27
25
|
---
|
|
28
26
|
|
|
29
27
|
<br/>
|
|
30
28
|
|
|
31
|
-
-
|
|
32
|
-
- ๐ [The TINIEST code size possible](https://bundlephobia.com/package/essential-eth)
|
|
29
|
+
- ๐๏ธ <sub><sup>[smallest code size possible](https://bundlephobia.com/package/essential-eth)</sup></sub>
|
|
33
30
|
- สฆ Fully typed with TypeScript (also works with JavaScript)
|
|
34
31
|
- ๐งช Tested to match both `web3` and `ethers`
|
|
32
|
+
- - โก๏ธ Near-identical API to `ethers`
|
|
35
33
|
- ๐ฒ Tree-shaking and no side-effects
|
|
36
34
|
- ๐ Supports multiple JS versions (CommonJS and ESM)
|
|
37
35
|
- โ
Node 17, 16, 14, & 12
|
|
@@ -39,13 +37,7 @@
|
|
|
39
37
|
|
|
40
38
|
<br/>
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
๐งช This repo is under active development. The API is less-fully featured than `web3` and `ethers`. More functions added often!
|
|
45
|
-
|
|
46
|
-
   
|
|
47
|
-
|
|
48
|
-
๐จ๐ปโ๐ป Breaking changes will exist between minor versions until `1.0.0` (Versions go `major.minor.patch`)
|
|
40
|
+
[](https://github.com/Earnifi/essential-eth/actions/workflows/test.yml) [](https://codecov.io/gh/Earnifi/essential-eth)   
|
|
49
41
|
|
|
50
42
|
<br/>
|
|
51
43
|
|
|
@@ -227,6 +219,35 @@ isAddress('vitalik.eth');
|
|
|
227
219
|
|
|
228
220
|
<br/>
|
|
229
221
|
|
|
222
|
+
#### `hexZeroPad`
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// returns a hex string padded to a specified length of bytes
|
|
226
|
+
// if the hex value provided is already longer than the padding value, the value itself is returned without alteration
|
|
227
|
+
hexZeroPad(hexValue: string | number, length: number): string
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
<details>
|
|
231
|
+
<summary>View Example</summary>
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
import { hexZeroPad } from 'essential-eth';
|
|
235
|
+
|
|
236
|
+
hexZeroPad('0x60', 2);
|
|
237
|
+
// '0x0060'
|
|
238
|
+
|
|
239
|
+
hexZeroPad(0x60, 3);
|
|
240
|
+
// '0x000060'
|
|
241
|
+
|
|
242
|
+
// Length of string is already longer than padding value
|
|
243
|
+
hexZeroPad('0x31323334', 3);
|
|
244
|
+
// Throws error
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
</details>
|
|
248
|
+
|
|
249
|
+
<br/>
|
|
250
|
+
|
|
230
251
|
## RPC
|
|
231
252
|
|
|
232
253
|
```typescript
|
|
@@ -234,10 +255,35 @@ import { JsonRpcProvider } from 'essential-eth';
|
|
|
234
255
|
const essentialEth = new JsonRpcProvider(
|
|
235
256
|
'RPC URL HERE' /* Try POKT or Infura */,
|
|
236
257
|
);
|
|
237
|
-
// OR for very quick testing (limited to
|
|
258
|
+
// OR for very quick testing (limited to 10,000 requests)
|
|
238
259
|
const essentialEth = new JsonRpcProvider();
|
|
239
260
|
```
|
|
240
261
|
|
|
262
|
+
<details>
|
|
263
|
+
<summary>Want a redundant provider that handles outages?</summary>
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
import { FallthroughProvider } from 'essential-eth';
|
|
267
|
+
|
|
268
|
+
// The FallthroughProvider handles falling through to the next valid URL.
|
|
269
|
+
// It's dynamic to never trust one URL again when it fails * until it has tried all other provided URLs
|
|
270
|
+
// The default timeout for a request is 8 seconds after which it moves to the next URL
|
|
271
|
+
const provider = new FallthroughProvider([
|
|
272
|
+
'https://bad.com',
|
|
273
|
+
'https://free-eth-node.com/api/eth',
|
|
274
|
+
]);
|
|
275
|
+
provider.getGasPrice().toNumber();
|
|
276
|
+
/*
|
|
277
|
+
39695942769
|
|
278
|
+
*/
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
</details>
|
|
282
|
+
|
|
283
|
+
<br/>
|
|
284
|
+
|
|
285
|
+
#### [`getTransactionCount(address, blockTag?): Promise<number>`](https://essential-eth.vercel.app/docs/api/classes/JsonRpcProvider#gettransactioncount)
|
|
286
|
+
|
|
241
287
|
#### `getGasPrice`
|
|
242
288
|
|
|
243
289
|
Returns the current gas price in gwei
|
|
@@ -344,49 +390,182 @@ essentialEth.getBlock('latest');
|
|
|
344
390
|
|
|
345
391
|
/*
|
|
346
392
|
{
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
393
|
+
number: 4232826,
|
|
394
|
+
hash: '0x93211a1cd17e154b183565ec685254a03f844a8e34824a46ce1bdd6753dcb669',
|
|
395
|
+
parentHash: '0x1b32bfcba1bb2a57f56e166a3bb06875a1978992999dfc8828397b4c1526f472',
|
|
396
|
+
sha3Uncles: '0x0fb399c67bb5a071ec8a22549223215ab76b7d4009941c9c37aa3c3936010463',
|
|
397
|
+
logsBloom: '0x00000000000000000000101000000000020000000000000000000000000000000000400000010000000000000000000000000000010000000008800000000800000000200000000000000000000000000000000000000000000002000000000000000000000000000040000000000040000000000000000000000000000000000000000000000001000000000004000000000010000000000000000020000000000000000200100020000000000000000080000000000080001000000000000000000001040000000000000000008000000020010100000000200000100000000000000000000000002000000080000000020400000000002000200000000000',
|
|
398
|
+
transactionsRoot: '0xc43b3f13e1fe810e34d3a26ffe465b72c7063a5c70a02de2c78e91e4d10bd9fb',
|
|
399
|
+
stateRoot: '0x04d7bc816537ea7ef3a16e76c9879d29f34f99d4154273c2e98e012a31bad745',
|
|
400
|
+
receiptsRoot: '0x89c6f781ceac0bd49c4d9aa9115df4a5d4dd0e0220ff7668012f15bc04222c6b',
|
|
401
|
+
miner: '0x31fe561eb2c628cD32Ec52573D7c4b7E4C278Bfa',
|
|
402
|
+
difficulty: '1300907486001755331049',
|
|
403
|
+
totalDifficulty: '5989929395521171616186006183',
|
|
404
|
+
extraData: '0xce018c495249532d62613031656132',
|
|
405
|
+
size: 5416,
|
|
406
|
+
gasLimit: 6800000,
|
|
407
|
+
gasUsed: 202955,
|
|
408
|
+
timestamp: 1649884910,
|
|
409
|
+
transactions: [
|
|
410
|
+
'0x6b34a59c7b9aead24fa6dad782f8a3ad84ed4a23ee09bcbf0bcf880840fbbe20',
|
|
411
|
+
'0x9a3851ca24d5336c6a0d48aba2c4b4769d7a672c9b01729c5eb9924efd1b19a7',
|
|
412
|
+
'0xc3ed3d198b62f2f3427ebfa3bbd0fcada4e3c0c189e4464e7eeceb403c75981e'
|
|
413
|
+
],
|
|
414
|
+
uncles: [
|
|
415
|
+
'0x0c567c054e98153f10d651fbbc018891c1dd9d62a9ffd998e87678803e95b6ed',
|
|
416
|
+
'0xb7d69389dbfb057c6fcb4bc0582d46a2ba01170703f0dadf8cd1462b83e88753',
|
|
417
|
+
'0xd5f74ccd0ad4c58b3161e8c2c507c264231e5f28925061b809c02e5e4bb6db28'
|
|
418
|
+
],
|
|
419
|
+
minimumGasPrice: '0x387ee40',
|
|
420
|
+
bitcoinMergedMiningHeader: '0x04000020e8567ed3d2480e15a1dd1b4335e4732ae343c037e4fd03000000000000000000ed10a8340d163d3e813bdd430f902f4e5a56828dc62313b2e23797c0be6b8516eb3e576297d8091735884f42',
|
|
421
|
+
bitcoinMergedMiningCoinbaseTransaction: '0x0000000000000140e910128fda7bac502dc5e0573bbaf12de8e2524f70c22f7bd160dedcb19a2521002b6a2952534b424c4f434b3ae493303f597fa368c0ccc4f8aceabf1c315bb7c9a07605c073a89f260040967aace6a7d9',
|
|
422
|
+
bitcoinMergedMiningMerkleProof: '0xdf63a3d7eb6fbcfb301311faa46e9a15b0408bb1a04e284daee86c273c1dfd65ede23f3170f806e9e0f4cef7ba6b56aa37470d9c23f96ec8e43d08b58645919c5e10bcb892897a731f8f9ce79c72dc0e390896bcd6c67bb38c0bdb72982b6cf05519968d76673572c3f3ef3a08b0ddb464863f1788f7cdbaad3fe44a8a8af576d430ac282fe28852c16df198ca96cc5f71a50695912efe1a836e8442be69e31b6d6f973da2818bce9a3a1c2d9be0671aee9a7776e398d6a03d1e178e20d84646004a3d03c0501334e629d9146aa6a01316dcbaa289df6e6c5e3090cadaddff22699cfc7ff09512fc0d65c5062f17c98561ce3c9510de210d9d654cf99f8d756ff37c9fa21e7122ee8cadb923341690845d572921425f2bd7e044558b7e07983ac4df28928028b0c13c3624dc7a965af8091b0cecc845bf7da5308c03b2c97d607f6706a599f802025894435f1d76ea4e67cc2fc4e1559f1206f559a24633de0f',
|
|
423
|
+
hashForMergedMining: '0xe493303f597fa368c0ccc4f8aceabf1c315bb7c9a07605c073a89f260040967a',
|
|
424
|
+
paidFees: '0xc0744dcb7a0',
|
|
425
|
+
cumulativeDifficulty: '0x1190930db285269e582'
|
|
426
|
+
}
|
|
427
|
+
*/
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
</details>
|
|
431
|
+
|
|
432
|
+
<br/>
|
|
433
|
+
|
|
434
|
+
#### `getTransaction`
|
|
435
|
+
|
|
436
|
+
Returns the Transaction associated with a given hash
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
// Similar to ethers.provider.getTransaction, formatting may differ
|
|
440
|
+
getTransaction(hash: string): Promise<Transaction>
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
<details>
|
|
444
|
+
<summary>View Example</summary>
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
import { JsonRpcProvider } from 'essential-eth';
|
|
448
|
+
const essentialEth = new JsonRpcProvider();
|
|
449
|
+
await provider.getTransaction(
|
|
450
|
+
'0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789',
|
|
451
|
+
);
|
|
452
|
+
|
|
453
|
+
/*
|
|
454
|
+
{
|
|
455
|
+
accessList: [],
|
|
456
|
+
blockHash: '0x876810a013dbcd140f6fd6048c1dc33abbb901f1f96b394c2fa63aef3cb40b5d',
|
|
457
|
+
blockNumber: 14578286,
|
|
458
|
+
chainId: 1,
|
|
459
|
+
from: '0xdfD9dE5f6FA60BD70636c0900752E93a6144AEd4',
|
|
460
|
+
gas: Big {
|
|
461
|
+
s: 1,
|
|
462
|
+
e: 5,
|
|
463
|
+
c: [ 1, 1, 2, 1, 6, 3 ],
|
|
464
|
+
constructor: <ref *1> [Function: Big] {
|
|
465
|
+
DP: 20,
|
|
466
|
+
RM: 1,
|
|
467
|
+
NE: -7,
|
|
468
|
+
PE: 21,
|
|
469
|
+
strict: false,
|
|
470
|
+
roundDown: 0,
|
|
471
|
+
roundHalfUp: 1,
|
|
472
|
+
roundHalfEven: 2,
|
|
473
|
+
roundUp: 3,
|
|
474
|
+
Big: [Circular *1],
|
|
475
|
+
default: [Circular *1]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
gasPrice: Big {
|
|
479
|
+
s: 1,
|
|
480
|
+
e: 10,
|
|
481
|
+
c: [
|
|
482
|
+
4, 8, 5, 9, 2,
|
|
483
|
+
4, 2, 6, 8, 5,
|
|
484
|
+
8
|
|
485
|
+
],
|
|
486
|
+
constructor: <ref *1> [Function: Big] {
|
|
487
|
+
DP: 20,
|
|
488
|
+
RM: 1,
|
|
489
|
+
NE: -7,
|
|
490
|
+
PE: 21,
|
|
491
|
+
strict: false,
|
|
492
|
+
roundDown: 0,
|
|
493
|
+
roundHalfUp: 1,
|
|
494
|
+
roundHalfEven: 2,
|
|
495
|
+
roundUp: 3,
|
|
496
|
+
Big: [Circular *1],
|
|
497
|
+
default: [Circular *1]
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
hash: '0x9014ae6ef92464338355a79e5150e542ff9a83e2323318b21f40d6a3e65b4789',
|
|
501
|
+
input: '0x83259f170000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dfd9de5f6fa60bd70636c0900752e93a6144aed400000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000009e99ad11a214fd016b19dc3648678c5944859ae292b21c24ca94f857836c4596f1950c82dd0c23dd621af4763edc2f66466e63c5df9de0c1107b1cd16bf460fe93e43fd308e3444bc79c3d88a4cb961dc8367ab6ad048867afc76d193bca99cf3a068864ed4a7df1dbf1d4c52238eced3e5e05644b4040fc2b3ccb8557b0e99fff6131305a0ea2b8061b90bd418db5bbdd2e92129f52d93f90531465e309c4caec5b85285822b6196398d36f16f511811b61bbda6461e80e29210cd303118bdcee8df6fa0505ffbe8642094fd2ba4dd458496fe3b459ac880bbf71877c713e969ccf5ed7efab8a84ebc07e3939901371ca427e1192e455a8f35a6a1d7ad09e1475dd1758b36fa631dab5d70e99316b23c4c43094188d360cd9c3457355904e07c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000162074a7047f',
|
|
502
|
+
maxFeePerGas: Big {
|
|
503
|
+
s: 1,
|
|
504
|
+
e: 10,
|
|
505
|
+
c: [
|
|
506
|
+
6, 7, 6, 8, 1,
|
|
507
|
+
2, 6, 1, 6, 1,
|
|
508
|
+
8
|
|
509
|
+
],
|
|
510
|
+
constructor: <ref *1> [Function: Big] {
|
|
511
|
+
DP: 20,
|
|
512
|
+
RM: 1,
|
|
513
|
+
NE: -7,
|
|
514
|
+
PE: 21,
|
|
515
|
+
strict: false,
|
|
516
|
+
roundDown: 0,
|
|
517
|
+
roundHalfUp: 1,
|
|
518
|
+
roundHalfEven: 2,
|
|
519
|
+
roundUp: 3,
|
|
520
|
+
Big: [Circular *1],
|
|
521
|
+
default: [Circular *1]
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
maxPriorityFeePerGas: Big {
|
|
525
|
+
s: 1,
|
|
526
|
+
e: 9,
|
|
527
|
+
c: [ 1, 5 ],
|
|
528
|
+
constructor: <ref *1> [Function: Big] {
|
|
529
|
+
DP: 20,
|
|
530
|
+
RM: 1,
|
|
531
|
+
NE: -7,
|
|
532
|
+
PE: 21,
|
|
533
|
+
strict: false,
|
|
534
|
+
roundDown: 0,
|
|
535
|
+
roundHalfUp: 1,
|
|
536
|
+
roundHalfEven: 2,
|
|
537
|
+
roundUp: 3,
|
|
538
|
+
Big: [Circular *1],
|
|
539
|
+
default: [Circular *1]
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
nonce: 129,
|
|
543
|
+
r: '0x59a7c15b12c18cd68d6c440963d959bff3e73831ffc938e75ecad07f7ee43fbc',
|
|
544
|
+
s: '0x1ebaf05f0d9273b16c2a7748b150a79d22533a8cd74552611cbe620fee3dcf1c',
|
|
545
|
+
to: '0x39B72d136ba3e4ceF35F48CD09587ffaB754DD8B',
|
|
546
|
+
transactionIndex: 29,
|
|
547
|
+
type: 2,
|
|
548
|
+
v: 0,
|
|
549
|
+
value: Big {
|
|
550
|
+
s: 1,
|
|
551
|
+
e: 0,
|
|
552
|
+
c: [ 0 ],
|
|
553
|
+
constructor: <ref *1> [Function: Big] {
|
|
554
|
+
DP: 20,
|
|
555
|
+
RM: 1,
|
|
556
|
+
NE: -7,
|
|
557
|
+
PE: 21,
|
|
558
|
+
strict: false,
|
|
559
|
+
roundDown: 0,
|
|
560
|
+
roundHalfUp: 1,
|
|
561
|
+
roundHalfEven: 2,
|
|
562
|
+
roundUp: 3,
|
|
563
|
+
Big: [Circular *1],
|
|
564
|
+
default: [Circular *1]
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
confirmations: 1210
|
|
568
|
+
}
|
|
390
569
|
*/
|
|
391
570
|
```
|
|
392
571
|
|
|
@@ -459,6 +638,17 @@ Any function on a contract. Returns are the same as `ethers.js`, except that ins
|
|
|
459
638
|
<br/>
|
|
460
639
|
<br/>
|
|
461
640
|
|
|
641
|
+

|
|
642
|
+
|
|
643
|
+

|
|
644
|
+
|
|
645
|
+
## More Info
|
|
646
|
+
|
|
647
|
+
๐งช This repo is under active development. The API is less-fully featured than `web3` and `ethers`. More functions added often!
|
|
648
|
+
|
|
649
|
+
๐จ๐ปโ๐ป Breaking changes will exist between minor versions until `1.0.0` (Versions go `major.minor.patch`)
|
|
650
|
+
|
|
651
|
+
<br/>
|
|
652
|
+
|
|
462
653
|
- [๐ View full docs](https://essential-eth.vercel.app)
|
|
463
654
|
- [๐ View changelog (by looking at releases diff)](https://github.com/dawsbot/essential-eth/releases)
|
|
464
|
-
- [๐ View docs for an older version](https://essential-eth.vercel.app/versions)
|