Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-3091: Block Explorer API Routes #3091

Merged
merged 4 commits into from
Nov 6, 2020
Merged

Conversation

pedrouid
Copy link
Contributor

@pedrouid pedrouid commented Nov 2, 2020

Providing wallet with a blockExporerUrl could be valuable given that applications can permissionessly interface with each other given that standards are followed and become interoperable.

Hence I've explored existing block explorers and identified existing patterns where these endpoints are in consensus and could be specified under a standard which this EIP describes

L1 Blockchain Explorers

Blocks

Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/blocks/<BLOCK_HASH_OR_HEIGHT>
Etherscan (chainId=1) -> https://etherscan.io/block/<BLOCK_HASH_OR_HEIGHT>
Etherchain (chainId=1) -> https://etherchain.org/block/<BLOCK_HASH_OR_HEIGHT>
Ethplorer (chainId=1) -> unsupported

Etherscan and Etherchain are in consensus for blocks endpoint but Blockscout uses /blocks endpoint instead and Ethplorer doesn't have a page for blocks so returns 404 not found.

Transactions

Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/tx/<TX_HASH>
Etherscan (chainId=1) -> https://etherscan.io/tx/<TX_HASH>
Etherchain (chainId=1) -> https://etherchain.org/tx/<TX_HASH>
Ethplorer (chainId=1) -> https://ethplorer.io/tx/<TX_HASH>

All block explorers are in consensus for transactions endpoint.

Accounts

Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/address/<ACCOUNT_ADDRESS>
Etherscan (chainId=1) -> https://etherscan.io/address/<ACCOUNT_ADDRESS>
Etherchain (chainId=1) -> https://etherchain.org/account/<ACCOUNT_ADDRESS>
Ethplorer (chainId=1) -> https://ethplorer.io/address/<ACCOUNT_ADDRESS>

All block explorers are in consensus for accounts endpoint except Etherchain which uses /account endpoint instead

ERC-20 Tokens

Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/tokens/<TOKEN_ADDRESS>
Etherscan (chainId=1) -> https://etherscan.io/token/<TOKEN_ADDRESS>
Etherchain (chainId=1) -> https://etherchain.org/token/<TOKEN_ADDRESS>
Ethplorer (chainId=1) -> https://ethplorer.io/address/<TOKEN_ADDRESS>

Etherscan and Etherchain are in consensus but Blockscout uses /tokens endpoint instead and Ethplorer doesn't have a page for tokens so redirects to accounts page (/address).

L2 Explorers

Blocks

Matic -> https://explorer.matic.network/blocks/<BLOCK_HEIGHT_OR_HASH>
zkScan -> https://zkscan.io/blocks/<BLOCK_NUMBER>
Fuel -> https://rinkeby.fuel.sh/block/<BLOCK_NUMBER>

Transactions

Matic -> https://explorer.matic.network/tx/<TX_HASH>
zkScan -> https://zkscan.io/transactions/<TX_HASH>
Fuel -> https://rinkeby.fuel.sh/tx/<TX_HASH>

Accounts

Matic -> https://explorer.matic.network/address/<ACCOUNT_ADDRESS>
zkScan -> https://zkscan.io/accounts/<ACCOUNT_ADDRESS>
Fuel -> https://rinkeby.fuel.sh/address/<ACCOUNT_ADDRESS>

ERC-20 Tokens

Matic -> https://explorer.matic.network/tokens/<TOKEN_ADDRESS>
zkScan -> unsupported (/tokens displays a list of tokens pointing to L1 explorer)
Fuel -> unsupported

EIP-3091

Blocks

<BLOCK_EXPORER_URL>/block/<BLOCK_HASH_OR_HEIGHT>

Transactions

<BLOCK_EXPORER_URL>/tx/<TX_HASH>

Accounts

<BLOCK_EXPORER_URL>/address/<ACCOUNT_ADDRESS>

ERC-20 Tokens

<BLOCK_EXPORER_URL>/token/<TOKEN_ADDRESS>

EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
@pedrouid
Copy link
Contributor Author

pedrouid commented Nov 3, 2020

Thanks for the review @MicahZoltu 👍 updated PR

Copy link

