From b4ea13255c9aaa4b06d2efb5e6e7e17b96b1944f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 23:23:54 +0000 Subject: [PATCH 01/35] Bump @types/react from 17.0.14 to 17.0.15 (#35) --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index c192693..7898a83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.24", "@types/node": "^14.17.5", - "@types/react": "^17.0.14", + "@types/react": "^17.0.15", "@types/react-blockies": "^1.4.1", "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", @@ -3062,9 +3062,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz", - "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz", + "integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -21087,9 +21087,9 @@ "version": "1.5.4" }, "@types/react": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz", - "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz", + "integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", diff --git a/package.json b/package.json index 6392c67..0993241 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.24", "@types/node": "^14.17.5", - "@types/react": "^17.0.14", + "@types/react": "^17.0.15", "@types/react-blockies": "^1.4.1", "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", From a66f98177db031bae0d5d33b0bf0b7d4a5d4a7c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 23:24:23 +0000 Subject: [PATCH 02/35] Bump ethers from 5.4.1 to 5.4.3 (#37) --- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7898a83..60f34a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", "chart.js": "^3.5.0", - "ethers": "^5.4.1", + "ethers": "^5.4.3", "query-string": "^7.0.1", "react": "^17.0.2", "react-blockies": "^1.4.1", @@ -1354,9 +1354,9 @@ } }, "node_modules/@ethersproject/abstract-signer": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", - "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz", + "integrity": "sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==", "funding": [ { "type": "individual", @@ -1435,9 +1435,9 @@ } }, "node_modules/@ethersproject/bignumber": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", - "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz", + "integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==", "funding": [ { "type": "individual", @@ -1491,9 +1491,9 @@ } }, "node_modules/@ethersproject/contracts": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.0.tgz", - "integrity": "sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.1.tgz", + "integrity": "sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==", "funding": [ { "type": "individual", @@ -1691,9 +1691,9 @@ } }, "node_modules/@ethersproject/providers": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.1.tgz", - "integrity": "sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.3.tgz", + "integrity": "sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==", "funding": [ { "type": "individual", @@ -7991,9 +7991,9 @@ } }, "node_modules/ethers": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", - "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.3.tgz", + "integrity": "sha512-esWqdrFZObpyZyhH6VLHCz5vRA/YJrEmQO77sALWSWFjFtJr5ITIRwJ448N+mxIrvnqjZGQ2Jx2zC3xt5lc64g==", "funding": [ { "type": "individual", @@ -8007,14 +8007,14 @@ "dependencies": { "@ethersproject/abi": "5.4.0", "@ethersproject/abstract-provider": "5.4.0", - "@ethersproject/abstract-signer": "5.4.0", + "@ethersproject/abstract-signer": "5.4.1", "@ethersproject/address": "5.4.0", "@ethersproject/base64": "5.4.0", "@ethersproject/basex": "5.4.0", - "@ethersproject/bignumber": "5.4.0", + "@ethersproject/bignumber": "5.4.1", "@ethersproject/bytes": "5.4.0", "@ethersproject/constants": "5.4.0", - "@ethersproject/contracts": "5.4.0", + "@ethersproject/contracts": "5.4.1", "@ethersproject/hash": "5.4.0", "@ethersproject/hdnode": "5.4.0", "@ethersproject/json-wallets": "5.4.0", @@ -8023,7 +8023,7 @@ "@ethersproject/networks": "5.4.1", "@ethersproject/pbkdf2": "5.4.0", "@ethersproject/properties": "5.4.0", - "@ethersproject/providers": "5.4.1", + "@ethersproject/providers": "5.4.3", "@ethersproject/random": "5.4.0", "@ethersproject/rlp": "5.4.0", "@ethersproject/sha2": "5.4.0", @@ -20042,9 +20042,9 @@ } }, "@ethersproject/abstract-signer": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", - "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz", + "integrity": "sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==", "requires": { "@ethersproject/abstract-provider": "^5.4.0", "@ethersproject/bignumber": "^5.4.0", @@ -20083,9 +20083,9 @@ } }, "@ethersproject/bignumber": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", - "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz", + "integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==", "requires": { "@ethersproject/bytes": "^5.4.0", "@ethersproject/logger": "^5.4.0", @@ -20109,9 +20109,9 @@ } }, "@ethersproject/contracts": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.0.tgz", - "integrity": "sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.1.tgz", + "integrity": "sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==", "requires": { "@ethersproject/abi": "^5.4.0", "@ethersproject/abstract-provider": "^5.4.0", @@ -20219,9 +20219,9 @@ } }, "@ethersproject/providers": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.1.tgz", - "integrity": "sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.3.tgz", + "integrity": "sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==", "requires": { "@ethersproject/abstract-provider": "^5.4.0", "@ethersproject/abstract-signer": "^5.4.0", @@ -24437,20 +24437,20 @@ "version": "1.8.1" }, "ethers": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", - "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.3.tgz", + "integrity": "sha512-esWqdrFZObpyZyhH6VLHCz5vRA/YJrEmQO77sALWSWFjFtJr5ITIRwJ448N+mxIrvnqjZGQ2Jx2zC3xt5lc64g==", "requires": { "@ethersproject/abi": "5.4.0", "@ethersproject/abstract-provider": "5.4.0", - "@ethersproject/abstract-signer": "5.4.0", + "@ethersproject/abstract-signer": "5.4.1", "@ethersproject/address": "5.4.0", "@ethersproject/base64": "5.4.0", "@ethersproject/basex": "5.4.0", - "@ethersproject/bignumber": "5.4.0", + "@ethersproject/bignumber": "5.4.1", "@ethersproject/bytes": "5.4.0", "@ethersproject/constants": "5.4.0", - "@ethersproject/contracts": "5.4.0", + "@ethersproject/contracts": "5.4.1", "@ethersproject/hash": "5.4.0", "@ethersproject/hdnode": "5.4.0", "@ethersproject/json-wallets": "5.4.0", @@ -24459,7 +24459,7 @@ "@ethersproject/networks": "5.4.1", "@ethersproject/pbkdf2": "5.4.0", "@ethersproject/properties": "5.4.0", - "@ethersproject/providers": "5.4.1", + "@ethersproject/providers": "5.4.3", "@ethersproject/random": "5.4.0", "@ethersproject/rlp": "5.4.0", "@ethersproject/sha2": "5.4.0", diff --git a/package.json b/package.json index 0993241..b2cec51 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", "chart.js": "^3.5.0", - "ethers": "^5.4.1", + "ethers": "^5.4.3", "query-string": "^7.0.1", "react": "^17.0.2", "react-blockies": "^1.4.1", From b24e3d35d4e3dc68ebb8d958dead7ed0fe2a21f8 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 31 Jul 2021 04:30:59 -0300 Subject: [PATCH 03/35] Revert ethers to 5.4.1; something is breaking on 5.4.2 --- package-lock.json | 120 +++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 94 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60f34a9..b87a2d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", "chart.js": "^3.5.0", - "ethers": "^5.4.3", + "ethers": "^5.4.1", "query-string": "^7.0.1", "react": "^17.0.2", "react-blockies": "^1.4.1", @@ -1491,9 +1491,9 @@ } }, "node_modules/@ethersproject/contracts": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.1.tgz", - "integrity": "sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==", "funding": [ { "type": "individual", @@ -1691,9 +1691,9 @@ } }, "node_modules/@ethersproject/providers": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.3.tgz", - "integrity": "sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.1.tgz", + "integrity": "sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==", "funding": [ { "type": "individual", @@ -7991,9 +7991,9 @@ } }, "node_modules/ethers": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.3.tgz", - "integrity": "sha512-esWqdrFZObpyZyhH6VLHCz5vRA/YJrEmQO77sALWSWFjFtJr5ITIRwJ448N+mxIrvnqjZGQ2Jx2zC3xt5lc64g==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", + "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", "funding": [ { "type": "individual", @@ -8007,14 +8007,14 @@ "dependencies": { "@ethersproject/abi": "5.4.0", "@ethersproject/abstract-provider": "5.4.0", - "@ethersproject/abstract-signer": "5.4.1", + "@ethersproject/abstract-signer": "5.4.0", "@ethersproject/address": "5.4.0", "@ethersproject/base64": "5.4.0", "@ethersproject/basex": "5.4.0", - "@ethersproject/bignumber": "5.4.1", + "@ethersproject/bignumber": "5.4.0", "@ethersproject/bytes": "5.4.0", "@ethersproject/constants": "5.4.0", - "@ethersproject/contracts": "5.4.1", + "@ethersproject/contracts": "5.4.0", "@ethersproject/hash": "5.4.0", "@ethersproject/hdnode": "5.4.0", "@ethersproject/json-wallets": "5.4.0", @@ -8023,7 +8023,7 @@ "@ethersproject/networks": "5.4.1", "@ethersproject/pbkdf2": "5.4.0", "@ethersproject/properties": "5.4.0", - "@ethersproject/providers": "5.4.3", + "@ethersproject/providers": "5.4.1", "@ethersproject/random": "5.4.0", "@ethersproject/rlp": "5.4.0", "@ethersproject/sha2": "5.4.0", @@ -8037,6 +8037,48 @@ "@ethersproject/wordlists": "5.4.0" } }, + "node_modules/ethers/node_modules/@ethersproject/abstract-signer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", + "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "node_modules/ethers/node_modules/@ethersproject/bignumber": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", + "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "license": "MIT" @@ -20109,9 +20151,9 @@ } }, "@ethersproject/contracts": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.1.tgz", - "integrity": "sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==", "requires": { "@ethersproject/abi": "^5.4.0", "@ethersproject/abstract-provider": "^5.4.0", @@ -20219,9 +20261,9 @@ } }, "@ethersproject/providers": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.3.tgz", - "integrity": "sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.1.tgz", + "integrity": "sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==", "requires": { "@ethersproject/abstract-provider": "^5.4.0", "@ethersproject/abstract-signer": "^5.4.0", @@ -24437,20 +24479,20 @@ "version": "1.8.1" }, "ethers": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.3.tgz", - "integrity": "sha512-esWqdrFZObpyZyhH6VLHCz5vRA/YJrEmQO77sALWSWFjFtJr5ITIRwJ448N+mxIrvnqjZGQ2Jx2zC3xt5lc64g==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", + "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", "requires": { "@ethersproject/abi": "5.4.0", "@ethersproject/abstract-provider": "5.4.0", - "@ethersproject/abstract-signer": "5.4.1", + "@ethersproject/abstract-signer": "5.4.0", "@ethersproject/address": "5.4.0", "@ethersproject/base64": "5.4.0", "@ethersproject/basex": "5.4.0", - "@ethersproject/bignumber": "5.4.1", + "@ethersproject/bignumber": "5.4.0", "@ethersproject/bytes": "5.4.0", "@ethersproject/constants": "5.4.0", - "@ethersproject/contracts": "5.4.1", + "@ethersproject/contracts": "5.4.0", "@ethersproject/hash": "5.4.0", "@ethersproject/hdnode": "5.4.0", "@ethersproject/json-wallets": "5.4.0", @@ -24459,7 +24501,7 @@ "@ethersproject/networks": "5.4.1", "@ethersproject/pbkdf2": "5.4.0", "@ethersproject/properties": "5.4.0", - "@ethersproject/providers": "5.4.3", + "@ethersproject/providers": "5.4.1", "@ethersproject/random": "5.4.0", "@ethersproject/rlp": "5.4.0", "@ethersproject/sha2": "5.4.0", @@ -24471,6 +24513,30 @@ "@ethersproject/wallet": "5.4.0", "@ethersproject/web": "5.4.0", "@ethersproject/wordlists": "5.4.0" + }, + "dependencies": { + "@ethersproject/abstract-signer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", + "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", + "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + } } }, "eventemitter3": { diff --git a/package.json b/package.json index b2cec51..0993241 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/react-dom": "^17.0.9", "@types/react-router-dom": "^5.1.8", "chart.js": "^3.5.0", - "ethers": "^5.4.3", + "ethers": "^5.4.1", "query-string": "^7.0.1", "react": "^17.0.2", "react-blockies": "^1.4.1", From 7600605103e39aec0a79e0c69a17d0e6fb97fb10 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 03:16:11 -0300 Subject: [PATCH 04/35] Add support for ws communication with erigon --- src/useProvider.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/useProvider.ts b/src/useProvider.ts index c6a3a5c..183f51f 100644 --- a/src/useProvider.ts +++ b/src/useProvider.ts @@ -33,7 +33,12 @@ export const useProvider = ( setConnStatus(ConnectionStatus.CONNECTING); const tryToConnect = async () => { - const provider = new ethers.providers.JsonRpcProvider(erigonURL); + let provider: ethers.providers.JsonRpcProvider; + if (erigonURL?.startsWith("ws://") || erigonURL?.startsWith("wss://")) { + provider = new ethers.providers.WebSocketProvider(erigonURL); + } else { + provider = new ethers.providers.JsonRpcProvider(erigonURL); + } // Check if it is at least a regular ETH node let blockNumber: number = 0; From 4fcf0cb5137d4708bdd582172b70fc3c9c21a138 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 03:17:13 -0300 Subject: [PATCH 05/35] Use websockets by default for communicating with erigon --- public/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/config.json b/public/config.json index 1db5aa7..5573731 100644 --- a/public/config.json +++ b/public/config.json @@ -1,4 +1,4 @@ { - "erigonURL": "http://localhost:8545", + "erigonURL": "ws://localhost:8545", "assetsURLPrefix": "http://localhost:3001" } \ No newline at end of file From 5b5791236ff682a5ff06e266355e15e6c3daea21 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 06:59:59 -0300 Subject: [PATCH 06/35] Extract custom hook --- src/Transaction.tsx | 94 ++----------------------------------- src/useErigonHooks.ts | 105 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 93 deletions(-) diff --git a/src/Transaction.tsx b/src/Transaction.tsx index ad940fe..cb5a4e1 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -1,19 +1,13 @@ -import React, { useState, useEffect, useMemo, useContext } from "react"; +import React, { useMemo, useContext } from "react"; import { Route, Switch, useParams } from "react-router-dom"; -import { BigNumber, ethers } from "ethers"; import StandardFrame from "./StandardFrame"; import StandardSubtitle from "./StandardSubtitle"; import Tab from "./components/Tab"; import Details from "./transaction/Details"; import Logs from "./transaction/Logs"; -import erc20 from "./erc20.json"; -import { TokenMetas, TokenTransfer, TransactionData } from "./types"; import { RuntimeContext } from "./useRuntime"; import { SelectionContext, useSelection } from "./useSelection"; -import { useInternalOperations } from "./useErigonHooks"; - -const TRANSFER_TOPIC = - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"; +import { useInternalOperations, useTxData } from "./useErigonHooks"; type TransactionParams = { txhash: string; @@ -24,89 +18,7 @@ const Transaction: React.FC = () => { const params = useParams(); const { txhash } = params; - const [txData, setTxData] = useState(); - useEffect(() => { - if (!provider) { - return; - } - - const readBlock = async () => { - const [_response, _receipt] = await Promise.all([ - provider.getTransaction(txhash), - provider.getTransactionReceipt(txhash), - ]); - const _block = await provider.getBlock(_receipt.blockNumber); - document.title = `Transaction ${_response.hash} | Otterscan`; - - // Extract token transfers - const tokenTransfers: TokenTransfer[] = []; - for (const l of _receipt.logs) { - if (l.topics.length !== 3) { - continue; - } - if (l.topics[0] !== TRANSFER_TOPIC) { - continue; - } - tokenTransfers.push({ - token: l.address, - from: ethers.utils.getAddress( - ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[1]), 12) - ), - to: ethers.utils.getAddress( - ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[2]), 12) - ), - value: BigNumber.from(l.data), - }); - } - - // Extract token meta - const tokenMetas: TokenMetas = {}; - for (const t of tokenTransfers) { - if (tokenMetas[t.token]) { - continue; - } - const erc20Contract = new ethers.Contract(t.token, erc20, provider); - const [name, symbol, decimals] = await Promise.all([ - erc20Contract.name(), - erc20Contract.symbol(), - erc20Contract.decimals(), - ]); - tokenMetas[t.token] = { - name, - symbol, - decimals, - }; - } - - setTxData({ - transactionHash: _receipt.transactionHash, - status: _receipt.status === 1, - blockNumber: _receipt.blockNumber, - transactionIndex: _receipt.transactionIndex, - confirmations: _receipt.confirmations, - timestamp: _block.timestamp, - miner: _block.miner, - from: _receipt.from, - to: _receipt.to, - createdContractAddress: _receipt.contractAddress, - value: _response.value, - tokenTransfers, - tokenMetas, - type: _response.type ?? 0, - fee: _response.gasPrice!.mul(_receipt.gasUsed), - blockBaseFeePerGas: _block.baseFeePerGas, - maxFeePerGas: _response.maxFeePerGas, - maxPriorityFeePerGas: _response.maxPriorityFeePerGas, - gasPrice: _response.gasPrice!, - gasUsed: _receipt.gasUsed, - gasLimit: _response.gasLimit, - nonce: _response.nonce, - data: _response.data, - logs: _receipt.logs, - }); - }; - readBlock(); - }, [provider, txhash]); + const txData = useTxData(provider, txhash); const internalOps = useInternalOperations(provider, txData); const sendsEthToMiner = useMemo(() => { diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index d11d2f5..c3c0398 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -1,7 +1,16 @@ -import { ethers, BigNumber } from "ethers"; import { useState, useEffect } from "react"; +import { ethers, BigNumber } from "ethers"; import { getInternalOperations } from "./nodeFunctions"; -import { TransactionData, InternalOperation } from "./types"; +import { + TokenMetas, + TokenTransfer, + TransactionData, + InternalOperation, +} from "./types"; +import erc20 from "./erc20.json"; + +const TRANSFER_TOPIC = + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"; export interface ExtendedBlock extends ethers.providers.Block { blockReward: BigNumber; @@ -76,6 +85,98 @@ export const useBlockData = ( return block; }; +export const useTxData = ( + provider: ethers.providers.JsonRpcProvider | undefined, + txhash: string +): TransactionData | undefined => { + const [txData, setTxData] = useState(); + + useEffect(() => { + if (!provider) { + return; + } + + const readBlock = async () => { + const [_response, _receipt] = await Promise.all([ + provider.getTransaction(txhash), + provider.getTransactionReceipt(txhash), + ]); + const _block = await provider.getBlock(_receipt.blockNumber); + document.title = `Transaction ${_response.hash} | Otterscan`; + + // Extract token transfers + const tokenTransfers: TokenTransfer[] = []; + for (const l of _receipt.logs) { + if (l.topics.length !== 3) { + continue; + } + if (l.topics[0] !== TRANSFER_TOPIC) { + continue; + } + tokenTransfers.push({ + token: l.address, + from: ethers.utils.getAddress( + ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[1]), 12) + ), + to: ethers.utils.getAddress( + ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[2]), 12) + ), + value: BigNumber.from(l.data), + }); + } + + // Extract token meta + const tokenMetas: TokenMetas = {}; + for (const t of tokenTransfers) { + if (tokenMetas[t.token]) { + continue; + } + const erc20Contract = new ethers.Contract(t.token, erc20, provider); + const [name, symbol, decimals] = await Promise.all([ + erc20Contract.name(), + erc20Contract.symbol(), + erc20Contract.decimals(), + ]); + tokenMetas[t.token] = { + name, + symbol, + decimals, + }; + } + + setTxData({ + transactionHash: _receipt.transactionHash, + status: _receipt.status === 1, + blockNumber: _receipt.blockNumber, + transactionIndex: _receipt.transactionIndex, + confirmations: _receipt.confirmations, + timestamp: _block.timestamp, + miner: _block.miner, + from: _receipt.from, + to: _receipt.to, + createdContractAddress: _receipt.contractAddress, + value: _response.value, + tokenTransfers, + tokenMetas, + type: _response.type ?? 0, + fee: _response.gasPrice!.mul(_receipt.gasUsed), + blockBaseFeePerGas: _block.baseFeePerGas, + maxFeePerGas: _response.maxFeePerGas, + maxPriorityFeePerGas: _response.maxPriorityFeePerGas, + gasPrice: _response.gasPrice!, + gasUsed: _receipt.gasUsed, + gasLimit: _response.gasLimit, + nonce: _response.nonce, + data: _response.data, + logs: _receipt.logs, + }); + }; + readBlock(); + }, [provider, txhash]); + + return txData; +}; + export const useInternalOperations = ( provider: ethers.providers.JsonRpcProvider | undefined, txData: TransactionData | undefined From 07e496f476fa46cebf3efbe6aaa6d12d7d38d647 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 07:04:58 -0300 Subject: [PATCH 07/35] Add block total tx count info --- src/transaction/Details.tsx | 2 +- src/types.ts | 1 + src/useErigonHooks.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 7346b0c..f49b6d1 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -229,7 +229,7 @@ const Details: React.FC = ({ {txData.nonce} - {txData.transactionIndex} + {txData.transactionIndex} / {txData.blockTransactionCount - 1} diff --git a/src/types.ts b/src/types.ts index 482828e..8a2cb8a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -40,6 +40,7 @@ export type TransactionData = { status: boolean; blockNumber: number; transactionIndex: number; + blockTransactionCount: number; confirmations: number; timestamp: number; miner?: string; diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index c3c0398..588940e 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -149,6 +149,7 @@ export const useTxData = ( status: _receipt.status === 1, blockNumber: _receipt.blockNumber, transactionIndex: _receipt.transactionIndex, + blockTransactionCount: _block.transactions.length, confirmations: _receipt.confirmations, timestamp: _block.timestamp, miner: _block.miner, From e78447f4b696a9e6f57b6255eb9b1264edfc0720 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 1 Aug 2021 07:41:19 -0300 Subject: [PATCH 08/35] Extract and apply relative position component --- src/components/RelativePosition.tsx | 15 +++++++++++++++ src/transaction/Details.tsx | 16 ++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 src/components/RelativePosition.tsx diff --git a/src/components/RelativePosition.tsx b/src/components/RelativePosition.tsx new file mode 100644 index 0000000..e952463 --- /dev/null +++ b/src/components/RelativePosition.tsx @@ -0,0 +1,15 @@ +import React from "react"; + +type RelativePositionProps = { + pos: React.ReactNode; + total: React.ReactNode; +}; + +const RelativePosition: React.FC = ({ pos, total }) => ( + + {pos} + / {total} + +); + +export default React.memo(RelativePosition); diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index f49b6d1..25dddb5 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -23,6 +23,7 @@ import TokenTransferItem from "../TokenTransferItem"; import { TransactionData, InternalOperation } from "../types"; import PercentageBar from "../components/PercentageBar"; import ExternalLink from "../components/ExternalLink"; +import RelativePosition from "../components/RelativePosition"; type DetailsProps = { txData: TransactionData; @@ -192,8 +193,10 @@ const Details: React.FC = ({
- /{" "} - + } + total={} + />
= ({ N/A {txData.nonce} - - - {txData.transactionIndex} / {txData.blockTransactionCount - 1} - + +