essential-eth 0.5.13-next.5 → 0.6.2

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.
@@ -1 +1 @@
1
- export declare const version = "0.5.13-next.5";
1
+ export declare const version = "0.6.2";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = '0.5.13-next.5';
5
+ exports.version = '0.6.2';
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { decodeRPCResponse, encodeData, } from './utils/encode-decode-transaction';
11
- import { buildRPCPostBody, post } from './utils/fetchers';
12
11
  function estimateGas(txnData) {
13
12
  txnData.split('').reduce((previousValue, currentValue) => {
14
13
  const characterCost = currentValue === '0' ? 4 : 68;
@@ -40,12 +39,9 @@ export class BaseContract {
40
39
  ? estimateGas(data)
41
40
  : null;
42
41
  const req = () => __awaiter(this, void 0, void 0, function* () {
43
- return yield post(this._provider.selectRpcUrl(), buildRPCPostBody('eth_call', [
44
- Object.assign({ to: this._address.toLowerCase(), data }, (decimalGas
45
- ? { gas: `0x${decimalGas.toString(16)}` }
46
- : {})),
47
- 'latest',
48
- ]));
42
+ return yield this._provider.call(Object.assign({ to: this._address.toLowerCase(), data }, (decimalGas
43
+ ? { gas: `0x${decimalGas.toString(16)}` }
44
+ : {})), 'latest');
49
45
  });
50
46
  const nodeResponse = yield req();
51
47
  return decodeRPCResponse(jsonABIArgument, nodeResponse);
@@ -85,6 +85,7 @@ export function decodeRPCResponse(jsonABIArgument, nodeResponse) {
85
85
  case 'address':
86
86
  return toChecksumAddress(`0x${output.slice(24)}`);
87
87
  case 'uint256':
88
+ case 'uint120':
88
89
  return tinyBig(hexToDecimal(`0x${output}`));
89
90
  case 'bytes32':
90
91
  return `0x${output}`;
@@ -1 +1 @@
1
- export declare const version = "0.5.13-next.5";
1
+ export declare const version = "0.6.2";
@@ -1 +1 @@
1
- export const version = '0.5.13-next.5';
1
+ export const version = '0.6.2';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "essential-eth",
3
3
  "description": "Ultralight JS for Ethereum",
4
- "version": "0.5.13-next.5",
4
+ "version": "0.6.2",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "private": false,
@@ -36,7 +36,7 @@
36
36
  "name": "Contract",
37
37
  "path": "src/index.ts",
38
38
  "import": "{ Contract }",
39
- "limit": "15.86kb"
39
+ "limit": "15.87kb"
40
40
  }
41
41
  ],
42
42
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  "jest": "jest",
54
54
  "build:chains-info": "npx ts-node scripts/fetch-chains-info.ts # used in getNetwork()",
55
55
  "update-deps": "sh ./scripts/pre-commit.sh",
56
- "pre-commit": "run-p build:chains-info update-deps",
56
+ "pre-commit": "npm run update-deps",
57
57
  "prepare": "husky install",
58
58
  "version": "npx genversion --es6 src/logger/package-version.ts && git add src/logger/package-version.ts",
59
59
  "postversion": "git push --follow-tags",
@@ -76,7 +76,7 @@
76
76
  "eslint": "^8.16.0",
77
77
  "eslint-plugin-jest": "^26.2.2",
78
78
  "eslint-plugin-jsdoc": "38.0.2",
79
- "ethers": "^5.6.9",
79
+ "ethers": "^5.7.0",
80
80
  "express": "^4.17.1",
81
81
  "husky": "^7.0.4",
82
82
  "jest": "^27.5.1",
package/readme.md CHANGED
@@ -124,7 +124,7 @@ Browsers:
124
124
 
125
125
  ```html
126
126
  <!-- index.html -->
127
- <script src="https://unpkg.com/essential-eth@0.5.13-next.5"></script>
127
+ <script src="https://unpkg.com/essential-eth@0.6.2"></script>
128
128
  ```
129
129
 
130
130
  <!-- ⛔️ AUTO-GENERATED-CONTENT:END (UNPKG_SCRIPT_TAG) -->