@Welziewagers2015 Welziewagers2015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Guys i dont k ke what i was thinking. Nice work.

Copy link
Contributor

@MicahZoltu MicahZoltu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor things to get the bot to let this through, but otherwise looks good as a Draft EIP to me!

EIPS/eip-3091.md Outdated Show resolved Hide resolved
EIPS/eip-3091.md Outdated Show resolved Hide resolved
pedrouid and others added 2 commits November 5, 2020 14:52
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
@MicahZoltu MicahZoltu merged commit 1e6bdf1 into ethereum:master Nov 6, 2020
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
Providing wallet with a `blockExporerUrl` could be valuable given that applications can permissionessly interface with each other given that standards are followed and become interoperable.

Hence I've explored existing block explorers and identified existing patterns where these endpoints are in consensus and could be specified under a standard which this EIP describes

### L1 Blockchain Explorers

#### Blocks
Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/blocks/<BLOCK_HASH_OR_HEIGHT>
Etherscan (chainId=1) -> https://etherscan.io/block/<BLOCK_HASH_OR_HEIGHT>
Etherchain (chainId=1) -> https://etherchain.org/block/<BLOCK_HASH_OR_HEIGHT>
Ethplorer (chainId=1) -> unsupported

Etherscan and Etherchain are in consensus for blocks endpoint but Blockscout uses `/blocks` endpoint instead and Ethplorer doesn't have a page for blocks so returns 404 not found.

#### Transactions
Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/tx/<TX_HASH>
Etherscan (chainId=1) -> https://etherscan.io/tx/<TX_HASH>
Etherchain (chainId=1) -> https://etherchain.org/tx/<TX_HASH>
Ethplorer (chainId=1) -> https://ethplorer.io/tx/<TX_HASH>

All block explorers are in consensus for transactions endpoint.

#### Accounts
Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/address/<ACCOUNT_ADDRESS>
Etherscan (chainId=1) -> https://etherscan.io/address/<ACCOUNT_ADDRESS>
Etherchain (chainId=1) -> https://etherchain.org/account/<ACCOUNT_ADDRESS>
Ethplorer (chainId=1) -> https://ethplorer.io/address/<ACCOUNT_ADDRESS>

All block explorers are in consensus for accounts endpoint except Etherchain which uses `/account` endpoint instead

#### ERC-20 Tokens
Blockscout (chainId=100) -> https://blockscout.com/poa/xdai/tokens/<TOKEN_ADDRESS>
Etherscan (chainId=1) -> https://etherscan.io/token/<TOKEN_ADDRESS>
Etherchain (chainId=1) -> https://etherchain.org/token/<TOKEN_ADDRESS>
Ethplorer (chainId=1) -> https://ethplorer.io/address/<TOKEN_ADDRESS>

Etherscan and Etherchain are in consensus but Blockscout uses `/tokens` endpoint instead and Ethplorer doesn't have a page for tokens so redirects to accounts page (`/address`).

### L2 Explorers

#### Blocks
Matic -> https://explorer.matic.network/blocks/<BLOCK_HEIGHT_OR_HASH>
zkScan -> https://zkscan.io/blocks/<BLOCK_NUMBER>
Fuel -> https://rinkeby.fuel.sh/block/<BLOCK_NUMBER>

#### Transactions
Matic -> https://explorer.matic.network/tx/<TX_HASH>
zkScan -> https://zkscan.io/transactions/<TX_HASH>
Fuel -> https://rinkeby.fuel.sh/tx/<TX_HASH>

#### Accounts
Matic -> https://explorer.matic.network/address/<ACCOUNT_ADDRESS>
zkScan -> https://zkscan.io/accounts/<ACCOUNT_ADDRESS>
Fuel -> https://rinkeby.fuel.sh/address/<ACCOUNT_ADDRESS>

#### ERC-20 Tokens
Matic -> https://explorer.matic.network/tokens/<TOKEN_ADDRESS>
zkScan -> unsupported (`/tokens` displays a list of tokens pointing to L1 explorer)
Fuel -> unsupported

## EIP-3091

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


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

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


### ERC-20 Tokens
<BLOCK_EXPORER_URL>/token/<TOKEN_ADDRESS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants