Skip to content

Commit

Permalink
Link to abi-playground from ERC-1167 Minimal Proxy contracts
Browse files Browse the repository at this point in the history
Related to e14c0ff
  • Loading branch information
lukaw3d committed Sep 12, 2024
1 parent 7707460 commit 07c18a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1540.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Detect ERC-1167 Minimal Proxy contracts
7 changes: 6 additions & 1 deletion src/app/components/Account/RuntimeAccountDetailsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { FiatMoneyAmount } from '../Balance/FiatMoneyAmount'
import { getFiatCurrencyForScope, showFiatValues } from '../../../config'
import { CardEmptyState } from '../CardEmptyState'
import { extractMinimalProxyERC1167 } from '../ContractVerificationIcon/extractMinimalProxyERC1167'
import { AbiPlaygroundLink } from '../ContractVerificationIcon/AbiPlaygroundLink'
import Box from '@mui/material/Box'

type RuntimeAccountDetailsViewProps = {
isLoading?: boolean
Expand Down Expand Up @@ -108,7 +110,10 @@ export const RuntimeAccountDetailsView: FC<RuntimeAccountDetailsViewProps> = ({
<>
<dt>{t('contract.verification.proxyERC1167')}</dt>
<dd>
<AccountLink scope={account} address={extractMinimalProxyERC1167(account)!} />
<Box>
<AccountLink scope={account} address={extractMinimalProxyERC1167(account)!} />
<AbiPlaygroundLink scope={account} address_eth={account.address_eth!} />
</Box>
</dd>
</>
)}
Expand Down
7 changes: 6 additions & 1 deletion src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { RoundedBalance } from 'app/components/RoundedBalance'
import { HighlightedText } from '../../components/HighlightedText'
import { RuntimeBalanceDisplay } from '../../components/Balance/RuntimeBalanceDisplay'
import { extractMinimalProxyERC1167 } from '../../components/ContractVerificationIcon/extractMinimalProxyERC1167'
import { AbiPlaygroundLink } from '../../components/ContractVerificationIcon/AbiPlaygroundLink'
import Box from '@mui/material/Box'

export const TokenDetailsCard: FC<{ scope: SearchScope; address: string; searchTerm: string }> = ({
scope,
Expand Down Expand Up @@ -71,7 +73,10 @@ export const TokenDetailsCard: FC<{ scope: SearchScope; address: string; searchT
<>
<dt>{t('contract.verification.proxyERC1167')}</dt>
<dd>
<AccountLink scope={account} address={extractMinimalProxyERC1167(account)!} />
<Box>
<AccountLink scope={account} address={extractMinimalProxyERC1167(account)!} />
<AbiPlaygroundLink scope={account} address_eth={account.address_eth!} />
</Box>
</dd>
</>
)}
Expand Down

0 comments on commit 07c18a6

Please sign in to comment.