Skip to content

Commit 751da19

Browse files
authored
Support EIP-7702 addresses (blockscout#2523)
* tx info customizations * authorizations tab * implement change for address page * amends
1 parent a0a3b38 commit 751da19

29 files changed

+332
-22
lines changed

.github/workflows/deploy-review.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
- eth_sepolia
2222
- eth_goerli
2323
- filecoin
24+
- mekong
2425
- optimism
2526
- optimism_celestia
2627
- optimism_sepolia

.vscode/tasks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@
369369
"eth_goerli",
370370
"eth_sepolia",
371371
"filecoin",
372+
"mekong",
372373
"optimism",
373374
"optimism_celestia",
374375
"optimism_sepolia",

configs/envs/.env.mekong

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Set of ENVs for Mekong network explorer
2+
# https://mekong.blockscout.com
3+
# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=mekong"
4+
5+
# Local ENVs
6+
NEXT_PUBLIC_APP_PROTOCOL=http
7+
NEXT_PUBLIC_APP_HOST=localhost
8+
NEXT_PUBLIC_APP_PORT=3000
9+
NEXT_PUBLIC_APP_ENV=development
10+
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
11+
12+
# Instance ENVs
13+
NEXT_PUBLIC_API_BASE_PATH=/
14+
NEXT_PUBLIC_API_HOST=mekong.blockscout.com
15+
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
16+
NEXT_PUBLIC_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/sherblockHolmesBadge
17+
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x7c7d9e09a5e0e6441a81efe57dbcf08848cd18a1f4238e28152faead390066a4
18+
NEXT_PUBLIC_HAS_BEACON_CHAIN=true
19+
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
20+
NEXT_PUBLIC_IS_TESTNET=true
21+
NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com
22+
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
23+
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=ETH
24+
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
25+
NEXT_PUBLIC_NETWORK_ID=7078815900
26+
NEXT_PUBLIC_NETWORK_NAME=Mekong
27+
NEXT_PUBLIC_NETWORK_RPC_URL=https://rpc.mekong.ethpandaops.io
28+
NEXT_PUBLIC_NETWORK_SHORT_NAME=Mekong
29+
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true
30+
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout
31+
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com

mocks/address/address.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ export const withoutName: AddressParam = {
6060
ens_domain_name: null,
6161
};
6262

63+
export const delegated: AddressParam = {
64+
...withoutName,
65+
is_verified: true,
66+
proxy_type: 'eip7702',
67+
};
68+
6369
export const token: Address = {
6470
hash: hash,
6571
implementations: null,

tools/preset-sync/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const PRESETS = {
1414
garnet: 'https://explorer.garnetchain.com',
1515
filecoin: 'https://filecoin.blockscout.com',
1616
gnosis: 'https://gnosis.blockscout.com',
17+
mekong: 'https://mekong.blockscout.com',
1718
optimism: 'https://optimism.blockscout.com',
1819
optimism_celestia: 'https://opcelestia-raspberry.gelatoscout.com',
1920
optimism_sepolia: 'https://optimism-sepolia.blockscout.com',

types/api/address.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Transaction } from 'types/api/transaction';
22

33
import type { UserTags, AddressImplementation, AddressParam, AddressFilecoinParams } from './addressParams';
44
import type { Block, EpochRewardsType } from './block';
5+
import type { SmartContractProxyType } from './contract';
56
import type { InternalTransaction } from './internalTransaction';
67
import type { MudWorldSchema, MudWorldTable } from './mudWorlds';
78
import type { NFTTokenType, TokenInfo, TokenInstance, TokenType } from './token';
@@ -31,6 +32,7 @@ export interface Address extends UserTags {
3132
name: string | null;
3233
token: TokenInfo | null;
3334
watchlist_address_id: number | null;
35+
proxy_type?: SmartContractProxyType | null;
3436
}
3537

3638
export interface AddressZilliqaParams {

types/api/addressParams.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { AddressMetadataTagApi } from './addressMetadata';
2+
import type { SmartContractProxyType } from './contract';
23

34
export interface AddressImplementation {
45
address: string;
@@ -59,6 +60,7 @@ export type AddressParamBasic = {
5960
tags: Array<AddressMetadataTagApi>;
6061
} | null;
6162
filecoin?: AddressFilecoinParams;
63+
proxy_type?: SmartContractProxyType | null;
6264
};
6365

6466
export type AddressParam = UserTags & AddressParamBasic;

types/api/contract.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type SmartContractProxyType =
2525
| 'eip1822'
2626
| 'eip930'
2727
| 'eip2535'
28+
| 'eip7702'
2829
| 'master_copy'
2930
| 'basic_implementation'
3031
| 'basic_get_implementation'

types/api/transaction.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ export type Transaction = {
105105
translation?: NovesTxTranslation;
106106
arbitrum?: ArbitrumTransactionData;
107107
scroll?: ScrollTransactionData;
108+
// EIP-7702
109+
authorization_list?: Array<TxAuthorization>;
108110
};
109111

110112
type ArbitrumTransactionData = {
@@ -206,3 +208,10 @@ export type ScrollTransactionData = {
206208
l2_block_status: ScrollL2BlockStatus;
207209
queue_index: number;
208210
};
211+
212+
export interface TxAuthorization {
213+
address: string;
214+
authority: string;
215+
chain_id: number;
216+
nonce: number;
217+
}

ui/address/AddressDetails.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
170170
<AddressImplementations
171171
data={ data.implementations }
172172
isLoading={ addressQuery.isPlaceholderData }
173+
proxyType={ data.proxy_type }
173174
/>
174175
) }
175176

0 commit comments

Comments
 (0)