diff --git a/docs/.vuepress/sidebar/en.ts b/docs/.vuepress/sidebar/en.ts index 9c888b9a63..6ed2d023f9 100644 --- a/docs/.vuepress/sidebar/en.ts +++ b/docs/.vuepress/sidebar/en.ts @@ -253,7 +253,7 @@ export const enSidebar = sidebar({ { text: "Block Explorer", // required link: "/tools/block-explorer", // optional, which should be a absolute path. - children: ["/tools/block-explorer/block-explorer-menu", "/tools/block-explorer/contract-verification"], + children: ["/tools/block-explorer/block-explorer-menu", "/tools/block-explorer/contract-verification", "/tools/block-explorer/block-explorer-api"], }, ], }); diff --git a/docs/tools/block-explorer/README.md b/docs/tools/block-explorer/README.md index 97a909a659..6bf460d4d6 100644 --- a/docs/tools/block-explorer/README.md +++ b/docs/tools/block-explorer/README.md @@ -65,3 +65,7 @@ Use the search bar on all pages to access data by: - **Batch index**: The index of a batch submitted to L1. - **Contract address**: The callable address of a smart contract deployed on zkSync Era. - **Transaction hash**: The unique 66 character identifier of an executed transaction. + +## Block Explorer API + +The [zkSync Era Block Explorer API](https://block-explorer-api.mainnet.zksync.io/docs) is available for developers to access data directly via HTTP requests. Learn more [here](./block-explorer-api.md). diff --git a/docs/tools/block-explorer/block-explorer-api.md b/docs/tools/block-explorer/block-explorer-api.md new file mode 100644 index 0000000000..f47536f0ee --- /dev/null +++ b/docs/tools/block-explorer/block-explorer-api.md @@ -0,0 +1,31 @@ +--- +head: + - - meta + - name: "twitter:title" + content: Block Explorer API | zkSync Era Docs +--- + +# Block Explorer API + +We’ve developed the [zkSync Era Block Explorer API](https://block-explorer-api.mainnet.zksync.io/docs) for developers to access [zkSync Era Block Explorer](https://explorer.zksync.io/) data directly via HTTP requests. + +The [API](https://block-explorer-api.mainnet.zksync.io/docs) provides various endpoints for many use cases you might want in your app. It is compatible with [Etherscan API](https://docs.etherscan.io/), which makes it easy to transition your existing apps to zkSync Era network. + +The following modules are supported: + +- [Contract](https://block-explorer-api.mainnet.zksync.io/docs#/Contract%20API) +- [Account](https://block-explorer-api.mainnet.zksync.io/docs#/Account%20API) +- [Transaction](https://block-explorer-api.mainnet.zksync.io/docs#/Transaction%20API) +- [Logs](https://block-explorer-api.mainnet.zksync.io/docs#/Logs%20API) +- [Block](https://block-explorer-api.mainnet.zksync.io/docs#/Block%20API) + +Check out the API documentation [API docs on Mainnet](https://block-explorer-api.mainnet.zksync.io/docs) | [API docs on Testnet](https://block-explorer-api.testnets.zksync.dev/docs) + +:::note Note + +The [API](https://block-explorer-api.mainnet.zksync.io/docs) does not fully cover all the functionality yet. +::: + +We are working on additional endpoints to cover more use cases and to make developers’ experience better. Stay tuned for further updates. + +Feel free to contribute and create issues and feature requests in [zkSync Era Block Explorer GitHub repo](https://github.com/matter-labs/block-explorer).