diff --git a/CHANGELOG.md b/CHANGELOG.md index 3667e16..d088dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ +### v4.1.1 + +- [feat] Adapt Mumbai and Fantom's new look +- [feat] Add label to contract creator address +- [fix] Fix UTC time format bug in variable history + ### v4.1.0 -[feat] Adapt to the new template of Polygonscan [fix] Resolve NFT risk radar chart malfunction due to opensea website updates [fix] Correct invalid redirect links in the downloaded fundflow SVG images +- [feat] Adapt to the new template of Polygonscan +- [fix] Resolve NFT risk radar chart malfunction due to opensea website updates +- [fix] Correct invalid redirect links in the downloaded fundflow SVG images ### v4.0.1 diff --git a/package.json b/package.json index ca7e172..c2d729a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metadock", - "version": "4.1.0", + "version": "4.1.1", "repository": { "type": "git", "url": "https://github.com/blocksecteam/metadock.git" diff --git a/src/common/components/ModalContractVariableLogs/columns.tsx b/src/common/components/ModalContractVariableLogs/columns.tsx index a0805eb..257ac2c 100644 --- a/src/common/components/ModalContractVariableLogs/columns.tsx +++ b/src/common/components/ModalContractVariableLogs/columns.tsx @@ -67,7 +67,9 @@ const columns = ( width: 220, render: (timestamp: number, record) => { if (record.isHolder) return '' - const formattedDate = dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss') + const formattedDate = dayjs(timestamp) + .utc() + .format('YYYY-MM-DD HH:mm:ss') return ( {utc2locale diff --git a/src/common/config/allowlist.ts b/src/common/config/allowlist.ts index 1769549..dcf1957 100644 --- a/src/common/config/allowlist.ts +++ b/src/common/config/allowlist.ts @@ -1,10 +1,10 @@ export default { ETHERSCAN_V1_MATCHES: [ - '*://mumbai.polygonscan.com/*', + '*://zkevm.polygonscan.com/*', '*://*.snowtrace.io/*', '*://optimistic.etherscan.io/*', '*://*.arbiscan.io/*', - '*://*.ftmscan.com/*', + '*://testnet.ftmscan.com/*', '*://cronoscan.com/*', '*://*.moonscan.io/*', '*://*.basescan.org/*', @@ -18,6 +18,7 @@ export default { '*://goerli-optimism.etherscan.io/*' ], ETHERSCAN_V2_MATCHES: [ + '*://ftmscan.com/*', '*://cn.etherscan.com/*', '*://goto.etherscan.com/*', '*://sepolia.etherscan.io/*', @@ -28,7 +29,8 @@ export default { '*://goto.bscscan.com/*', '*://www.bscscan.com/*', '*://testnet.bscscan.com/*', - '*://polygonscan.com/*' + '*://polygonscan.com/*', + '*://mumbai.polygonscan.com/*' ], BTC_EXPLORER_MATCHES: ['*://explorer.btc.com/*'], BLOCKSEC_MATCHES: ['*://*.blocksec.com/*'], diff --git a/src/common/constants/selector.ts b/src/common/constants/selector.ts index 9998f33..d1e5413 100644 --- a/src/common/constants/selector.ts +++ b/src/common/constants/selector.ts @@ -6,10 +6,18 @@ export const TABLE_LIST_ADDRESS_SELECTORS = export const TABLE_LIST_METHOD_SELECTORS = '.card tbody .u-label.u-label--info, maindiv tbody .u-label.u-label--info' -/** *scans address v2 */ +/** etherscan address */ export const TABLE_LIST_ADDRESS_SELECTORS_V2 = ".card tbody *:has(+ a.js-clipboard[aria-label='Copy Address'])" -/** *scans methods v2 */ +/** etherscan methods */ export const TABLE_LIST_METHOD_SELECTORS_V2 = '.table-responsive table tbody span.d-block.badge.text-truncate' + +/** *scans address */ +export const TR_CONTRACT_ADDRESS_SELECTORS = + "#ContentPlaceHolder1_trContract a.hash-tag[href*='/address/']" + +/** etherscan address */ +export const TR_CONTRACT_ADDRESS_SELECTORS_V2 = + "#ContentPlaceHolder1_trContract a[href*='/address/']" diff --git a/src/content/etherscan/feat-scripts/enhanced-labels.tsx b/src/content/etherscan/feat-scripts/enhanced-labels.tsx index a38bc61..f8e904d 100644 --- a/src/content/etherscan/feat-scripts/enhanced-labels.tsx +++ b/src/content/etherscan/feat-scripts/enhanced-labels.tsx @@ -6,7 +6,8 @@ import { chromeEvent } from '@common/event' import type { AddressLabel } from '@common/api/types' import { GET_ADDRESS_LABELS, - TABLE_LIST_ADDRESS_SELECTORS_V2 + TABLE_LIST_ADDRESS_SELECTORS_V2, + TR_CONTRACT_ADDRESS_SELECTORS_V2 } from '@common/constants' import { widthScanV2Tooltip } from '@common/hoc' import { TokenSymbol } from '@common/components' @@ -59,7 +60,9 @@ const handleReplace = async ( /** enhanced address label */ const genEnhancedLabels = async (chain: string) => { - const addressTags = $(TABLE_LIST_ADDRESS_SELECTORS_V2).toArray() + const addressTags = $( + `${TABLE_LIST_ADDRESS_SELECTORS_V2}, ${TR_CONTRACT_ADDRESS_SELECTORS_V2}` + ).toArray() const iframes = document.querySelectorAll('iframe') function handleCollectReplaceTarget(nodeList: HTMLElement[]) { diff --git a/src/content/scans/feat-scripts/enhanced-labels.tsx b/src/content/scans/feat-scripts/enhanced-labels.tsx index 615ebb7..78892e5 100644 --- a/src/content/scans/feat-scripts/enhanced-labels.tsx +++ b/src/content/scans/feat-scripts/enhanced-labels.tsx @@ -5,7 +5,8 @@ import { chromeEvent } from '@common/event' import type { AddressLabel } from '@common/api/types' import { GET_ADDRESS_LABELS, - TABLE_LIST_ADDRESS_SELECTORS + TABLE_LIST_ADDRESS_SELECTORS, + TR_CONTRACT_ADDRESS_SELECTORS } from '@common/constants' import { CopyButton, TokenSymbol } from '@common/components' @@ -62,7 +63,7 @@ const handleReplace = async ( /** enhanced address label */ const genEnhancedLabels = async (chain: string) => { const addressTags = document.querySelectorAll( - TABLE_LIST_ADDRESS_SELECTORS + `${TABLE_LIST_ADDRESS_SELECTORS}, ${TR_CONTRACT_ADDRESS_SELECTORS}` ) const iframes = document.querySelectorAll('iframe')