Updated dist files.

This commit is contained in:
Richard Moore 2021-04-17 22:41:09 -04:00
parent 53ee187443
commit 0cd5fccfad
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
77 changed files with 778 additions and 227 deletions

@ -3,6 +3,19 @@ Changelog
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
ethers/v5.1.1 (2021-04-17 22:40)
--------------------------------
- Prevent non-typed transactions from unsafely ignoring specified access lists. ([#1364](https://github.com/ethers-io/ethers.js/issues/1364); [4577444](https://github.com/ethers-io/ethers.js/commit/4577444c448f41114263077c5b54fbe6af749fd4))
- Update tests for current EIP-2930 support across backends. ([#1364](https://github.com/ethers-io/ethers.js/issues/1364); [1cb3199](https://github.com/ethers-io/ethers.js/commit/1cb3199e5cb01f5a55eb00ab6c7904606d7ea1dd))
- Removed underscore from the JsonRpcBatchProvider name. ([#62](https://github.com/ethers-io/ethers.js/issues/62), [#656](https://github.com/ethers-io/ethers.js/issues/656), [#892](https://github.com/ethers-io/ethers.js/issues/892); [ae0d5eb](https://github.com/ethers-io/ethers.js/commit/ae0d5eb7c2e37a003d893671db59c2d5719aea0f))
- Added better error detection when pre-EIP-155 transactions are disabled. ([b8df000](https://github.com/ethers-io/ethers.js/commit/b8df000c8f0ccd252b6049ac5a32a986d5a8e08d))
- Fix Android React Native environment shims which crash on normalizing Korean test. ([#1298](https://github.com/ethers-io/ethers.js/issues/1298); [eb1ec2f](https://github.com/ethers-io/ethers.js/commit/eb1ec2f2318e2851073ea1634e5003cdb53f1c1b))
- Fixed EIP-2930 transactions for EtherscanProvider. ([#1364](https://github.com/ethers-io/ethers.js/issues/1364); [b655089](https://github.com/ethers-io/ethers.js/commit/b65508995ce7d02f109a970ebeb625819beb915a))
- Re-enable AlchemyProvider Berlin tests. ([bec066b](https://github.com/ethers-io/ethers.js/commit/bec066bcb5ab8b95a7e7ce4848d7b76d7f248ccc))
- Added experimental _JsonRpcBatchProvider. ([#62](https://github.com/ethers-io/ethers.js/issues/62), [#656](https://github.com/ethers-io/ethers.js/issues/656), [#892](https://github.com/ethers-io/ethers.js/issues/892); [d55ab6d](https://github.com/ethers-io/ethers.js/commit/d55ab6d4e6025c484cc7e64486d927bd54a0772b))
- Cache JsonRpcProvider requests for certain methods per event loop. ([#1371](https://github.com/ethers-io/ethers.js/issues/1371); [1a7c4e8](https://github.com/ethers-io/ethers.js/commit/1a7c4e89efecc2b8afc8bea4c1f8f75fdaac08c5))
ethers/v5.1.0 (2021-03-30 14:44)
--------------------------------

169
package-lock.json generated

@ -13,15 +13,15 @@
}
},
"@babel/compat-data": {
"version": "7.13.12",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz",
"integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz",
"integrity": "sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==",
"dev": true
},
"@babel/core": {
"version": "7.13.14",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz",
"integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.15.tgz",
"integrity": "sha512-6GXmNYeNjS2Uz+uls5jalOemgIhnTMeaXo+yBUA72kC2uX/8VW6XyhVIo2L8/q0goKQA3EVKx0KOQpVKSeWadQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
@ -29,9 +29,9 @@
"@babel/helper-compilation-targets": "^7.13.13",
"@babel/helper-module-transforms": "^7.13.14",
"@babel/helpers": "^7.13.10",
"@babel/parser": "^7.13.13",
"@babel/parser": "^7.13.15",
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.13.13",
"@babel/traverse": "^7.13.15",
"@babel/types": "^7.13.14",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
@ -42,9 +42,9 @@
},
"dependencies": {
"@babel/parser": {
"version": "7.13.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz",
"integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.15.tgz",
"integrity": "sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==",
"dev": true
},
"@babel/types": {
@ -411,9 +411,9 @@
},
"dependencies": {
"@babel/parser": {
"version": "7.13.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz",
"integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.15.tgz",
"integrity": "sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==",
"dev": true
},
"@babel/types": {
@ -430,25 +430,25 @@
}
},
"@babel/traverse": {
"version": "7.13.13",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz",
"integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.15.tgz",
"integrity": "sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.13.9",
"@babel/helper-function-name": "^7.12.13",
"@babel/helper-split-export-declaration": "^7.12.13",
"@babel/parser": "^7.13.13",
"@babel/types": "^7.13.13",
"@babel/parser": "^7.13.15",
"@babel/types": "^7.13.14",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
"dependencies": {
"@babel/parser": {
"version": "7.13.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz",
"integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==",
"version": "7.13.15",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.15.tgz",
"integrity": "sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==",
"dev": true
},
"@babel/types": {
@ -509,20 +509,20 @@
"dev": true
},
"@ledgerhq/cryptoassets": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/cryptoassets/-/cryptoassets-5.48.0.tgz",
"integrity": "sha512-kIhZMK7DVRZ69yYXbe1ss/3DO/watVepHF3vO36/0FR+1tPRNlokq62B7B1lHia2VgZ6ysA1bysDLaLlTmKWtg==",
"version": "5.49.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/cryptoassets/-/cryptoassets-5.49.0.tgz",
"integrity": "sha512-PgB00VOugxsLckjstiyVZxbGBHRa/qimKoMDog17U8ENSIbrsLM9/zVCsCTAunjRlAbwwrZW1PfmXRAY2Si+Yg==",
"requires": {
"invariant": "2"
}
},
"@ledgerhq/devices": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.48.0.tgz",
"integrity": "sha512-qIaL0K5Gh9kfePvptB8GGKEHGUAZuJHYmy9eDmIk6RZbgiYJ5njP/u5zQgKxijZArBgssdK/dtxEH4ueTiqkkA==",
"version": "5.49.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.49.0.tgz",
"integrity": "sha512-14VSO+NeR/O8VSXXnlBsA0DAluzanJVEjHLDJubU5NZjEttXVF9gdQh1j10+MKW0f8H23IkdqwswVQIB9ZPomQ==",
"requires": {
"@ledgerhq/errors": "^5.48.0",
"@ledgerhq/logs": "^5.48.0",
"@ledgerhq/errors": "^5.49.0",
"@ledgerhq/logs": "^5.49.0",
"rxjs": "^6.6.7",
"semver": "^7.3.5"
},
@ -538,9 +538,9 @@
}
},
"@ledgerhq/errors": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.48.0.tgz",
"integrity": "sha512-817t7M0hi7j0xY6uuG0F3kjbkaEP9hHlxfDBpb3EWkTvkg5SgHaDmvHYTjUoE1HhaPypHLjEii7URx2boOfQVA=="
"version": "5.49.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.49.0.tgz",
"integrity": "sha512-+uhoSsAnzZiZ2CUk/dv4Uo8lrl0jn2izYJATSbC5aZFd0Yl7PWZ1SMHMkvPVEgQvWZcu4iQZ67rlKOtj5tUFWA=="
},
"@ledgerhq/hw-app-eth": {
"version": "5.27.2",
@ -576,9 +576,9 @@
}
},
"@ledgerhq/logs": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.48.0.tgz",
"integrity": "sha512-ItOEw1BDsN7q43/uku44izA9y5f6va79KrO5SeYNcojAa3gLn6u02ADLzdHJtuvGEf9DBwCTRPlJmlT7kIaFPQ=="
"version": "5.49.0",
"resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.49.0.tgz",
"integrity": "sha512-Ynl2JzRwh8l9PoXrDNihXEicpVo6Ra2lYZoqSYfVH/v/2/TSa/JB9Qll8P85XFYkS3ouDTTbp1S5KViaTkqD5g=="
},
"@npmcli/ci-detect": {
"version": "1.3.0",
@ -587,19 +587,18 @@
"dev": true
},
"@npmcli/git": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.6.tgz",
"integrity": "sha512-a1MnTfeRPBaKbFY07fd+6HugY1WAkKJzdiJvlRub/9o5xz2F/JtPacZZapx5zRJUQFIzSL677vmTSxEcDMrDbg==",
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.8.tgz",
"integrity": "sha512-LPnzyBZ+1p7+JzHVwwKycMF8M3lr1ze3wxGRnxn/QxJtk++Y3prSJQrdBDGCxJyRpFsup6J3lrRBVYBhJVrM8Q==",
"dev": true,
"requires": {
"@npmcli/promise-spawn": "^1.1.0",
"@npmcli/promise-spawn": "^1.3.2",
"lru-cache": "^6.0.0",
"mkdirp": "^1.0.3",
"npm-pick-manifest": "^6.0.0",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^6.1.1",
"promise-inflight": "^1.0.1",
"promise-retry": "^2.0.1",
"semver": "^7.3.2",
"unique-filename": "^1.1.1",
"semver": "^7.3.5",
"which": "^2.0.2"
},
"dependencies": {
@ -773,9 +772,9 @@
"integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ=="
},
"@types/node": {
"version": "12.20.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.7.tgz",
"integrity": "sha512-gWL8VUkg8VRaCAUgG9WmhefMqHmMblxe2rVpMF86nZY/+ZysU+BkAp+3cz03AixWDSSz0ks5WX59yAhv/cDwFA==",
"version": "12.20.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.10.tgz",
"integrity": "sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw==",
"dev": true
},
"@types/resolve": {
@ -937,9 +936,9 @@
}
},
"anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
"integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
@ -1064,9 +1063,9 @@
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base64-arraybuffer": {
"version": "0.1.4",
@ -1170,16 +1169,16 @@
"dev": true
},
"browserslist": {
"version": "4.16.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz",
"integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==",
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz",
"integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30001181",
"colorette": "^1.2.1",
"electron-to-chromium": "^1.3.649",
"caniuse-lite": "^1.0.30001208",
"colorette": "^1.2.2",
"electron-to-chromium": "^1.3.712",
"escalade": "^3.1.1",
"node-releases": "^1.1.70"
"node-releases": "^1.1.71"
}
},
"buffer": {
@ -1276,9 +1275,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001204",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz",
"integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==",
"version": "1.0.30001209",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001209.tgz",
"integrity": "sha512-2Ktt4OeRM7EM/JaOZjuLzPYAIqmbwQMNnYbgooT+icoRGrKOyAxA1xhlnotBD1KArRSPsuJp3TdYcZYrL7qNxA==",
"dev": true
},
"caseless": {
@ -1666,9 +1665,9 @@
"dev": true
},
"electron-to-chromium": {
"version": "1.3.702",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.702.tgz",
"integrity": "sha512-qJVUKFWQnF6wP7MmTngDkmm8/KPzaiTXNFOAg5j7DSa6J7kPou7mTBqC8jpUOxauQWwHR3pn4dMRdV8IE1xdtA==",
"version": "1.3.717",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz",
"integrity": "sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==",
"dev": true
},
"elliptic": {
@ -3305,18 +3304,18 @@
"dev": true
},
"mime-db": {
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
"integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==",
"version": "1.47.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz",
"integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==",
"dev": true
},
"mime-types": {
"version": "2.1.29",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
"integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
"version": "2.1.30",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz",
"integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==",
"dev": true,
"requires": {
"mime-db": "1.46.0"
"mime-db": "1.47.0"
}
},
"minimalistic-assert": {
@ -3798,9 +3797,9 @@
},
"dependencies": {
"hosted-git-info": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
}
}
@ -4005,9 +4004,9 @@
"dev": true
},
"object-inspect": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
"integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.1.tgz",
"integrity": "sha512-WQUIkCSDPWm5ing/PTUkLr2KaOXX2uV/vz1hLGW2XbZ/RDUmtgcsOyEqA1ox0rkyNx9mJX4kxX+YWceje3pmag==",
"dev": true
},
"object-keys": {
@ -4208,9 +4207,9 @@
"dev": true
},
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz",
"integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==",
"dev": true
},
"pkg-dir": {
@ -5466,9 +5465,9 @@
"dev": true
},
"y18n": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
},
"yallist": {

@ -12703,7 +12703,7 @@ function computePublicKey(key, compressed) {
return logger$g.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
}
const version$c = "transactions/5.1.0";
const version$c = "transactions/5.1.1";
"use strict";
const logger$h = new Logger(version$c);
@ -12873,6 +12873,9 @@ function _serialize(transaction, signature) {
function serialize(transaction, signature) {
// Legacy and EIP-155 Transactions
if (transaction.type == null) {
if (transaction.accessList != null) {
logger$h.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
}
return _serialize(transaction, signature);
}
// Typed Transactions (EIP-2718)
@ -17846,7 +17849,7 @@ var bech32 = {
fromWords: fromWords
};
const version$m = "providers/5.1.0";
const version$m = "providers/5.1.1";
"use strict";
const logger$s = new Logger(version$m);
@ -19717,6 +19720,12 @@ function checkError(method, error, params) {
error, method, transaction
});
}
// "replacement transaction underpriced"
if (message.match(/only replay-protected/)) {
logger$u.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, {
error, method, transaction
});
}
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {
logger$u.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
error, method, transaction
@ -19914,6 +19923,7 @@ class JsonRpcProvider extends BaseProvider {
});
}
super(networkOrReady);
this._eventLoopCache = {};
// Default URL
if (!url) {
url = getStatic(this.constructor, "defaultUrl")();
@ -19932,6 +19942,16 @@ class JsonRpcProvider extends BaseProvider {
return "http:/\/localhost:8545";
}
detectNetwork() {
if (!this._eventLoopCache["detectNetwork"]) {
this._eventLoopCache["detectNetwork"] = this._uncachedDetectNetwork();
// Clear this cache at the beginning of the next event loop
setTimeout(() => {
this._eventLoopCache["detectNetwork"] = null;
}, 0);
}
return this._eventLoopCache["detectNetwork"];
}
_uncachedDetectNetwork() {
return __awaiter$9(this, void 0, void 0, function* () {
yield timer(0);
let chainId = null;
@ -19985,7 +20005,13 @@ class JsonRpcProvider extends BaseProvider {
request: deepCopy(request),
provider: this
});
return fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {
// We can expand this in the future to any call, but for now these
// are the biggest wins and do not require any serializing parameters.
const cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0);
if (cache && this._eventLoopCache[method]) {
return this._eventLoopCache[method];
}
const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {
this.emit("debug", {
action: "response",
request: request,
@ -20002,6 +20028,14 @@ class JsonRpcProvider extends BaseProvider {
});
throw error;
});
// Cache the fetch, but clear it on the next event loop
if (cache) {
this._eventLoopCache[method] = result;
setTimeout(() => {
this._eventLoopCache[method] = null;
}, 0);
}
return result;
}
prepareRequest(method, params) {
switch (method) {
@ -20683,7 +20717,10 @@ function getTransactionPostData(transaction) {
value = hexValue(hexlify(value));
}
else if (key === "accessList") {
value = value;
const sets = accessListify(value);
value = '[' + sets.map((set) => {
return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`;
}).join(",") + "]";
}
else {
value = hexlify(value);
@ -20927,12 +20964,6 @@ class EtherscanProvider extends BaseProvider {
url += apiKey;
return get(url, null);
case "call": {
if (params.transaction.type != null) {
logger$z.throwError("Etherscan does not currently support Berlin", Logger.errors.UNSUPPORTED_OPERATION, {
operation: "call",
transaction: params.transaction
});
}
if (params.blockTag !== "latest") {
throw new Error("EtherscanProvider does not support blockTag for call");
}
@ -20948,12 +20979,6 @@ class EtherscanProvider extends BaseProvider {
}
}
case "estimateGas": {
if (params.transaction.type != null) {
logger$z.throwError("Etherscan does not currently support Berlin", Logger.errors.UNSUPPORTED_OPERATION, {
operation: "estimateGas",
transaction: params.transaction
});
}
const postData = getTransactionPostData(params.transaction);
postData.module = "proxy";
postData.action = "eth_estimateGas";
@ -21757,6 +21782,77 @@ class InfuraProvider extends UrlJsonRpcProvider {
}
}
// Experimental
class JsonRpcBatchProvider extends JsonRpcProvider {
send(method, params) {
const request = {
method: method,
params: params,
id: (this._nextId++),
jsonrpc: "2.0"
};
if (this._pendingBatch == null) {
this._pendingBatch = [];
}
const inflightRequest = { request, resolve: null, reject: null };
const promise = new Promise((resolve, reject) => {
inflightRequest.resolve = resolve;
inflightRequest.reject = reject;
});
this._pendingBatch.push(inflightRequest);
if (!this._pendingBatchAggregator) {
// Schedule batch for next event loop + short duration
this._pendingBatchAggregator = setTimeout(() => {
// Get teh current batch and clear it, so new requests
// go into the next batch
const batch = this._pendingBatch;
this._pendingBatch = null;
this._pendingBatchAggregator = null;
// Get the request as an array of requests
const request = batch.map((inflight) => inflight.request);
this.emit("debug", {
action: "requestBatch",
request: deepCopy(request),
provider: this
});
return fetchJson(this.connection, JSON.stringify(request)).then((result) => {
this.emit("debug", {
action: "response",
request: request,
response: result,
provider: this
});
// For each result, feed it to the correct Promise, depending
// on whether it was a success or error
batch.forEach((inflightRequest, index) => {
const payload = result[index];
if (payload.error) {
const error = new Error(payload.error.message);
error.code = payload.error.code;
error.data = payload.error.data;
inflightRequest.reject(error);
}
else {
inflightRequest.resolve(payload.result);
}
});
}, (error) => {
this.emit("debug", {
action: "response",
error: error,
request: request,
provider: this
});
batch.forEach((inflightRequest) => {
inflightRequest.reject(error);
});
});
}, 10);
}
return promise;
}
}
/* istanbul ignore file */
"use strict";
const logger$C = new Logger(version$m);
@ -22058,6 +22154,7 @@ var index$3 = /*#__PURE__*/Object.freeze({
InfuraProvider: InfuraProvider,
InfuraWebSocketProvider: InfuraWebSocketProvider,
JsonRpcProvider: JsonRpcProvider,
JsonRpcBatchProvider: JsonRpcBatchProvider,
NodesmithProvider: NodesmithProvider,
PocketProvider: PocketProvider,
StaticJsonRpcProvider: StaticJsonRpcProvider,
@ -22339,7 +22436,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
Indexed: Indexed
});
const version$o = "ethers/5.1.0";
const version$o = "ethers/5.1.1";
"use strict";
const logger$H = new Logger(version$o);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -13843,7 +13843,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "transactions/5.1.0";
exports.version = "transactions/5.1.1";
});
@ -14052,6 +14052,9 @@
function serialize(transaction, signature) {
// Legacy and EIP-155 Transactions
if (transaction.type == null) {
if (transaction.accessList != null) {
logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
}
return _serialize(transaction, signature);
}
// Typed Transactions (EIP-2718)
@ -20093,7 +20096,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "providers/5.1.0";
exports.version = "providers/5.1.1";
});
@ -22504,6 +22507,12 @@
error: error, method: method, transaction: transaction
});
}
// "replacement transaction underpriced"
if (message.match(/only replay-protected/)) {
logger.throwError("legacy pre-eip-155 transactions not supported", lib.Logger.errors.UNSUPPORTED_OPERATION, {
error: error, method: method, transaction: transaction
});
}
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {
logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", lib.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
error: error, method: method, transaction: transaction
@ -22748,6 +22757,7 @@
});
}
_this = _super.call(this, networkOrReady) || this;
_this._eventLoopCache = {};
// Default URL
if (!url) {
url = lib$3.getStatic(_this.constructor, "defaultUrl")();
@ -22767,6 +22777,17 @@
return "http:/\/localhost:8545";
};
JsonRpcProvider.prototype.detectNetwork = function () {
var _this = this;
if (!this._eventLoopCache["detectNetwork"]) {
this._eventLoopCache["detectNetwork"] = this._uncachedDetectNetwork();
// Clear this cache at the beginning of the next event loop
setTimeout(function () {
_this._eventLoopCache["detectNetwork"] = null;
}, 0);
}
return this._eventLoopCache["detectNetwork"];
};
JsonRpcProvider.prototype._uncachedDetectNetwork = function () {
return __awaiter(this, void 0, void 0, function () {
var chainId, error_1, error_2, getNetwork;
return __generator(this, function (_a) {
@ -22841,7 +22862,13 @@
request: lib$3.deepCopy(request),
provider: this
});
return lib$q.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {
// We can expand this in the future to any call, but for now these
// are the biggest wins and do not require any serializing parameters.
var cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0);
if (cache && this._eventLoopCache[method]) {
return this._eventLoopCache[method];
}
var result = lib$q.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {
_this.emit("debug", {
action: "response",
request: request,
@ -22858,6 +22885,14 @@
});
throw error;
});
// Cache the fetch, but clear it on the next event loop
if (cache) {
this._eventLoopCache[method] = result;
setTimeout(function () {
_this._eventLoopCache[method] = null;
}, 0);
}
return result;
};
JsonRpcProvider.prototype.prepareRequest = function (method, params) {
switch (method) {
@ -23862,6 +23897,7 @@
var logger = new lib.Logger(_version$I.version);
// The transaction has already been sanitized by the calls in Provider
@ -23877,7 +23913,10 @@
value = lib$1.hexValue(lib$1.hexlify(value));
}
else if (key === "accessList") {
value = value;
var sets = lib$e.accessListify(value);
value = '[' + sets.map(function (set) {
return "{address:\"" + set.address + "\",storageKeys:[\"" + set.storageKeys.join('","') + "\"]}";
}).join(",") + "]";
}
else {
value = lib$1.hexlify(value);
@ -24154,12 +24193,6 @@
url += apiKey;
return [2 /*return*/, get(url, null)];
case 11:
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", lib.Logger.errors.UNSUPPORTED_OPERATION, {
operation: "call",
transaction: params.transaction
});
}
if (params.blockTag !== "latest") {
throw new Error("EtherscanProvider does not support blockTag for call");
}
@ -24176,12 +24209,6 @@
error_1 = _c.sent();
return [2 /*return*/, checkError("call", error_1, params.transaction)];
case 15:
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", lib.Logger.errors.UNSUPPORTED_OPERATION, {
operation: "estimateGas",
transaction: params.transaction
});
}
postData = getTransactionPostData(params.transaction);
postData.module = "proxy";
postData.action = "eth_estimateGas";
@ -25180,6 +25207,110 @@
var infuraProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(infuraProvider);
var jsonRpcBatchProvider = createCommonjsModule(function (module, exports) {
"use strict";
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonRpcBatchProvider = void 0;
// Experimental
var JsonRpcBatchProvider = /** @class */ (function (_super) {
__extends(JsonRpcBatchProvider, _super);
function JsonRpcBatchProvider() {
return _super !== null && _super.apply(this, arguments) || this;
}
JsonRpcBatchProvider.prototype.send = function (method, params) {
var _this = this;
var request = {
method: method,
params: params,
id: (this._nextId++),
jsonrpc: "2.0"
};
if (this._pendingBatch == null) {
this._pendingBatch = [];
}
var inflightRequest = { request: request, resolve: null, reject: null };
var promise = new Promise(function (resolve, reject) {
inflightRequest.resolve = resolve;
inflightRequest.reject = reject;
});
this._pendingBatch.push(inflightRequest);
if (!this._pendingBatchAggregator) {
// Schedule batch for next event loop + short duration
this._pendingBatchAggregator = setTimeout(function () {
// Get teh current batch and clear it, so new requests
// go into the next batch
var batch = _this._pendingBatch;
_this._pendingBatch = null;
_this._pendingBatchAggregator = null;
// Get the request as an array of requests
var request = batch.map(function (inflight) { return inflight.request; });
_this.emit("debug", {
action: "requestBatch",
request: lib$3.deepCopy(request),
provider: _this
});
return lib$q.fetchJson(_this.connection, JSON.stringify(request)).then(function (result) {
_this.emit("debug", {
action: "response",
request: request,
response: result,
provider: _this
});
// For each result, feed it to the correct Promise, depending
// on whether it was a success or error
batch.forEach(function (inflightRequest, index) {
var payload = result[index];
if (payload.error) {
var error = new Error(payload.error.message);
error.code = payload.error.code;
error.data = payload.error.data;
inflightRequest.reject(error);
}
else {
inflightRequest.resolve(payload.result);
}
});
}, function (error) {
_this.emit("debug", {
action: "response",
error: error,
request: request,
provider: _this
});
batch.forEach(function (inflightRequest) {
inflightRequest.reject(error);
});
});
}, 10);
}
return promise;
};
return JsonRpcBatchProvider;
}(jsonRpcProvider.JsonRpcProvider));
exports.JsonRpcBatchProvider = JsonRpcBatchProvider;
});
var jsonRpcBatchProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(jsonRpcBatchProvider);
var nodesmithProvider = createCommonjsModule(function (module, exports) {
/* istanbul ignore file */
"use strict";
@ -25520,7 +25651,7 @@
var lib$r = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return lib$b.Provider; } });
@ -25546,6 +25677,8 @@
Object.defineProperty(exports, "JsonRpcProvider", { enumerable: true, get: function () { return jsonRpcProvider.JsonRpcProvider; } });
Object.defineProperty(exports, "JsonRpcSigner", { enumerable: true, get: function () { return jsonRpcProvider.JsonRpcSigner; } });
Object.defineProperty(exports, "JsonRpcBatchProvider", { enumerable: true, get: function () { return jsonRpcBatchProvider.JsonRpcBatchProvider; } });
Object.defineProperty(exports, "NodesmithProvider", { enumerable: true, get: function () { return nodesmithProvider.NodesmithProvider; } });
Object.defineProperty(exports, "PocketProvider", { enumerable: true, get: function () { return pocketProvider.PocketProvider; } });
@ -25968,7 +26101,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "ethers/5.1.0";
exports.version = "ethers/5.1.1";
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
export declare const version = "ethers/5.1.0";
export declare const version = "ethers/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,2 +1,2 @@
export const version = "ethers/5.1.0";
export const version = "ethers/5.1.1";
//# sourceMappingURL=_version.js.map

@ -1,2 +1,2 @@
export declare const version = "ethers/5.1.0";
export declare const version = "ethers/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,5 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "ethers/5.1.0";
exports.version = "ethers/5.1.1";
//# sourceMappingURL=_version.js.map

@ -20,14 +20,14 @@
"@ethersproject/networks": "5.1.0",
"@ethersproject/pbkdf2": "5.1.0",
"@ethersproject/properties": "5.1.0",
"@ethersproject/providers": "5.1.0",
"@ethersproject/providers": "5.1.1",
"@ethersproject/random": "5.1.0",
"@ethersproject/rlp": "5.1.0",
"@ethersproject/sha2": "5.1.0",
"@ethersproject/signing-key": "5.1.0",
"@ethersproject/solidity": "5.1.0",
"@ethersproject/strings": "5.1.0",
"@ethersproject/transactions": "5.1.0",
"@ethersproject/transactions": "5.1.1",
"@ethersproject/units": "5.1.0",
"@ethersproject/wallet": "5.1.0",
"@ethersproject/web": "5.1.0",
@ -62,7 +62,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": false,
"tarballHash": "0x9c7d6cbbc0071ab31b338928740bc00a7879f5d0c403042e71cf7d46b5272cab",
"tarballHash": "0xce8d29a26dd72fd6ca2474e5c5419e612aed4113b68575acedeac474b2095cb9",
"types": "./lib/index.d.ts",
"version": "5.1.0"
"version": "5.1.1"
}

@ -1 +1 @@
export const version = "ethers/5.1.0";
export const version = "ethers/5.1.1";

@ -1,2 +1,2 @@
export declare const version = "providers/5.1.0";
export declare const version = "providers/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,2 +1,2 @@
export const version = "providers/5.1.0";
export const version = "providers/5.1.1";
//# sourceMappingURL=_version.js.map

@ -1 +1 @@
{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAsB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAU9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAmI/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAiC3C,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA+NxD,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IA0DpI,mBAAmB,IAAI,OAAO;CAGjC"}
{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAsB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAW9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAsI/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAiC3C,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAiNxD,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IA0DpI,mBAAmB,IAAI,OAAO;CAGjC"}

@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
import { hexlify, hexValue, isHexString } from "@ethersproject/bytes";
import { deepCopy, defineReadOnly } from "@ethersproject/properties";
import { accessListify } from "@ethersproject/transactions";
import { fetchJson } from "@ethersproject/web";
import { showThrottleMessage } from "./formatter";
import { Logger } from "@ethersproject/logger";
@ -29,7 +30,10 @@ function getTransactionPostData(transaction) {
value = hexValue(hexlify(value));
}
else if (key === "accessList") {
value = value;
const sets = accessListify(value);
value = '[' + sets.map((set) => {
return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`;
}).join(",") + "]";
}
else {
value = hexlify(value);
@ -273,12 +277,6 @@ export class EtherscanProvider extends BaseProvider {
url += apiKey;
return get(url, null);
case "call": {
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", Logger.errors.UNSUPPORTED_OPERATION, {
operation: "call",
transaction: params.transaction
});
}
if (params.blockTag !== "latest") {
throw new Error("EtherscanProvider does not support blockTag for call");
}
@ -294,12 +292,6 @@ export class EtherscanProvider extends BaseProvider {
}
}
case "estimateGas": {
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", Logger.errors.UNSUPPORTED_OPERATION, {
operation: "estimateGas",
transaction: params.transaction
});
}
const postData = getTransactionPostData(params.transaction);
postData.module = "proxy";
postData.action = "eth_estimateGas";

File diff suppressed because one or more lines are too long

@ -9,6 +9,7 @@ import { FallbackProvider } from "./fallback-provider";
import { IpcProvider } from "./ipc-provider";
import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider";
import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider";
import { JsonRpcBatchProvider } from "./json-rpc-batch-provider";
import { NodesmithProvider } from "./nodesmith-provider";
import { PocketProvider } from "./pocket-provider";
import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider";
@ -17,5 +18,5 @@ import { WebSocketProvider } from "./websocket-provider";
import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider";
import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter";
declare function getDefaultProvider(network?: Network | string, options?: any): BaseProvider;
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
//# sourceMappingURL=index.d.ts.map

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3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;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAShI,iBAAS,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,YAAY,CA2CnF;AAKD,OAAO,EAGH,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB,EAKlB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW,EAMX,aAAa,EAMb,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"}

@ -9,6 +9,7 @@ import { FallbackProvider } from "./fallback-provider";
import { IpcProvider } from "./ipc-provider";
import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider";
import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider";
import { JsonRpcBatchProvider } from "./json-rpc-batch-provider";
import { NodesmithProvider } from "./nodesmith-provider";
import { PocketProvider } from "./pocket-provider";
import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider";
@ -67,7 +68,7 @@ export {
Provider, BaseProvider, Resolver, UrlJsonRpcProvider,
///////////////////////
// Concreate Providers
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
///////////////////////
// Signer
JsonRpcSigner,

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAOH,QAAQ,EAIX,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAA4B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAm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 +1,17 @@
/// <reference types="node" />
import { JsonRpcProvider } from "./json-rpc-provider";
export declare class JsonRpcBatchProvider extends JsonRpcProvider {
_pendingBatchAggregator: NodeJS.Timer;
_pendingBatch: Array<{
request: {
method: string;
params: Array<any>;
id: number;
jsonrpc: "2.0";
};
resolve: (result: any) => void;
reject: (error: Error) => void;
}>;
send(method: string, params: Array<any>): Promise<any>;
}
//# sourceMappingURL=json-rpc-batch-provider.d.ts.map

@ -0,0 +1 @@
{"version":3,"file":"json-rpc-batch-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,oBAAqB,SAAQ,eAAe;IACrD,uBAAuB,EAAE,MAAM,CAAC,KAAK,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC;QACjB,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,KAAK,CAAA;SAAE,CAAC;QAC5E,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;QAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAgFzD"}

@ -0,0 +1,74 @@
import { deepCopy } from "@ethersproject/properties";
import { fetchJson } from "@ethersproject/web";
import { JsonRpcProvider } from "./json-rpc-provider";
// Experimental
export class JsonRpcBatchProvider extends JsonRpcProvider {
send(method, params) {
const request = {
method: method,
params: params,
id: (this._nextId++),
jsonrpc: "2.0"
};
if (this._pendingBatch == null) {
this._pendingBatch = [];
}
const inflightRequest = { request, resolve: null, reject: null };
const promise = new Promise((resolve, reject) => {
inflightRequest.resolve = resolve;
inflightRequest.reject = reject;
});
this._pendingBatch.push(inflightRequest);
if (!this._pendingBatchAggregator) {
// Schedule batch for next event loop + short duration
this._pendingBatchAggregator = setTimeout(() => {
// Get teh current batch and clear it, so new requests
// go into the next batch
const batch = this._pendingBatch;
this._pendingBatch = null;
this._pendingBatchAggregator = null;
// Get the request as an array of requests
const request = batch.map((inflight) => inflight.request);
this.emit("debug", {
action: "requestBatch",
request: deepCopy(request),
provider: this
});
return fetchJson(this.connection, JSON.stringify(request)).then((result) => {
this.emit("debug", {
action: "response",
request: request,
response: result,
provider: this
});
// For each result, feed it to the correct Promise, depending
// on whether it was a success or error
batch.forEach((inflightRequest, index) => {
const payload = result[index];
if (payload.error) {
const error = new Error(payload.error.message);
error.code = payload.error.code;
error.data = payload.error.data;
inflightRequest.reject(error);
}
else {
inflightRequest.resolve(payload.result);
}
});
}, (error) => {
this.emit("debug", {
action: "response",
error: error,
request: request,
provider: this
});
batch.forEach((inflightRequest) => {
inflightRequest.reject(error);
});
});
}, 10);
}
return promise;
}
}
//# sourceMappingURL=json-rpc-batch-provider.js.map

@ -0,0 +1 @@
{"version":3,"file":"json-rpc-batch-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;AAEf,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IAQrD,IAAI,CAAC,MAAc,EAAE,MAAkB;QACnC,MAAM,OAAO,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,EAAE,KAAK;SACjB,CAAC;QAEF,IAAI,IAAI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;wBAChB,QAAQ,EAAE,MAAM;wBAChB,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBAEH,6DAA6D;oBAC7D,uCAAuC;oBACvC,KAAK,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,KAAK,EAAE,EAAE;wBACrC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;wBAC9B,IAAI,OAAO,CAAC,KAAK,EAAE;4BACf,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;4BACzC,KAAM,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;4BACjC,KAAM,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;4BACvC,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;yBACjC;6BAAM;4BACH,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;yBAC3C;oBACL,CAAC,CAAC,CAAC;gBAEP,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;oBACT,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;wBACf,MAAM,EAAE,UAAU;wBAClB,KAAK,EAAE,KAAK;wBACZ,OAAO,EAAE,OAAO;wBAChB,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBAEH,KAAK,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;wBAC9B,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAClC,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YAEP,CAAC,EAAE,EAAE,CAAC,CAAC;SACV;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}

@ -28,9 +28,11 @@ export declare class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo;
_pendingFilter: Promise<number>;
_nextId: number;
_eventLoopCache: Record<string, Promise<any>>;
constructor(url?: ConnectionInfo | string, network?: Networkish);
static defaultUrl(): string;
detectNetwork(): Promise<Network>;
_uncachedDetectNetwork(): Promise<Network>;
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
listAccounts(): Promise<Array<string>>;

@ -1 +1 @@
{"version":3,"file":"json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE1G,OAAO,EAAE,KAAK,EAAkC,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAA6B,UAAU,EAA6D,MAAM,2BAA2B,CAAC;AAE7I,OAAO,EAAE,UAAU,EAAiB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAmB,MAAM,oBAAoB,CAAC;AAMrE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAkFtD,qBAAa,aAAc,SAAQ,MAAO,YAAW,eAAe;IAChE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;gBAEL,gBAAgB,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IA0B9F,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa;IAM1C,gBAAgB,IAAI,aAAa;IAIjC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAe7B,wBAAwB,CAAC,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,MAAM,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M,CAAC;IAKhB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;gBAElC,GAAG,CAAC,EAAE,cAAc,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU;IAoC/D,MAAM,CAAC,UAAU,IAAI,MAAM;IAI3B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAY3B,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC;IA8BhD,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa;IAI1D,kBAAkB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,sBAAsB;IAI5E,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAMtC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAqDtD,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAE;IA4D7D,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAaxD,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAK/B,aAAa,IAAI,IAAI;IA2CrB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAiB9B,MAAM,CAAC,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;KAAE;CAgC9I"}

@ -60,6 +60,12 @@ function checkError(method, error, params) {
error, method, transaction
});
}
// "replacement transaction underpriced"
if (message.match(/only replay-protected/)) {
logger.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, {
error, method, transaction
});
}
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {
logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
error, method, transaction
@ -257,6 +263,7 @@ export class JsonRpcProvider extends BaseProvider {
});
}
super(networkOrReady);
this._eventLoopCache = {};
// Default URL
if (!url) {
url = getStatic(this.constructor, "defaultUrl")();
@ -275,6 +282,16 @@ export class JsonRpcProvider extends BaseProvider {
return "http:/\/localhost:8545";
}
detectNetwork() {
if (!this._eventLoopCache["detectNetwork"]) {
this._eventLoopCache["detectNetwork"] = this._uncachedDetectNetwork();
// Clear this cache at the beginning of the next event loop
setTimeout(() => {
this._eventLoopCache["detectNetwork"] = null;
}, 0);
}
return this._eventLoopCache["detectNetwork"];
}
_uncachedDetectNetwork() {
return __awaiter(this, void 0, void 0, function* () {
yield timer(0);
let chainId = null;
@ -328,7 +345,13 @@ export class JsonRpcProvider extends BaseProvider {
request: deepCopy(request),
provider: this
});
return fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {
// We can expand this in the future to any call, but for now these
// are the biggest wins and do not require any serializing parameters.
const cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0);
if (cache && this._eventLoopCache[method]) {
return this._eventLoopCache[method];
}
const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {
this.emit("debug", {
action: "response",
request: request,
@ -345,6 +368,14 @@ export class JsonRpcProvider extends BaseProvider {
});
throw error;
});
// Cache the fetch, but clear it on the next event loop
if (cache) {
this._eventLoopCache[method] = result;
setTimeout(() => {
this._eventLoopCache[method] = null;
}, 0);
}
return result;
}
prepareRequest(method, params) {
switch (method) {

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
export declare const version = "providers/5.1.0";
export declare const version = "providers/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,5 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "providers/5.1.0";
exports.version = "providers/5.1.1";
//# sourceMappingURL=_version.js.map

@ -1 +1 @@
{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAsB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAU9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAmI/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAiC3C,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA+NxD,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IA0DpI,mBAAmB,IAAI,OAAO;CAGjC"}
{"version":3,"file":"etherscan-provider.d.ts","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAsB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAW9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAsI/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAiC3C,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAiNxD,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IA0DpI,mBAAmB,IAAI,OAAO;CAGjC"}

@ -54,6 +54,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.EtherscanProvider = void 0;
var bytes_1 = require("@ethersproject/bytes");
var properties_1 = require("@ethersproject/properties");
var transactions_1 = require("@ethersproject/transactions");
var web_1 = require("@ethersproject/web");
var formatter_1 = require("./formatter");
var logger_1 = require("@ethersproject/logger");
@ -73,7 +74,10 @@ function getTransactionPostData(transaction) {
value = bytes_1.hexValue(bytes_1.hexlify(value));
}
else if (key === "accessList") {
value = value;
var sets = transactions_1.accessListify(value);
value = '[' + sets.map(function (set) {
return "{address:\"" + set.address + "\",storageKeys:[\"" + set.storageKeys.join('","') + "\"]}";
}).join(",") + "]";
}
else {
value = bytes_1.hexlify(value);
@ -350,12 +354,6 @@ var EtherscanProvider = /** @class */ (function (_super) {
url += apiKey;
return [2 /*return*/, get(url, null)];
case 11:
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
operation: "call",
transaction: params.transaction
});
}
if (params.blockTag !== "latest") {
throw new Error("EtherscanProvider does not support blockTag for call");
}
@ -372,12 +370,6 @@ var EtherscanProvider = /** @class */ (function (_super) {
error_1 = _c.sent();
return [2 /*return*/, checkError("call", error_1, params.transaction)];
case 15:
if (params.transaction.type != null) {
logger.throwError("Etherscan does not currently support Berlin", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
operation: "estimateGas",
transaction: params.transaction
});
}
postData = getTransactionPostData(params.transaction);
postData.module = "proxy";
postData.action = "eth_estimateGas";

File diff suppressed because one or more lines are too long

@ -9,6 +9,7 @@ import { FallbackProvider } from "./fallback-provider";
import { IpcProvider } from "./ipc-provider";
import { InfuraProvider, InfuraWebSocketProvider } from "./infura-provider";
import { JsonRpcProvider, JsonRpcSigner } from "./json-rpc-provider";
import { JsonRpcBatchProvider } from "./json-rpc-batch-provider";
import { NodesmithProvider } from "./nodesmith-provider";
import { PocketProvider } from "./pocket-provider";
import { StaticJsonRpcProvider, UrlJsonRpcProvider } from "./url-json-rpc-provider";
@ -17,5 +18,5 @@ import { WebSocketProvider } from "./websocket-provider";
import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider";
import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter";
declare function getDefaultProvider(network?: Network | string, options?: any): BaseProvider;
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
//# sourceMappingURL=index.d.ts.map

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAA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AE,OAAO,CAAC,EAAE,GAAG,GAAG,YAAY,CA2CnF;AAKD,OAAO,EAGH,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB,EAKlB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW,EAMX,aAAa,EAMb,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"}

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
var abstract_provider_1 = require("@ethersproject/abstract-provider");
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return abstract_provider_1.Provider; } });
var networks_1 = require("@ethersproject/networks");
@ -25,6 +25,8 @@ Object.defineProperty(exports, "InfuraWebSocketProvider", { enumerable: true, ge
var json_rpc_provider_1 = require("./json-rpc-provider");
Object.defineProperty(exports, "JsonRpcProvider", { enumerable: true, get: function () { return json_rpc_provider_1.JsonRpcProvider; } });
Object.defineProperty(exports, "JsonRpcSigner", { enumerable: true, get: function () { return json_rpc_provider_1.JsonRpcSigner; } });
var json_rpc_batch_provider_1 = require("./json-rpc-batch-provider");
Object.defineProperty(exports, "JsonRpcBatchProvider", { enumerable: true, get: function () { return json_rpc_batch_provider_1.JsonRpcBatchProvider; } });
var nodesmith_provider_1 = require("./nodesmith-provider");
Object.defineProperty(exports, "NodesmithProvider", { enumerable: true, get: function () { return nodesmith_provider_1.NodesmithProvider; } });
var pocket_provider_1 = require("./pocket-provider");

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,sEAW0C;AAiFtC,yFArFA,4BAAQ,OAqFA;AA/EZ,oDAAqD;AAqHjD,2FArHK,qBAAU,OAqHL;AAlHd,iDAAmF;AA6E/E,6FA7EK,4BAAY,OA6EL;AAEZ,yFA/E6C,wBAAQ,OA+E7C;AA7EZ,uDAA+E;AAsF3E,gGAtFK,kCAAe,OAsFL;AACf,yGAvFsB,2CAAwB,OAuFtB;AAtF5B,6DAA2D;AAuFvD,mGAvFK,wCAAkB,OAuFL;AAtFtB,2DAAyD;AAuFrD,kGAvFK,sCAAiB,OAuFL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BACL,OAAO,IAAI,sCAAiB,CAAC,OAAO,CAAC,CAAC;gBAC1C;oBACI,MAAM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;aAC/E;SACJ;KACJ;IAED,IAAM,CAAC,GAAG,qBAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,wCAAwC,EAAE,eAAM,CAAC,MAAM,CAAC,aAAa,EAAE;YACrF,SAAS,EAAE,oBAAoB;YAC/B,OAAO,EAAE,OAAO;SACnB,CAAC,CAAC;KACN;IAED,OAAO,CAAC,CAAC,gBAAgB,CAAC;QACtB,gBAAgB,sCAAA;QAEhB,eAAe,oCAAA;QACf,kBAAkB,0CAAA;QAClB,iBAAiB,wCAAA;QACjB,cAAc,kCAAA;QACd,eAAe,qCAAA;QACf,iBAAiB,wCAAA;QACjB,cAAc,kCAAA;QACd,YAAY,8BAAA;QAEZ,WAAW,4BAAA;KACd,EAAE,OAAO,CAAC,CAAC;AAChB,CAAC;AA8CG,gDAAkB"}

@ -0,0 +1,17 @@
/// <reference types="node" />
import { JsonRpcProvider } from "./json-rpc-provider";
export declare class JsonRpcBatchProvider extends JsonRpcProvider {
_pendingBatchAggregator: NodeJS.Timer;
_pendingBatch: Array<{
request: {
method: string;
params: Array<any>;
id: number;
jsonrpc: "2.0";
};
resolve: (result: any) => void;
reject: (error: Error) => void;
}>;
send(method: string, params: Array<any>): Promise<any>;
}
//# sourceMappingURL=json-rpc-batch-provider.d.ts.map

@ -0,0 +1 @@
{"version":3,"file":"json-rpc-batch-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,oBAAqB,SAAQ,eAAe;IACrD,uBAAuB,EAAE,MAAM,CAAC,KAAK,CAAC;IACtC,aAAa,EAAE,KAAK,CAAC;QACjB,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,KAAK,CAAA;SAAE,CAAC;QAC5E,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;QAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAgFzD"}

@ -0,0 +1,99 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonRpcBatchProvider = void 0;
var properties_1 = require("@ethersproject/properties");
var web_1 = require("@ethersproject/web");
var json_rpc_provider_1 = require("./json-rpc-provider");
// Experimental
var JsonRpcBatchProvider = /** @class */ (function (_super) {
__extends(JsonRpcBatchProvider, _super);
function JsonRpcBatchProvider() {
return _super !== null && _super.apply(this, arguments) || this;
}
JsonRpcBatchProvider.prototype.send = function (method, params) {
var _this = this;
var request = {
method: method,
params: params,
id: (this._nextId++),
jsonrpc: "2.0"
};
if (this._pendingBatch == null) {
this._pendingBatch = [];
}
var inflightRequest = { request: request, resolve: null, reject: null };
var promise = new Promise(function (resolve, reject) {
inflightRequest.resolve = resolve;
inflightRequest.reject = reject;
});
this._pendingBatch.push(inflightRequest);
if (!this._pendingBatchAggregator) {
// Schedule batch for next event loop + short duration
this._pendingBatchAggregator = setTimeout(function () {
// Get teh current batch and clear it, so new requests
// go into the next batch
var batch = _this._pendingBatch;
_this._pendingBatch = null;
_this._pendingBatchAggregator = null;
// Get the request as an array of requests
var request = batch.map(function (inflight) { return inflight.request; });
_this.emit("debug", {
action: "requestBatch",
request: properties_1.deepCopy(request),
provider: _this
});
return web_1.fetchJson(_this.connection, JSON.stringify(request)).then(function (result) {
_this.emit("debug", {
action: "response",
request: request,
response: result,
provider: _this
});
// For each result, feed it to the correct Promise, depending
// on whether it was a success or error
batch.forEach(function (inflightRequest, index) {
var payload = result[index];
if (payload.error) {
var error = new Error(payload.error.message);
error.code = payload.error.code;
error.data = payload.error.data;
inflightRequest.reject(error);
}
else {
inflightRequest.resolve(payload.result);
}
});
}, function (error) {
_this.emit("debug", {
action: "response",
error: error,
request: request,
provider: _this
});
batch.forEach(function (inflightRequest) {
inflightRequest.reject(error);
});
});
}, 10);
}
return promise;
};
return JsonRpcBatchProvider;
}(json_rpc_provider_1.JsonRpcProvider));
exports.JsonRpcBatchProvider = JsonRpcBatchProvider;
//# sourceMappingURL=json-rpc-batch-provider.js.map

@ -0,0 +1 @@
{"version":3,"file":"json-rpc-batch-provider.js","sourceRoot":"","sources":["../src.ts/json-rpc-batch-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,wDAAqD;AACrD,0CAA+C;AAE/C,yDAAsD;AAEtD,eAAe;AAEf;IAA0C,wCAAe;IAAzD;;IAwFA,CAAC;IAhFG,mCAAI,GAAJ,UAAK,MAAc,EAAE,MAAkB;QAAvC,iBA+EC;QA9EG,IAAM,OAAO,GAAG;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE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<number>;
_nextId: number;
_eventLoopCache: Record<string, Promise<any>>;
constructor(url?: ConnectionInfo | string, network?: Networkish);
static defaultUrl(): string;
detectNetwork(): Promise<Network>;
_uncachedDetectNetwork(): Promise<Network>;
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
listAccounts(): Promise<Array<string>>;

@ -1 +1 @@
{"version":3,"file":"json-rpc-provider.d.ts","sourceRoot":"","sources":["../src.ts/json-rpc-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE1G,OAAO,EAAE,KAAK,EAAkC,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAA6B,UAAU,EAA6D,MAAM,2BAA2B,CAAC;AAE7I,OAAO,EAAE,UAAU,EAAiB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAmB,MAAM,oBAAoB,CAAC;AAMrE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAkFtD,qBAAa,aAAc,SAAQ,MAAO,YAAW,eAAe;IAChE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;gBAEL,gBAAgB,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IA0B9F,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa;IAM1C,gBAAgB,IAAI,aAAa;IAIjC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAe7B,wBAAwB,CA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@@ function checkError(method, error, params) {
error: error, method: method, transaction: transaction
});
}
// "replacement transaction underpriced"
if (message.match(/only replay-protected/)) {
logger.throwError("legacy pre-eip-155 transactions not supported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
error: error, method: method, transaction: transaction
});
}
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted/)) {
logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
error: error, method: method, transaction: transaction
@ -348,6 +354,7 @@ var JsonRpcProvider = /** @class */ (function (_super) {
});
}
_this = _super.call(this, networkOrReady) || this;
_this._eventLoopCache = {};
// Default URL
if (!url) {
url = properties_1.getStatic(_this.constructor, "defaultUrl")();
@ -367,6 +374,17 @@ var JsonRpcProvider = /** @class */ (function (_super) {
return "http:/\/localhost:8545";
};
JsonRpcProvider.prototype.detectNetwork = function () {
var _this = this;
if (!this._eventLoopCache["detectNetwork"]) {
this._eventLoopCache["detectNetwork"] = this._uncachedDetectNetwork();
// Clear this cache at the beginning of the next event loop
setTimeout(function () {
_this._eventLoopCache["detectNetwork"] = null;
}, 0);
}
return this._eventLoopCache["detectNetwork"];
};
JsonRpcProvider.prototype._uncachedDetectNetwork = function () {
return __awaiter(this, void 0, void 0, function () {
var chainId, error_1, error_2, getNetwork;
return __generator(this, function (_a) {
@ -441,7 +459,13 @@ var JsonRpcProvider = /** @class */ (function (_super) {
request: properties_1.deepCopy(request),
provider: this
});
return web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {
// We can expand this in the future to any call, but for now these
// are the biggest wins and do not require any serializing parameters.
var cache = (["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0);
if (cache && this._eventLoopCache[method]) {
return this._eventLoopCache[method];
}
var result = web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {
_this.emit("debug", {
action: "response",
request: request,
@ -458,6 +482,14 @@ var JsonRpcProvider = /** @class */ (function (_super) {
});
throw error;
});
// Cache the fetch, but clear it on the next event loop
if (cache) {
this._eventLoopCache[method] = result;
setTimeout(function () {
_this._eventLoopCache[method] = null;
}, 0);
}
return result;
};
JsonRpcProvider.prototype.prepareRequest = function (method, params) {
switch (method) {

File diff suppressed because one or more lines are too long

@ -66,7 +66,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": false,
"tarballHash": "0x6e19b4da489cbf02e698d8ce8e42564d81b1547e41ddcad5cfcded518c19ca9c",
"tarballHash": "0xa0262ee95a674718fcdede03961a5bba6742f793e0462e6dadf2a68c64719a62",
"types": "./lib/index.d.ts",
"version": "5.1.0"
"version": "5.1.1"
}

@ -1 +1 @@
export const version = "providers/5.1.0";
export const version = "providers/5.1.1";

@ -618,9 +618,19 @@
var forms = ["NFD", "NFC", "NFKD", "NFKC"];
for (var i = 0; i < forms.length; i++) {
try {
// Simple test that catches invalid normalization
if ("test".normalize(forms[i]) !== "test") {
throw new Error("failed to normalize");
}
// Some platforms seem to only fail when normalizing
// specific code planes, so add those here as they
// come up.
// "hangul"
const checks = [ "\ud55c\uae00" ];
for (var j = 0; j < checks.length; j++) {
checks[j].normalize(forms[i]);
}
} catch(error) {
missing.push(forms[i]);
}

File diff suppressed because one or more lines are too long

@ -33,7 +33,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x9a5737ccb124af95c5890361f9912ea8ea0ccc3dadac92d8388a774a1ef95a14",
"tarballHash": "0x59e818c2093604325cf6c4b07213a7e77b8f620bf74d9f1fae0b7250d525dc06",
"types": "./lib/index.d.ts",
"version": "5.1.0"
"version": "5.1.1"
}

@ -1,2 +1,2 @@
export declare const version = "tests/5.1.0";
export declare const version = "tests/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,2 +1,2 @@
export const version = "tests/5.1.0";
export const version = "tests/5.1.1";
//# sourceMappingURL=_version.js.map

@ -240,6 +240,7 @@ const blockchainData = {
},
],
transactions: [
// Berlin tests
{
hash: "0x48bff7b0e603200118a672f7c622ab7d555a28f98938edb8318803eed7ea7395",
type: 1,
@ -635,9 +636,6 @@ Object.keys(blockchainData).forEach((network) => {
tests.transactions.forEach((test) => {
addObjectTest(`fetches transaction ${test.hash}`, (provider) => __awaiter(void 0, void 0, void 0, function* () {
const tx = yield provider.getTransaction(test.hash);
//console.log("TX");
//console.dir(test, { depth: null })
//console.dir(tx, { depth: null })
// This changes with every block
assert.equal(typeof (tx.confirmations), "number", "confirmations is a number");
delete tx.confirmations;
@ -645,11 +643,11 @@ Object.keys(blockchainData).forEach((network) => {
delete tx.wait;
return tx;
}), test, (provider, network, test) => {
if (network === "ropsten" && (provider === "AlchemyProvider" || provider === "PocketProvider")) {
console.log(`Skipping ${provider}; incomplete Berlin support`);
// Temporary; Pocket is having issues with old transactions on some testnets
if ((network === "ropsten" || network === "goerli") && provider === "PocketProvider") {
return true;
}
return false; //(provider === "EtherscanProvider");
return false;
});
});
tests.transactionReceipts.forEach((test) => {
@ -663,7 +661,13 @@ Object.keys(blockchainData).forEach((network) => {
assert.equal(typeof (receipt.confirmations), "number", "confirmations is a number");
delete receipt.confirmations;
return receipt;
}), test);
}), test, (provider, network, test) => {
// Temporary; Pocket is having issues with old transactions on some testnets
if ((network === "ropsten" || network === "goerli") && provider === "PocketProvider") {
return true;
}
return false;
});
});
});
(function () {
@ -683,14 +687,22 @@ Object.keys(blockchainData).forEach((network) => {
})
});
}
addErrorTest(ethers.utils.Logger.errors.NONCE_EXPIRED, (provider) => __awaiter(this, void 0, void 0, function* () {
/*
@TODO: Use this for testing pre-EIP-155 transactions on specific networks
addErrorTest(ethers.utils.Logger.errors.NONCE_EXPIRED, async (provider: ethers.providers.Provider) => {
return provider.sendTransaction("0xf86480850218711a0082520894000000000000000000000000000000000000000002801ba038aaddcaaae7d3fa066dfd6f196c8348e1bb210f2c121d36cb2c24ef20cea1fba008ae378075d3cd75aae99ab75a70da82161dffb2c8263dabc5d8adecfa9447fa");
});
*/
// Wallet(id("foobar1234"))
addErrorTest(ethers.utils.Logger.errors.NONCE_EXPIRED, (provider) => __awaiter(this, void 0, void 0, function* () {
return provider.sendTransaction("0xf86480850218711a00825208940000000000000000000000000000000000000000038029a04320fd28c8e6c95da9229d960d14ffa3de81f83abe3ad9c189642c83d7d951f3a009aac89e04a8bafdcf618e21fed5e7b1144ca1083a301fd5fde28b0419eb63ce");
}));
addErrorTest(ethers.utils.Logger.errors.INSUFFICIENT_FUNDS, (provider) => __awaiter(this, void 0, void 0, function* () {
const txProps = {
to: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
gasPrice: 9000000000,
gasLimit: 21000,
chainId: 3,
value: 1
};
const wallet = ethers.Wallet.createRandom();
@ -741,7 +753,8 @@ testFunctions.push({
timeout: 300,
networks: ["ropsten"],
checkSkip: (provider, network, test) => {
return (provider === "PocketProvider" || provider === "EtherscanProvider" || provider === "AlchemyProvider");
// Temporary
return false;
},
execute: (provider) => __awaiter(void 0, void 0, void 0, function* () {
const wallet = fundWallet.connect(provider);

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
export declare const version = "tests/5.1.0";
export declare const version = "tests/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,5 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "tests/5.1.0";
exports.version = "tests/5.1.1";
//# sourceMappingURL=_version.js.map

@ -271,6 +271,7 @@ var blockchainData = {
},
],
transactions: [
// Berlin tests
{
hash: "0x48bff7b0e603200118a672f7c622ab7d555a28f98938edb8318803eed7ea7395",
type: 1,
@ -689,9 +690,6 @@ Object.keys(blockchainData).forEach(function (network) {
case 0: return [4 /*yield*/, provider.getTransaction(test.hash)];
case 1:
tx = _a.sent();
//console.log("TX");
//console.dir(test, { depth: null })
//console.dir(tx, { depth: null })
// This changes with every block
assert_1.default.equal(typeof (tx.confirmations), "number", "confirmations is a number");
delete tx.confirmations;
@ -701,11 +699,11 @@ Object.keys(blockchainData).forEach(function (network) {
}
});
}); }, test, function (provider, network, test) {
if (network === "ropsten" && (provider === "AlchemyProvider" || provider === "PocketProvider")) {
console.log("Skipping " + provider + "; incomplete Berlin support");
// Temporary; Pocket is having issues with old transactions on some testnets
if ((network === "ropsten" || network === "goerli") && provider === "PocketProvider") {
return true;
}
return false; //(provider === "EtherscanProvider");
return false;
});
});
tests.transactionReceipts.forEach(function (test) {
@ -726,7 +724,13 @@ Object.keys(blockchainData).forEach(function (network) {
return [2 /*return*/, receipt];
}
});
}); }, test);
}); }, test, function (provider, network, test) {
// Temporary; Pocket is having issues with old transactions on some testnets
if ((network === "ropsten" || network === "goerli") && provider === "PocketProvider") {
return true;
}
return false;
});
});
});
(function () {
@ -758,9 +762,16 @@ Object.keys(blockchainData).forEach(function (network) {
}); }
});
}
/*
@TODO: Use this for testing pre-EIP-155 transactions on specific networks
addErrorTest(ethers.utils.Logger.errors.NONCE_EXPIRED, async (provider: ethers.providers.Provider) => {
return provider.sendTransaction("0xf86480850218711a0082520894000000000000000000000000000000000000000002801ba038aaddcaaae7d3fa066dfd6f196c8348e1bb210f2c121d36cb2c24ef20cea1fba008ae378075d3cd75aae99ab75a70da82161dffb2c8263dabc5d8adecfa9447fa");
});
*/
// Wallet(id("foobar1234"))
addErrorTest(ethers_1.ethers.utils.Logger.errors.NONCE_EXPIRED, function (provider) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, provider.sendTransaction("0xf86480850218711a0082520894000000000000000000000000000000000000000002801ba038aaddcaaae7d3fa066dfd6f196c8348e1bb210f2c121d36cb2c24ef20cea1fba008ae378075d3cd75aae99ab75a70da82161dffb2c8263dabc5d8adecfa9447fa")];
return [2 /*return*/, provider.sendTransaction("0xf86480850218711a00825208940000000000000000000000000000000000000000038029a04320fd28c8e6c95da9229d960d14ffa3de81f83abe3ad9c189642c83d7d951f3a009aac89e04a8bafdcf618e21fed5e7b1144ca1083a301fd5fde28b0419eb63ce")];
});
}); });
addErrorTest(ethers_1.ethers.utils.Logger.errors.INSUFFICIENT_FUNDS, function (provider) { return __awaiter(_this, void 0, void 0, function () {
@ -772,6 +783,7 @@ Object.keys(blockchainData).forEach(function (network) {
to: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
gasPrice: 9000000000,
gasLimit: 21000,
chainId: 3,
value: 1
};
wallet = ethers_1.ethers.Wallet.createRandom();
@ -846,7 +858,8 @@ testFunctions.push({
timeout: 300,
networks: ["ropsten"],
checkSkip: function (provider, network, test) {
return (provider === "PocketProvider" || provider === "EtherscanProvider" || provider === "AlchemyProvider");
// Temporary
return false;
},
execute: function (provider) { return __awaiter(void 0, void 0, void 0, function () {
var wallet, addr, b0, tx, b1;

File diff suppressed because one or more lines are too long

@ -37,7 +37,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0xe1e841ad215ba962bb3ec410d588dd78bae3f578b52ec3834f92800490fc4fdb",
"tarballHash": "0xe416e762def736a5ceb055221d4c7e36fe0eb2101114e1c712af45bc640cb4cf",
"types": "./lib/index.d.ts",
"version": "5.1.0"
"version": "5.1.1"
}

@ -1 +1 @@
export const version = "tests/5.1.0";
export const version = "tests/5.1.1";

@ -1,2 +1,2 @@
export declare const version = "transactions/5.1.0";
export declare const version = "transactions/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,2 +1,2 @@
export const version = "transactions/5.1.0";
export const version = "transactions/5.1.1";
//# sourceMappingURL=_version.js.map

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAY,SAAS,EAAyF,aAAa,EAA+B,MAAM,sBAAsB,CAAC;AAc9L,oBAAY,UAAU,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC;AAGhF,oB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ACd,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAEhB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IAGX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AA4BD,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAG9D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAElF;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAsB9D;AA6GD,wBAAgB,SAAS,CAAC,WAAW,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,MAAM,CAqB7F;AAoHD,wBAAgB,KAAK,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAkB5D"}

@ -176,6 +176,9 @@ function _serialize(transaction, signature) {
export function serialize(transaction, signature) {
// Legacy and EIP-155 Transactions
if (transaction.type == null) {
if (transaction.accessList != null) {
logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
}
return _serialize(transaction, signature);
}
// Typed Transactions (EIP-2718)

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
export declare const version = "transactions/5.1.0";
export declare const version = "transactions/5.1.1";
//# sourceMappingURL=_version.d.ts.map

@ -1,5 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "transactions/5.1.0";
exports.version = "transactions/5.1.1";
//# sourceMappingURL=_version.js.map

@ -1 +1 @@
{"version":3,"file":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AC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAA;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAEhB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IAGX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AA4BD,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAG9D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAElF;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAsB9D;AA6GD,wBAAgB,SAAS,CAAC,WAAW,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,MAAM,CAqB7F;AAoHD,wBAAgB,KAAK,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAkB5D"}

@ -200,6 +200,9 @@ function _serialize(transaction, signature) {
function serialize(transaction, signature) {
// Legacy and EIP-155 Transactions
if (transaction.type == null) {
if (transaction.accessList != null) {
logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
}
return _serialize(transaction, signature);
}
// Typed Transactions (EIP-2718)

File diff suppressed because one or more lines are too long

@ -43,7 +43,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": false,
"tarballHash": "0xfcc7bf02b3381db31f124dd3b0cfcfa12e70b371e86b45238bc125e8d8e41d87",
"tarballHash": "0x534ec8856279734fbd887b095e750e59f71feb9a6d587fc6fd1992b8ee65a4a3",
"types": "./lib/index.d.ts",
"version": "5.1.0"
"version": "5.1.1"
}

@ -1 +1 @@
export const version = "transactions/5.1.0";
export const version = "transactions/5.1.1";