From d773a442a43a879ef3892203569746c1c2f48b24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Nov 2021 11:55:27 +0000 Subject: [PATCH 1/5] Bump @testing-library/jest-dom from 5.14.1 to 5.15.0 (#111) --- 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 ef51571..ce287b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/react-fontawesome": "^0.1.16", "@headlessui/react": "^1.4.1", - "@testing-library/jest-dom": "^5.14.1", + "@testing-library/jest-dom": "^5.15.0", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.24", @@ -2887,9 +2887,9 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.14.1.tgz", - "integrity": "sha512-dfB7HVIgTNCxH22M1+KU6viG5of2ldoA5ly8Ar8xkezKHKXjRvznCdbMbqjYGgO2xjRbwnR+rR8MLUIqF3kKbQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.15.0.tgz", + "integrity": "sha512-lOMuQidnL1tWHLEWIhL6UvSZC1Qt3OkNe1khvi2h6xFiqpe5O8arYs46OU0qyUGq0cSTbroQyMktYNXu3a7sAA==", "dependencies": { "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", @@ -21609,9 +21609,9 @@ } }, "@testing-library/jest-dom": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.14.1.tgz", - "integrity": "sha512-dfB7HVIgTNCxH22M1+KU6viG5of2ldoA5ly8Ar8xkezKHKXjRvznCdbMbqjYGgO2xjRbwnR+rR8MLUIqF3kKbQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.15.0.tgz", + "integrity": "sha512-lOMuQidnL1tWHLEWIhL6UvSZC1Qt3OkNe1khvi2h6xFiqpe5O8arYs46OU0qyUGq0cSTbroQyMktYNXu3a7sAA==", "requires": { "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", diff --git a/package.json b/package.json index d301e67..ab9241d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/react-fontawesome": "^0.1.16", "@headlessui/react": "^1.4.1", - "@testing-library/jest-dom": "^5.14.1", + "@testing-library/jest-dom": "^5.15.0", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.24", From d99a9a24c16eef228d1edd6266876046c4d01b28 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Wed, 3 Nov 2021 09:01:22 -0300 Subject: [PATCH 2/5] Add GR11 matching payout address to the hardcoded list --- src/api/address-resolver/hardcoded-addresses/1.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/address-resolver/hardcoded-addresses/1.json b/src/api/address-resolver/hardcoded-addresses/1.json index 7ae2f9b..a9ae33d 100644 --- a/src/api/address-resolver/hardcoded-addresses/1.json +++ b/src/api/address-resolver/hardcoded-addresses/1.json @@ -1,5 +1,6 @@ { "0x7d655c57f71464B6f83811C55D84009Cd9f5221C": "Gitcoin: Bulk Checkout", + "0x0EbD2E2130b73107d0C45fF2E16c93E7e2e10e3a": "Gitcoin: GR11 Matching Payout", "0x722122dF12D4e14e13Ac3b6895a86e84145b6967": "Tornado Cash: Proxy", "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95": "Uniswap V1: Factory", "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f": "Uniswap V2: Factory", From 03e48f678cac95b83b1d52085d34fbf9cf5de8f2 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Wed, 3 Nov 2021 09:07:38 -0300 Subject: [PATCH 3/5] Add missing resolvers on token transferred section --- src/TokenTransferItem.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TokenTransferItem.tsx b/src/TokenTransferItem.tsx index 03fa198..e7c65c4 100644 --- a/src/TokenTransferItem.tsx +++ b/src/TokenTransferItem.tsx @@ -40,6 +40,7 @@ const TokenTransferItem: React.FC = ({ addressCtx={AddressContext.FROM} txFrom={t.from === txData.from} txTo={t.from === txData.to} + resolvedAddresses={resolvedAddresses} /> @@ -51,6 +52,7 @@ const TokenTransferItem: React.FC = ({ addressCtx={AddressContext.TO} txFrom={t.to === txData.from} txTo={t.to === txData.to} + resolvedAddresses={resolvedAddresses} /> From 8efe230bc8e4529d6dfdd2fc0fc7ccacef12b39a Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Wed, 3 Nov 2021 09:14:52 -0300 Subject: [PATCH 4/5] Add missing resolvers support on decoded inputs and logs table --- src/transaction/Details.tsx | 1 + src/transaction/LogEntry.tsx | 1 + src/transaction/decoder/AddressDecoder.tsx | 9 ++++++++- src/transaction/decoder/DecodedParamRow.tsx | 9 ++++++++- src/transaction/decoder/DecodedParamsTable.tsx | 4 ++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 9c9e29d..85cb2fc 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -375,6 +375,7 @@ const Details: React.FC = ({ hasParamNames={resolvedTxDesc === txDesc} userMethod={userMethod} devMethod={devMethod} + resolvedAddresses={resolvedAddresses} /> )} diff --git a/src/transaction/LogEntry.tsx b/src/transaction/LogEntry.tsx index 2993e16..4e89ffd 100644 --- a/src/transaction/LogEntry.tsx +++ b/src/transaction/LogEntry.tsx @@ -114,6 +114,7 @@ const LogEntry: React.FC = ({ paramTypes={resolvedLogDesc.eventFragment.inputs} txData={txData} hasParamNames={resolvedLogDesc === logDesc} + resolvedAddresses={resolvedAddresses} /> diff --git a/src/transaction/decoder/AddressDecoder.tsx b/src/transaction/decoder/AddressDecoder.tsx index ee6369a..45fb30c 100644 --- a/src/transaction/decoder/AddressDecoder.tsx +++ b/src/transaction/decoder/AddressDecoder.tsx @@ -3,13 +3,19 @@ import AddressHighlighter from "../../components/AddressHighlighter"; import DecoratedAddressLink from "../../components/DecoratedAddressLink"; import Copy from "../../components/Copy"; import { TransactionData } from "../../types"; +import { ResolvedAddresses } from "../../api/address-resolver"; type AddressDecoderProps = { r: any; txData: TransactionData; + resolvedAddresses?: ResolvedAddresses | undefined; }; -const AddressDecoder: React.FC = ({ r, txData }) => ( +const AddressDecoder: React.FC = ({ + r, + txData, + resolvedAddresses, +}) => (
= ({ r, txData }) => ( miner={r.toString() === txData.confirmedData?.miner} txFrom={r.toString() === txData.from} txTo={r.toString() === txData.to} + resolvedAddresses={resolvedAddresses} /> diff --git a/src/transaction/decoder/DecodedParamRow.tsx b/src/transaction/decoder/DecodedParamRow.tsx index fed9ecb..b2b0baf 100644 --- a/src/transaction/decoder/DecodedParamRow.tsx +++ b/src/transaction/decoder/DecodedParamRow.tsx @@ -9,6 +9,7 @@ import AddressDecoder from "./AddressDecoder"; import BooleanDecoder from "./BooleanDecoder"; import BytesDecoder from "./BytesDecoder"; import { TransactionData } from "../../types"; +import { ResolvedAddresses } from "../../api/address-resolver"; type DecodedParamRowProps = { prefix?: ReactNode; @@ -18,6 +19,7 @@ type DecodedParamRowProps = { txData: TransactionData; arrayElem?: number | undefined; help?: string | undefined; + resolvedAddresses?: ResolvedAddresses | undefined; }; const DecodedParamRow: React.FC = ({ @@ -28,6 +30,7 @@ const DecodedParamRow: React.FC = ({ txData, arrayElem, help, + resolvedAddresses, }) => { const [showHelp, setShowHelp] = useState(false); @@ -72,7 +75,11 @@ const DecodedParamRow: React.FC = ({ {paramType.baseType === "uint256" ? ( ) : paramType.baseType === "address" ? ( - + ) : paramType.baseType === "bool" ? ( ) : paramType.baseType === "bytes" ? ( diff --git a/src/transaction/decoder/DecodedParamsTable.tsx b/src/transaction/decoder/DecodedParamsTable.tsx index f7daee5..8f4a562 100644 --- a/src/transaction/decoder/DecodedParamsTable.tsx +++ b/src/transaction/decoder/DecodedParamsTable.tsx @@ -3,6 +3,7 @@ import { ParamType, Result } from "@ethersproject/abi"; import DecodedParamRow from "./DecodedParamRow"; import { TransactionData } from "../../types"; import { DevMethod, UserMethod } from "../../useSourcify"; +import { ResolvedAddresses } from "../../api/address-resolver"; type DecodedParamsTableProps = { args: Result; @@ -11,6 +12,7 @@ type DecodedParamsTableProps = { hasParamNames?: boolean; userMethod?: UserMethod | undefined; devMethod?: DevMethod | undefined; + resolvedAddresses?: ResolvedAddresses | undefined; }; const DecodedParamsTable: React.FC = ({ @@ -19,6 +21,7 @@ const DecodedParamsTable: React.FC = ({ txData, hasParamNames = true, devMethod, + resolvedAddresses, }) => ( @@ -48,6 +51,7 @@ const DecodedParamsTable: React.FC = ({ paramType={paramTypes[i]} txData={txData} help={devMethod?.params?.[paramTypes[i].name]} + resolvedAddresses={resolvedAddresses} /> ))} From e2ba28b64e4d48a5996a9365fd12b3cbdca6d54f Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Thu, 4 Nov 2021 15:59:17 -0300 Subject: [PATCH 5/5] Add previous GR round payout addresses --- src/api/address-resolver/hardcoded-addresses/1.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/address-resolver/hardcoded-addresses/1.json b/src/api/address-resolver/hardcoded-addresses/1.json index a9ae33d..072a2c0 100644 --- a/src/api/address-resolver/hardcoded-addresses/1.json +++ b/src/api/address-resolver/hardcoded-addresses/1.json @@ -1,5 +1,8 @@ { "0x7d655c57f71464B6f83811C55D84009Cd9f5221C": "Gitcoin: Bulk Checkout", + "0xf2354570bE2fB420832Fb7Ff6ff0AE0dF80CF2c6": "Gitcoin: GR8 Matching Payout", + "0x3342E3737732D879743f2682A3953a730ae4F47C": "Gitcoin: GR9 Matching Payout", + "0x3ebAFfe01513164e638480404c651E885cCA0AA4": "Gitcoin: GR10 Matching Payout", "0x0EbD2E2130b73107d0C45fF2E16c93E7e2e10e3a": "Gitcoin: GR11 Matching Payout", "0x722122dF12D4e14e13Ac3b6895a86e84145b6967": "Tornado Cash: Proxy", "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95": "Uniswap V1: Factory",