EIP-3091: Block Explorer API Routes
作者 | Pedro Gomes |
---|---|
讨论-To | https://ethereum-magicians.org/t/eip-3091-block-explorer-api-routes/4907 |
状态 | Stagnant |
类型 | Standards Track |
分类 | Interface |
创建日期 | 2020-11-02 |
英文版 | https://eips.ethereum.org/EIPS/eip-3091 |
目录
简述
Standard API Routes for Blockchain explorers
摘要
This proposal brings standardization between block explorers API routes when linking transactions, blocks, accounts and tokens.
动机
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 more feasible.
规范
Block explorers will route their webpages accordingly for the following data:
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>
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.
Security Considerations
TBD
版权声明
Copyright and related rights waived via CC0.
参考文献
Please cite this document as:
Pedro Gomes, "EIP-3091: Block Explorer API Routes [DRAFT]," Ethereum Improvement Proposals, no. 3091, November 2020. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-3091.