Skip to content

Commit

Permalink
feat: Updated Phalcon Explorer, added zkSync support to Blockscout, s…
Browse files Browse the repository at this point in the history
…witched to snowscan.xyz, and fixed bugs
  • Loading branch information
0xbe37e committed Apr 8, 2024
1 parent 495def2 commit c68b177
Show file tree
Hide file tree
Showing 80 changed files with 185 additions and 640 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### v4.8.0

- [update] Update the domain for Phalcon Explorer
- [feat] Added support for zkSync on Blockscout
- [feat] Adapted to snowscan.xyz as a replacement for the previous snowtrace.io
- [fix] Fixed various bugs

### v4.7.0

- [feat] Integration with Blockscout explorer
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For up to the minute news, follow our [Twitter](https://twitter.com/MetaDockTeam
- arbiscan.io
- cronoscan.com
- moonscan.io
- snowtrace.io
- snowscan.xyz
- optimistic.etherscan.io
- nova.arbiscan.io
- bttcscan.com
Expand Down
6 changes: 3 additions & 3 deletions manifest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default defineManifest((env: ConfigEnv) => {
'*://gnosisscan.io/*',
'*://*.celoscan.io/*',
'*://*.bttcscan.com/*',
'*://era.zksync.network/*'
'*://era.zksync.network/*',
'*://snowscan.xyz/*'
]
: ['<all_urls>'],
js: ['src/content/index.all_frames.ts'],
Expand All @@ -49,8 +50,7 @@ export default defineManifest((env: ConfigEnv) => {
? [
'*://explorer.btc.com/*',
'*://*.opensea.io/*',
'*://*.tronscan.org/*',
'*://*.snowtrace.io/*'
'*://*.tronscan.org/*'
]
: ['<all_urls>'],
js: ['src/content/index.ts'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metasuites",
"version": "4.7.0",
"version": "4.8.0",
"repository": {
"type": "git",
"url": "https://github.com/blocksecteam/metasuites.git"
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/BscModal/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
font-size: 15px;
padding-left: 20px;
.justify-between;
.align-center;
.items-center;
.closeIcon {
padding: 20px;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Cell/cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Cell: FC<CellProps> = props => {
style={style}
onClick={onClick}
>
<div className="align-center flex1">
<div className="items-center flex1">
{icon && <img className={styles.icon} src={icon} alt="" />}
<div className={cls(styles.title, 'flex1')}>
<span style={{ fontSize: desc ? '14px' : '12px' }}>{title}</span>
Expand Down
17 changes: 10 additions & 7 deletions src/common/components/DrawerSimulation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import type {
Arguments,
SimulateTxParams
} from '@common/api/types'
import { PHALCON_EXPLORER_DOMAIN } from '@common/config/uri'
import {
PHALCON_EXPLORER_DOMAIN,
PHALCON_FORK_DOMAIN
} from '@common/config/uri'

import styles from './index.module.less'
import type {
Expand Down Expand Up @@ -321,7 +324,7 @@ const DrawerSimulation: FC<Props> = ({
width={isMobile() ? '100%' : 530}
closable={false}
title={
<div className="align-center">
<div className="items-center">
<IconClose mr={16} onClick={() => setVisible(false)} />
<span>Simulator</span>
<Tooltip
Expand Down Expand Up @@ -354,7 +357,7 @@ const DrawerSimulation: FC<Props> = ({
destroyOnClose
extra={
<Button
className="align-center"
className="items-center"
type="primary"
onClick={() => window.open(PHALCON_EXPLORER_DOMAIN)}
>
Expand Down Expand Up @@ -388,7 +391,7 @@ const DrawerSimulation: FC<Props> = ({
>
{SIMULATE_SUPPORT_LIST.map(item => (
<Select.Option key={item.chain} value={item.chain}>
<div className="align-center" style={{ fontSize: 12 }}>
<div className="items-center" style={{ fontSize: 12 }}>
<TokenSymbol logo={item.logo} mr={4} size={14} />
{item.name}
</div>
Expand Down Expand Up @@ -421,15 +424,15 @@ const DrawerSimulation: FC<Props> = ({
recommend you visit the
<a
className="letter-space-lr-1"
href="https://phalcon.blocksec.com/explorer"
href={PHALCON_EXPLORER_DOMAIN}
target="_blank"
>
Phalcon Simulator
</a>
or
<a
className="letter-space-lr-1"
href="https://phalcon.blocksec.com"
href={PHALCON_FORK_DOMAIN}
target="_blank"
>
Phalcon Fork
Expand Down Expand Up @@ -555,7 +558,7 @@ const DrawerSimulation: FC<Props> = ({
return (
<div
key={index}
className="justify-between align-center"
className="justify-between items-center"
style={{ marginLeft: 30 }}
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
max-width: 1200px;
.title {
overflow: hidden;
.align-center;
.items-center;
.contract {
font-weight: normal;
.text-ellipsis;
Expand All @@ -14,7 +14,7 @@
.tablePanel {
.justify-between;
.metadata {
.align-center;
.items-center;
.variableName {
margin-right: 0.5rem;
}
Expand All @@ -28,7 +28,7 @@
border: 1px solid @primary-color;
font-size: 14px;
border-radius: 12px;
.align-center;
.items-center;
}
}
.filter {
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/ModalContractVariableLogs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const ModalContractVariableLogs: FC<Props> = ({
}
footer={
list.length > 0 ? (
<div className="justify-end align-center">
<div className="justify-end items-center">
<Button
type="primary"
className="md-btn-primary"
Expand Down
12 changes: 6 additions & 6 deletions src/common/components/ModalFundFlow/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
font-size: 14px;
padding-left: 22px;
border-bottom: 1px solid #f0f0f0;
.align-center;
.items-center;

.basicInfo {
min-width: 300px;
.align-center;
.items-center;

.tokenLogo {
width: 26px;
Expand All @@ -56,7 +56,7 @@
}

.msButton {
.align-center;
.items-center;

gap: 4px;
}
Expand All @@ -73,7 +73,7 @@
margin: 0 21px 0 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
.align-center;
.items-center;

label {
margin: 0 0 0 5px;
Expand All @@ -100,7 +100,7 @@
.tipContainer {
position: relative;
margin-right: 10px;
.align-center;
.items-center;

&:hover {
.content {
Expand Down Expand Up @@ -201,7 +201,7 @@
padding: 7px 10px;
box-shadow: 0 -4px 10px 0 rgba(0, 0, 0, 0.1);
justify-content: space-between;
.align-center;
.items-center;
}
}
}
Expand Down
38 changes: 21 additions & 17 deletions src/common/components/ModalFundFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
IconClose,
IconMetaDock
} from '@common/components'
import { IconMetaSleuth } from '@common/components/icon'
import { SLEUTH_DOMAIN } from '@common/config/uri'

import styles from './index.module.less'
Expand Down Expand Up @@ -300,28 +301,31 @@ const ModalFundFlowGraph: FC<Props> = ({
</div>
</div>
{SLEUTH_SUPPORT_LIST.includes(chain) && (
<Button
className={styles.msButton}
type="primary"
onClick={() =>
window.open(
`${SLEUTH_DOMAIN}/result/${chain}/${mainAddress}`
)
}
<ConfigProvider
theme={{
token: {
colorPrimary: '#bd7c40'
}
}}
>
<img
className="mr-1"
style={{ width: '18px' }}
src="https://assets.blocksec.com/image/1677135239463-4.png"
alt=""
/>
Try Enhanced Version
</Button>
<Button
className={styles.msButton}
type="primary"
onClick={() =>
window.open(
`${SLEUTH_DOMAIN}/result/${chain}/${mainAddress}`
)
}
>
<IconMetaSleuth color="#FFFFFF" size={20} />
Deep Dive with MetaSleuth
</Button>
</ConfigProvider>
)}
</div>
<div
id="__metadock-fundflow-options-wrapper__"
className="align-center"
className="items-center"
>
{fundFlow?.nodes && (
<Select
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/ModalProxyLog/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const columns: ColumnsType<ProxyContractLog> = [
},
{
title: (
<div className="align-center">
<div className="items-center">
<img
style={{ width: 16, height: 16, marginRight: 4 }}
src="https://assets.blocksec.com/image/1681815761137-2.png"
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/ModalProxyLog/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.modalProxyLog {
.title {
.align-center;
.items-center;
.address {
font-size: 14px;
color: #6c757d;
Expand All @@ -27,7 +27,7 @@
}
}
.cell {
.align-center;
.items-center;
a {
display: inline-block;
max-width: 160px;
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/ModalProxyLog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ModalProxyLog: FC<Props> = ({ visible, onClose, chain, address }) => {
destroyOnClose
title={
<div className={cls(styles.title, { [styles.column]: isMobile() })}>
<div className="align-center">
<div className="items-center">
<TokenSymbol />
Proxy Upgrade Log
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/RarityLabel/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
color: rgb(4, 17, 29);
border-radius: 8px;
font-weight: 600;
.align-center;
.items-center;

&:hover {
.symbol {
Expand All @@ -27,7 +27,7 @@
overflow: hidden;
position: relative;
margin-right: 3px;
.align-center;
.items-center;

div {
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/icon/IconMetaDock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props extends BaseComponent {
mr?: number
}

const IconDownload: FC<Props> = ({
const IconMetaDock: FC<Props> = ({
size = 16,
color = '#448C0C',
className,
Expand Down Expand Up @@ -96,4 +96,4 @@ const IconDownload: FC<Props> = ({
)
}

export default IconDownload
export default IconMetaDock
47 changes: 47 additions & 0 deletions src/common/components/icon/IconMetaSleuth/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { type FC } from 'react'

import type { BaseComponent } from '@common/types'

interface Props extends BaseComponent {
color?: string
size?: number
ml?: number
mr?: number
}

const IconMetaSleuth: FC<Props> = ({
size = 16,
color = '#bd7c40',
className,
style = {},
ml = 0,
mr = 0
}) => {
const stylesheet = Object.assign(
{
margin: 0,
marginLeft: ml,
marginRight: mr
},
style
)

return (
<svg
className={className}
style={stylesheet}
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
>
<path
d="M806.826667 556.373333v194.816l-330.538667 190.848v-5.461333l-2.432 1.450667V747.093333l330.496-190.72-0.042667 1.365334 2.517334-1.408zM981.333333 292.608l-8.576 6.869333 8.576-2.816-294.229333 235.818667-0.256-5.845333-2.218667 1.834666-2.133333-55.722666-74.88 27.264-78.890667 168.874666-214.058666 194.645334-0.256-6.101334-2.176 2.048-8.021334-206.592H233.898667l1.664-4.053333h-4.138667l52.010667-123.904 695.466666-232.32-1.792 1.408 4.224-1.408zM627.797333 85.333333l80.896 152.490667-1.706666 0.768 1.706666 3.242667-303.914666 144.554666 327.04-100.352 0.298666 0.597334 2.133334-0.597334 15.658666 29.610667-1.834666 0.597333 1.834666 3.413334-704.768 240.768 10.922667-7.808-10.922667 3.754666 2.218667-1.621333-4.693333 1.621333 202.368-143.061333L290.346667 123.733333l2.218666 1.28 0.256-1.28 103.637334 62.165334L625.365333 85.333333l0.426667 0.896 2.005333-0.896z"
fill={color}
/>
</svg>
)
}

export default IconMetaSleuth
1 change: 1 addition & 0 deletions src/common/components/icon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export { default as IconDownload } from './IconDownload'
export { default as IconClose } from './IconClose'
export { default as IconRefresh } from './IconRefresh'
export { default as IconMetaDock } from './IconMetaDock'
export { default as IconMetaSleuth } from './IconMetaSleuth'
export { default as IconArrowRightOutlined } from './IconArrowRightOutlined'
Loading

0 comments on commit c68b177

Please sign in to comment.