Commit c3420f6d authored by tom goriunov's avatar tom goriunov Committed by GitHub

Blueprint contracts support (#2009)

Fixes #1907
parent aeb16bf0
...@@ -16,6 +16,7 @@ export const verified: SmartContract = { ...@@ -16,6 +16,7 @@ export const verified: SmartContract = {
}, },
evm_version: 'default', evm_version: 'default',
is_verified: true, is_verified: true,
is_blueprint: false,
name: 'WPOA', name: 'WPOA',
optimization_enabled: true, optimization_enabled: true,
optimization_runs: 1500, optimization_runs: 1500,
...@@ -101,10 +102,12 @@ export const selfDestructed: SmartContract = { ...@@ -101,10 +102,12 @@ export const selfDestructed: SmartContract = {
export const withChangedByteCode: SmartContract = { export const withChangedByteCode: SmartContract = {
...verified, ...verified,
is_changed_bytecode: true, is_changed_bytecode: true,
is_blueprint: true,
}; };
export const nonVerified: SmartContract = { export const nonVerified: SmartContract = {
is_verified: false, is_verified: false,
is_blueprint: false,
creation_bytecode: 'creation_bytecode', creation_bytecode: 'creation_bytecode',
deployed_bytecode: 'deployed_bytecode', deployed_bytecode: 'deployed_bytecode',
is_self_destructed: false, is_self_destructed: false,
......
...@@ -30,6 +30,7 @@ export interface SmartContract { ...@@ -30,6 +30,7 @@ export interface SmartContract {
optimization_runs: number | null; optimization_runs: number | null;
name: string | null; name: string | null;
verified_at: string | null; verified_at: string | null;
is_blueprint: boolean | null;
is_verified: boolean | null; is_verified: boolean | null;
is_verified_via_eth_bytecode_db: boolean | null; is_verified_via_eth_bytecode_db: boolean | null;
is_changed_bytecode: boolean | null; is_changed_bytecode: boolean | null;
......
...@@ -206,6 +206,14 @@ const ContractCode = ({ addressHash, contractQuery, channel }: Props) => { ...@@ -206,6 +206,14 @@ const ContractCode = ({ addressHash, contractQuery, channel }: Props) => {
return ( return (
<> <>
<Flex flexDir="column" rowGap={ 2 } mb={ 6 } _empty={{ display: 'none' }}> <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 && ( { data?.is_verified && (
<Skeleton isLoaded={ !isPlaceholderData }> <Skeleton isLoaded={ !isPlaceholderData }>
<Alert status="success" flexWrap="wrap" rowGap={ 3 } columnGap={ 5 }> <Alert status="success" flexWrap="wrap" rowGap={ 3 } columnGap={ 5 }>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment