-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
Thanks for the review @MicahZoltu 👍 updated PR |
There was a problem hiding this 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.
There was a problem hiding this 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!
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
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>
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 insteadERC-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>