Skip to content

Commit

Permalink
Update EIP-3091: Move to Draft
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
ligi committed Sep 15, 2023
1 parent 1942c16 commit 4708c61
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions EIPS/eip-3091.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
---
eip: 3091
title: Block Explorer API Routes
author: Pedro Gomes (@pedrouid)
description: API Routes for Blockchain explorers
author: Pedro Gomes (@pedrouid), ligi (@ligi)
discussions-to: https://ethereum-magicians.org/t/eip-3091-block-explorer-api-routes/4907
status: Stagnant
status: Draft
type: Standards Track
category: Interface
created: 2020-11-02
---

## Simple Summary
Standard API Routes for Blockchain explorers

## Abstract

This proposal brings standardization between block explorers API routes when linking transactions, blocks, accounts and tokens.

## Motivation
Currently wallets will link transactions and accounts to block explorers web pages but as chain diversity and layer two solutions grow it becomes harder to maintain a consistent user experience. Adding new chains or layer two solutions becomes harder given these endpoints are inconsistent. Standardizing the API routes to these links improves interoperability between wallets and block explorers. This EIP makes RPC endpoints like [EIP-2015](./eip-2015.md) more feasible.

Currently wallets and dapps link transactions and accounts to block explorer web pages but as chain diversity and layer two solutions grow it becomes harder to maintain a consistent user experience. Adding new chains or layer two solutions becomes harder given these endpoints are inconsistent. Standardizing the API routes to these links improves interoperability between wallets and block explorers.

## Specification

Block explorers will route their webpages accordingly for the following data:

### Blocks
`<BLOCK_EXPORER_URL>/block/<BLOCK_HASH_OR_HEIGHT>`

`<BLOCK_EXPLORER_URL>/block/<BLOCK_HASH_OR_HEIGHT>`

### Transactions
`<BLOCK_EXPORER_URL>/tx/<TX_HASH>`

`<BLOCK_EXPLORER_URL>/tx/<TX_HASH>`

### Accounts
`<BLOCK_EXPORER_URL>/address/<ACCOUNT_ADDRESS>`

### ERC-20 Tokens
`<BLOCK_EXPORER_URL>/token/<TOKEN_ADDRESS>`
`<BLOCK_EXPLORER_URL>/address/<ACCOUNT_ADDRESS>`

### Tokens

## Backward Compatibility
This EIP was designed with existing API routes in mind to reduce disruption. Incompatible block explorers should include either 301 redirects to their existing API routes to match this EIP.
`<BLOCK_EXPLORER_URL>/token/<TOKEN_ADDRESS>`

## Rationale

The particular paths used in this proposal are chosen to be compatible with the majority of existing block explorers.

## Backwards Compatibility

Incompatible block explorers can use redirects to their existing API routes in order to conform to this EIP.

## Security Considerations
TBD

None

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).

0 comments on commit 4708c61

Please sign in to comment.