Blueprint contracts support (#2009)

Fixes #1907
This commit is contained in:
tom goriunov
2024-06-13 13:11:26 +02:00
committed by GitHub
parent bb2d38bdba
commit eaa80daf4f
6 changed files with 12 additions and 0 deletions
+3
View File
@@ -16,6 +16,7 @@ export const verified: SmartContract = {
},
evm_version: 'default',
is_verified: true,
is_blueprint: false,
name: 'WPOA',
optimization_enabled: true,
optimization_runs: 1500,
@@ -101,10 +102,12 @@ export const selfDestructed: SmartContract = {
export const withChangedByteCode: SmartContract = {
...verified,
is_changed_bytecode: true,
is_blueprint: true,
};
export const nonVerified: SmartContract = {
is_verified: false,
is_blueprint: false,
creation_bytecode: 'creation_bytecode',
deployed_bytecode: 'deployed_bytecode',
is_self_destructed: false,
+1
View File
@@ -30,6 +30,7 @@ export interface SmartContract {
optimization_runs: number | null;
name: string | null;
verified_at: string | null;
is_blueprint: boolean | null;
is_verified: boolean | null;
is_verified_via_eth_bytecode_db: boolean | null;
is_changed_bytecode: boolean | null;
+8
View File
@@ -206,6 +206,14 @@ const ContractCode = ({ addressHash, contractQuery, channel }: Props) => {
return (
<>
<Flex flexDir="column" rowGap={ 2 } mb={ 6 } _empty={{ display: 'none' }}>
{ data?.is_blueprint && (
<Box>
<span>This is an </span>
<LinkExternal href="https://eips.ethereum.org/EIPS/eip-5202">
ERC-5202 Blueprint contract
</LinkExternal>
</Box>
) }
{ data?.is_verified && (
<Skeleton isLoaded={ !isPlaceholderData }>
<Alert status="success" flexWrap="wrap" rowGap={ 3 } columnGap={ 5 }>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 98 KiB