# News Highlights
Source: https://docs.blockscout.com/about/announcements
News, media coverage, and major announcements related to Blockscout.
## Seed Funding Announcement
Blockscout open-source explorer
## OurNetwork Blockscout Feature
OurNetwork is a leading crypto publication providing data-driven insights on blockchain industry trends. This deep dive on Blockscout features coverage about Blockscout Network Health, User Trends, Explorer-as-a-Service, and the DAppscout Marketplace.
OurNetwork
## Dappcon 2024 Blockscout Presentation
Head of research Kirill Fedoseev presented on network resilience and the need for reliable, transparent, and available explorers in a multi-chain world (starts at 7:50:00)
## EthCC 2023 Blockscout Presentation
Head of Product Ulyana Skladchikova presented on the future of block explorers at ETHCC 2023 in Paris.
## The Evolution & Future of Infrastructure at Optimism's On-Chain Summit
## Base + Blockscout mainnet launch announcement
Blockscout open-source explorer
## Base + Blockscout original press release
pdf
# Newsletter & Blog
Source: https://docs.blockscout.com/about/announcements/newsletter-and-blog
The Blockscout Newsletter is sent out bi-monthly. It includes information on updates, new chains, integrations and other related information. If you use the My Account feature on Blockscout, an email newsletter subscription is automatically enabled when you sign up. You can unsubscribe at any time by clicking the unsubscribe link at the bottom of the email.
You can also [subscribe to receive the newsletter](https://www.blog.blockscout.com/).
Past newsletters are available on the [Blockscout Blog](https://www.blog.blockscout.com/).
# Chains Using Blockscout
Source: https://docs.blockscout.com/about/chains
List of projects and links
**The new searchable projects page is located at [https://chains.blockscout.com/](https://chains.blockscout.com/)**
**Please [Submit a PR](https://github.com/blockscout/chainscout) to add your chain.**
# Features
Source: https://docs.blockscout.com/about/features
Blockscout is a full-featured, open-source blockchain explorer
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. **[Get Started Now](/using-blockscout/autoscout) and have your explorer up-and-running in minutes.**
### What can I do with Blockscout?
* **Deep Search**: Find all the information you need on [Blocks](/using-blockscout/overviews/blocks), Transactions, Addresses, Tags and more through the integrated search box.
* **Interact with Contracts**: [Read and write to contracts](/devs/verification/interacting-with-smart-contracts) directly from the Blockscout UI.
* **Verify Contracts:** Use [Hardhat](/devs/verification/hardhat-verification-plugin), [Sourcify](/devs/verification/contracts-verification-via-sourcify), and other tools to quickly verify contracts.
* **Make API Calls**: Make requests to a [robust API](/devs/apis) using standard and customized endpoints.
* **Customize Views**: Use the [My Account](/using-blockscout/my-account) features to add tags, watchlists and other features.
* **Interact with Apps**: Chains with the [Apps Marketplace](/using-blockscout/blockscout-apps) enabled include a portal for discovery and interaction with applications deployed on-chain.
### Key Features
* **Open source development**: The code is community driven and available for anyone to use, explore, and improve.
* **Broad multi-chain ecosystem support**: Blockscout supports Ethereum mainnet, EVM forks like Ethereum Classic & Gnosis Chain, the Superchain Ecosystem, Polkadot Parachains, Cosmos ecosystem, and many additional public and private EVM networks. [See the list](/about/chains)
* **Smart contract interaction**: Users can read and verify Solidity & Vyper smart contracts and access pre-existing contracts to fast-track development.
* **Token support**: Support for ERC20, ERC721 and ERC1155 tokens.
* **Decoded views:** Contract method calls and logs are decoded to provide additional information within the UI.
* **Full-featured API:** GraphQL provides the opportunity to test API calls directly from a web interface, and REST and JSON RPC methods are well documented.
* **User customization**: Users can easily deploy on a network and customize the Bootstrap-based interface.
* **Modular and extendible**: We're building next generation modularity into Blockscout with Rust-designed microservices.
# Funding
Source: https://docs.blockscout.com/about/funding
Information about Blockscout funding sources, grants, and opportunities for support.
Blockscout [raised their first seed round](https://www.blog.blockscout.com/blockscout-raises-3m-seed-round-led-by-1kx/) in 2024 to help bring open-source exploration to more blockchain users.
We would like to thank projects, individuals, and agencies who have helped support Blockscout open-source explorer growth either through direct giving or grants to support instances.
We are open to additional grant opportunities and [welcome queries](https://discord.gg/XmNatGKbPS) from projects in need of a new open-source explorer instance or maintenance of their current instances.
Funding grants include:
* Seed Grant from the [Ethprize Foundation](http://ethprize.io/) (2018)
* [Gitcoin Grants](https://explorer.gitcoin.co/#/round/424/0x222ea76664ed77d18d4416d2b2e77937b76f0a35/0x222ea76664ed77d18d4416d2b2e77937b76f0a35-22) rounds (ongoing)
* [Community governance funding from Astar](https://forum.astar.network/t/blockscout-builders-program-application/1735) to support Blockscout instances for their networks (2021)
* [GnosisDAO funding](https://forum.gnosis.io/t/gip-54-should-gnosisdao-support-hosting-and-feature-updates-for-blockscout-explorer/5378/4) to support Gnosis Chain Blockscout instances (ongoing)
* [Optimism RetroPGF2](https://optimism.mirror.xyz/Upn_LtV2-3SviXgX_PE_LyA7YI00jQyoM1yf55ltvvI) & [RetroPGF3](https://optimism.mirror.xyz/37Bgum6MfTJWDuE41CH9RXSH5KBm_RCL5zsSFeRZl4E) (2023)
* [ETC Grants DAO](https://etccooperative.org/posts/2023-08-09-presenting-first-round-etc-grants-dao-winner-blockscout-en) (2023)
* Grant support from the [Ethereum Foundation](https://ethereum.foundation/) (2023 & 2025).
# Partners & Integrations
Source: https://docs.blockscout.com/about/partners-and-integrations
Blockscout featured integrations
Blockscout features many 3rd party integrations. Additional services are also integrating Blockscout, including many [Rollup-as-a-Service (RaaS) providers](/about/partners-and-integrations/raas-providers).
## Blockscout Partners
Partners provide vital data, infrastructure, and contract support to Blockscout.
| | |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**Metasuites**](https://blocksec.com/metasuites) by Blocksec provides an browser extension that enhances Blockscout with address labelling, transaction explanations, and compliance scores for addresses based on behavior. |
| | [**Sourcify**](https://sourcify.dev/) gives developers the option to verify contracts via the Sourcify API with Blockscout. Contracts verified through Sourcify will display this information on the verified contracts page. [Learn more](/devs/verification/contracts-verification-via-sourcify). |
| | [**DPRC**](https://drpc.org/) is a decentralized Web3 infrastructure provider with a focus on resilience and latency. DPRC provides RPC services for a number of Blockscout hosted instances. |
## Tools and Utilities
Blockscout provides links to relevant, useful tools related to specific transactions and contracts for easy enhanced inspection.
| | |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**Tenderly**](https://tenderly.co/) is an all-in-one Web3 development platform. It is extremely useful for transaction simulation and smart contract development. Blockscout provides a link to transactions for viewing additional detailed information on the Tenderly platform. |
| | [**Sentio**](https://www.sentio.xyz/) is a monitoring, alerting, log management and debugging service for blockchains. Blockscout provides a link to the Sentio explorer for users who need to find advanced analytics about a particular transaction or contract, and read/search/write/fix code faster! |
| | [**SolidityScan**](https://solidityscan.com) is an AI-driven tool specifically tailored for Smart Contract Vulnerability Detection within the web3 ecosystem. With the Blockscout integration, users can access a real-time security score for verified contracts on supported chains. |
## Linked Explorers
Blockscout includes links to additional blockchain explorers for verification and transparency on hosted instances. Self-hosted instances can choose which additional explorers to link with using [front-end ENVs](https://github.com/blockscout/frontend/blob/main/docs/ENVS.md) during deployment.
| | |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**Blockchair**](https://blockchair.com/) block explorer indexes data for 18 blockchains. When available, Blockscout provides a link to Blockchair for transactions, addresses, and more so users can verify and double-check data accuracy. |
| | [**Etherscan**](https://etherscan.io/) explorer is available for large chains and provides a comprehensive data source. When available, Blockscout provides a link to Etherscan so users may double check and verify transactions on multiple explorers. |
| | [**0xPPL**](https://0xppl.com/) offers social search as well as transaction information, providing a connection between on and off chain data. When available, Blockscout provides a link to 0xPPL for transactions, addresses, and more so users can verify and find additional information. |
| | [**3xpl**](https://3xpl.com/) is a fast, universal explorer for most popular public blockchains. When available, Blockscout provides a link to 3xpl for data verification. |
## Contract Verification
Contract verification integrations make it easier to verify contracts from a variety of development environments and bring in additional verified contract information.
| | |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**Hardhat**](https://hardhat.org/) is a popular Ethereum development environment. Contracts can be deployed and verified on Blockscout using the verification plugin. [Learn more](/devs/verification/hardhat-verification-plugin). |
| | [**Foundry**](https://github.com/foundry-rs/foundry/) is a smart contract development toolchain and Forge is a command-line tool that ships with Foundry that supports contract verification with Blockscout. [Learn More](/devs/verification/foundry-verification). |
| | [**Remix**](https://remix-project.org/)is a popular IDE for developing smart contracts. You can use the built-in verification plugin to verify contracts in Blockscout. [Learn More](/devs/verification/remix-verification). |
| | [**Sourcify**](https://sourcify.dev/) is an open-source platform for verifying contracts. You can use the Sourcify API to verify contracts in Blockscout. [Learn more](/devs/verification/contracts-verification-via-sourcify). |
## Tokens and TVL
Feeds can be sourced from several options to provide the latest up-to-date token information. These options are set through [application ENVs](/setup/env-variables) during deployment.
| | |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**CoinGecko**](https://www.coingecko.com/)is a source for token prices and market cap information using the e CoinGecko API. CoinGecko is a leading application which provides price tracking, volume and market capitalisation, community growth, and open-source code development. |
| | [**CoinMarketCap**](https://coinmarketcap.com/) is a source for token prices and market cap information using the CoinMarketCap API. CoinMarketCap is a popular price-tracking website for crypto assets. |
| | [**Cryptorank**](https://cryptorank.io/) provides data aggregation and analytics services. The application tracks crypto assets, prices, and detailed information about cryptocurrencies. |
| | [**Mobula**](https://mobula.io/) is a crypto data aggregator that provides curated blockchain data and industry-leading coverage. |
| | [**CoinCompare**](https://coincompare.eu/) is a source for token prices using the CoinCompare API. CoinCompare is a real-time crypto price tracker and comparator. |
| | [**Trust Wallet**](https://trustwallet.com/) is a source for token icon information. Trust Wallet is a leading self-custody multi-chain platform, we support millions of assets across 100+ blockchains. |
| | [**DeFiLlama**](https://defillama.com/) is a source for TVL information through the API integration. DeFiLlama is a DeFi TVL aggregator providing accurate and transparent data. |
## Ad Providers
Ad providers can be selected to bring relevant, web3 based ads based on the network where Blockscout is deployed. Ad options are set using [front-end ENVs](https://github.com/blockscout/frontend/blob/main/docs/ENVS.md) during deployment.
| | |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| | [**Slise**](https://www.slise.xyz/) specializes in web3 ads for users featuring transparent data usage and no tracking. It is the default ad network for hosted chains. |
| | [**Coinzilla**](https://coinzilla.com/) is a large ad network for crypto-relevant content and are well-established in the blockchain space. |
| | [**Adbutler**](https://www.adbutler.com/) provides ads for many different types of industries and users, and can be a good option for instances that serve diverse user bases. |
# RaaS Providers
Source: https://docs.blockscout.com/about/partners-and-integrations/raas-providers
Rollup-as-a-Service Providers using Blockscout
Many Rollup-as-a-Service providers are using Blockscout as the default explorer for their instances. Once deployed, Blockscout can provide explorer support services when rollups want to customize or augment their explorers.
Each RaaS has their own processes and specializations including zkRollups or opRollups optimized for different environments. If you have questions about which RaaS to choose, or need customizations for your RaaS Blockscout instance, [please contact us and we can direct you to the best option for your chain](https://www.blockscout.com/#contact-us).
| | |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | [**Gelato**](https://www.gelato.network/): Gelato's zkRollup as a Service Platform is fully-serviced, leverages OP, Arbitrum Orbit and Polygon zkEVM, and provides High TPS, Low Fees, and Ethereum's Security. |
| | [**Alchemy**](https://www.alchemy.com/): Alchemy is a proven web3 infrastructure provider now offering best-in-class RaaS services for L2s and L3s. |
| | [**QuickNode**](https://www.quicknode.com/rollup): QuickNode offers enterprise-grade rollups backed by industry-leading infrastructure. Supporting Optimism Superchains, Arbitrum Orbit Chains, and ZKsync Elastic Chains. [Docs](https://www.quicknode.com/docs/rollups/intro) |
| | [**Conduit**](https://conduit.xyz/): Conduit's RaaS platform allows teams to scale their applications quickly and easily using production-grade OP Stack or Arbitrum Orbit rollups. |
| | [**Zeeve**](https://www.zeeve.io/): Low-code, scalable, enterprise-grade infrastructure for ZK Rollups and OP Stack Rollups. |
| | [**Caldera**](https://caldera.xyz/): Caldera makes it easy to launch high-performance, customizable, and application-specific Arbitrum Orbit and OP Stack rollups. |
| | [**Aurora Cloud**](https://auroracloud.dev/): Aurora Virtual Chains are EVM compatible blockchains inheriting the full security, scalability and infrastructure of Near Protocol |
| | [**Lumoz**](https://lumoz.org/?ref=blog.blockscout.com): Lumoz offers an easy-to-use, universal launchbase where anyone can quickly create a zk-rollup with several different options. [Learn More](https://www.blog.blockscout.com/lumoz-and-blockscout-collaborate-to-elevate-the-zk-raas-experience/) |
| | [**Presto**](https://gateway.fm/presto/?ref=blog.blockscout.com): Presto provides zk-Validium and zk-Rollups with instant deployment and a full suite of tools. Settle on Eth or Gnosis Chain. [Learn More](https://www.blog.blockscout.com/blockscout-presto-raas/) |
| | [**Altlayer**](https://altlayer.io/raas): Altlayer offers a versatile rollup stack including Arbitrum Orbit, OP stack, Polygon ZKEVM and StarkWare, and support for various DA layers such as EigenLayer and Celestia. |
| | [**Chainstack**](< https://chainstack.com/>): Chainstack provides infrastructure services including rollup deployment. |
| | [**Snapchain:**](https://www.snapchain.dev/) Snapchain specializes in zkRollups for scaling on-chain games and DeFi applications cheaply and securely. |
| | [**Dymension**](https://dymension.xyz/): Dymension offers app-chains called RollApps, designed for application-specific speed and efficiency. |
| | [**Vistara**:](https://www.vistara.dev/) Vistara provides a one-click rollup deployment framework for designing and managing scalable infrastructure. |
# Vera: Verifier Alliance
Source: https://docs.blockscout.com/about/partners-and-integrations/vera-verifier-alliance
The [Verifier Alliance](https://verifieralliance.org/) is an ecosystem collective aiming for easy, unified, and open access to the source-code of EVM smart contracts. It is made up of projects across the ecosystem dedicated to making source code verification information freely available for all. Blockscout is a founding member of the collective and major contributor to the Vera Database.
* [Blockscout Vera app](https://vera.blockscout.com/): Verify and Publish contracts to supported networks.
* [Add your network to the Vera DB](/about/partners-and-integrations/vera-verifier-alliance/adding-your-chain-to-the-vera-database)
* [Verify contracts programmatically via the API](/about/partners-and-integrations/vera-verifier-alliance/programmatic-verification-via-the-api)
# Roadmap
Source: https://docs.blockscout.com/about/roadmap
Upcoming enhancements, features, and strategic plans for Blockscout.
# Roadmap
The Blockscout roadmap is a high-level strategic plan designed to guide research and development. **Target dates and details are reviewed by the team and subject to move, adjust and change as the project evolves**. Note that only completed items (β Status: Complete) are considered achieved project milestones.
[*Last update: SEP 2025 | Changelog*](/about/roadmap#change-log)
## π¦ Q3-4 2025
We've updated our roadmap for the remainder of 2025 with a focus on our flagship auto-launch platform Autoscout.
**2025**
* **Plugin system:** Create basic plugin system for self-deployed chains
* **User ops plugin**: First plugin launched for user ops
* **Recurring payments**: Build out recurring payments system for regular users
**2026**
***Q 1-2***
* New Plugins:
* **Admin panel**: Instance can access to admin functionality
* **Account Features**: Instances can add MyAccount to provide user-centric features such as tags and API key generation
* **BENS (ens resolution)**: Instances can add support for ENS names.
* **Automatic scaling**: Will provide real-time scaling as needed to support large spikes or decreases in usage.
* **DDoS protection**: Improve security and reduce potential slowing from DDoS attacks
* **Setup wizard** (get setting from RPC URL): Simple setup for new instances
* **Background RPC validation**: Will improve monitoring and alerts
* **Password protection**: Instances can protect new instances before they go public.
* MCP server integrations, improve MCP service and expand usage
* Explore basic chat integration with instances
* Chat integration with DeFi products such as Swap
* Index cross-chain bridge transactions
* Create UI interface for exploration
* Targeting Gnosis Chain as the first live instance
* PRO API service with higher limits and additional endpoints
* Create self-service module
* Design integrated interface and move current standalone Blockscout DeFi apps (Swap, Revoke) to Essential Dapps within the explorer
* Add Multisender app to Essential Dapps
* Continued development for customized instances
* Based on client needs on a chain-by-chain basis
* Support new and upcoming features on hosted chains
* Create data service with wide instance coverage.
* Custom data delivery for a wide range of real-time and historica data.
* Contract and protocol deployment tracking and ecosystem analysis
* Cross-chain liquidity movement and large asset flow monitoring
* Public address labeling and protocol identification
* Dapp interaction and dapp usage reports
Smart Contract Analytics
* Provide detailed analytics for smart contract usage and performance
Advanced EOA (Externally Owned Account) Analytics
* Offer in-depth analysis of regular user accounts
Market Data Integration
* Incorporate relevant market data into the explorer
Protocol-specific Stats
* Provide statistics broken down by different protocols
* Display top NFTs
* Show latest trades, transfers, and mints
* Integrate with NFT marketplaces and platforms
## π¦ Q1-2 2025
We accomplished many important updates in the first half of 2025. Any items not completed have been either restructured or moved to Q3-4.
### β Account Abstraction
**Target Date:** Q2 2025
* Support for AA transaction actions: Improved handling of AA-specific transactions
* Public tags for Bundlers, Paymasters, Factories: Better identification of AA-related accounts
### β Advanced Features
**Target Date:** Q2 2025
Includes:
* Multi-chain Search: Allows users to search across multiple blockchain networks simultaneously
* Advanced Filters Enables more detailed and customizable data filtering options
* Export Filter Results to CSV Allows users to download filtered data in CSV format for further analysis
* Validators Page Displays information about validators for Proof-of-Stake chain chains
* Simplified Account Creation Integration with WalletConnect for easier account setup
### β Analytics and Statistics
**Target Date:** Q1 2025
* Customizable Time Views: Daily, weekly, monthly, and yearly data views
### β Defi Integrations
**Target Date:** Q2 2025
* Swap: Token exchange functionality
* Revoke approvals: Manage token approvals
### β Data Availability
**Target Date:** Q2 2025
* Celestia DA for rollups
### β Enhanced Name Service Support
**Target Date:** Q2 2025
* Extend ENS support to Ethereum L2 explorers
* Enable multiple name services on a single chain
### β Token Information Service
**Target Date:** Q2 2025
* Integrate CEX/DEX data: Information from centralized and decentralized exchanges
* Display liquidity pairs data
* Capture token prices from multiple sources for accuracy
## β Previously Completed
###
### β Basic ENS Support
**Target Date:** Q2 2024
**Status**: β Completed
* β Resolving ENS names for addresses and listing names for the address
* β Enabling search by ENS name
* β Search by ENS name
### β Visualizer Service
**Target Date:** Q2 2024
**Status**: β Completed
Visualizer service offering various visualization schemes, such as Sol2UML and transaction graphs for complex blockchain data analysis.
### β Ongoing L2 support
**Target Date:** Q2 2024
**Status**: β Completed
* zkSync Era and zkSync Sepolia Testnet
* Arbitrum
### β Gas Tracker
**Target Date:** Q2 2024
**Status**: β Completed
Users can monitor gas prices and trends to help them make informed decisions about transaction fees and timing.
### β Human Readable Transactions v1
**Target Date:** Q1 2024
**Status**: β Completed
Display complex transactions in an easily understandable format for non-technical users. This includes the ability to automatically decode transaction data, including tokens, contracts, and events.
### β Universal Smart Contract front-end
**Target Date:** Q3 2023
**Status**: β Completed
Improve and simplify the Smart Contract deployment & verification process. Integrate React components to abstract away common on-chain operations.
### β Improved Indexer Performance
**Target Date:** Q2 2023
**Status**: β Completed
Load speed, database optimization & caching, data parsing features to maintain optimal performance. These efforts will continue as additional features are added to BlockScout.
### β Advanced Filter and Sort
**Target Date:** Q2 2023
**Status**: β Completed
Enhance filter and sort options so users can view transaction data in various formats including transaction types, assets & time ranges. Explore ability to save and share custom filter configurations.
### β My Account Improvements
**Target Date:** Q2 2023
**Status**: β Completed
My Account beta is active and will be rolled out on a case-by-base basis, with hosted instances receiving priority. Includes adding the following features:
* Watchlists: Users can create watchlists for specific addresses or contracts, and view all transactions from the watchlists on the main page.
* Enhanced CSV export features
* Smart contract ownership verification
* Airdrop eligibility tool
### β Admin Dashboard
**Target Date:** Q2 2023
**Status**: β Completed
Rust microservice which will provide a comprehensive dashboard for blockchain administrators. Available for hosted versions first.
* Token info
* Public tags
* Real-time network monitoring, chain statistics, user analytics
### β Landing Page
**Target Date:** Q3 2022
**Status**: β Completed
A new landing page is in development for Blockscout to assist new users and developers understand the Blockscout feature set and find information quickly.
### β UI Redesign
**Target Date:** Q3-Q4 2022
**Status**: β v1 Completed see [https://eth-goerli.blockscout.com/](https://eth-goerli.blockscout.com/)
A new UI interface is under development to improve data exploration, optimize views, and provide overall better UX for Blockscout users. The UI is being built from the ground up. It will overhaul all aspects of Blockscout engagement, creating a complete all-in-one interface for chain exploration. In addition to a modern design, the upgrade will also improvements to features such as:
* **Search**: Prominent search, mobile upgrades, improved dropdown, full-page results, search control
* **Data Sort/Filtering**: Ability to sort data (ascending & descending by column). Improved pagination and filtering abilities.
* **My Account**: See below for features related to My Account functionality.
### β DApp Marketplace v1
**Target Date:** Q4 2022
**Status**: β v1 Completed
Chain users will be able to access applications and modules directly from Blockscout, vastly improving the overall chain experience. Interoperability, swaps, transactions, and 3rd party project-based apps will be accessible and integrated with the modular interface.
Blockscout will also develop native applications for this marketplace. Several are in active development.
* **Blockscout Swap**: Swap feature using an aggregator under the hood for simple swaps without leaving Blockscout.
* **Blockscout Revoke**: Find contracts/apps you have granted allowances to (the ability to spend tokens on your behalf) and revoke these permissions.
* More TBD
### β My Account Functionality v1
**Target Date:** Q3 2022
**Status**: β Instance deployed on Gnosis Chain. Undergoing improvements.
We will explore adding account features for users looking for explorer personalizations, including alerts and notifications, the ability to watch specific addresses, name and customize data within the dashboard, and other advanced features.
### β Blockscout Rust Microservices v1
**Target Date:** Q3 2022
**Status**: β v1 completed - Smart Contract Verification microservice
New Rust-developed microservices will be enabled on Blockscout to extend functionality and modularity. We are revamping smart contract verification to use a Rust module and working on a smart contract uml visualization module to start.
### β Deployment Improvements
**Target Date:** Q3 2022
**Status**: β Completed, Documentation in progress
BlockScout deployment can be complicated for new users. Deployment improvements within a Docker environment will enable a fast path for easy setup and deployment.
### β Ethereum Mainnet BlockScout Instance
**Target Date:** Q2 2022
**Status**: β Instance deployed, optimizations ongoing.
BlockScout offered prior support for the Ethereum mainnet. This instance was discontinued; however a new instance is now planned to further increase explorer diversity on Ethereum and provide additional transparency for Ethereum users.
### β ERC721 Metadata
**Target Date:** Q4 2019
**Status:** β Complete, ERC721 Metadata storage and display ([Release 2.1.0](https://forum.poa.network/t/blockscout-2-1-0-release/3128)) and verification checks ([Release 2.1.1](https://forum.poa.network/t/blockscout-2-1-1-release/3172)) are implemented.
[ERC-721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) non-fungible tokens represent ownership of digital or physical assets. Each token is unique, and may include images and other data which identifies the asset and provides additional information. This might include registration information (for example land, property or art registration), identifying numbers or other data unique to that token. As ERC-721 tokens continue to proliferate, it is important to display the relevant information related to each owned token.
### β Staking DApp Integration
**Target Date:** Q3 2020
**Status:** β Complete Q4 2020
BlockScout will support the new POSDAO staking consensus mechanism through an on-board UI. The initial implementation will support the [xDai Stable Chain](https://xdaichain.com). This will allow users to place stake directly from the interface, monitor validator activity, and participate in consensus on the xDai Chain.
### β Smart Contract Write Functionality
**Target Date:** Q2 - Q3 2020
**Status**: β Complete, Write contract/ write proxy functionalities are implemented ([Release 3.3.0](https://forum.poa.network/t/blockscout-v3-3-0-beta/3558)).
Users can currently verify and read contracts on BlockScout. The next smart contract development phase will allow users to interact with contracts directly through the interface. Verified contract methods will be accessible and users can connect through a web3 wallet (such as MetaMask) to access and execute contract functions.
### β ERC1155 Support
**Target Date:** Q2 2021
**Status**: β Basic Functionality added for xDai chain, additional support in process.
ERC-1155 tokens are increasing in popularity as a way to manage multiple-token types including fungible and non-fungible tokens within a single instance. This feature provides parsing and display of tokens contained within an ERC-1155. Additional functionality such as metadata display is in process.
### β Rollup Support
**Target Date:** Q4 2021
**Status**: β Instances for Optimism and Arbitrum on Gnosis Chain
BlockScout availability and support is available for Optimism and Arbitrum on the Gnosis Chain. Includes tracking for gas price on L1 and the L2 implementations. Currently Optimism is the favored deployment.
* Optimism: [https://blockscout.com/xdai/optimism](https://blockscout.com/xdai/optimism)
* Arbitrum: [https://blockscout.com/xdai/aox/](https://blockscout.com/xdai/aox/)
### β EIP-1559 Support
**Target Date:** Q3-Q4 2021
**Status**: β Complete
The Gnosis Chain explorer supports EIP-1559 functionality with a stated transaction type (2 for EIP-1559) and includes data reporting of Max Fee per Gas, Max Priority Fee per Gas and Priority Fee / Tip paid for a transaction.
### β Multi-file Contract Source Code Verification
**Target Date:** Q4 2021
**Status:** β Complete
BlockScout supports verification for contracts via multiple methods including Hardhat and the Hardhat and Sourcify plugins. [More information is available here](/devs/verification).
## Change Log
Update
Items
30.09.2025
Updated 2025 with remaining items and moved items from Q1/Q2 to completed or Q3-4 2025 based on status.
Moved to Q3/Q4
Analytics and Statistics
NFT explorer enhancements
Completed Items
Account Abstraction
Advanced Features
Analytics and Statistics
DeFi Integrations
Data Availability (Celestia Support)
Enhanced ENS Support
Token Info Services
19.08.2024
Major update to restructure roadmap for the rest of 2024. Moved completed items from Q1-2 into completed section and adjusted remaining items to fit into targeted areas for the remainder of 2024.\
\
Removed from Roadmap:
New Microservices (folded into existing categories)
CEX/DEX views (deprioritized)
Ongoing Improvements (moved to existing categories)
Moved to Completed:
L2 Support
Visualizer Service
29.05.2024
Minor update: Will be adding a major overhaul in June for Q3-Q4 and will reconfigure, add new items and remove others.\
\
**Completed:**
Gas Tracker
Basic ENS support
**Removed:**
AWS template
Multisender native dapp
03.01.2024
Update milestones for Q1 2024.\
Completed:
Universal smart contract front-end
Human readable transactions v1
07.11.2023
Updated milestones to reflect current quarterly work. A more extensive update with many reworked milestones will be added for 2024.
10.08.2023
Updated Q3 milestones to account for completed items.\
Completed:
Improved indexer performance
Advanced filter and search
My Account improvements
Admin Account
17.04.2023
Revamp roadmap for 2023 milestones by Q.
Moved all In-research items to appropriate Q.
Added:
Q2,Q3,Q4 2023 items
Completed:
Landing Page
React UI v1
Rust Microservices v1
DApp Marketplace v1
My Account v1
27.07.2022
Updated marketplace to include Blockscout native DApps
Added Blockscout Microservices
Added Multi-chain search
Added personal asset management features
Added Blockscout ID
Combined several elements into UI category
Deployment improvements (Docker image) moved to completed
Update Research Phase items to 2023
06.07.2022
Added:
Analytics Dashboards
UI Overhaul
Modular Plug-and-Play Library
Completed:
Ethereum Mainnet Instance
11.04.2022
Rearranged into Completed and Ongoing Categories
Updated Ongoing Item dates
Added UI enhancements
Marked as Completed
EIP-1559 Support
Rollup Support
Multi-file Contract Source Code Verification
# Get apiv1celestiablob
Source: https://docs.blockscout.com/api-reference/celestiaservice/get-apiv1celestiablob
openapi.yaml get /api/v1/celestia/blob
# Get apiv1celestial2batchmetadata
Source: https://docs.blockscout.com/api-reference/celestiaservice/get-apiv1celestial2batchmetadata
openapi.yaml get /api/v1/celestia/l2BatchMetadata
# If the requested service is unknown, the call will fail with status
NOT_FOUND.
Source: https://docs.blockscout.com/api-reference/celestiaservice/if-the-requested-service-is-unknown-the-call-will-fail-with-statusnot_found
openapi.yaml get /health
# get account abstraction indexing status
Source: https://docs.blockscout.com/api-reference/get-account-abstraction-indexing-status
openapi.yaml get /proxy/account-abstraction/status
# get address coin balance history
Source: https://docs.blockscout.com/api-reference/get-address-coin-balance-history
openapi.yaml get /addresses/{address_hash}/coin-balance-history
# get address coin balance history by day
Source: https://docs.blockscout.com/api-reference/get-address-coin-balance-history-by-day
openapi.yaml get /addresses/{address_hash}/coin-balance-history-by-day
# get address counters
Source: https://docs.blockscout.com/api-reference/get-address-counters
openapi.yaml get /addresses/{address_hash}/counters
# get address info
Source: https://docs.blockscout.com/api-reference/get-address-info
openapi.yaml get /addresses/{address_hash}
# get address internal transactions
Source: https://docs.blockscout.com/api-reference/get-address-internal-transactions
openapi.yaml get /addresses/{address_hash}/internal-transactions
# get address logs
Source: https://docs.blockscout.com/api-reference/get-address-logs
openapi.yaml get /addresses/{address_hash}/logs
# get address token transfers
Source: https://docs.blockscout.com/api-reference/get-address-token-transfers
openapi.yaml get /addresses/{address_hash}/token-transfers
# get address transactions
Source: https://docs.blockscout.com/api-reference/get-address-transactions
openapi.yaml get /addresses/{address_hash}/transactions
# get address withdrawals
Source: https://docs.blockscout.com/api-reference/get-address-withdrawals
openapi.yaml get /addresses/{address_hash}/withdrawals
# get all tokens balances for the address
Source: https://docs.blockscout.com/api-reference/get-all-tokens-balances-for-the-address
openapi.yaml get /addresses/{address_hash}/token-balances
# get block info
Source: https://docs.blockscout.com/api-reference/get-block-info
openapi.yaml get /blocks/{block_number_or_hash}
# get block transactions
Source: https://docs.blockscout.com/api-reference/get-block-transactions
openapi.yaml get /blocks/{block_number_or_hash}/transactions
# get block withdrawals
Source: https://docs.blockscout.com/api-reference/get-block-withdrawals
openapi.yaml get /blocks/{block_number_or_hash}/withdrawals
# get blocks
Source: https://docs.blockscout.com/api-reference/get-blocks
openapi.yaml get /blocks
# get blocks validated by address
Source: https://docs.blockscout.com/api-reference/get-blocks-validated-by-address
openapi.yaml get /addresses/{address_hash}/blocks-validated
# get human-readable transaction summary
Source: https://docs.blockscout.com/api-reference/get-human-readable-transaction-summary
openapi.yaml get /transactions/{transaction_hash}/summary
# get indexing status
Source: https://docs.blockscout.com/api-reference/get-indexing-status
openapi.yaml get /main-page/indexing-status
# get internal transactions
Source: https://docs.blockscout.com/api-reference/get-internal-transactions
openapi.yaml get /internal-transactions
# get json rpc url
Source: https://docs.blockscout.com/api-reference/get-json-rpc-url
openapi.yaml get /config/json-rpc-url
# get list of NFT owned by address
Source: https://docs.blockscout.com/api-reference/get-list-of-nft-owned-by-address
openapi.yaml get /addresses/{address_hash}/nft
# get list of NFT owned by address, grouped by collection
Source: https://docs.blockscout.com/api-reference/get-list-of-nft-owned-by-address-grouped-by-collection
openapi.yaml get /addresses/{address_hash}/nft/collections
# get main page blocks
Source: https://docs.blockscout.com/api-reference/get-main-page-blocks
openapi.yaml get /main-page/blocks
# get main page transactions
Source: https://docs.blockscout.com/api-reference/get-main-page-transactions
openapi.yaml get /main-page/transactions
# get market chart
Source: https://docs.blockscout.com/api-reference/get-market-chart
openapi.yaml get /stats/charts/market
# get native coin holders list
Source: https://docs.blockscout.com/api-reference/get-native-coin-holders-list
openapi.yaml get /addresses
# get NFT instance by id
Source: https://docs.blockscout.com/api-reference/get-nft-instance-by-id
openapi.yaml get /tokens/{address_hash}/instances/{id}
# get NFT instances
Source: https://docs.blockscout.com/api-reference/get-nft-instances
openapi.yaml get /tokens/{address_hash}/instances
# get smart contract
Source: https://docs.blockscout.com/api-reference/get-smart-contract
openapi.yaml get /smart-contracts/{address_hash}
# get stats counters
Source: https://docs.blockscout.com/api-reference/get-stats-counters
openapi.yaml get /stats
# get token holders
Source: https://docs.blockscout.com/api-reference/get-token-holders
openapi.yaml get /tokens/{address_hash}/holders
# get token holders
Source: https://docs.blockscout.com/api-reference/get-token-holders-1
openapi.yaml get /tokens/{address_hash}/counters
# get token info
Source: https://docs.blockscout.com/api-reference/get-token-info
openapi.yaml get /tokens/{address_hash}
# get token instance holders
Source: https://docs.blockscout.com/api-reference/get-token-instance-holders
openapi.yaml get /tokens/{address_hash}/instances/{id}/holders
# get token token transfers
Source: https://docs.blockscout.com/api-reference/get-token-token-transfers
openapi.yaml get /tokens/{address_hash}/transfers
# get token transfers
Source: https://docs.blockscout.com/api-reference/get-token-transfers
openapi.yaml get /token-transfers
# get tokens list
Source: https://docs.blockscout.com/api-reference/get-tokens-list
openapi.yaml get /tokens
# get transaction info
Source: https://docs.blockscout.com/api-reference/get-transaction-info
openapi.yaml get /transactions/{transaction_hash}
# get transaction internal transactions
Source: https://docs.blockscout.com/api-reference/get-transaction-internal-transactions
openapi.yaml get /transactions/{transaction_hash}/internal-transactions
# get transaction logs
Source: https://docs.blockscout.com/api-reference/get-transaction-logs
openapi.yaml get /transactions/{transaction_hash}/logs
# get transaction raw trace
Source: https://docs.blockscout.com/api-reference/get-transaction-raw-trace
openapi.yaml get /transactions/{transaction_hash}/raw-trace
# get transaction state changes
Source: https://docs.blockscout.com/api-reference/get-transaction-state-changes
openapi.yaml get /transactions/{transaction_hash}/state-changes
# get transaction token transfers
Source: https://docs.blockscout.com/api-reference/get-transaction-token-transfers
openapi.yaml get /transactions/{transaction_hash}/token-transfers
# get transactions
Source: https://docs.blockscout.com/api-reference/get-transactions
openapi.yaml get /transactions
# get transactions chart
Source: https://docs.blockscout.com/api-reference/get-transactions-chart
openapi.yaml get /stats/charts/transactions
# get transfers count of NFT instance
Source: https://docs.blockscout.com/api-reference/get-transfers-count-of-nft-instance
openapi.yaml get /tokens/{address_hash}/instances/{id}/transfers-count
# get transfers of NFT instance
Source: https://docs.blockscout.com/api-reference/get-transfers-of-nft-instance
openapi.yaml get /tokens/{address_hash}/instances/{id}/transfers
# get verified smart contracts
Source: https://docs.blockscout.com/api-reference/get-verified-smart-contracts
openapi.yaml get /smart-contracts
# get verified smart contracts counters
Source: https://docs.blockscout.com/api-reference/get-verified-smart-contracts-counters
openapi.yaml get /smart-contracts/counters
# get withdrawals
Source: https://docs.blockscout.com/api-reference/get-withdrawals
openapi.yaml get /withdrawals
# Delete adminapiv1offers secrets
Source: https://docs.blockscout.com/api-reference/pointsadminservice/delete-adminapiv1offers-secrets
merits-admin-service.yaml delete /admin/api/v1/offers/{offer_id}/secrets/{secret_id}
# Get adminapiv1codes
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1codes
merits-admin-service.yaml get /admin/api/v1/codes
# Get adminapiv1distributions
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1distributions
merits-admin-service.yaml get /admin/api/v1/distributions/{distribution_id}
# Get adminapiv1networks
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1networks
merits-admin-service.yaml get /admin/api/v1/networks
# Get adminapiv1networks 1
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1networks-1
merits-admin-service.yaml get /admin/api/v1/networks/{chain_id}
# Get adminapiv1offers redemptions
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1offers-redemptions
merits-admin-service.yaml get /admin/api/v1/offers/{offer_id}/redemptions
# Get adminapiv1offers secrets
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1offers-secrets
merits-admin-service.yaml get /admin/api/v1/offers/{offer_id}/secrets
# Get adminapiv1users
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1users
merits-admin-service.yaml get /admin/api/v1/users
# Get adminapiv1users 1
Source: https://docs.blockscout.com/api-reference/pointsadminservice/get-adminapiv1users-1
merits-admin-service.yaml get /admin/api/v1/users/{address_or_code}
# Patch adminapiv1codes
Source: https://docs.blockscout.com/api-reference/pointsadminservice/patch-adminapiv1codes
merits-admin-service.yaml patch /admin/api/v1/codes
# Patch adminapiv1networks
Source: https://docs.blockscout.com/api-reference/pointsadminservice/patch-adminapiv1networks
merits-admin-service.yaml patch /admin/api/v1/networks/{chain_id}
# Patch adminapiv1offers
Source: https://docs.blockscout.com/api-reference/pointsadminservice/patch-adminapiv1offers
merits-admin-service.yaml patch /admin/api/v1/offers/{offer_id}
# Post adminapiv1codes
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1codes
merits-admin-service.yaml post /admin/api/v1/codes
# Post adminapiv1distribute
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1distribute
merits-admin-service.yaml post /admin/api/v1/distribute
# Post adminapiv1networks
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1networks
merits-admin-service.yaml post /admin/api/v1/networks/{chain_id}
# Post adminapiv1offers
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1offers
merits-admin-service.yaml post /admin/api/v1/offers/{offer_id}
# Post adminapiv1offers secrets
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1offers-secrets
merits-admin-service.yaml post /admin/api/v1/offers/{offer_id}/secrets
# Post adminapiv1users code
Source: https://docs.blockscout.com/api-reference/pointsadminservice/post-adminapiv1users-code
merits-admin-service.yaml post /admin/api/v1/users/{address}/code
# re-fetch token instance metadata
Source: https://docs.blockscout.com/api-reference/re-fetch-token-instance-metadata
openapi.yaml patch /tokens/{address_hash}/instances/{id}/refetch-metadata
# search
Source: https://docs.blockscout.com/api-reference/search
openapi.yaml get /search
# search redirect
Source: https://docs.blockscout.com/api-reference/search-redirect
openapi.yaml get /search/check-redirect
# token balances with filtering and pagination
Source: https://docs.blockscout.com/api-reference/token-balances-with-filtering-and-pagination
openapi.yaml get /addresses/{address_hash}/tokens
# Blockscout APIs
Source: https://docs.blockscout.com/devs/apis
How to use Blockscout APIs
## Blockscout API Usage
API information can be accessed from the Blockscout main menu, footer or header depending on the instance.
Blockscout supports several methods:
1. [**REST API**](/devs/apis/rest): API that serves the UI for Blockscout.
2. [**RPC API**](/devs/apis/rpc): provided for developers transitioning applications from Etherscan to Blockscout. Supports GET and POST requests, simply replace Etherscan url with Blockscout url to use the RPC.
3. [**Eth RPC API**](/devs/apis/rpc/eth-rpc): Supports the most popular [JSON RPC methods](https://ethereum.github.io/execution-apis/api-documentation/).
4. [**Graphiql**](https://github.com/graphql/graphiql): An IDE for exploring GraphQL.
## API Keys
* More info on [My Account and adding API Keys](/using-blockscout/my-account/api-keys)
* More info on [API Requests and Limits](/devs/apis/requests-and-limits)
Blockscout provides swagger documentation for various API services here: [https://blockscout.github.io/swaggers/](https://blockscout.github.io/swaggers/)
## Blockscout Internal Documentation
To view Modules and API Reference documentation:
1. Generate documentation.
`mix docs`
2. View the generated docs.
`open doc/index.html`
# Blockscout APIs
Source: https://docs.blockscout.com/devs/apis-redirect
# GraphQL in Blockscout
Source: https://docs.blockscout.com/devs/apis/graphql
## **What is GraphQL**
GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. It provides an efficient, powerful and flexible approach to developing web APIs. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned.
Key concepts of the GraphQL query language are:
* Hierarchical
* Strongly typed
* Client-specified queries
Advantages of GraphQL:
* Declarative integration on client (what data/operations do I need)
* A standard way to expose data and operations
* Support for real-time data (with subscriptions)
## **Query types**
There are three main query types in GraphQL schema:
1\) **Query:** fetch data
```
query {
allPosts {
description
text
}
}
```
2\) **Mutation:** change data.
```javascript theme={null}
mutation {
updatePost(id: 1, text: "text") {
text
}
}
```
1. **Subscription:** subscribe to real-time data.
```javascript theme={null}
subscription {
newPost(category: [1]) {
description
text
}
}
```
## **Access GraphQL API**
To access Blockscout GraphQL interface you can use GraphiQL - in-browser IDE for exploring GraphQL. It's built in to Blockscout. From the `APIs` dropdown menu choose `GraphQL.`
You can also use your favorite http client:
```sh theme={null}
curl 'https://eth-sepolia.blockscout.com/graphiql'
-H 'Authorization: Bearer YOUR_AUTH_TOKEN'
-d '{"query":""{transaction(hash:\"0x4f3a80620613d18a5073108f56558c7cbf0020c8ccb1acbad2c1f1fe3714e5ce\"){blockNumbertoAddressHashfromAddressHashcreatedContractAddressHashvaluestatusnoncehasherrorgasgasPricegasUsedcumulativeGasUsedidindexinputrsv}}""}'
```
## **Queries**
Blockscout's GraphQL API provides queries and a subscription. You can view them in the GraphQL interface in the `Docs` menu. Example Queries:
| Query | Description | Example |
| ----------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| address(hash: AddressHash!): Address | Gets an address by hash | \{address(hash: "0x1fddEc96688e0538A316C64dcFd211c491ECf0d8") \{hash, contractCode} } |
| addresses (hashes: \[AddressHash!]): \[Address] | Gets addresses by hashes | \{addresses(hashes: \["0x1fddEc96688e0538A316C64dcFd211c491ECf0d8", "0x3948c17c0f45017064858b8352580267a85a762c"]) \{hash, contractCode} } |
| block(number: Int!): Block | Gets a block by number | \{block(number: 1) \{parentHash, size, nonce}} |
| transaction (hash: FullHash!): Transaction | Gets a transaction by hash. | \{transaction(hash: "0xc391da8f433b3bea0b3eb45da40fdd194c7a0e07d1b5ad656bf98940f80a6cf6") \{input, gasUsed}} |
### Example Query to retrieve transactions for a specific address
```javascript theme={null}
{
address(hash: "0x...") {
transactions(first:5) {
edges {
node {
blockNumber
createdContractAddressHash
fromAddressHash
gas
hash
}
}
}
}
}
```
Note that transactions can accept the following arguments:
* first
* after
* before
# Requests & Limits
Source: https://docs.blockscout.com/devs/apis/requests-and-limits
API variables and info
* Please note this table scrolls horizontally
* Default API rate limit is 5 requests per second without an API key
| **Type of API key** | **Rate limitvalue, req/sec** | **API key is defined by env variable (if applicable)** | **Rate limit for the API key managed by env variable** | **Description** |
| -------------------------------- | ---------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No API key (by IP) | 5 | | `API_RATE_LIMIT_BY_IP` & `API_RATE_LIMIT_BY_IP_TIME_INTERVAL` | The default rate limit is 300 requests per minute. This limit applies to all requests that are not from whitelisted addresses and do not use an API key. |
| Temp token | 5 | | `API_RATE_LIMIT_UI_V2_WITH_TOKEN` & `API_RATE_LIMIT_UI_V2_WITH_TOKEN_TIME_INTERVAL` | When frontend user reaches the default IP limit, they must solve a captcha to obtain a temporary token. This token provides a personal (not per-IP) rate limit of 5 req/sec. Token TTL is configured via `API_RATE_LIMIT_UI_V2_TOKEN_TTL` |
| Individual API key | 10 | | `API_RATE_LIMIT_BY_ACCOUNT_API_KEY_TIME_INTERVAL` | An API key can be [created by the user in the My Account section](/using-blockscout/my-account/api-keys) |
| Rate limit, if IP is whitelisted | 25 | `API_RATE_LIMIT_WHITELISTED_IPS` | `API_RATE_LIMIT_BY_WHITELISTED_IP` & `API_RATE_LIMIT_BY_WHITELISTED_IP_TIME_INTERVAL` | Rate limit for requests from whitelisted IPs |
| Per explorer instance API key | 10 | `API_RATE_LIMIT_STATIC_API_KEY` | `API_RATE_LIMIT_BY_KEY` & `API_RATE_LIMIT_BY_KEY_TIME_INTERVAL` | A per-instance API key (*this feature was created before individual API keys existed and may have limited utility*) |
| No rate limit API key | βΎοΈ | `API_NO_RATE_LIMIT_API_KEY` | | Administrator API key |
The default rate limit config of each API endpoint is described [in the codebase](https://github.com/blockscout/blockscout/blob/master/apps/block_scout_web/priv/rate_limit_config.json) and can be re-defined via `API_RATE_LIMIT_CONFIG_URL` env variable. [Here](https://github.com/blockscout/blockscout/blob/master/apps/block_scout_web/rate_limits.md) you can find details on the rate limits config.
Some of the API endpoints have their own rate limit before showing captcha to the user:
| **API endpoint** | **Number of requests per period** | **Period** |
| -------------------------------------------------------- | --------------------------------- | ---------- |
| `api/v2/key` | βΎοΈ | |
| `api/v2/import/token-info` | βΎοΈ | |
| `api/v2/import/smart-contracts/:param` | βΎοΈ | |
| `api/account/v2/authenticate_via_wallet` | 1 | 1 hour |
| `api/account/v2/send_otp` | 1 | 1 hour |
| `api/v2/tokens/:param/instances/:param/refetch-metadata` | 50 | 1 hour |
| `api/v2/advanced-filters/csv` | 50 | 1 hour |
| `api/v2/tokens/:param/holders/csv` | 50 | 1 hour |
| `api/v2/addresses/:param/transactions/csv` | 50 | 1 hour |
| `api/v2/addresses/:param/token-transfers/csv` | 50 | 1 hour |
| `api/v2/addresses/:param/internal-transactions/csv` | 50 | 1 hour |
| `api/v2/addresses/:param/logs/csv` | 50 | 1 hour |
| `api/v2/addresses/:param/election-rewards/csv` | 50 | 1 hour |
| `api/v2/smart-contracts/:param/audit-reports` | 50 | 1 hour |
| `api/health/*` | 5 | 1 second |
# REST API Endpoints
Source: https://docs.blockscout.com/devs/apis/rest
REST API methods are used to render the UI for new versions of Blockscout. These can be accessed and used to get many types of information. Methods parameters and schemas are available at *https\://instance-name/api-docs* (ie [https://eth.blockscout.com/api-docs](https://eth.blockscout.com/api-docs))
Additional information:
* [Stats queries](/devs/apis/rest/stats-api): Access pre-calculated statistics for a chain
* [Interpreter queries](/devs/apis/rest/interpreter-api): Transactions populated with contract names, methods, etc for easy interpretation
## Pagination
Blockscout uses the keyset pagination method to quickly return results. By default an API response returns the first 50 results. To access additional results (in groups of 50), add the `next_page_params` to your query.
For example, open [https://eth.blockscout.com/api/v2/transactions](https://eth.blockscout.com/api/v2/transactions) and scroll to the bottom of the response.
You will see the `next_page_params` object. Add the parameters from this object to your next query to receive the next 50 results.
[https://eth.blockscout.com/api/v2/transactions?block\_number=18678766\&index=119\&items\_count=50](https://eth.blockscout.com/api/v2/transactions?block_number=18678766\&index=119\&items_count=50)
Repeat this process to continue receiving results in groups of 50 (remove params and substitute the new `next_page_params` found in the body of the query).
In this example, the query to receive the next 50 results would be:
[https://eth.blockscout.com/api/v2/transactions?block\_number=18678766\&index=69\&items\_count=100](https://eth.blockscout.com/api/v2/transactions?block_number=18678766\&index=69\&items_count=100)
# Interpreter API
Source: https://docs.blockscout.com/devs/apis/rest/interpreter-api
### [https://eth.blockscout.com/api/v2/transactions/transaction\_hash/summary](https://eth.blockscout.com/api/v2/transactions/transaction_hash/summary)
The Interpreter API is currently in development. This REST API service will provide human-readable information regarding transactions, addresses and more.
## How It Works
The Transactions Interpreter Service is designed to process blockchain transactions by extracting and analyzing relevant information to generate a summary of the transaction. The process follows several distinct phases:
1. **Transaction Hash Reception** : The service receives a transaction hash, which triggers the processing pipeline.
2. **Data Retrieval** : The service automatically retrieves necessary transaction data from the blockchain using the provided transaction hash.
3. **Initial Validation** : The input data undergoes validation to ensure authenticity and correctness before further processing.
4. **Data Processing** : The retrieved transaction data is processed, involving multiple phases:
1. **Pre-LLM Phase** : During this phase, the service attempts to classify and interpret the on-chain actions using predefined algorithms. This step includes determining the type of action (e.g., transfer, minting, etc.) based on the transaction data.
2. **LLM Phase** : If the type of action cannot be determined algorithmically in the Pre-LLM phase, the service leverages a Language Learning Model (LLM) to infer the type of on-chain action.
5. **Transaction Summary Generation** : After the classification, the service generates a summary of the transaction, which is returned as the response. The summary includes key details about the transaction and is structured according to a specific template.
## Response Structure
The response from the Transactions Interpreter Service is structured as follows (will vary depending on the specific case):
### **Success Response**
```json theme={null}
{
"success": true,
"data": {
"summaries": [
{
"summary_template": "{action_type} {amount} {token} to {to_address}",
"summary_template_variables": {
"action_type": {
"type": "string",
"value": "Transfer"
},
"amount": {
"type": "currency",
"value": "7800"
},
"token": {
"type": "token",
"value": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"circulating_market_cap": "34593435047.40006",
"decimals": "6",
"exchange_rate": "1.001",
"holders": "2761518",
"icon_url": "",
"name": "USD Coin",
"symbol": "USDC",
"total_supply": "25611927821576420",
"type": "ERC-20",
"volume_24h": "8858197053.476923"
}
},
"to_address": {
"type": "address",
"value": {
"hash": "0x242ba6d68FfEb4a098B591B32d370F973FF882B7"
}
}
}
}
],
"debug_data": {
"transaction_hash": "0xea7cbead745789346343435cf2a0910887ab0ebef08af07cbd2f0920a2c628da",
"model_classification_type": "transfer",
"post_llm_classification_type": "transfer",
"is_prompt_truncated": false,
"summary_template": {
"transfer": {
"template_name": "Generic-Transfer",
"template_vars": {
"strippedInput": "",
"decodedInput": "",
"tokenTransfers": [],
"isErc20Transfer": true,
"erc20Amount": "7800",
"isNftTransfer": false,
"token": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"circulating_market_cap": "34593435047.40006",
"decimals": "6",
"exchange_rate": "1.001",
"holders": "2761518",
"icon_url": "",
"name": "USD Coin",
"symbol": "USDC",
"total_supply": "25611927821576420",
"type": "ERC-20",
"volume_24h": "8858197053.476923"
},
"nftAmount": null,
"toAddress": {
"hash": "0x242ba6d68FfEb4a098B591B32d370F973FF882B7"
}
}
}
}
}
}
}
```
### **Response Variable Types**
The response from the service can contain the following types of data:
* `number`: Numerical values.
* `string`: Textual data.
* `array`: An array of items.
* `currency`: Represents a monetary value.
* `token`: Information related to a cryptocurrency or token.
* `address`: Blockchain address information.
* `timestamp`: A date and time representation.
* `domain`: Domain name data.
* `code`: Code snippets or encoded data.
These types are used to ensure that the data returned in the summary is consistent and properly structured.
## Error Handling
If the service encounters an error, it returns a structured error response:
* **Error Response**:
```json theme={null}
{
"success": false,
"error": {
"id": "v_ap_rd_1",
"code": "INVALID_API_PARAMS",
"message": "Invalid API parameters",
"error_data": [
{
"parameter": "data",
"message": "Invalid parameter data. Please ensure the input is well formed."
}
]
}
}
```
### **Attributes of the Error Object**
* `id`: A unique identifier for the error, used for debugging purposes.
* `code`: A code representing the type of error.
* `message`: A user-friendly message that can be displayed on the front end.
* `error_data`: An array containing details about the invalid parameters.
# Stats API
Source: https://docs.blockscout.com/devs/apis/rest/stats-api
The [stats microservice](https://github.com/blockscout/blockscout-rs/tree/main/stats) collects data from a Blockscout instance and calculates statistics based on predefined values. The calculated data is available through a REST API, providing access to this statistical information.
*Endpoint info in process*
# JSON RPC & ETH Compatible RPC Endpoints
Source: https://docs.blockscout.com/devs/apis/rpc
API designed for ease of use
This API is provided for developers transitioning applications from Etherscan to BlockScout and applications requiring general API and data support. It supports GET and POST requests.
URLs vary by instance. With typical installations, access the API by adding `/api` to the end of the url. For example with the Sepolia instance.
* URL: [https://eth-sepolia.blockscout.com](https://eth-sepolia.blockscout.com/)
* API URL: [https://eth-sepolia.blockscout.com/api](https://eth-sepolia.blockscout.com/api)
An example query includes a module and action(s)/parameters. For example: [https://eth-sepolia.blockscout.com/api?module=**account**\&action=**listaccounts**\&page=2\&offset=5](https://eth-sepolia.blockscout.com/api?module=account\&action=listaccounts\&page=2\&offset=5)
The following modules are supported. Click through to see specific endpoints and parameters.
| | |
| ----------------------------------------- | --------------------- |
| [Account](/devs/apis/rpc/account) | `?module=account` |
| [Logs](/devs/apis/rpc/logs) | `?module=logs` |
| [Token](/devs/apis/rpc/token) | `?module=token` |
| [Stats](/devs/apis/rpc/stats) | `?module=stats` |
| [Block](/devs/apis/rpc/block) | `?module=block` |
| [Contract](/devs/apis/rpc/contract) | `?module=contract` |
| [Transaction](/devs/apis/rpc/transaction) | `?module=transaction` |
# Account
Source: https://docs.blockscout.com/devs/apis/rpc/account
?module=account
### `https://instance_base_url/api?module=account`
## Return balance from a provided block
`eth_get_balance`
Mimics Ethereum JSON RPC's eth\_getBalance
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=eth_get_balance
&address={addressHash}
```
| Parameter | Description |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **address** | `string` containing the address hash. |
| block | optional. Block number as a string, or `latest`, `earliest` or `pending` Latest is the latest balance in a *consensus* block. Earliest is the first recorded balance for the address. Pending is the latest balance in a consensus *or* nonconsensus block. |
```json theme={null}
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x0234c8a3397aab58"
}
```
## Get the native token balance for an address
`balance`
Many chains use their own native tokens. On Ethereum, this will return the result in "Ether", on Gnosis it will be "xDai", etc. Results are returned in wei.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=balance
&address={addressHash}
```
| Parameter | Description |
| ----------- | ------------------------------------- |
| **address** | `string` containing the address hash. |
```json theme={null}
{
"message": "OK",
"result": "663046792267785498951364",
"status": "1"
}
```
Also available through a GraphQL `address` query.
If the balance hasn't been updated recently, the node is double-checked to fetch the absolute latest balance. This will not be reflected in the current request, but once it is updated, subsequent requests will show the updated balance. If you want to know if there is a check for another balance, use the `balancemulti` action. That contains a property called `stale` that will let you know to recheck that balance in the near future.
## Get balance for multiple addresses
`balancemulti`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=balancemulti
&address={addressHash1,addressHash2,addressHash3}
```
| Parameter | Description |
| ----------- | ---------------------------------------------------------------------------- |
| **address** | `string` containing the address hash, comma separated. **Max 20 addresses.** |
```json theme={null}
{
"message": "OK",
"result": [
{
"account": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance": "40807168566070000000000",
"stale": true
},
{
"account": "0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance": "332567136222827062478",
"stale": false
},
{
"account": "0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance": "185178830000000000",
"stale": false
}
],
"status": "1"
}
```
Also available through a GraphQL 'addresses' query
If the balance hasn't been updated in a long time, the node is double checked to fetch the absolute latest balance. This is not reflected in the current request, but once it is updated, subsequent requests will show the updated balance. The `stale` attribute will be set to `true` if a new balance is being fetched.
## Get pending transactions by address
`pendingtxlist`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=pendingtxlist
&address={addressHash}
&page=1
&offset=5
```
| Parameter | Description |
| ----------- | ------------------------------------------------------------------------------------------------------- |
| **address** | `string` containing the address hash. |
| page | optional `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"contractAddress": "",
"cumulativeGasUsed": "122207",
"from": "0x3fb1cd2cd96c6d5c0b5eb3322d807b34482481d4",
"gas": "122261",
"gasPrice": "50000000000",
"gasUsed": "122207",
"hash": "0x98beb27135aa0a25650557005ad962919d6a278c4b3dde7f4f6a3a1e65aa746c",
"input": "0xf00d4b5d000000000000000000000000036c8cecce8d8bbf0831d840d7f29c9e3ddefa63000000000000000000000000c5a96db085dda36ffbe390f455315d30d6d3dc52",
"nonce": "0",
"to": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
"value": "0"
}
],
"status": "1"
}
```
## Get transactions by address
`txlist`
Maximum of 10,000 transactions. Also available through a GraphQL 'address' query. For faster results, specify a smaller block range to search using the `startblock` and `endblock` parameters
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=txlist
&address={addressHash}
&startblock=555555
&endblock=666666
&page=1
&offset=5
&sort=asc
```
| Parameter | Description |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **address** | `string` containing the address hash. |
| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
| startblock | optional `integer` block number to start transaction search |
| endblock | optional `integer` block number to stop transaction search. |
| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
| filter\_by | optional string representing the field to filter by. Values include `to` and `from`. If none provided returns transactions that match to, from, or contract address. |
| start\_timestamp | optional starting block unix timestamp. |
| end\_timestamp | optional ending block unix timestamp. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockHash": "0x373d339e45a701447367d7b9c7cef84aab79c2b2714271b908cda0ab3ad0849b",
"blockNumber": "65204",
"confirmations": "5994246",
"contractAddress": "",
"cumulativeGasUsed": "122207",
"from": "0x3fb1cd2cd96c6d5c0b5eb3322d807b34482481d4",
"gas": "122261",
"gasPrice": "50000000000",
"gasUsed": "122207",
"hash": "0x98beb27135aa0a25650557005ad962919d6a278c4b3dde7f4f6a3a1e65aa746c",
"input": "0xf00d4b5d000000000000000000000000036c8cecce8d8bbf0831d840d7f29c9e3ddefa63000000000000000000000000c5a96db085dda36ffbe390f455315d30d6d3dc52",
"isError": "0",
"methodId": "0xf00d4b5d",
"nonce": "0",
"timeStamp": "1439232889",
"to": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
"transactionIndex": "0",
"txreceipt_status": "1",
"value": "0"
}
],
"status": "1"
}
```
## Get internal transactions
`txlistinternal`
Up to a maximum of 10,000 internal transactions. Also available through a GraphQL 'transaction' query. For faster results, specify a smaller block range to search using the start\_block and end\_block parameters.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=txlistinternal
&startblock=555555
&endblock=666666
&page=1
&offset=5
&sort=asc
&include_zero_value=true
```
| Parameter | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **txhash** | optional `string` representing the transaction hash to check for internal transactions |
| address | optional `string` containing the address hash. |
| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. **Only available if 'address' is provided.** |
| startblock | optional `integer` block number to start transaction search. **Only available if 'address' is provided.** |
| endblock | optional `integer` block number to stop transaction search. **Only available if 'address' is provided.** |
| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. **Only available if 'address' is provided.** |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. **Only available if 'address' is provided.** |
| include\_zero\_value | optional `boolean` representing whether to include zero-value transactions. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockNumber": "6153702",
"callType": "delegatecall",
"contractAddress": "0x883103875d905c11f9ac7dacbfc16deb39655361",
"errCode": "",
"from": "0x2ca1e3f250f56f1761b9a52bc42db53986085eff",
"gas": "814937",
"gasUsed": "536262",
"index": "0",
"input": "",
"isError": "0",
"timeStamp": "1534362606",
"to": "",
"transactionHash": "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb",
"type": "call",
"value": "5488334153118633"
}
],
"status": "1"
}
```
## Get ERC-20 token transfer events by address
`tokentx`
Up to a maximum of 10,000 ERC-20 token transfer events. Also available through the GraphQL `token_transfers` query.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=tokentx
&address={addressHash}
&page=1
&offset=10
&sort=asc
```
| Parameter | Description |
| ---------------- | ---------------------------------------------------------------------------------------------------------------- |
| **address** | required if no `contractaddress` parameter is provided, `string` containing the address hash. |
| contract address | required if no `address` parameter is provided, `string` with the token contract address to identify a contract. |
| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
| startblock | optional `integer` block number to start transaction search |
| endblock | optional `integer` block number to stop transaction search. |
| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockHash": "0x6169c5dc05d0051564ba3eae8ebfbdefda640c5f5ffc095846b8aed0b44f64ea",
"blockNumber": "5997843",
"confirmations": "199384",
"contractAddress": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"cumulativeGasUsed": "1043649",
"from": "0x4e83362442b8d1bec281594cea3050c8eb01311c",
"gas": "44758",
"gasPrice": "7000000000",
"gasUsed": "37298",
"hash": "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb",
"input": "0xa9059cbb00000000000000000000000021e21ba085289f81a86921de890eed30f1ad23750000000000000000000000000000000000000000000000008ac7230489e80000",
"methodId": "0xa9059cbb",
"nonce": "765",
"timeStamp": "1532086946",
"to": "0x21e21ba085289f81a86921de890eed30f1ad2375",
"tokenDecimal": "18",
"tokenName": "Maker",
"tokenSymbol": "MKR",
"transactionIndex": "27",
"value": "10000000000000000000"
}
],
"status": "1"
}
```
**Usage:**
* To fetch ERC-20 token transfers by address, specify `address` parameter
* To fetch ERC-20 token transfers by token, specify `contractaddress` parameter
* To fetch ERC-20 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
## Get ERC-721 token transfer events by address
`tokennfttx`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=tokennfttx
&address={addressHash}
&page=1
&offset=10
&sort=asc
```
| Parameter | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
| **address** | required if no `contractaddress` parameter is provided, `string` containing the address hash. |
| contractaddress | required if no `address` parameter is provided, `string` with the token contract address to identify a contract. |
| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
| startblock | optional `integer` block number to start transaction search |
| endblock | optional `integer` block number to stop transaction search. |
| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockHash": "0xd033832ffd0480a3e3b16362320d4ea247e6905117eaa8741a845ac51bd51b1f",
"blockNumber": "22895463",
"confirmations": "13",
"contractAddress": "0xb6bcaa0c71c90b26f4190418d77ad0b95f656f2c",
"cumulativeGasUsed": "23511347",
"from": "0xc8fb7aca6b31dc905647d31ac0383f5b30d9be31",
"functionName": "transferFrom(address from, address to, uint256 id)",
"gas": "108139",
"gasPrice": "5596263013",
"gasUsed": "71227",
"hash": "0x76be4925c1a5f268c12a3ae7b60486293a96ebd28dc289064ca687708de46397",
"input": "0x23b872dd000000000000000000000000c8fb7aca6b31dc905647d31ac0383f5b30d9be31000000000000000000000000d2a999bc8e4ea85131c1800e2a5c606d127533330000000000000000000000000000000000000000000000000000000000000445",
"methodId": "0x23b872dd",
"nonce": "376",
"timeStamp": "1752231191",
"to": "0xd2a999bc8e4ea85131c1800e2a5c606d12753333",
"tokenDecimal": "0",
"tokenID": "1093",
"tokenName": "SpaceRush Bounty Hunters",
"tokenSymbol": "SRB",
"transactionIndex": "360"
}
],
"status": "1"
}
```
**Usage:**
* To fetch ERC-721 token transfers by address, specify `address` parameter
* To fetch ERC-721 token transfers by token, specify `contractaddress` parameter
* To fetch ERC-721 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
## Get ERC-1155 token transfer events by address
`token1155tx`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=token1155tx
&address={addressHash}
&page=1
&offset=10
&sort=asc
```
| Parameter | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
| address | required if no `contractaddress` parameter is provided, `string` containing the address hash. |
| contractaddress | required if no `address` parameter is provided, `string` with the token contract address to identify a contract. |
| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
| startblock | optional `integer` block number to start transaction search |
| endblock | optional `integer` block number to stop transaction search. |
| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockNumber": "22767293",
"timeStamp": "1750683671",
"hash": "0xe63f23bc2882dc083cf77c3a9a32efe62a2f045334232c92ed63716368eb56c9",
"nonce": "332",
"blockHash": "0x5960ef1fb1a3f424a90723238cf5d91a996cb7344f9ff613f00942ea4f7bcf31",
"transactionIndex": "52",
"gas": "198549",
"gasPrice": "3662960410",
"gasUsed": "150369",
"cumulativeGasUsed": "8276535",
"input": "deprecated",
"methodId": "0xa64dfa75",
"functionName": "multiConfigure(address token,tuple config)",
"contractAddress": "0x81d5cedef14934957232e6673e1b37375e6ec5cd",
"from": "0x0000000000000000000000000000000000000000",
"to": "0xa6718ebedb87b85acfb39d8a02759f1be7cb01ed",
"tokenID": "43",
"tokenValue": "1",
"tokenName": "Colored rombs",
"tokenSymbol": "CR",
"confirmations": "128226"
}
],
"status": "1"
}
```
**Usage:**
* To fetch ERC-1155 token transfers by address, specify `address` parameter
* To fetch ERC-1155 token transfers by token, specify `contractaddress` parameter
* To fetch ERC-1155 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
## Get ERC-404 token transfer events by address
`token404tx`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=token404tx
&address={addressHash}
&page=1
&offset=10
&sort=asc
```
| Parameter | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
| address | required if no `contractaddress` parameter is provided, `string` containing the address hash. |
| contractaddress | required if no `address` parameter is provided, `string` with the token contract address to identify a contract. |
| sort | optionalsorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
| startblock | optional `integer` block number to start transaction search |
| endblock | optional `integer` block number to stop transaction search. |
| page | optional`integer` representing the page number used for pagination. `offset` must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
// ERC-20 like case
{
"blockHash": "0x600684206fd92aa22bf0d24e376fa0433bd7247178919e31d6c8c02a8a704e78",
"blockNumber": "22895119",
"confirmations": "532",
"contractAddress": "0x9e9fbde7c7a83c43913bddc8779158f1368f0413",
"cumulativeGasUsed": "2148253",
"from": "0x0d0707963952f2fba59dd06f2b425ace40b492fe",
"functionName": "transfer(address to, uint256 amount)",
"gas": "3000000",
"gasPrice": "4992772042",
"gasUsed": "202651",
"hash": "0x85eba6287c25630b0f2764954e15294937ef5a423727c2236223bfb6864d2c6f",
"input": "0xa9059cbb00000000000000000000000028e0e453997430fa2168c7efc1899a2c110e53b500000000000000000000000000000000000000000000000028536338c182e000",
"methodId": "0xa9059cbb",
"nonce": "8218148",
"timeStamp": "1752227039",
"to": "0x28e0e453997430fa2168c7efc1899a2c110e53b5",
"tokenDecimal": "0",
"tokenID": "",
"tokenName": "Pandora",
"tokenSymbol": "PANDORA",
"transactionIndex": "44",
"value": "2905775280000000000"
},
// ERC-721 like case
{
"blockHash": "0x600684206fd92aa22bf0d24e376fa0433bd7247178919e31d6c8c02a8a704e78",
"blockNumber": "22895119",
"confirmations": "532",
"contractAddress": "0x9e9fbde7c7a83c43913bddc8779158f1368f0413",
"cumulativeGasUsed": "2148253",
"from": "0x0000000000000000000000000000000000000000",
"functionName": "transfer(address to, uint256 amount)",
"gas": "3000000",
"gasPrice": "4992772042",
"gasUsed": "202651",
"hash": "0x85eba6287c25630b0f2764954e15294937ef5a423727c2236223bfb6864d2c6f",
"input": "0xa9059cbb00000000000000000000000028e0e453997430fa2168c7efc1899a2c110e53b500000000000000000000000000000000000000000000000028536338c182e000",
"methodId": "0xa9059cbb",
"nonce": "8218148",
"timeStamp": "1752227039",
"to": "0x28e0e453997430fa2168c7efc1899a2c110e53b5",
"tokenDecimal": "0",
"tokenID": "97956",
"tokenName": "Pandora",
"tokenSymbol": "PANDORA",
"transactionIndex": "44",
"value": ""
}
],
"status": "1"
}
```
**Usage:**
* To fetch ERC-404 token transfers by address, specify `address` parameter
* To fetch ERC-404 token transfers by token, specify `contractaddress` parameter
* To fetch ERC-404 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
## Get token account balance for token contract address
`tokenbalance`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=tokenbalance
&contractaddress={contractAddressHash}
&address={addressHash}
```
| Parameter | Description |
| -------------------- | --------------------------------------------------------------------- |
| **contract address** | `string` containing the contract address hash. |
| **address** | `string` containing the account address hash to retrieve balance for. |
```json theme={null}
{
"message": "OK",
"result": "135499",
"status": "1"
}
```
## Get list of tokens owned by address
`tokenlist`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=tokenlist
&address={addressHash}
```
| Parameter | Description |
| ----------- | --------------------------------------------- |
| **address** | `string` containing the account address hash. |
```json theme={null}
{
"message": "OK",
"result": [
{
"balance": "135499",
"contractAddress": "0x0000000000000000000000000000000000000000",
"decimals": "18",
"name": "Example Token",
"symbol": "ET",
"type": "ERC-20"
},
{
"balance": "1",
"contractAddress": "0x0000000000000000000000000000000000000001",
"decimals": "18",
"name": "Example ERC-721 Token",
"symbol": "ET7",
"type": "ERC-721"
}
],
"status": "1"
}
```
## Get list of blocks mined by address
`getminedblocks`
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=getminedblocks
&address={addressHash}
```
| Parameter | Description |
| ----------- | ------------------------------------------------------------------------------------------------------- |
| **address** | `string` containing the address hash. |
| page | optional `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"blockNumber": "3462296",
"blockReward": "5194770940000000000",
"timeStamp": "1491118514"
}
],
"status": "1"
}
```
## Get a list of accounts and their balances
`listaccounts`
Lists accounts and native balances, sorted ascending by the time they were first seen by the explorer.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=account
&action=listaccounts
&address={addressHash}
&page=1
&offset=3
```
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------------- |
| page | optional `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
If the balance hasn't been updated in a long time, the node is double checked to fetch the absolute latest balance. This is not reflected in the current request, but once it is updated, subsequent requests will show the updated balance. The `stale` attribute will be set to `true` if a new balance is being fetched.
```json theme={null}
{
"message": "OK",
"result": [
{
"address": "0x3870c57fbf1d7e49b154269331c7bc66c64d8857",
"balance": "3790064387342000000",
"stale": false
},
{
"address": "0x497d69ae30d7cca0aa84d647c6d85a59a82c16ef",
"balance": "2047176464264000000",
"stale": false
},
{
"address": "0x9233042b8e9e03d5dc6454bbbe5aee83818ff103",
"balance": "444111960222208758647",
"stale": false
}
],
"status": "1"
}
```
# Block
Source: https://docs.blockscout.com/devs/apis/rpc/block
?module=block
### `https://instance_base_url/api?module=block`
## Get block reward by block number
`getblockreward`
Returns the block reward and 'uncle' block rewards when applicable.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=block
&action=getblockreward
&blockno={blockNumber}
```
| Parameter | Description |
| --------- | --------------------------------------------------------------- |
| blockno | `integer` block number to check block rewards for eg. `2165403` |
```json theme={null}
{
"message": "OK",
"result": {
"blockMiner": "0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3",
"blockNumber": "2165403",
"blockReward": "5314181600000000000",
"timeStamp": "1472533979",
"uncleInclusionReward": null,
"uncles": null
},
"status": "1"
}
```
## Get estimated block countdown time by block number
`getblockcountdown`
Returns the estimated time remaining, in seconds, until a certain block is included in blockchain.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=block
&action=getblockcountdown
&blockno={blockNumber}
```
| Parameter | Description |
| --------- | --------------------------------------------------------------- |
| blockno | `integer` block number to check block rewards for eg. `2165403` |
```json theme={null}
{
"message": "OK",
"result": {
"CurrentBlock": "115334213",
"CountdownBlock": "116015880",
"RemainingBlock": "681667",
"EstimateTimeInSec": "1363349.0"
},
"status": "1"
}
```
## Get block number by time stamp
`getblocknobytime`
Returns the block number created closest to a provided timestamp.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=block
&action=getblocknobytime
×tamp={blockTimestamp}
&closest={before/after}
```
| Parameter | Description |
| --------- | -------------------------------------------------------------------- |
| timestamp | `integer` representing the Unix timestamp in seconds. |
| closest | closest block to the provided timestamp, either `before` or `after`. |
Note: [How to convert date/time to a Unix timestamp](https://www.unixtimestamp.com/).
```json theme={null}
{
"message":"OK",
"result":{
"blockNumber":"23592675"
},
"status":"1"
}
```
## Get the latest block number
`eth_block_number`
Mimics Ethereum JSON RPC's eth\_blockNumber.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=block
&action=eth_block_number
```
| Parameter | Description |
| --------- | --------------------------------------------------------------------- |
| id | optional nonnegative integer that represents the json rpc request id. |
More on [json rpc request id](https://www.jsonrpc.org/specification).
```json theme={null}
{
"jsonrpc": "2.0",
"result": "0x103538a",
"id": 1
}
```
# Contract
Source: https://docs.blockscout.com/devs/apis/rpc/contract
?module=contract
### `https://instance_base_url/api?module=contract`
## Get a list of contracts
`listcontracts`
List sorted in ascending order based on the time a contact was first indexed by the explorer. With filters \`unverified(2)\` the results will not be sorted for performance reasons.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=listcontracts
```
| Parameter | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| page | optional nonnegative `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional nonnegative `integer` representing the max number of records to return when paginating. 'page' must also be provided. |
| filter | optional string `verified`\|`unverified`\|`empty`, or `1`\|`2`\|`3` respectively. Returns contracts with the requested status. |
| verified\_at\_start\_timestamp | optional `unix timestamp` Represents the starting timestamp for verified contracts. Only used with `verified` filter. |
| verified\_at\_end\_timestamp | optional `unix timestamp` Represents the ending timestamp for verified contracts. Only used with `verified` filter. |
```json theme={null}
{
"message": "OK",
"result": [
{
"ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
"CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
"ContractName": "Test",
"OptimizationUsed": "1",
"SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
}
],
"status": "1"
}
```
## Get ABI for a verified contract
`getabi`
Also available through a GraphQL `addresses` query.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=getabi
&address={addressHash}
```
| Parameter | Description |
| ----------- | ------------------------------------- |
| **address** | `string` containing the address hash. |
```json theme={null}
{
"message": "OK",
"result": "[{\"constant\":false,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"is_expired\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"is_burnt\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"},{\"name\":\"_lifetime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]",
"status": "1"
}
```
## Get contract source code for a verified contract
`getsourcecode`
Also available through a GraphQL `addresses` query.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=getsourcecode
&address={addressHash}
```
| Parameter | Description |
| ----------- | ------------------------------------- |
| **address** | `string` containing the address hash. |
```json theme={null}
{
"message": "OK",
"result": {
"ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
"CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
"ContractName": "Test",
"FileName": "{sourcify path or empty}",
"ImplementationAddress": "0x000000000000000000000000000000000000000e",
"IsProxy": "true",
"OptimizationUsed": "1",
"SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
},
"status": "1"
}
```
## Get contract creator address hash and creation transaction hash
`getcontractcreation`
Returns contract creator and transaction hash. Up to 10 contracts at the one request
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=getcontractcreation
&contractaddresses={addressHash},{addressHash}
```
| Parameter | Description |
| --------------------- | ---------------------------------------------------- |
| **contractaddresses** | `string` containing address hashes, separated by `,` |
```json theme={null}
{
"message": "OK",
"result": [
{
"contractAddress": "0xdc2082945d55596bf39f362d9ec0f7f65edbb9dd",
"contractCreator": "0xbb36c792b9b45aaf8b848a1392b0d6559202729e",
"txHash": "0xe79426c9a5560cfbd78d0ef058e455c94483224ec265475583ff01ebdedceaf2"
},
{
"contractAddress": "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506",
"contractCreator": "0xf87bc5535602077d340806d71f805ea9907a843d",
"txHash": "0xe54bf38dfad760b8f96a76d8136d6540d74b02dafb5781746bf705bf7e647a3b"
}
],
"status": "1"
}
```
## Verify a contract with its source code and contract creation information
`verify`
**Example:**
```text theme={null}
https://instance_base_url/api
?module=contract
&action=verify
&addressHash={addressHash}
&name={name}
&compilerVersion={compilerVersion}
&optimization={false}
&contractSourceCode={contractSourceCode}
```
**Curl Post Example**
```sh theme={null}
curl -d '{"addressHash":"0xc63BB6555C90846afACaC08A0F0Aa5caFCB382a1","compilerVersion":"v0.5.4+commit.9549d8ff", "contractSourceCode":"pragma solidity ^0.5.4; contract Test { }","name":"Test","optimization":false}' -H "Content-Type: application/json" -X POST "https://blockscout.com/poa/sokol/api?module=contract&action=verify"
```
On successful submission you will receive a guid as a receipt. Use this with [`checkverifystatus`](/devs/apis/rpc/contract#return-status-of-a-verification-attempt)`to view verification status.`
| Parameter | Description |
| ------------------------------ | ----------------------------------------------------------------------------- |
| **addressHash** | `string` containing the address hash of the contract. |
| **name** | `string` containing the name of the contract. |
| **compilerVersion** | `string` containing the compiler version for the contract. |
| **optimization** | `enum` whether or not compiler optimizations were enabled `0`=false, `1`=true |
| **contractSourceCode** | `string` containing the source code of the contract. |
| constructorArguments | optional `string` constructor argument data provided. |
| autodetectConstructorArguments | optional `boolean` whether or not automatically detect constructor argument. |
| evmVersion | optional EVM version for the contract. |
| optimizationRuns | optional number of optimization runs used during compilation |
| library1Name | optional `string` name of the first library used. |
| library1Address | optional `string` address of the first library used. |
| library2Name | optional `string` name of the second library used. |
| library2Address | optional `string` address of the second library used. |
| library3Name | optional `string` name of the third library used. |
| library3Address | optional `string` address of the third library used. |
| library4Name | optional `string` name of the fourth library used. |
| library4Address | optional `string` address of the fourth library used. |
| library5Name | optional `string` name of the fifth library used. |
| library5Address | optional `string` address of the fifth library used. |
```json theme={null}
{
"message": "OK",
"result": {
"ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
"CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
"ContractName": "Test",
"ImplementationAddress": "0x000000000000000000000000000000000000000e",
"IsProxy": "true",
"OptimizationUsed": "1",
"SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
},
"status": "1"
}
```
## Verify a contract through [Sourcify](https://sourcify.dev/)
`verify_via_sourcify`
1. if a smart contract is already verified on Sourcify, it will automatically fetch the data from the [repo](https://repo.sourcify.dev/)
2. otherwise you need to upload source files and JSON metadata file(s).
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=verify_via_sourcify
&addressHash={addressHash}
```
#### POST body example
```text theme={null}
--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="addressHash"
0xb77b7443e0F32F1FEBf0BE0fBd7124D135d0a525
--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="files[0]"; filename="contract.sol"
Content-Type: application/json
...Source code...
--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="files[1]"; filename="metadata.json"
Content-Type: application/json
...JSON metadata...
--6e1e4c11657c62dc1e4349d024de9e28--
```
| Parameter | Description |
| --------------- | --------------------------------------- |
| **addressHash** | `string` containing the address hash. |
| files | `array` with sources and metadata files |
```json theme={null}
{
"message": "OK",
"result": {
"ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
"CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
"ContractName": "Test",
"ImplementationAddress": "0x000000000000000000000000000000000000000e",
"IsProxy": "true",
"OptimizationUsed": "1",
"SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
},
"status": "1"
}
```
## Verify a vyper contract with its source code and contract creation information
`verify_vyper_contract`
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=verify_vyper_contract
&addressHash={addressHash}
&name={name}
&compilerVersion={compilerVersion}
&contractSourceCode={contractSourceCode}
```
**curl POST example**
```powershell theme={null}
curl --location --request POST 'http://localhost:4000/api?module=contract&action=verify_vyper_contract' --form 'contractSourceCode="SOURCE_CODE"' --form 'name="Vyper_contract"' --form 'addressHash="0xE60B1B8bD493569a3E945be50A6c89d29a560Fa1"' --form 'compilerVersion="v0.2.12"'
```
| Parameter | Description |
| ---------------------- | ---------------------------------------------------------- |
| **addressHash** | `string` containing the address hash of the contract. |
| **name** | `string` containing the name of the contract. |
| **compilerVersion** | `string` containing the compiler version for the contract. |
| **contractSourceCode** | `string` containing the source code of the contract. |
| constructorArguments | `string` constructor argument data provided. |
```json theme={null}
{
"message": "OK",
"result": {
"ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
"CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
"ContractName": "Test",
"ImplementationAddress": "0x000000000000000000000000000000000000000e",
"IsProxy": "true",
"OptimizationUsed": "1",
"SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
},
"status": "1"
}
```
## Verify a contract with Standard input JSON file
`verifysourcecode`
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=verifysourcecode
&codeformat={solidity-standard-json-input}
&contractaddress={contractaddress}
&contractname={contractname}
&compilerversion={compilerversion}
&sourceCode={sourceCode}
```
`solidity-single-file`:
```sh theme={null}
curl --location 'localhost:4000/api?module=contract&action=verifysourcecode' \
--form 'contractaddress="0xDc2082945d55596bf39F362d9EC0F7F65eDBB9DD"' \
--form 'sourceCode="// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Storage {
uint256 number;
function store(uint256 num) public {
number = num;
}
function retrieve() public view returns (uint256){
return number;
}
}"' \
--form 'contractname="Storage"' \
--form 'codeformat="solidity-single-file"' \
--form 'compilerversion="v0.8.17+commit.8df45f5f"' \
--form 'optimizationUsed="1"' \
--form 'runs="199"' \
--form 'constructorArguements=""' \
--form 'evmversion="london"' \
--form 'libraryname1="qwe"' \
--form 'libraryaddress1="0xDc2082945d55596bf39F362d9EC0F7F65eDBB9DD"'
--form 'licenseType=0'
```
| Parameter | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **codeformat** | Format of sourceCode (`solidity-standard-json-input` or `solidity-single-file`) |
| **contractaddress** | `string` containing the address hash of the contract. |
| **contractname** | `string` name of the contract. It an be an empty string(""), just the contract name("ContractName"), or a filename and contract name("contracts/contract\_1.sol:ContractName") |
| **compilerversion** | `string` containing the compiler version for the contract. |
| **sourceCode** | `string` standard input json or flattened solidity code |
| optimizationUsed | could be `0`, `false`, `1`, `true`. Should be set when `codeformat=solidity-single-file` |
| runs | `integer` is equal to optimization runs number set on compilation. Should be set when `optimizationUsed` is `1` or `true` |
| evmversion | `string` EVM version. Should be set when `codeformat=solidity-single-file` |
| constructorArguments | optional `string` constructor argument data provided. |
| autodetectConstructorArguments | optional `boolean` whether or not automatically detect constructor argument. |
| licenseType | `string` or `number` representing the license type. |
**License type**
"See [available license types](/devs/verification/blockscout-smart-contract-verification-api)."
```json theme={null}
{
"message": "OK",
"result": "b080b96bd06ad1c9341c2afb7e3730311388544961acde94",
"status": "1"
}
```
## Return status of a verification attempt
`checkverifystatus`
guid is received as a receipt from the `verifysourcecode` method.
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=checkverifystatus
&guid={identifierString}
```
| Parameter | Description |
| --------- | ------------------------------------------------- |
| **guid** | `string`used for identifying verification attempt |
```json theme={null}
{
"message": "OK",
"result": "Pending in queue",
"status": "1"
}
```
Return Options: `Pending in queue` | `Pass - Verified` | `Fail - Unable to verify` | `Unknown UID`
## Verify proxy contract
`verifyproxycontract`
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=verifyproxycontract
&address={addressHash}
```
| Parameter | Description |
| ----------- | ---------------------------------------------------- |
| **address** | `string` containing the address hash of the contract |
```json theme={null}
{
"message": "OK",
"result": "c32d204404f33ff38fee42394f7e671fd96314b3658d466a",
"status": "1"
}
```
## Return status of a proxy contract verification attempt
`checkproxyverification`
guid is received as a receipt from the `verifyproxycontract` method.
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=contract
&action=checkproxyverification
&guid={identifierString}
```
| Parameter | Description |
| --------- | ------------------------------------------------- |
| **guid** | `string`used for identifying verification attempt |
```json theme={null}
{
"message": "OK",
"result": "Implementation (0x5a3f40fd57731bbf62a38fd290add074e9cdb844) was verified and saved for proxy (0xc32d204404f33ff38fee42394f7e671fd96314b3)",
"status": "1"
}
```
Return Options:
* `Verification in progress`
* `The proxy's ({addressHash}) implementation contract is found at {addressHash} and is successfully updated.`
* `A corresponding implementation contract was unfortunately not detected for the proxy address.`
* `Unknown UID`
# ETH RPC API
Source: https://docs.blockscout.com/devs/apis/rpc/eth-rpc
In addition to the custom [RPC endpoints documented here](/devs/apis/rpc), the Blockscout ETH RPC API supports most used methods in the exact format specified for Ethereum nodes, see the [Ethereum JSON-RPC Specification](https://ethereum.github.io/execution-apis/api-documentation/) for more details.
These methods are provided for your convenience and are most suitable as a fallback option in your JSON RPC API providers. For other use cases, REST or custom RPC methods are recommended.
The following methods are supported:
* eth\_blockNumber
* eth\_getBalance
* eth\_getLogs
* eth\_gasPrice
* eth\_getTransactionByHash
* eth\_getTransactionReceipt
* eth\_chainId
* eth\_maxPriorityFeePerGas
* eth\_getTransactionCount
* eth\_getCode
* eth\_getStorageAt
* eth\_estimateGas
* eth\_getBlockByNumber
* eth\_getBlockByHash
* eth\_sendRawTransaction
* eth\_call
In the following examples we use the Ethereum mainnet with the base instance url `https://eth.blockscout.com`. When sending a request add `/api/eth-rpc` to the end of the base url.
## eth\_blockNumber
Returns the latest block number in the chain in hexadecimal format. No params are needed. Type: POST
**Example**
```swift theme={null}
// Request
curl -H "content-type: application/json" -X POST --data '{"id":0,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}' https://eth.blockscout.com/api/eth-rpc
// Response
{
"jsonrpc": "2.0",
"result": "0xfa0b0e",
"id": 0
}
```
## eth\_getBalance
Returns the balance of a given address in wei. Note the `earliest` parameter does not work as expected because genesis block balances are not currently imported. Parameters are required.
**Required Parameters**
| | |
| ------------------------ | ----------------------------------------------------------------------------- |
| Type | POST |
| Data (string) | 20 Byte address to check balance |
| Quantity or Tag (string) | Integer value of a block number, or a tag "latest" for the most recent block. |
**Example**
```swift theme={null}
// Request
curl -H "content-type: application/json" -X POST --data '{"id":0,"jsonrpc":"2.0","method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","latest"]}' https://eth.blockscout.com/api/eth-rpc
// Response
{
"jsonrpc": "2.0",
"result": "0x1d863bf76508104fb", //34039260923474019579
"id": 0
}
```
## eth\_getLogs
Returns an array of logs matching a specified filter object. Params are optional based on data you want to receive. From more information, see this [post on eth\_getLogs](https://medium.com/alchemy-api/deep-dive-into-eth-getlogs-5faf6a66fd81).
Note: Never returns more than 1000 log entries. You can use pagination options to request the next page. Pagination options params: \{"logIndex": "3D", "blockNumber": "6423AC"} which include parameters from the last log received from the previous request. These three parameters are required for pagination.
**Parameters**
| | |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Type | POST |
| `address` (string, array) | 20Byte contract address or list of addresses to collect logs from. |
| `fromBlock` (Quantity/Tag) | Integer block number, `"latest"` (default) for the last mined block or `"pending"`, `"earliest"` for not yet mined transactions. |
| `toBlock` (Quantity/Tag) | Integer block number, `"latest"` |
# Logs
Source: https://docs.blockscout.com/devs/apis/rpc/logs
?module=logs
### `https://instance_base_url/api?module=logs`
## Get Event Logs by Address and/or Topic(s)
`getLogs`
Event logs for an address and topic. Use **and/or** with the topic operator to specify topic retrieval options when adding multiple topics. Up to a maximum of 1,000 event logs.
**Example:**
```javascript theme={null}
https://instance_base_url/api
?module=logs
&action=getLogs
&fromBlock=1379224
&toBlock=13792288
&address=0x33990122638b9132ca29c723bdf037f1a891a70c
&topic0=0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545
&topic1=0x72657075746174696f6e00000000000000000000000000000000000000000000
&topic0_1_opr=or
```
*\*=required field*
| Parameter | Description |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| fromBlock\* | `integer` block number to start searching for logs. `latest` is also supported |
| toBlock\* | `integer` block number to stop searching for logs. `latest` is also supported. *Note can be same as fromBlock if looking at logs for a single block* |
| address\* | `string` 160-bit code used for identifying contracts. An address and/or topic is required. |
| topic0\* | `string` for first required topic. |
| topic1 | `string` for 2nd optional topic. |
| topic2 | `string` for 3rd optional topic. |
| topic3 | `string` for 4th optional topic. |
| topic0\_1\_opr | operator when topic 0 and 1 are used. Either `and` or `or` |
| topic0\_2\_opr | operator for topic 0 and topic 2. Either `and` or `or` |
| topic0\_3\_opr | operator for topic 0 and topic 3. Either `and` or `or` |
| topic1\_2\_opr | operator for topic 1 and topic 2. Either `and` or `or` |
| topic1\_3\_opr | the topic operator for topic 1 and topic 3. Either `and` or `or` |
| topic2\_3\_opr | the topic operator for topic 2 and topic 3. Either `and` or `or` |
```json theme={null}
{
"message": "OK",
"result": [
{
"address": "0x33990122638b9132ca29c723bdf037f1a891a70c",
"blockNumber": "0x5c958",
"data": "0x",
"gasPrice": "0xba43b7400",
"gasUsed": "0x10682",
"logIndex": "0x",
"timeStamp": "0x561d688c",
"topics": [
"0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545",
"0x72657075746174696f6e00000000000000000000000000000000000000000000",
"0x000000000000000000000000d9b2f59f3b5c7b3c67047d2f03c3e8052470be92"
],
"transactionHash": "0x0b03498648ae2da924f961dda00dc6bb0a8df15519262b7e012b7d67f4bb7e83",
"transactionIndex": "0x"
}
],
"status": "1"
}
```
# Stats
Source: https://docs.blockscout.com/devs/apis/rpc/stats
?module=stats
### `https://instance_base_url/api?module=stats`
## Get [ERC-20](https://github.com/ethereum/EIPs/issues/20) or [ERC-721](https://github.com/ethereum/EIPs/issues/721) token total supply by contract address
`tokensupply`
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=stats
&action=tokensupply
&contractaddress={contractAddressHash}
```
| Parameter | Description |
| --------------- | ---------------------------------------------------------------------------------------------- |
| contractaddress | `string` containing the contract address hash - a 160-bit code used for identifying contracts. |
```json theme={null}
{
"message": "OK",
"result": "21265524714464",
"status": "1"
}
```
## Get total supply in Wei from exchange
`ethsupplyexchange`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
## Get total supply in Wei from DB
`ethsupply`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
## Get total coin supply from DB minus burnt number
`coinsupply`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
## Get latest price of native coin in USD and BTC
`ethprice`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
## Get latest price of native coin in USD and BTC in more general format
`coinprice`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
## Get total transaction fees in Wei paid by users to validators per day
`totalfees`
**Example:**
```javascript theme={null}
// Some code
```
| Parameter | Description |
| --------- | ----------- |
| param | description |
```javascript theme={null}
// Some code
```
# Token
Source: https://docs.blockscout.com/devs/apis/rpc/token
?module=token
### `https://instance_base_url/api?module=token`
## Get ERC-20 or ERC-721 token by contract address
`getToken`
Info on name, symbol, supply and type for a token contract address.
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=token
&action=getToken
&contractaddress={contractaddressHash}
```
| Parameter | Description |
| --------------- | ---------------------------------------------------------------------------------------------- |
| contractaddress | `string` containing the contract address hash - a 160-bit code used for identifying contracts. |
```json theme={null}
{
"message": "OK",
"result": {
"cataloged": true,
"contractAddress": "0x0000000000000000000000000000000000000000",
"decimals": "18",
"name": "Example Token",
"symbol": "ET",
"totalSupply": "1000000000",
"type": "ERC-20"
},
"status": "1"
}
```
## Get token holders by contract address
`getTokenHolders`
Returns an array of token holder's accounts and amounts held for a specified token contract address.
**Example**
```text theme={null}
https://instance_base_url/api
?module=token
&action=getTokenHolders
&contractaddress={contractaddressHash}
&page={integer}
&offset={integer}
```
| Parameter | Description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| contractaddress | `string` containing the contract address hash of the ERC-20/ERC-721 token |
| page | optional nonnegative `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional nonnegative `integer` representing the max number of records to return when paginating. 'page' must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"address": "0x3887e82dbdbe8ec6db44e6298a2d48af572a3b78",
"value": "153737849289497644937838"
},
{
"address": "0xc894c5de34cb2a3615c737d1276876e44e9700a3",
"value": "77247336418828547887499"
}
],
"status": "1"
}
```
## Get bridged tokens list
`bridgedTokenList`
Returns an array of bridged token information (uses native bridge application and only returns when applicable - depends on implementation).
**Example**
```text theme={null}
https://instance_base_url/api
?module=token
&action=bridgedTokenList
&chainid={chainid}
&page={integer}
&offset={integer}
```
| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------------------ |
| chainID | nonnegative `integer` that represents the chain id where the original token exists. |
| page | optional nonnegative `integer` representing the page number used for pagination. 'offset' must also be provided. |
| offset | optional nonnegative `integer` representing the max number of records to return when paginating. 'page' must also be provided. |
```json theme={null}
{
"message": "OK",
"result": [
{
"foreignChainId": "1",
"foreignTokenContractAddressHash": "0x0ae055097c6d159879521c384f1d2123d1f195e6",
"homeContractAddressHash": "0xb7d311e2eb55f2f68a9440da38e7989210b9a05e",
"homeDecimals": "18",
"homeHolderCount": 393,
"homeName": "STAKE on xDai",
"homeSymbol": "STAKE",
"homeTotalSupply": "1484374.775044204093387391",
"homeUsdValue": "18807028.39981006586321824397"
},
{
"foreignChainId": "1",
"foreignTokenContractAddressHash": "0xf5581dfefd8fb0e4aec526be659cfab1f8c781da",
"homeContractAddressHash": "0xd057604a14982fe8d88c5fc25aac3267ea142a08",
"homeDecimals": "18",
"homeHolderCount": 73,
"homeName": "HOPR Token on xDai",
"homeSymbol": "HOPR",
"homeTotalSupply": "26600449.86076749062791602",
"homeUsdValue": "6638727.472651464170990256943"
}
],
"status": "1"
}
```
# Transaction
Source: https://docs.blockscout.com/devs/apis/rpc/transaction
?module=transaction
### `https://instance_base_url/api?module=transaction`
## Get transaction info
`gettxinfo`
Information related to a specified transaction. Includes:
* blockNumber
* confirmations
* from
* gasLimit (in wei)
* gasPrice (in wei)
* gasUsed
* hash
* input
* logs (array)
* revert reason
* success
* timeStamp
* to
* value (in wei)
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=transaction
&action=gettxinfo
&txhash={transactionHash}
```
| Parameter | Description |
| --------- | --------------------------------------------------------------------------------- |
| txhash | `string` containing the transaction hash |
| index | optional nonnegative `integer` that represents the log index used for pagination. |
```json theme={null}
{
"result": {
"revertReason": "No credit of that type",
"blockNumber": "3",
"confirmations": "0",
"from": "0x000000000000000000000000000000000000000c",
"gasLimit": "91966",
"gasPrice": "100000",
"gasUsed": "95123",
"hash": "0x0000000000000000000000000000000000000000000000000000000000000004",
"input": "0x04",
"logs": [
{
"address": "0x000000000000000000000000000000000000000e",
"data": "0x00",
"topics": [
"First Topic",
"Second Topic",
"Third Topic",
"Fourth Topic"
]
}
],
"success": true,
"timeStamp": "1541018182",
"to": "0x000000000000000000000000000000000000000d",
"value": "67612"
},
"status": "1"
}
```
## Get transaction receipt status
`gettxreceiptstatus`
Also available through a GraphQL 'transaction' query. `Status` field return:
* `0` = failed transaction
* `1` = successful transaction
**Example**
```text theme={null}
https://instance_base_url/api
?module=transaction
&action=gettxreceiptstatus
&txhash={transactionHash}
```
| Parameter | Description |
| --------- | ---------------------------------------- |
| txhash | `string` containing the transaction hash |
```json theme={null}
{
"message": "OK",
"result": {
"status": "1"
},
"status": "1"
}
```
## Get error status and message
`getstatus`
Also available through a GraphQL 'transaction' query. Includes the following:
* errDescription: string with error message
* isError
* 0 = pass, no error
* 1 = error
**Example**
```javascript theme={null}
https://instance_base_url/api
?module=transaction
&action=getstatus
&txhash={transactionHash}
```
| Parameter | Description |
| --------- | ---------------------------------------- |
| txhash | `string` containing the transaction hash |
```json theme={null}
{
"message": "OK",
"result": {
"errDescription": "Out of gas",
"isError": "1"
},
"status": "1"
}
```
# Blockscout SDK
Source: https://docs.blockscout.com/devs/blockscout-sdk
Attention ETHGlobal Hackathon Participants. We have a $3000 Bounty available for best SDK Usage (1 $2000 prize and 1 \$1000 prize). Add the Blockscout SDK into your app to provide interactivity and instant explorer feedback to your users.
Note: The Blockscout SDK is currently in beta release. Please report any issues on the [Blockscout Discord](https://discord.gg/blockscout).
## Overview
The Blockscout App SDK is a React toolkit designed to integrate Blockscout transaction notifications and transaction history into your decentralized applications (dApps). It provides an easy-to-use interface for displaying transaction status updates and viewing transaction history with real-time updates and mobile-responsive design.
* Repo: [https://github.com/blockscout/app-sdk](https://github.com/blockscout/app-sdk)
* NPM Package [https://www.npmjs.com/package/@blockscout/app-sdk]()
### Key Features
* **Transaction Toast Notifications** - Real-time transaction status updates with pending, success, and error states
* **Transaction History Popup** - View recent transactions for specific addresses or entire chains
* **Transaction Interpretation** - Detailed transaction summaries and interpretations
* **Multi-chain Support** - Compatible with any blockchain that has a Blockscout explorer instance
* **Mobile-responsive Design** - Optimized for both desktop and mobile experiences
### Installation
Install the SDK using npm or yarn:
```sh theme={null}
npm install @blockscout/app-sdk
# or
yarn add @blockscout/app-sdk
```
### Transaction Toast Notifications
The transaction toast feature provides real-time notifications for transaction status updates, showing pending, success, and error states with detailed transaction information.
#### Setup
Wrap your application with the `NotificationProvider`:
```javascript theme={null}
import { NotificationProvider } from "@blockscout/app-sdk";
function App() {
return (
);
}
```
#### Usage
Use the `useNotification` hook to display transaction toasts:
```javascript theme={null}
import { useNotification } from "@blockscout/app-sdk";
function YourComponent() {
const { openTxToast } = useNotification();
const handleTransaction = async (txHash) => {
try {
// Your transaction logic here
await sendTransaction();
// Show transaction toast
openTxToast("1", txHash); // '1' is the chain ID for Ethereum mainnet
} catch (error) {
console.error("Transaction failed:", error);
}
};
return (
);
}
```
#### Toast Features
* Real-time status updates (pending, success, error)
* Transaction interpretation and summaries
* Links to block explorer
* Automatic status polling
* Error handling with revert reasons
### Transaction History Popup
The transaction history popup allows users to view recent transactions for a specific address or all transactions on a chain.
#### Setup
Wrap your application with the `TransactionPopupProvider`:
```javascript theme={null}
import { TransactionPopupProvider } from "@blockscout/app-sdk";
function App() {
return (
);
}
```
#### Usage
Use the `useTransactionPopup` hook to open transaction history:
```javascript theme={null}
import { useTransactionPopup } from "@blockscout/app-sdk";
function YourComponent() {
const { openPopup } = useTransactionPopup();
// Show transactions for a specific address
const showAddressTransactions = () => {
openPopup({
chainId: "1", // Ethereum mainnet
address: "0x123...", // Optional: specific address
});
};
// Show all transactions for a chain
const showAllTransactions = () => {
openPopup({
chainId: "1", // Ethereum mainnet
});
};
return (
);
}
```
#### Popup Features
* View recent transactions
* Filter by address
* Transaction status indicators
* Transaction interpretation
* Links to block explorer
* Mobile-responsive design
* Loading states and error handling
### Supported Chains
The SDK is compatible with any blockchain that has a Blockscout explorer instance with API v2 support.
* Chains are listed in [Chainscout](https://chains.blockscout.com/).
* Chain IDs can be retrieved from [https://github.com/blockscout/chainscout/blob/main/data/chains.json](https://github.com/blockscout/chainscout/blob/main/data/chains.json)
* To verify if your target chain ID is supported, visit the [compatibility checker](https://sdk-compatibility.blockscout.com/).
#### Common Supported Chain IDs
* `1` - Ethereum Mainnet
* `137` - Polygon Mainnet
* `42161` - Arbitrum One
* `10` - Optimism
### API Reference
#### useNotification Hook
```js theme={null}
const { openTxToast } = useNotification();
// Open a transaction toast
openTxToast(chainId: string, hash: string): Promise
```
#### useTransactionPopup Hook
```js theme={null}
const { openPopup } = useTransactionPopup();
// Open transaction popup
openPopup(options: {
chainId: string;
address?: string;
}): void
```
### Complete Integration Example
Here's a complete example showing how to integrate both features:
```javascript theme={null}
import React from 'react';
import {
NotificationProvider,
TransactionPopupProvider,
useNotification,
useTransactionPopup
} from "@blockscout/app-sdk";
function TransactionComponent() {
const { openTxToast } = useNotification();
const { openPopup } = useTransactionPopup();
const sendTransaction = async () => {
const txHash = "0x123..."; // Your transaction hash
await openTxToast("1", txHash);
};
const viewHistory = () => {
openPopup({
chainId: "1",
address: "0x456..." // Optional
});
};
return (
);
}
function App() {
return (
);
}
export default App;
```
# Chainscout Chains List
Source: https://docs.blockscout.com/devs/chainscout-chains-list
List of EVM networks supported by Blockscout
Chainscout is currently in Beta. Visit a live instance at [https://chains.blockscout.com/](https://chains.blockscout.com/)
* Chainscout includes chain ids and other chain information formatted as a JSON file. Add your own chain details through a pull request.
* Visit the repository to learn more: [https://github.com/blockscout/chainscout](https://github.com/blockscout/chainscout)
* Once all chains have been added, Chainscout will replace the current Blockscout chains and projects page located at [https://www.blockscout.com/chains-and-projects](https://www.blockscout.com/chains-and-projects).
# For Web3 Developers
Source: https://docs.blockscout.com/devs/for-web3-developers
π Welcome Web3 Developers and hackathon participants! Blockscout is built for you and optimized for use in web3 applications.
See the categories below for more information.
Blockscout APIs
Smart Contract Verification Tools and Resources
Pointing links to Blockscout / Replacing Existing Links
Blockscout SDK
Integrate Blockscout Merits
Autoscout 5 minute cloud deployment wizard
Chainscout EVM chains list
### Additional Resources
ππ»ββοΈ For details on developing on the Blockscout platform, advanced setup, ENVs, microservices like ENS, and Blockscout deployment please see the [Blockscout Setup](/setup/information-and-settings) section.
βSee the [Common Developer FAQs](/faqs/developer-faqs) for questions related to Blockscout development.
ππ½ββοΈ [Join our Discord](https://discord.gg/blockscout) for technical questions and support.
# Integrate Merits
Source: https://docs.blockscout.com/devs/integrate-merits
Attention ETHGlobal Hackathon Participants. We have a \$1000 Bounty available for best integration of Merits. The basic requirement is to incorporate Merits (Blockscout Points) into your application in some way. Users can earn Merits through different activities in your app and you can distribute them via the API. Below you will find more info on the program and the API for checking user Merits, distribution, and login processes.
***
### What are Blockscout Merits?
Merits are digital rewards collected by interacting with Blockscout and Blockscout-related apps and by participating in various activities (like contests, X participation, telegram participation, app participation and more). Merits are chain agnostic and can be incorporated into any application. For more details see the [Merits section of the docs](/using-blockscout/merits).
### Using Merits as an activity incentive
Merits are used to incentivize different activities within the Blockscout universe. For example:
* **Blockscout explorer basics:** Earn Merits by signing up for the program. Once you are signed up, you can earn additional Merits by completing a daily claim. You can also share your referral code and earn Merits when new users sign up with that code.
* **Telegram mini app.** The telegram Blockscout Merits Bot allows for direct communication with subscribers. Users who download the bot receive extra Merits -> [https://t.me/blockscout\_merits\_bot](https://t.me/blockscout_merits_bot)
* **Swapscout swapping app**. Merits are incorporated in the app so that users can view their balance and earn Merits for their swaps. [https://swap.blockscout.com/](https://swap.blockscout.com/). **This is a good example of an external app that incorporates Merits.**
* **Revokescout app.** Merits are used to incentivize users but there is no sign in or interface. We simply check addresses that use the application and distribute Merits to those addresses.
* **Blockscout campaigns**. Participants in time-gated campaigns such as rating Dapps or Twitter(X) contests receive additional Merits. We collect the Ethereum addresses of winners and distribute Merits manually.
* **Partner campaigns**. Merits are allocated to users of other protocols as an additional incentive for use. Partners provide us with a list of addresses and tasks they completed and we distribute accordingly.
### Integrating Test Merits into your application
Merits can be integrated in different ways into your application. Ideas may be to include Merits as a reward for user interactions with your app or a general reward for any activity. Merits can be distributed to users via the API.
Users can have the ability to sign up for Merits through your app and/or login to their Merits account. You can also display individual Merits balances and leaderboard balances within your application. However, these are optional integrations.
To qualify for the bounty, you simply need to provide Merit incentives for certain activities, and then distribute those merits appropriately. As long as you have the participant's Ethereum address you can distribute Merits.
Note: You can retrieve basic data without an API key, but **for interactivity purposes you will need to request one via our Discord channe**l. See below.
### Getting started
1. Request your API key at: [https://ethglobal.com/discord](https://ethglobal.com/discord) in the #partner-blockscout channel
2. API hostname (and test merits dashboard): [https://merits-staging.blockscout.com](https://merits-staging.blockscout.com)
A full list of endpoints is available on our swagger page here: [https://blockscout.github.io/swaggers/services/merits/main/index.html](https://blockscout.github.io/swaggers/services/merits/main/index.html)
### Get basic Merit info for a user
`GET` `https://merits-staging.blockscout.com/api/v1/auth/user/\{address}`
Returns user information by address
**Path parameters**
The blockchain address of the user
**Responses**
Indicates if the user exists
Example: `true`
The blockchain address of the user
Example: `0x813399e5b08Bb50b038AA7dF6347b6AF2D161338`
Merits balance
Example: `981`
Number of invited users
Example: `5`
Registration timestamp
Example: `2024-10-21T13:21:20.529Z`
```http HTTP theme={null}
GET /api/v1/auth/user/{address} HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/api/v1/auth/user/{address}' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/auth/user/{address}', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/api/v1/auth/user/{address}",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 User Information theme={null}
{
"exists": true,
"user": {
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"total_balance": "981",
"referrals": "5",
"registered_at": "2024-10-21T13:21:20.529Z"
}
}
```
### Get leaderboard ranking for a user
`GET` `https://merits-staging.blockscout.com/api/v1/leaderboard/users/\{address}`
Returns the leaderboard information for a specific user
**Path parameters**
The blockchain address of the user
**Responses**
The blockchain address of the user
Example: `0x813399e5b08Bb50b038AA7dF6347b6AF2D161338`
The current user's balance
Example: `981`
Number of invited users
Example: `5`
The date and time when the user registered
Example: `2024-10-21T13:21:20.529Z`
The rank of the user on the leaderboard
Example: `1`
Number of users below the current user
Example: `71569`
In what percentage of users the current one is in
Example: `0.01`
```http HTTP theme={null}
GET /api/v1/leaderboard/users/{address} HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/api/v1/leaderboard/users/{address}' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/leaderboard/users/{address}', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/api/v1/leaderboard/users/{address}",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 User leaderboard information theme={null}
{
"address": "0x813399e5b1102950b038AA7dF6347b6AF21102828",
"total_balance": "981",
"referrals": "5",
"registered_at": "2024-10-21T13:21:20.529Z",
"rank": "1",
"users_below": "71569",
"top_percent": 0.01
}
```
### Partner balance and distribution information
When you request an API key you become a partner! You will receive a balance of test Merits which can then be distributed to your users.
*\* Requires API Key - Add the assigned API KEY in the Authorization header to see your information.*
`GET` `https://merits-staging.blockscout.com/partner/api/v1/balance`
Returns the balance and distribution information for a partner
**Responses**
Partner name
Example: `partner-1`
API key for the partner
Example: `4VF6LDF7RC64CNGWXOECF8J1LJ62W5HS`
Merits accrual start date
Example: `2025-05-01T00:00:00.000Z`
Merits accrual end date
Example: `2025-06-01T00:00:00.000Z`
Amount of accruing merits per second
Example: `0.1`
Current amount available for distribution
Example: `1234.5`
Total amount distributed in the past
Example: `100`
Last update timestamp
Example: `2025-04-16T11:26:31.757Z`
```http HTTP theme={null}
GET /partner/api/v1/balance HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/partner/api/v1/balance' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/partner/api/v1/balance', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/partner/api/v1/balance",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 Partner balance information theme={null}
{
"name": "partner-1",
"api_key": "4VF6LDF7RC64CNGWXOECF8J1LJ62W5HS",
"valid_since": "2025-05-01T00:00:00.000Z",
"valid_until": "2025-06-01T00:00:00.000Z",
"rate": "0.1",
"balance": "1234.5",
"total_distributed": "100",
"updated_at": "2025-04-16T11:26:31.757Z"
}
```
### Distribute Merits
*\* Requires API Key - Add the assigned API KEY in the Authorization header to add your distribution information.*
*Notes:*
* `id` must be unique per each API KEY, so it's recommended to include date or time period describing the distribution period.
* `distributions`
* Max `1000` wallets per distribution.
* Amounts less than `0.01` per address are not allowed.
* Amounts can be in decimals, max 2 decimal digits precision is recommended.
* create\_missing\_accounts
* `true`: allows distributions to not yet registered Merits accounts.
* `false`: only allow distributions to users that are already registered.
`POST` `https://merits-staging.blockscout.com/partner/api/v1/distribute`
Distributes merits to specified addresses
**Body**
Unique ID for the distribution
Example: `ethglobal_rewards-2025/05/01`
Human readable description of the distribution
Example: `Extra rewards from ProjectX for using Blockscout during ETH Global`
List of wallet addresses and amounts (max 1000 wallets)
Blockchain address to receive the distribution
Example: `0x813399e5b08Bb50b038AA7dF6347b6AF2D161338`
Amount to distribute
Example: `10.50`
Allow distribution for non-registered accounts if true
Example: `false`
Total distribution amount (must equal sum of all amounts)
Example: `100.00`
**Responses**
Number of accounts that received distributions
Example: `1`
Number of new accounts created during distribution
Example: `0`
```http HTTP theme={null}
POST /partner/api/v1/distribute HTTP/1.1
Host: merits-staging.blockscout.com
Content-Type: application/json
Accept: */*
Content-Length: 270
{
"id": "ethglobal_rewards-2025/05/01",
"description": "Extra rewards from ProjectX for using Blockscout during ETH Global",
"distributions": [
{
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"amount": "10.50"
}
],
"create_missing_accounts": false,
"expected_total": "100.00"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://merits-staging.blockscout.com/partner/api/v1/distribute' \
--header 'Content-Type: application/json' \
--data '{
"id": "ethglobal_rewards-2025/05/01",
"description": "Extra rewards from ProjectX for using Blockscout during ETH Global",
"distributions": [
{
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"amount": "10.50"
}
],
"create_missing_accounts": false,
"expected_total": "100.00"
}'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/partner/api/v1/distribute', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "ethglobal_rewards-2025/05/01",
"description": "Extra rewards from ProjectX for using Blockscout during ETH Global",
"distributions": [
{
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"amount": "10.50"
}
],
"create_missing_accounts": false,
"expected_total": "100.00"
})
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.post(
"https://merits-staging.blockscout.com/partner/api/v1/distribute",
headers={"Content-Type":"application/json"},
data=json.dumps({
"id": "ethglobal_rewards-2025/05/01",
"description": "Extra rewards from ProjectX for using Blockscout during ETH Global",
"distributions": [
{
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"amount": "10.50"
}
],
"create_missing_accounts": False,
"expected_total": "100.00"
})
)
data = response.json()
```
```json 200 Distribution results theme={null}
{
"accounts_distributed": "1",
"accounts_created": "0"
}
```
### Login and Registration Flow - Get User Token
*Use the following flow to get a User Token*
1. Get Nonce from Backend
`GET` `https://merits-staging.blockscout.com/api/v1/auth/nonce`
Returns a nonce for authentication
**Responses**
Authentication nonce
Example: `4MCWIDlddqsmJAAAZ`
Optional merits-specific login nonce
```http HTTP theme={null}
GET /api/v1/auth/nonce HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/api/v1/auth/nonce' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/auth/nonce', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/api/v1/auth/nonce",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 Authentication nonce theme={null}
{
"exists": true,
"user": {
"address": "0x813399e5b08Bb50b038AA7dF6347b6AF2D161338",
"total_balance": "981",
"referrals": "5",
"registered_at": "2024-10-21T13:21:20.529Z"
}
}
```
2. Ask for a signature from a user with a predefined message
```text theme={null}
// Formatted message example
merits.blockscout.com wants you to sign in with your Ethereum account:
0x813399e5b08Bb50b038AA7dF6347b6AF2D163328
Sign-In for the Blockscout Merits program.
URI:
https://merits-staging.blockscout.com
Version: 1
Chain ID: 1
Nonce: 4MCWIDlddqsmJAZOZ
Issued At: 2025-03-18T12:23:51.549Z
Expiration Time: 2026-03-18T12:23:51.549Z
```
3. Send data to get a user token
`POST` `https://merits-staging.blockscout.com/api/v1/auth/login`
Authenticates a user with a signed message
**Body**
Authentication nonce received from the server
Example: `4MCWIDlddqsmJAAAZ`
The message that was signed
Example: `merits.blockscout.com wants you to sign in with your Ethereum account: 0x813399e5b08Bb50b038AA7dF6347b6AF2D161338 Sign-In for the Blockscout Merits program. URI: https://merits.blockscout.com Version: 1 Chain ID: 1 Nonce: 4MCWIDlddqsmJAAAZ Issued At: 2025-03-18T12:23:51.549Z Expiration Time: 2026-03-18T12:23:51.549Z`
The signature of the message
Example: `0xb11b582a6ef196a3f20fa9c84443a92c9f456c9da2ce8ceea2bcf4ce2b936e35767ac2ff56a1de635b7a5f4bcb5da89c4297efb2b4ce559123891202731752661c`
**Responses**
Indicates if an account was created during this login
Example: `false`
JWT authentication token
Example: `eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NzM4MzY2MzEsImlhdCI6MTc0MjMwMDYzMSwibmJmIjoxNzQyMzAwNjMxLCJzdWIiOiIweDgxMzM5OWU1YjA4QmI1MGIwMzhBQTdkRjYzNDdiNkFGMkQxNsadasdasdasdsajE4MjgiLCJqdGkiOiI0TUNXSURsZGRxc21KQVpPWiIsImNoYWluX2lkIjoxLCJkb21haW4iOiJtZXJpdHMuYmxvY2tzY291dC5jb20ifQ.QQj-dn3ZmHhusq7cvtohF72yxF-605lP7WxVuVZ7BfQ`
```http HTTP theme={null}
POST /api/v1/auth/login HTTP/1.1
Host: merits-staging.blockscout.com
Content-Type: application/json
Accept: */*
Content-Length: 518
{
"nonce": "4MCWIDlddqsmJAAAZ",
"message": "merits.blockscout.com wants you to sign in with your Ethereum account:\n0x813399e5b08Bb50b038AA7dF6347b6AF2D161338\n\nSign-In for the Blockscout Merits program.\n\nURI: https://merits.blockscout.com\nVersion: 1\nChain ID: 1\nNonce: 4MCWIDlddqsmJAAAZ\nIssued At: 2025-03-18T12:23:51.549Z\nExpiration Time: 2026-03-18T12:23:51.549Z",
"signature": "0xb11b582a6ef196a3f20fa9c84443a92c9f456c9da2ce8ceea2bcf4ce2b936e35767ac2ff56a1de635b7a5f4bcb5da89c4297efb2b4ce559123891202731752661c"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://merits-staging.blockscout.com/api/v1/auth/login' \
--header 'Content-Type: application/json' \
--data '{
"nonce": "4MCWIDlddqsmJAAAZ",
"message": "merits.blockscout.com wants you to sign in with your Ethereum account:
0x813399e5b08Bb50b038AA7dF6347b6AF2D161338
Sign-In for the Blockscout Merits program.
URI: https://merits.blockscout.com
Version: 1
Chain ID: 1
Nonce: 4MCWIDlddqsmJAAAZ
Issued At: 2025-03-18T12:23:51.549Z
Expiration Time: 2026-03-18T12:23:51.549Z",
"signature": "0xb11b582a6ef196a3f20fa9c84443a92c9f456c9da2ce8ceea2bcf4ce2b936e35767ac2ff56a1de635b7a5f4bcb5da89c4297efb2b4ce559123891202731752661c"
}'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/auth/login', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"nonce": "4MCWIDlddqsmJAAAZ",
"message": "merits.blockscout.com wants you to sign in with your Ethereum account:\n0x813399e5b08Bb50b038AA7dF6347b6AF2D161338\n\nSign-In for the Blockscout Merits program.\n\nURI: https://merits.blockscout.com\nVersion: 1\nChain ID: 1\nNonce: 4MCWIDlddqsmJAAAZ\nIssued At: 2025-03-18T12:23:51.549Z\nExpiration Time: 2026-03-18T12:23:51.549Z",
"signature": "0xb11b582a6ef196a3f20fa9c84443a92c9f456c9da2ce8ceea2bcf4ce2b936e35767ac2ff56a1de635b7a5f4bcb5da89c4297efb2b4ce559123891202731752661c"
})
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.post(
"https://merits-staging.blockscout.com/api/v1/auth/login",
headers={"Content-Type":"application/json"},
data=json.dumps({
"nonce": "4MCWIDlddqsmJAAAZ",
"message": "merits.blockscout.com wants you to sign in with your Ethereum account:\n0x813399e5b08Bb50b038AA7dF6347b6AF2D161338\n\nSign-In for the Blockscout Merits program.\n\nURI: https://merits.blockscout.com\nVersion: 1\nChain ID: 1\nNonce: 4MCWIDlddqsmJAAAZ\nIssued At: 2025-03-18T12:23:51.549Z\nExpiration Time: 2026-03-18T12:23:51.549Z",
"signature": "0xb11b582a6ef196a3f20fa9c84443a92c9f456c9da2ce8ceea2bcf4ce2b936e35767ac2ff56a1de635b7a5f4bcb5da89c4297efb2b4ce559123891202731752661c"
})
)
data = response.json()
```
### API Calls Requiring a User Token
*\*Requires User Token: put the user token in the Authorization header*
`GET` `https://merits-staging.blockscout.com/api/v1/user/balances`
Returns the detailed balance information for the authenticated user
**Responses**
The total balance of the user
Example: `2426.61`
The amount of tokens staked by the user
Example: `0`
The amount of tokens not staked by the user
Example: `2426.61`
The total staking rewards earned by the user
Example: `0`
The total referral rewards earned by the user
Example: `20`
The pending referral rewards for the user
Example: `0`
```http HTTP theme={null}
GET /api/v1/user/balances HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/api/v1/user/balances' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/user/balances', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/api/v1/user/balances",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 User balance details theme={null}
{
"total": "2426.61",
"staked": "0",
"unstaked": "2426.61",
"total_staking_rewards": "0",
"total_referral_rewards": "20",
"pending_referral_rewards": "0"
}
```
`GET` `https://merits-staging.blockscout.com/api/v1/user/logs`
Returns activity logs for the authenticated user
**Query parameters**
Number of items to return per page
Token for pagination
**Responses**
list of activity logs
Type of activity
Example: `daily_reward`
Streak count for daily rewards
Example: `1`
Amount of merits received
Example: 10
Date of the activity
Example: 2025-03-18
Timestamp of the activity
Example: `2025-03-18T12:13:20.110Z`
Token for the next page
Example: `1732067538792818,984727`
Size of the page
Example: `50`
```http HTTP theme={null}
GET /api/v1/user/logs HTTP/1.1
Host: merits-staging.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://merits-staging.blockscout.com/api/v1/user/logs' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://merits-staging.blockscout.com/api/v1/user/logs', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://merits-staging.blockscout.com/api/v1/user/logs",
headers={"Accept":"*/*"},
)
data = response.json()
```
# MCP Server
Source: https://docs.blockscout.com/devs/mcp-server
Wraps Blockscout APIs to expose blockchain data such as balances, tokens, NFTs, and contract metadata via MCP
* MCP Landing page: [https://mcp.blockscout.com](https://mcp.blockscout.com)
* Github with technical specs and run information located at [https://github.com/blockscout/mcp-server](https://github.com/blockscout/mcp-server)
The Model Context Protocol (MCP) is an open protocol designed to allow AI agents, IDEs, and automation tools to consume, query, and analyze structured data through context-aware APIs.
This server wraps Blockscout APIs and exposes blockchain dataβbalances, tokens, NFTs, contract metadataβvia MCP so that AI agents and tools (like Claude, Cursor, or IDEs) can access and analyze it contextually.
#### **Key Features:**
* Contextual blockchain data access for AI tools
* Multi-chain support via getting Blockscout instance URLs from Chainscout
* Custom instructions for MCP host to use the server
* Supports MCP progress notifications for multi-step tool operations, allowing clients to track execution status
* Enhanced User Experience: Provides periodic progress updates for long-running API queries (e.g., fetching extensive transaction histories) when requested by the client, improving responsiveness
#### Use Cases
* Enabling AI agents to analyze blockchain transactions and account balances.
* Automating blockchain data analysis workflows with context-aware APIs.
* Allowing IDEs to fetch contract ABIs and other relevant smart contract information.
### Examples
* Using the MCP to [find ENV variables for rollup deployments](/devs/mcp-examples/rollup-deployment-variables).
#### **Architecture and Data Flow**
```mermaid theme={null}
sequenceDiagram
participant AI as MCP Host
participant MCP as MCP Server
participant BENS as ENS Service
participant CS as Chainscout
participant BS as Blockscout Instance
participant Metadata as Metadata Service
AI->>MCP: __get_instructions__
MCP-->>AI: Custom instructions
AI->>MCP: get_address_by_ens_name
MCP->>BENS: Forward ENS name resolution request
BENS-->>MCP: Address response
MCP-->>AI: Formatted address
AI->>MCP: get_chains_list
MCP->>CS: Request available chains
CS-->>MCP: List of chains
MCP-->>AI: Formatted chains list
Note over AI: Host selects chain_id as per the user's initial prompt
AI->>MCP: Tool request with chain_id
MCP->>CS: GET /api/chains/:id
CS-->>MCP: Chain metadata (includes Blockscout URL)
par Concurrent API Calls (when applicable)
MCP->>BS: Request to Blockscout API
BS-->>MCP: Primary data response
and
MCP->>Metadata: Request to Metadata API (for enriched data)
Metadata-->>MCP: Secondary data response
end
MCP-->>AI: Formatted & combined information
```
# PRO API
Source: https://docs.blockscout.com/devs/pro-api
Blockscout's PRO API provides higher call limits and custom endpoints
Blockscout PRO API is currently in development. If you are interested in beta testing our API, [reach out in Discord](https://discord.gg/blockscout).
## General Info
The PRO API expands on Blockscout's free tier API (5 requests per second) to provide expanded rate limits for high-usage projects on Blockscout hosted networks. Pricing and details are coming soon.
## Authorization
You can pass api key using either:
* `apikey` query parameter
* `authorization` header
## PRO API routes (in progress)
1. **API v1**
1. base\_url/v2/api?chain\_id=:chain\_id
`https://api.k8s-dev.blockscout.com/v2/api?chain_id=17000&module=block&action=eth_block_number&apikey=proapi_xxxxxxxx`
2. base\_url/:chain\_id/api
`https://api.k8s-dev.blockscout.com/17000/api?module=block&action=eth_block_number&apikey=proapi_xxxxxxxx`
2. **API v2**
base\_url/:chain\_id/api/v2
`https://api.k8s-dev.blockscout.com/17000/api/v2/blocks?apikey=proapi_xxxxxxxx`
3. **ETH RPC API**
base\_url/:chain\_id/json-rpc `https://api.k8s-dev.blockscout.com/17000/json-rpc?apikey=proapi_xxxxxxxx`
# Link To Blockscout
Source: https://docs.blockscout.com/devs/replace-links
Easily replace your current explorer links with Blockscout explorer links
## Replace the primary explorer link
In most cases simply replacing the first part of the url is all that is needed to replace Etherscan with Blockscout.
For example, replace [https://etherscan.io/](https://etherscan.io/) with [https://eth.blockscout.com/](https://eth.blockscout.com/) in your code and the corresponding links to blocks, transactions, etc will be mapped to Blockscout rather than Etherscan.
π’ Tx before replacement
[https://etherscan.io/tx/0x3e8c3aad50b2f8471400e3fe6b812f20c332846064dff8c25fadf783eefa68df](https://etherscan.io/tx/0x3e8c3aad50b2f8471400e3fe6b812f20c332846064dff8c25fadf783eefa68df)
π Tx after replacement
[https://eth.blockscout.com/tx/0x3e8c3aad50b2f8471400e3fe6b812f20c332846064dff8c25fadf783eefa68df](https://eth.blockscout.com/tx/0x3e8c3aad50b2f8471400e3fe6b812f20c332846064dff8c25fadf783eefa68df)
Blockscout linking architecture follows [EIP-3091](https://eips.ethereum.org/EIPS/eip-3091)standardization for the following routes:
* Blocks `/block/`
* Transactions `/tx/`
* Accounts `/address/`
* Tokens `/token/`
### UTM tags
We encourage adding UTM tags with your project information to Blockscout links. This helps us track referrals and improve our overall performance via metrics. Simply append `?utm_source=` to the end of any links pointing to Blockscout. For example [https://eth.blockscout.com/?utm\_source=tenderly](https://eth.blockscout.com/?utm_source=Tenderly)
### Common chain replacements
Replace the Etherscan url in your code with the Blockscout url for a seamless transition. All chains supported by Etherscan are also supported by Blockscout (along with many additional Blockscout chains). Some examples are below. For additional Blockscout chains see the [chains and projects](https://www.blockscout.com/chains-and-projects) page or the [chainscout json file which includes chainids](https://github.com/blockscout/chainscout/blob/main/data/chains.json).
| Chain | Etherscan β | Blockscout β |
| ---------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Ethereum | [https://etherscan.io/](https://etherscan.io/) | [https://eth.blockscout.com/](https://eth.blockscout.com/) |
| Ethereum Sepolia | [https://sepolia.etherscan.io/](https://sepolia.etherscan.io/) | [https://eth-sepolia.blockscout.com/](https://eth-sepolia.blockscout.com/) |
| Optimism | [https://optimistic.etherscan.io/](https://optimistic.etherscan.io/) | [https://optimism.blockscout.com/](https://optimism.blockscout.com/) |
| Optimism Sepolia | [https://sepolia-optimism.etherscan.io/](https://sepolia-optimism.etherscan.io/) | [https://optimism-sepolia.blockscout.com/](https://optimism-sepolia.blockscout.com/) |
| Base | [https://basescan.org/](https://basescan.org/) | [https://base.blockscout.com/](https://base.blockscout.com/) |
| Base Sepolia | [https://sepolia.basescan.org/](https://sepolia.basescan.org/) | [https://base-sepolia.blockscout.com/](https://base-sepolia.blockscout.com/) |
| Arbitrum | [https://arbiscan.io/](https://arbiscan.io/) | [https://arbitrum.blockscout.com/](https://arbitrum.blockscout.com/) |
| Arbitrum Sepolia | [https://sepolia.arbiscan.io/](https://sepolia.arbiscan.io/) | [https://arbitrum-sepolia.blockscout.com/](https://arbitrum-sepolia.blockscout.com/) |
| Polygon | [https://polygonscan.com/](https://polygonscan.com/) | [https://polygon.blockscout.com/](https://polygon.blockscout.com/) |
| Gnosis | [https://gnosisscan.io/](https://gnosisscan.io/) | [https://gnosis.blockscout.com/](https://gnosis.blockscout.com/) |
| Celo | [https://celoscan.io/](https://celoscan.io/) | [https://celo.blockscout.com/](https://celo.blockscout.com/) |
| Unichain | [https://uniscan.xyz/](https://uniscan.xyz/) | [https://unichain.blockscout.com/](https://unichain.blockscout.com/) |
### Exceptions
Some newer operations without standards are still handled differently by different explorers. For example:
* Blobs on Blockscout are accessed in different ways depending on the route. For example via the `?tab=blob_txs` query string following a block ([https://eth.blockscout.com/block/20822532?tab=blob\_txs](https://eth.blockscout.com/block/20822532?tab=blob_txs)) or the `?tab=blobs` query string following a transaction. Blobs on Etherscan are accessed via `#blobinfo` query string following a block (ie [https://etherscan.io/block/20822532#blobinfo](https://etherscan.io/block/20822532#blobinfo)).
* User Operations (EIP-4337) are displayed on Blockscout via the [https://eth.blockscout.com/ops](https://eth.blockscout.com/ops) url. On Etherscan there is currently no defined route, but User Operations can be viewed with the `Handle Ops` filter applied to the senders address (ie [https://etherscan.io/advanced-filter?fadd=0x20e9695f25413f14e5807b530D0698bd4F155074\&mtd=0x1fad948c\~Handle+Ops\&ps=10\&p=8](https://etherscan.io/advanced-filter?fadd=0x20e9695f25413f14e5807b530D0698bd4F155074\&mtd=0x1fad948c~Handle+Ops\&ps=10\&p=8))
## Replace the API link
Standard Blockscout RPC calls do not need an API key (Etherscan calls always require one). You can remove the `&apikey=YourApiKeyToken` query string at the end of the url with no problem or keep it as any string value and Blockscout will process. If you want to increase your limits, you can also [sign up for a free Blockscout API key](/using-blockscout/my-account/api-keys) and use it to access 10 RPS limits.
Etherscan uses a subdomain link for api access. For example, the Ethereum explorer the api link is [https://api.etherscan.io/](https://api.etherscan.io/) followed by your query, or for Optimism it is [https://api-optimistic.etherscan.io/](https://api-optimistic.etherscan.io/) followed by your query.
**To replace, simply use the regular blockscout url for the instance**, for example [https://eth.blockscout.com/](https://eth.blockscout.com/) for Ethereum or [https://optimism.blockscout.com/](https://optimism.blockscout.com/) for Optimism.
π’ API call before replacement (doesn't work without API key)
[https://api.etherscan.io/api?module=account\&action=balance\&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae\&tag=latest\&apikey=YourApiKeyToken](https://api.etherscan.io/api?module=account\&action=balance\&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae\&tag=latest\&apikey=YourApiKeyToken)
π API call after replacement (works without API key)
[https://eth.blockscout.com/api?module=account\&action=balance\&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae\&tag=latest](https://eth.blockscout.com/api?module=account\&action=balance\&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae\&tag=latest)
Standard API routes on Etherscan work for your queries on Blockscout. We've structured our data calls to be consistent with Etherscan whenever possible. You can see supported calls in the [JSON RPC & ETH Compatible RPC endpoints section](/devs/apis/rpc).
If you require more varied or richer datasets consider replacing your JSON RPC calls with the [REST API from Blockscout](/devs/apis/rest). This free API features additional metadata, stats data, human readable transactions and more.
### API Exceptions
* Blockscout does not currently support most [Etherscan API PRO](https://docs.etherscan.io/api-pro/etherscan-api-pro) queries.
* The 10 RPS limits can be increased further via the [Quicknode marketplace add-on](https://marketplace.quicknode.com/add-on/blockscout-json-rpc-api).
## Replace your wallet block explorer link
Every wallet handles the explorer link differently, but typically wallets ship with Etherscan links by default. To change, simply go to settings and replace the Etherscan link with the Blockscout one. Here's how you do it in MetaMask.
1. Open MetaMask, click the dots to open the menu, and select Settings
2. Select Networks
3. Select the network where you want to change the explorer link
4. Find the block explorer url (ie [https://optimistic.etherscan.io/](https://optimistic.etherscan.io/)).
5. Change the url to blockscout (ie [https://optimism.blockscout.com/](https://optimism.blockscout.com/)) and Save.
Repeat this process for all networks from the Networks screen.
# Smart Contract Verification
Source: https://docs.blockscout.com/devs/verification
Verifying your deployed contract using contract source code, JSON input, Sourcify and more.
Once verified, a smart contract or token contract's source code becomes publicly available and verifiable, creating transparency and trust. It also allows for interactivity with methods directly through the Read and Write buttons.
There are many different ways to verify your contracts with Blockscout.
* [Blockscout UI](/devs/verification/blockscout-ui)
* [Verification API](/devs/verification/blockscout-smart-contract-verification-api)
* [Hardhat Plugin](/devs/verification/hardhat-verification-plugin)
* [Foundry Verification](/devs/verification/foundry-verification)
* [Sourcify Verification](/devs/verification/contracts-verification-via-sourcify)
* [Remix Verification](/devs/verification/remix-verification)
* [Automate verification with Catapulta](/devs/verification/automate-verifications-catapulta)
* [Stylus verification via API](/devs/verification/stylus-verification)
* [Thirdweb verification](/devs/verification/verification-via-thirdweb)
# Automate verifications with Catapulta
Source: https://docs.blockscout.com/devs/verification/automate-verifications-catapulta
Deploy smart contracts and get verified automatically with Catapulta
[Catapulta](https://catapulta.sh) is a multi-chain smart contracts deployment tool for Foundry and Hardhat to improve deployments DevX and remove the need to perform manual verifications.
With Catapulta you can deploy to +14 networks and the verification will happen automatically in Blockscout based block explorers. You may need to register in Catapulta to be able to deploy in testnets with automatic verification, for free, in Blockscout based explorers.
You can install `catapulta` in your Linux/MacOs machine using NPM:
```sh theme={null}
npm i -g catapulta
```
## Deploy with Foundry and Catapulta
To verify at deployment time with Foundry and Catapulta, just broadcast your script with the Catapulta CLI:
```sh theme={null}
catapulta script scripts/Deploy.s.sol --network [NETWORK_NAME]
```
If you already deployed with Forge, but want to automate the verification, you can import your deployment to Catapulta with the "catapulta import" command, and it will re-trigger verification:
```sh theme={null}
catapulta import 'broadcasts/Deploy.s.sol/[chain id]/run-latest.json'
```
## Deploy with Hardhat and Catapulta
To verify at deployment time with `hardhat-deploy` and Catapulta, just deploy with Catapulta CLI to enjoy automated verifications.
```sh theme={null}
catapulta deploy --network [NETWORK_NAME]
```
If you use plain Hardhat scripts, you can use `catapulta run`, pointing to your Javascript or Typescript deploy script:
```sh theme={null}
catapulta run scripts/DeployScript.ts --network [NETWORK_NAME]
```
## Verify your project anytime, with one button
In case Blockscout is newly added to a network you already deployed with Catapulta, you can always re-trigger verification to your entire project with only one click, from your deployment report, and Catapulta will take care to migrate all the verifications to Blockscout block explorer.
# Blockscout Smart Contract Verification API
Source: https://docs.blockscout.com/devs/verification/blockscout-smart-contract-verification-api
Blockscout also offers a contract verification API.
This is the preferred option for contract verification via API. However, you can also use RPC endpoints, [more info is available here](/devs/apis/rpc/contract#verify-a-contract-with-its-source-code-and-contract-creation-information).
### License type
You can specify license type of the smart contract as `string` or `number`. For example for `GNU General Public License v2.0 (GNU GPLv2)` you could pass either `4` or `"gnu_gpl_v2"`
We are supporting such types of license as:
```java theme={null}
1. No License (None)
2. The Unlicense (Unlicense)
3. MIT License (MIT)
4. GNU General Public License v2.0 (GNU GPLv2)
5. GNU General Public License v3.0 (GNU GPLv3)
6. GNU Lesser General Public License v2.1 (GNU LGPLv2.1)
7. GNU Lesser General Public License v3.0 (GNU LGPLv3)
8. BSD 2-clause "Simplified" license (BSD-2-Clause)
9. BSD 3-clause "New" Or "Revised" license* (BSD-3-Clause)
10. Mozilla Public License 2.0 (MPL-2.0)
11. Open Software License 3.0 (OSL-3.0)
12. Apache 2.0 (Apache-2.0)
13. GNU Affero General Public License (GNU AGPLv3)
14. Business Source License (BSL 1.1)
```
API license types:
```
none
unlicense
mit
gnu_gpl_v2
gnu_gpl_v3
gnu_lgpl_v2_1
gnu_lgpl_v3
bsd_2_clause
bsd_3_clause
mpl_2_0
osl_3_0
apache_2_0
gnu_agpl_v3
bsl_1_1
```
### Verify smart contract
Use the appropriate Blockscout instance endpoint to verify if the smart contract microservice is enabled.
In the following examples we use [https://eth.blockscout.com](https://eth.blockscout.com) to query Ethereum.
### verification service running
`GET` `https://eth.blockscout.com/api/v2/smart-contracts/verification/config`
**Responses**
Β
```http HTTP theme={null}
GET /api/v2/smart-contracts/verification/config HTTP/1.1
Host: eth.blockscout.com
Accept: */*
```
```sh cURL theme={null}
curl -L \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/verification/config' \
--header 'Accept: */*'
```
```js JavaScript theme={null}
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/verification/config', {
method: 'GET',
headers: {
"Accept": "*/*"
},
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.get(
"https://eth.blockscout.com/api/v2/smart-contracts/verification/config",
headers={"Accept":"*/*"},
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
`0x` contract addresses in POST example urls below should be replaced with your contract hash supplied on contract creation. Variables in the body are examples and should be replaced with your contract details.
## Flattened contract
For more information on parameters to pass, see the [flattened source code information on the Verifying a smart contract page](/devs/verification#via-flattened-source-code).
### verification flattened contract
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code`
**Body**
Example: `{"compiler_version":"v0.8.17+commit.8df45f5f","license_type":"mit","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Owner\n * @dev Set & change owner\n */\ncontract Owner {\n\n address private owner;\n \n // event for EVM logging 2345678ewqwertyui54567890987654345678\n event OwnerSet(address indexed oldOwner, address indexed newOwner);\n \n // modifier to check if caller is owner\n modifier isOwner() {\n // If the first argument of 'require' evaluates to 'false', execution terminates and all\n // changes to the state and to Ether balances are reverted.\n // This used to consume all gas in old EVM versions, but not anymore.\n // It is often a good idea to use 'require' to check if functions are called correctly.\n // As a second argument, you can also provide an explanation about what went wrong.\n require(msg.sender == owner, \"Caller is not owner\");\n _;\n }\n \n /**\n * @dev Set contract deployer as owner\n */\n constructor(uint112 abc, address abb, bytes32 ghnc) {\n // console.log(\"Owner contract deployed by:\", msg.sender);\n owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor\n emit OwnerSet(address(0), owner);\n }\n\n /**\n * @dev Change owner\n * @param newOwner address of new owner\n */\n function changeOwner(address newOwner) public isOwner {\n emit OwnerSet(owner, newOwner);\n owner = newOwner;\n }\n\n /**\n * @dev Return owner address \n * @return address of owner\n */\n function getOwner() external view returns (address) {\n return owner;\n }\n}","is_optimization_enabled":true,"optimization_runs":199,"contract_name":"Owner","libraries":{"Libcheck":"0x030f7c7dbd472864220bcf9e37ede1b8a3125970","Libcheck_1":"0x030f7c7dbd472864220bcf9e37ede1b8a3125970"},"evm_version":"berlin","autodetect_constructor_args":true}`
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code HTTP/1.1
Host: eth.blockscout.com
Content-Type: application/json
Accept: */*
Content-Length: 2029
{
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "mit",
"source_code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Owner\n * @dev Set & change owner\n */\ncontract Owner {\n\n address private owner;\n \n // event for EVM logging 2345678ewqwertyui54567890987654345678\n event OwnerSet(address indexed oldOwner, address indexed newOwner);\n \n // modifier to check if caller is owner\n modifier isOwner() {\n // If the first argument of 'require' evaluates to 'false', execution terminates and all\n // changes to the state and to Ether balances are reverted.\n // This used to consume all gas in old EVM versions, but not anymore.\n // It is often a good idea to use 'require' to check if functions are called correctly.\n // As a second argument, you can also provide an explanation about what went wrong.\n require(msg.sender == owner, \"Caller is not owner\");\n _;\n }\n \n /**\n * @dev Set contract deployer as owner\n */\n constructor(uint112 abc, address abb, bytes32 ghnc) {\n // console.log(\"Owner contract deployed by:\", msg.sender);\n owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor\n emit OwnerSet(address(0), owner);\n }\n\n /**\n * @dev Change owner\n * @param newOwner address of new owner\n */\n function changeOwner(address newOwner) public isOwner {\n emit OwnerSet(owner, newOwner);\n owner = newOwner;\n }\n\n /**\n * @dev Return owner address \n * @return address of owner\n */\n function getOwner() external view returns (address) {\n return owner;\n }\n}",
"is_optimization_enabled": true,
"optimization_runs": 199,
"contract_name": "Owner",
"libraries": {
"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970",
"Libcheck_1": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"
},
"evm_version": "berlin",
"autodetect_constructor_args": true
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code' \
--header 'Content-Type: application/json' \
--data '{
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "mit",
"source_code": "// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Owner
* @dev Set & change owner
*/
contract Owner {
address private owner;
// event for EVM logging 2345678ewqwertyui54567890987654345678
event OwnerSet(address indexed oldOwner, address indexed newOwner);
// modifier to check if caller is owner
modifier isOwner() {
// If the first argument of 'require' evaluates to 'false', execution terminates and all
// changes to the state and to Ether balances are reverted.
// This used to consume all gas in old EVM versions, but not anymore.
// It is often a good idea to use 'require' to check if functions are called correctly.
// As a second argument, you can also provide an explanation about what went wrong.
require(msg.sender == owner, \"Caller is not owner\");
_;
}
/**
* @dev Set contract deployer as owner
*/
constructor(uint112 abc, address abb, bytes32 ghnc) {
// console.log(\"Owner contract deployed by:\", msg.sender);
owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor
emit OwnerSet(address(0), owner);
}
/**
* @dev Change owner
* @param newOwner address of new owner
*/
function changeOwner(address newOwner) public isOwner {
emit OwnerSet(owner, newOwner);
owner = newOwner;
}
/**
* @dev Return owner address
* @return address of owner
*/
function getOwner() external view returns (address) {
return owner;
}
}",
"is_optimization_enabled": true,
"optimization_runs": 199,
"contract_name": "Owner",
"libraries": {
"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970",
"Libcheck_1": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"
},
"evm_version": "berlin",
"autodetect_constructor_args": true
}'
```
```js JavaScript theme={null}
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "mit",
"source_code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Owner\n * @dev Set & change owner\n */\ncontract Owner {\n\n address private owner;\n \n // event for EVM logging 2345678ewqwertyui54567890987654345678\n event OwnerSet(address indexed oldOwner, address indexed newOwner);\n \n // modifier to check if caller is owner\n modifier isOwner() {\n // If the first argument of 'require' evaluates to 'false', execution terminates and all\n // changes to the state and to Ether balances are reverted.\n // This used to consume all gas in old EVM versions, but not anymore.\n // It is often a good idea to use 'require' to check if functions are called correctly.\n // As a second argument, you can also provide an explanation about what went wrong.\n require(msg.sender == owner, \"Caller is not owner\");\n _;\n }\n \n /**\n * @dev Set contract deployer as owner\n */\n constructor(uint112 abc, address abb, bytes32 ghnc) {\n // console.log(\"Owner contract deployed by:\", msg.sender);\n owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor\n emit OwnerSet(address(0), owner);\n }\n\n /**\n * @dev Change owner\n * @param newOwner address of new owner\n */\n function changeOwner(address newOwner) public isOwner {\n emit OwnerSet(owner, newOwner);\n owner = newOwner;\n }\n\n /**\n * @dev Return owner address \n * @return address of owner\n */\n function getOwner() external view returns (address) {\n return owner;\n }\n}",
"is_optimization_enabled": true,
"optimization_runs": 199,
"contract_name": "Owner",
"libraries": {
"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970",
"Libcheck_1": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"
},
"evm_version": "berlin",
"autodetect_constructor_args": true
})
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code",
headers={"Content-Type":"application/json"},
data=json.dumps({
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "mit",
"source_code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Owner\n * @dev Set & change owner\n */\ncontract Owner {\n\n address private owner;\n \n // event for EVM logging 2345678ewqwertyui54567890987654345678\n event OwnerSet(address indexed oldOwner, address indexed newOwner);\n \n // modifier to check if caller is owner\n modifier isOwner() {\n // If the first argument of 'require' evaluates to 'false', execution terminates and all\n // changes to the state and to Ether balances are reverted.\n // This used to consume all gas in old EVM versions, but not anymore.\n // It is often a good idea to use 'require' to check if functions are called correctly.\n // As a second argument, you can also provide an explanation about what went wrong.\n require(msg.sender == owner, \"Caller is not owner\");\n _;\n }\n \n /**\n * @dev Set contract deployer as owner\n */\n constructor(uint112 abc, address abb, bytes32 ghnc) {\n // console.log(\"Owner contract deployed by:\", msg.sender);\n owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor\n emit OwnerSet(address(0), owner);\n }\n\n /**\n * @dev Change owner\n * @param newOwner address of new owner\n */\n function changeOwner(address newOwner) public isOwner {\n emit OwnerSet(owner, newOwner);\n owner = newOwner;\n }\n\n /**\n * @dev Return owner address \n * @return address of owner\n */\n function getOwner() external view returns (address) {\n return owner;\n }\n}",
"is_optimization_enabled": True,
"optimization_runs": 199,
"contract_name": "Owner",
"libraries": {
"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970",
"Libcheck_1": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"
},
"evm_version": "berlin",
"autodetect_constructor_args": True
})
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Via Standard JSON input
For more information on parameters to pass, see the [flattened source code information on the Verifying a smart contract page](/devs/verification#via-flattened-source-code). `0x` contract in POST example should be replaced with your contract hash.
### verification standard json
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input`
**Body**
Example: `v0.8.17+commit.8df45f5f`
Example: `Owner`
Β
Example: `false`
Example: `00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000`
Example: `gnu_gpl_v2`
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input HTTP/1.1
Host: eth.blockscout.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 370
{
"compiler_version": "v0.8.17+commit.8df45f5f",
"contract_name": "Owner",
"files[0]": "binary",
"autodetect_constructor_args": "false",
"constructor_args": "00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000",
"license_type": "gnu_gpl_v2"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input' \
--header 'Content-Type: multipart/form-data' \
--form 'compiler_version=v0.8.17+commit.8df45f5f' \
--form 'contract_name=Owner' \
--form 'files[0]=binary' \
--form 'autodetect_constructor_args=false' \
--form 'constructor_args=00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000' \
--form 'license_type=gnu_gpl_v2'
```
```js JavaScript theme={null}
const formData = new FormData();
formData.append("compiler_version", "v0.8.17+commit.8df45f5f");
formData.append("contract_name", "Owner");
formData.append("files[0]", "binary");
formData.append("autodetect_constructor_args", "false");
formData.append("constructor_args", "00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000");
formData.append("license_type", "gnu_gpl_v2");
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input', {
method: 'POST',
headers: {
"Content-Type": "multipart/form-data"
},
body: formData
});
const data = await response.json();
```
```py Python theme={null}
import requests
files = {
"compiler_version": "v0.8.17+commit.8df45f5f",
"contract_name": "Owner",
"files[0]": "binary",
"autodetect_constructor_args": "false",
"constructor_args": "00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000",
"license_type": "gnu_gpl_v2",
}
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input",
headers={"Content-Type":"multipart/form-data"},
files=files
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Via Sourcify Files
For more information on parameters to pass, see the [Contract Verification via Sourcify](/devs/verification/contracts-verification-via-sourcify). `0x` contract in POST example url should be replaced with your contract hash, as should your relevant variables.
### verification sourcify
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/sourcify`
**Body**
Β
Example: `4`
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/sourcify HTTP/1.1
Host: eth.blockscout.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 47
{
"files[0]": "text",
"chosen_contract_index": "4"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/sourcify' \
--header 'Content-Type: multipart/form-data' \
--form 'files[0]=text' \
--form 'chosen_contract_index=4'
```
```js JavaScript theme={null}
const formData = new FormData();
formData.append("files[0]", "text");
formData.append("chosen_contract_index", "4");
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/sourcify', {
method: 'POST',
headers: {
"Content-Type": "multipart/form-data"
},
body: formData
});
const data = await response.json();
```
```py Python theme={null}
import requests
files = {
"files[0]": "text",
"chosen_contract_index": "4",
}
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/sourcify",
headers={"Content-Type":"multipart/form-data"},
files=files
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Multi-part Solidity files
### verification multipart Copy
`POST` `https\://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part`
**Body**
Example: `v0.8.17+commit.8df45f5f`
Example: `gnu_gpl_v3`
Example: `true`
Example: `{"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"}`
Example: `london`
Example: `199`
Β
Β
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part HTTP/1.1
Host: eth.blockscout.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 271
{
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "gnu_gpl_v3",
"is_optimization_enabled": "true",
"libraries": "{\"Libcheck\": \"0x030f7c7dbd472864220bcf9e37ede1b8a3125970\"}",
"evm_version": "london",
"optimization_runs": "199",
"files[0]": "text",
"files[1]": "binary"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part' \
--header 'Content-Type: multipart/form-data' \
--form 'compiler_version=v0.8.17+commit.8df45f5f' \
--form 'license_type=gnu_gpl_v3' \
--form 'is_optimization_enabled=true' \
--form 'libraries={"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"}' \
--form 'evm_version=london' \
--form 'optimization_runs=199' \
--form 'files[0]=text' \
--form 'files[1]=binary'
```
```js JavaScript theme={null}
const formData = new FormData();
formData.append("compiler_version", "v0.8.17+commit.8df45f5f");
formData.append("license_type", "gnu_gpl_v3");
formData.append("is_optimization_enabled", "true");
formData.append("libraries", "{"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"}");
formData.append("evm_version", "london");
formData.append("optimization_runs", "199");
formData.append("files[0]", "text");
formData.append("files[1]", "binary");
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part', {
method: 'POST',
headers: {
"Content-Type": "multipart/form-data"
},
body: formData
});
const data = await response.json();
```
```py Python theme={null}
import requests
files = {
"compiler_version": "v0.8.17+commit.8df45f5f",
"license_type": "gnu_gpl_v3",
"is_optimization_enabled": "true",
"libraries": "{"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"}",
"evm_version": "london",
"optimization_runs": "199",
"files[0]": "text",
"files[1]": "binary",
}
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part",
headers={"Content-Type":"multipart/form-data"},
files=files
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Vyper Contracts
### verification vyper contract
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0xd73249995040f04cb891bdf0f997579ee3a6676c/verification/via/vyper-code`
**Body**
Example: `{"compiler_version":"v0.2.12+commit.2c6842c","license_type":"gnu_agpl_v3","source_code":"from vyper.interfaces import ERC20\n\nimplements: ERC20\n\nevent Transfer:\n sender: indexed(address)\n receiver: indexed(address)\n value: uint256\n\nevent Approval:\n owner: indexed(address)\n spender: indexed(address)\n value: uint256\n\nname: public(String[64])\nsymbol: public(String[32])\ndecimals: public(uint256)\n\nbalanceOf: public(HashMap[address, uint256])\nallowance: public(HashMap[address, HashMap[address, uint256]])\ntotalSupply: public(uint256)\nminter: address\n_supply: uint256\n_check: uint256 #1% of the total supply check\n\n\n@external\ndef __init__():\n self._supply = 10_000_000_000 \n self._check = 100_000_000\n self.decimals = 18\n self.name = 'Kooopa'\n self.symbol = 'KOO'\n \n init_supply: uint256 = self._supply * 10 ** self.decimals\n \n self.balanceOf[msg.sender] = init_supply\n self.totalSupply = init_supply\n self.minter = msg.sender\n\n log Transfer(ZERO_ADDRESS, msg.sender, init_supply)\n\n\n@internal\ndef _transfer(_from : address, _to : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Transfer limit of 1%(100 Million) Tokens'\n\n TargetBalance: uint256 = self.balanceOf[_to] + _value\n assert TargetBalance <= self._check, 'Single wallet cannot hold more than 1%(100 Million) Tokens'\n\n self.balanceOf[_from] -= _value\n self.balanceOf[_to] += _value\n log Transfer(_from, _to, _value)\n return True\n\n\n@external\ndef transfer(_to : address, _value : uint256) -> bool:\n self._transfer(msg.sender, _to, _value)\n return True\n\n\n@external\ndef transferFrom(_from : address, _to : address, _value : uint256) -> bool:\n self._transfer(_from, _to, _value)\n self.allowance[_from][msg.sender] -= _value\n return True\n\n\n@external\ndef approve(_spender : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Cant Approve more than 1%(100 Million) Tokens for transfer'\n\n self.allowance[msg.sender][_spender] = _value\n log Approval(msg.sender, _spender, _value)\n return True\n\n\n@external\ndef mint(_to: address, _value: uint256):\n assert msg.sender == self.minter\n assert _to != ZERO_ADDRESS\n self.totalSupply += _value\n self.balanceOf[_to] += _value\n log Transfer(ZERO_ADDRESS, _to, _value)\n\n\n@internal\ndef _burn(_to: address, _value: uint256):\n \n assert _to != ZERO_ADDRESS\n self.totalSupply -= _value\n self.balanceOf[_to] -= _value\n log Transfer(_to, ZERO_ADDRESS, _value)\n\n\n@external\ndef burn(_value: uint256):\n self._burn(msg.sender, _value)\n\n\n@external\ndef burnFrom(_to: address, _value: uint256):\n self.allowance[_to][msg.sender] -= _value\n self._burn(_to, _value)","constructor_args":null,"contract_name":"Storage","evm_version":"istanbul"}`
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0xd73249995040f04cb891bdf0f997579ee3a6676c/verification/via/vyper-code HTTP/1.1
Host: eth.blockscout.com
Content-Type: application/json
Accept: */*
Content-Length: 2891
{
"compiler_version": "v0.2.12+commit.2c6842c",
"license_type": "gnu_agpl_v3",
"source_code": "from vyper.interfaces import ERC20\n\nimplements: ERC20\n\nevent Transfer:\n sender: indexed(address)\n receiver: indexed(address)\n value: uint256\n\nevent Approval:\n owner: indexed(address)\n spender: indexed(address)\n value: uint256\n\nname: public(String[64])\nsymbol: public(String[32])\ndecimals: public(uint256)\n\nbalanceOf: public(HashMap[address, uint256])\nallowance: public(HashMap[address, HashMap[address, uint256]])\ntotalSupply: public(uint256)\nminter: address\n_supply: uint256\n_check: uint256 #1% of the total supply check\n\n\n@external\ndef __init__():\n self._supply = 10_000_000_000 \n self._check = 100_000_000\n self.decimals = 18\n self.name = 'Kooopa'\n self.symbol = 'KOO'\n \n init_supply: uint256 = self._supply * 10 ** self.decimals\n \n self.balanceOf[msg.sender] = init_supply\n self.totalSupply = init_supply\n self.minter = msg.sender\n\n log Transfer(ZERO_ADDRESS, msg.sender, init_supply)\n\n\n@internal\ndef _transfer(_from : address, _to : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Transfer limit of 1%(100 Million) Tokens'\n\n TargetBalance: uint256 = self.balanceOf[_to] + _value\n assert TargetBalance <= self._check, 'Single wallet cannot hold more than 1%(100 Million) Tokens'\n\n self.balanceOf[_from] -= _value\n self.balanceOf[_to] += _value\n log Transfer(_from, _to, _value)\n return True\n\n\n@external\ndef transfer(_to : address, _value : uint256) -> bool:\n self._transfer(msg.sender, _to, _value)\n return True\n\n\n@external\ndef transferFrom(_from : address, _to : address, _value : uint256) -> bool:\n self._transfer(_from, _to, _value)\n self.allowance[_from][msg.sender] -= _value\n return True\n\n\n@external\ndef approve(_spender : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Cant Approve more than 1%(100 Million) Tokens for transfer'\n\n self.allowance[msg.sender][_spender] = _value\n log Approval(msg.sender, _spender, _value)\n return True\n\n\n@external\ndef mint(_to: address, _value: uint256):\n assert msg.sender == self.minter\n assert _to != ZERO_ADDRESS\n self.totalSupply += _value\n self.balanceOf[_to] += _value\n log Transfer(ZERO_ADDRESS, _to, _value)\n\n\n@internal\ndef _burn(_to: address, _value: uint256):\n \n assert _to != ZERO_ADDRESS\n self.totalSupply -= _value\n self.balanceOf[_to] -= _value\n log Transfer(_to, ZERO_ADDRESS, _value)\n\n\n@external\ndef burn(_value: uint256):\n self._burn(msg.sender, _value)\n\n\n@external\ndef burnFrom(_to: address, _value: uint256):\n self.allowance[_to][msg.sender] -= _value\n self._burn(_to, _value)",
"constructor_args": null,
"contract_name": "Storage",
"evm_version": "istanbul"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0xd73249995040f04cb891bdf0f997579ee3a6676c/verification/via/vyper-code' \
--header 'Content-Type: application/json' \
--data '{
"compiler_version": "v0.2.12+commit.2c6842c",
"license_type": "gnu_agpl_v3",
"source_code": "from vyper.interfaces import ERC20
implements: ERC20
event Transfer:
sender: indexed(address)
receiver: indexed(address)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
name: public(String[64])
symbol: public(String[32])
decimals: public(uint256)
balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
totalSupply: public(uint256)
minter: address
_supply: uint256
_check: uint256 #1% of the total supply check
@external
def __init__():
self._supply = 10_000_000_000
self._check = 100_000_000
self.decimals = 18
self.name = 'Kooopa'
self.symbol = 'KOO'
init_supply: uint256 = self._supply * 10 ** self.decimals
self.balanceOf[msg.sender] = init_supply
self.totalSupply = init_supply
self.minter = msg.sender
log Transfer(ZERO_ADDRESS, msg.sender, init_supply)
@internal
def _transfer(_from : address, _to : address, _value : uint256) -> bool:
assert _value <= self._check, 'Transfer limit of 1%(100 Million) Tokens'
TargetBalance: uint256 = self.balanceOf[_to] + _value
assert TargetBalance <= self._check, 'Single wallet cannot hold more than 1%(100 Million) Tokens'
self.balanceOf[_from] -= _value
self.balanceOf[_to] += _value
log Transfer(_from, _to, _value)
return True
@external
def transfer(_to : address, _value : uint256) -> bool:
self._transfer(msg.sender, _to, _value)
return True
@external
def transferFrom(_from : address, _to : address, _value : uint256) -> bool:
self._transfer(_from, _to, _value)
self.allowance[_from][msg.sender] -= _value
return True
@external
def approve(_spender : address, _value : uint256) -> bool:
assert _value <= self._check, 'Cant Approve more than 1%(100 Million) Tokens for transfer'
self.allowance[msg.sender][_spender] = _value
log Approval(msg.sender, _spender, _value)
return True
@external
def mint(_to: address, _value: uint256):
assert msg.sender == self.minter
assert _to != ZERO_ADDRESS
self.totalSupply += _value
self.balanceOf[_to] += _value
log Transfer(ZERO_ADDRESS, _to, _value)
@internal
def _burn(_to: address, _value: uint256):
assert _to != ZERO_ADDRESS
self.totalSupply -= _value
self.balanceOf[_to] -= _value
log Transfer(_to, ZERO_ADDRESS, _value)
@external
def burn(_value: uint256):
self._burn(msg.sender, _value)
@external
def burnFrom(_to: address, _value: uint256):
self.allowance[_to][msg.sender] -= _value
self._burn(_to, _value)",
"constructor_args": null,
"contract_name": "Storage",
"evm_version": "istanbul"
}'
```
```js JavaScript theme={null}
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0xd73249995040f04cb891bdf0f997579ee3a6676c/verification/via/vyper-code', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"compiler_version": "v0.2.12+commit.2c6842c",
"license_type": "gnu_agpl_v3",
"source_code": "from vyper.interfaces import ERC20\n\nimplements: ERC20\n\nevent Transfer:\n sender: indexed(address)\n receiver: indexed(address)\n value: uint256\n\nevent Approval:\n owner: indexed(address)\n spender: indexed(address)\n value: uint256\n\nname: public(String[64])\nsymbol: public(String[32])\ndecimals: public(uint256)\n\nbalanceOf: public(HashMap[address, uint256])\nallowance: public(HashMap[address, HashMap[address, uint256]])\ntotalSupply: public(uint256)\nminter: address\n_supply: uint256\n_check: uint256 #1% of the total supply check\n\n\n@external\ndef __init__():\n self._supply = 10_000_000_000 \n self._check = 100_000_000\n self.decimals = 18\n self.name = 'Kooopa'\n self.symbol = 'KOO'\n \n init_supply: uint256 = self._supply * 10 ** self.decimals\n \n self.balanceOf[msg.sender] = init_supply\n self.totalSupply = init_supply\n self.minter = msg.sender\n\n log Transfer(ZERO_ADDRESS, msg.sender, init_supply)\n\n\n@internal\ndef _transfer(_from : address, _to : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Transfer limit of 1%(100 Million) Tokens'\n\n TargetBalance: uint256 = self.balanceOf[_to] + _value\n assert TargetBalance <= self._check, 'Single wallet cannot hold more than 1%(100 Million) Tokens'\n\n self.balanceOf[_from] -= _value\n self.balanceOf[_to] += _value\n log Transfer(_from, _to, _value)\n return True\n\n\n@external\ndef transfer(_to : address, _value : uint256) -> bool:\n self._transfer(msg.sender, _to, _value)\n return True\n\n\n@external\ndef transferFrom(_from : address, _to : address, _value : uint256) -> bool:\n self._transfer(_from, _to, _value)\n self.allowance[_from][msg.sender] -= _value\n return True\n\n\n@external\ndef approve(_spender : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Cant Approve more than 1%(100 Million) Tokens for transfer'\n\n self.allowance[msg.sender][_spender] = _value\n log Approval(msg.sender, _spender, _value)\n return True\n\n\n@external\ndef mint(_to: address, _value: uint256):\n assert msg.sender == self.minter\n assert _to != ZERO_ADDRESS\n self.totalSupply += _value\n self.balanceOf[_to] += _value\n log Transfer(ZERO_ADDRESS, _to, _value)\n\n\n@internal\ndef _burn(_to: address, _value: uint256):\n \n assert _to != ZERO_ADDRESS\n self.totalSupply -= _value\n self.balanceOf[_to] -= _value\n log Transfer(_to, ZERO_ADDRESS, _value)\n\n\n@external\ndef burn(_value: uint256):\n self._burn(msg.sender, _value)\n\n\n@external\ndef burnFrom(_to: address, _value: uint256):\n self.allowance[_to][msg.sender] -= _value\n self._burn(_to, _value)",
"constructor_args": null,
"contract_name": "Storage",
"evm_version": "istanbul"
})
});
const data = await response.json();
```
```py Python theme={null}
import requests
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0xd73249995040f04cb891bdf0f997579ee3a6676c/verification/via/vyper-code",
headers={"Content-Type":"application/json"},
data=json.dumps({
"compiler_version": "v0.2.12+commit.2c6842c",
"license_type": "gnu_agpl_v3",
"source_code": "from vyper.interfaces import ERC20\n\nimplements: ERC20\n\nevent Transfer:\n sender: indexed(address)\n receiver: indexed(address)\n value: uint256\n\nevent Approval:\n owner: indexed(address)\n spender: indexed(address)\n value: uint256\n\nname: public(String[64])\nsymbol: public(String[32])\ndecimals: public(uint256)\n\nbalanceOf: public(HashMap[address, uint256])\nallowance: public(HashMap[address, HashMap[address, uint256]])\ntotalSupply: public(uint256)\nminter: address\n_supply: uint256\n_check: uint256 #1% of the total supply check\n\n\n@external\ndef __init__():\n self._supply = 10_000_000_000 \n self._check = 100_000_000\n self.decimals = 18\n self.name = 'Kooopa'\n self.symbol = 'KOO'\n \n init_supply: uint256 = self._supply * 10 ** self.decimals\n \n self.balanceOf[msg.sender] = init_supply\n self.totalSupply = init_supply\n self.minter = msg.sender\n\n log Transfer(ZERO_ADDRESS, msg.sender, init_supply)\n\n\n@internal\ndef _transfer(_from : address, _to : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Transfer limit of 1%(100 Million) Tokens'\n\n TargetBalance: uint256 = self.balanceOf[_to] + _value\n assert TargetBalance <= self._check, 'Single wallet cannot hold more than 1%(100 Million) Tokens'\n\n self.balanceOf[_from] -= _value\n self.balanceOf[_to] += _value\n log Transfer(_from, _to, _value)\n return True\n\n\n@external\ndef transfer(_to : address, _value : uint256) -> bool:\n self._transfer(msg.sender, _to, _value)\n return True\n\n\n@external\ndef transferFrom(_from : address, _to : address, _value : uint256) -> bool:\n self._transfer(_from, _to, _value)\n self.allowance[_from][msg.sender] -= _value\n return True\n\n\n@external\ndef approve(_spender : address, _value : uint256) -> bool:\n assert _value <= self._check, 'Cant Approve more than 1%(100 Million) Tokens for transfer'\n\n self.allowance[msg.sender][_spender] = _value\n log Approval(msg.sender, _spender, _value)\n return True\n\n\n@external\ndef mint(_to: address, _value: uint256):\n assert msg.sender == self.minter\n assert _to != ZERO_ADDRESS\n self.totalSupply += _value\n self.balanceOf[_to] += _value\n log Transfer(ZERO_ADDRESS, _to, _value)\n\n\n@internal\ndef _burn(_to: address, _value: uint256):\n \n assert _to != ZERO_ADDRESS\n self.totalSupply -= _value\n self.balanceOf[_to] -= _value\n log Transfer(_to, ZERO_ADDRESS, _value)\n\n\n@external\ndef burn(_value: uint256):\n self._burn(msg.sender, _value)\n\n\n@external\ndef burnFrom(_to: address, _value: uint256):\n self.allowance[_to][msg.sender] -= _value\n self._burn(_to, _value)",
"constructor_args": None,
"contract_name": "Storage",
"evm_version": "istanbul"
})
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Vyper Multi-part files
### verification multipart vyper
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-multi-part`
**Body**
Example: `v0.3.7+commit.6020b8bb`
Example: `gnu_lgpl_v2_1`
Example: `istanbul`
Β
Β
Β
Β
Β
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-multi-part HTTP/1.1
Host: eth.blockscout.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 216
{
"compiler_version": "v0.3.7+commit.6020b8bb",
"license_type": "gnu_lgpl_v2_1",
"evm_version": "istanbul",
"files[0]": "binary",
"files[1]": "binary",
"interfaces[0]": "binary",
"interfaces[1]": "binary",
"interfaces[2]": "binary"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-multi-part' \
--header 'Content-Type: multipart/form-data' \
--form 'compiler_version=v0.3.7+commit.6020b8bb' \
--form 'license_type=gnu_lgpl_v2_1' \
--form 'evm_version=istanbul' \
--form 'files[0]=binary' \
--form 'files[1]=binary' \
--form 'interfaces[0]=binary' \
--form 'interfaces[1]=binary' \
--form 'interfaces[2]=binary'
```
```js JavaScript theme={null}
const formData = new FormData();
formData.append("compiler_version", "v0.3.7+commit.6020b8bb");
formData.append("license_type", "gnu_lgpl_v2_1");
formData.append("evm_version", "istanbul");
formData.append("files[0]", "binary");
formData.append("files[1]", "binary");
formData.append("interfaces[0]", "binary");
formData.append("interfaces[1]", "binary");
formData.append("interfaces[2]", "binary");
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-multi-part', {
method: 'POST',
headers: {
"Content-Type": "multipart/form-data"
},
body: formData
});
const data = await response.json();
```
```py Python theme={null}
import requests
files = {
"compiler_version": "v0.3.7+commit.6020b8bb",
"license_type": "gnu_lgpl_v2_1",
"evm_version": "istanbul",
"files[0]": "binary",
"files[1]": "binary",
"interfaces[0]": "binary",
"interfaces[1]": "binary",
"interfaces[2]": "binary",
}
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-multi-part",
headers={"Content-Type":"multipart/form-data"},
files=files
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
## Vyper Standard JSON input
### verification standard json vyper
`POST` `https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-standard-input`
**Body**
Example: `v0.2.7+commit.0b3f3b3`
Example: `gnu_lgpl_v3`
Example: `istanbul`
Β
Β
**Responses**
Β
```http HTTP theme={null}
POST /api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-standard-input HTTP/1.1
Host: eth.blockscout.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 138
{
"compiler_version": "v0.2.7+commit.0b3f3b3",
"license_type": "gnu_lgpl_v3",
"evm_version": "istanbul",
"files[0]": "binary",
"files[1]": "binary"
}
```
```sh cURL theme={null}
curl -L \
--request POST \
--url 'https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-standard-input' \
--header 'Content-Type: multipart/form-data' \
--form 'compiler_version=v0.2.7+commit.0b3f3b3' \
--form 'license_type=gnu_lgpl_v3' \
--form 'evm_version=istanbul' \
--form 'files[0]=binary' \
--form 'files[1]=binary'
```
```js JavaScript theme={null}
const formData = new FormData();
formData.append("compiler_version", "v0.2.7+commit.0b3f3b3");
formData.append("license_type", "gnu_lgpl_v3");
formData.append("evm_version", "istanbul");
formData.append("files[0]", "binary");
formData.append("files[1]", "binary");
const response = await fetch('https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-standard-input', {
method: 'POST',
headers: {
"Content-Type": "multipart/form-data"
},
body: formData
});
const data = await response.json();
```
```py Python theme={null}
import requests
files = {
"compiler_version": "v0.2.7+commit.0b3f3b3",
"license_type": "gnu_lgpl_v3",
"evm_version": "istanbul",
"files[0]": "binary",
"files[1]": "binary",
}
response = requests.post(
"https://eth.blockscout.com/api/v2/smart-contracts/0xc3fd3c09d5481f4d6c85e70775804de4c93fe630/verification/via/vyper-standard-input",
headers={"Content-Type":"multipart/form-data"},
files=files
)
data = response.json()
```
```json 200 Successful Response theme={null}
No content
```
# Blockscout UI
Source: https://docs.blockscout.com/devs/verification/blockscout-ui
Verification is available for both Solidity and Vyper contracts. **Currently, there are 7 different type of inputs you can use for verification using the Blockscout UI.**
π·π»ββοΈ If preferred you can verify directly from your Hardhat or Foundry dev environment.
* [Hardhat Verification Plugin](/devs/verification/hardhat-verification-plugin)
* [Foundry Verification](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)
To learn more about the smart contract verification Rust microservice and verification algorithm [see this page for developers](/setup/microservices/smart-contract-verification).
## Smart Contract Verification with Blockscout
1. Go to the Verify contract page *(Other -> Verify contract)*
2. Enter in the contract address you received during deployment. The dropdown will show you several available verification options. Select the one you would like to use and continue.
* [Solidity (Flattened source code)](/devs/verification#via-flattened-source-code)
* [Solidity (Standard JSON input)](/devs/verification/blockscout-ui#via-standard-json-input)
* [Solidity (Sourcify)](/devs/verification/contracts-verification-via-sourcify)
* [Solidity (Multi-part files)](/devs/verification/blockscout-ui#solidity-multi-part-files)
* [Vyper (Contract)](/devs/verification#vyper-contract)
* [Vyper (Multi-part files)](/devs/verification/blockscout-ui#vyper-multi-part-files-and-standard-json-input)
* [Vyper (Standard JSON input)](/devs/verification/blockscout-ui#vyper-multi-part-files-and-standard-json-input)
### Solidity (Flattened source code)
This verification method is recommended only for a single-file smart contract without any imports. For verification of contracts containing more that 1 file, a different verification method is recommended.
1. **Contract Address:** The `0x` address supplied on contract creation (added above)
2. **Is Yul contract:** Select if the contract is coded in Yul for efficiency.
3. **Include Nightly Builds**: Select if you want to show nightly builds.
4. **Compiler:** derived from the first line in the contract `pragma solidity X.X.X`. Use the corresponding compiler version rather than the nightly build.
5. **EVM Version:** Select the correct[EVM version](/setup/information-and-settings/evm-version-information)if known, otherwise use default.
6. **Optimization Enabled:** If you enabled optimization during compilation, select and enter the run value. 200 is the Solidity Compiler default value. Only change if you changed this value while compiling.
7. **Enter the Solidity Contract Code:** Copy-paste the source code of your smart contract as is.
8. **Add Contract Libraries:** Enter the name and 0x address for any required libraries called in the .sol file. You can add multiple contracts with the "+" button.
9. Click the `Verify and Publish` button.
10. If all goes well, you will see a checkmark β next to Code in the code tab, and an additional tab called `Read Contract`. The contract name will now appear in BlockScout with any transactions related to your contract.
### Solidity (Standard JSON input)
[More information on JSON input is available here](https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description).
1. **Include nightly builds**. You can choose **Yes** or **No** depending on your compiler.
2. **Compiler.** Choose the compiler version used to compile your smart contract. If you selected yes for nightly builds, use the compiler version rather than the build.
3. **Standard Input JSON.** Upload your Standard Input JSON file. File should follows solidity [format](https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description) and all the sources must be in Literal Content format, not a URL.
Click the **Verify & publish** button and wait for the response.
### Via Sourcify: Sources and metadata JSON file
See the [Contract Verification via Sourcify](/devs/verification/contracts-verification-via-sourcify) page for details.
### Solidity (Multi-part files)
See the above settings. You will upload all of the .sol or .yul files you used for your contract. This method requires at least 2 files - if you have a single file use the flattened source code method.
### Vyper Contract
1. **Contract Name:** Name assigned to the contract.
2. **Compiler**: Select the compiler version used in the source code.
3. **EVM Version:** Select the correct [EVM version](/setup/information-and-settings/evm-version-information) if known, otherwise use default.
4. **Contract Code:** Copy and paste the contract code
5. Click the `Verify and Publish` button.
If all goes well, you will see a checkmark β next to Code in the code tab, and an additional tab called `Read Contract`. The contract name will now appear in BlockScout with any transactions related to your contract.
### Vyper Multi-part files and standard json input
See the information above.
## Troubleshooting
If you receive the dreaded `There was an error compiling your contract` message this means the bytecode doesn't match the supplied sourcecode. Unfortunately, there are many reasons this may be the case. Here are a few things to try:
1. Double check the compiler version is correct.
Check all version digits - for example 0.5.1 is different from 0.5.10
2. Check that an extra space has not been added to the end of the contract. When pasting in, an extra space may be added. Delete this and attempt to recompile.
3. Copy, paste, and verify your source code in Remix. You may find some exceptions here.
### Verification in a dev environment
The [Hardhat verification plugin](/devs/verification/hardhat-verification-plugin) supports BlockScout. You can also choose to use the [Sourcify plugin](/devs/verification/hardhat-verification-plugin/sourcify-plugin-for-hardhat) to verify with Sourcify from your hardhat environment. [Foundry supports blockscout verification with Forge](https://book.getfoundry.sh/reference/forge/forge-verify-contract).
# Sourcify Verification
Source: https://docs.blockscout.com/devs/verification/contracts-verification-via-sourcify
Along with contract verification through a flattened source file (the default option in Blockscout), a [Sourcify](https://sourcify.dev/) verification option through their UI is also available.
## Usage Example
Verify your contract using Sourcify:
1\) Go to the Verify contract page *(Other -> Verify contract)*
2\) Enter the deployed contract address, select Sourcify (Solidity or Vyper) from the Verification method dropdown.
3\) Now follow the instructions inside the Sourcify widget. Select the smart contract language of the source code and a verification method.
4\) Upload or paste your contract source code according to the selected verification method. In the example, we paste the contract sources as Std Json into the text box. Select the compiler version and contract identifier.
Once all information is provided, start the verification by clicking the Verify Contract button.
5\) You can follow the verification process by clicking on the View Job Status button.
After several seconds your contract should be verified through Sourcify's API (If verification fails, you will see the reason in the job status page). Verification metadata will be saved in the Blockscout DB and you will see the verified contract page with the link to the same metadata in the [Sourcify contract repository](https://repo.sourcify.dev/).
### Example Contract:
* Contract [verified in Blockscout](https://gnosis.blockscout.com/address/0x4f15a6e74CFC2F80D5967a8aB75F3c83D8043cF4?tab=contract)
* The same contract in the [Sourcify contract repository](https://repo.sourcify.dev/contracts/full_match/100/0x4f15a6e74CFC2F80D5967a8aB75F3c83D8043cF4/).
# Foundry Verification
Source: https://docs.blockscout.com/devs/verification/foundry-verification
[Foundry](https://github.com/foundry-rs/foundry/) is a smart contract development toolchain. Foundry manages your dependencies, compiles your project, runs tests, deploys, and lets you interact with the chain from the command line and via Solidity scripts.
Forge is a command-line tool that ships with Foundry. Forge tests, builds, and deploys your smart contracts. Forge supports contract verification out of the box ([https://book.getfoundry.sh/reference/forge/forge-verify-contract](https://book.getfoundry.sh/reference/forge/forge-verify-contract))
## Verify contract
In forge, contracts can be verified at the time of the deployment (e.g. using `forge script`), or later, if the contracts are already deployed (e.g. using `forge verify-contract`).
#### Tips:
1. Specify the `βverifier=blockscout` flag to use the Blockscout verification provider. API key for Blockscout verification is optional.
2. Specify the `--verifier-url=/api/` flag for connecting to a specific Blockscout instance (e.g., `--verifier-url=https://eth-sepolia.blockscout.com/api/`).
3. You can specify most configuration options (e.g., evm version, disabling optimizations) via the usual Forge configuration (see [https://github.com/foundry-rs/foundry/blob/master/config/README.md](https://github.com/foundry-rs/foundry/blob/master/config/README.md)).
### Example (Deploy and verify)
Verify a contract with Blockscout right after deployment (make sure you add "/api/" to the end of the Blockscout homepage explorer URL):
```sh theme={null}
forge create \
--rpc-url \
--private-key $PRIVATE_KEY \
: \
--verify \
--verifier blockscout \
--verifier-url /api/
```
Or if using foundry scripts:
```sh theme={null}
forge script \
--rpc-url \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--verifier blockscout \
--verifier-url /api/
```
### Example (Verify already deployed contract)
```sh theme={null}
forge verify-contract \
--rpc-url \
\
: \
--verifier blockscout \
--verifier-url /api/
```
Or if using foundry scripts for last executed script run:
```sh theme={null}
forge script \
--rpc-url \
--private-key $PRIVATE_KEY \
--resume \
--verify \
--verifier blockscout \
--verifier-url /api/
```
# Hardhat Verification Plugin
Source: https://docs.blockscout.com/devs/verification/hardhat-verification-plugin
[Hardhat](https://hardhat.org/) is a full-featured development environment for contract compilation, deployment and verification. The [hardhat-verify plugin](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify) supports contract verification on Blockscout.
## Get Started
### **1) Install Hardhat**
If you are starting from scratch, create an npm project by going to an empty folder, running `npm init`, and following the instructions. Recommend npm 7 or higher.
Once your project is ready:
**npm instructions**
```sh theme={null}
npm install --save-dev hardhat
```
**yarn instructions**
```sh theme={null}
yarn add --dev hardhat
```
### **2) Create a project**
Run `npx hardhat` in your project folder and follow the instructions to create ([more info here](https://hardhat.org/getting-started/#quick-start)).
### 3) Install plugin
Install the [hardhat-verify plugin](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)
**npm**
```sh theme={null}
npm install --save-dev @nomicfoundation/hardhat-verify
```
**yarn**
```sh theme={null}
yarn add --dev @nomicfoundation/hardhat-verify
```
### 4) Add plugin reference to config file
Add the following statement to your `hardhat.config.js`.
```javascript theme={null}
require("@nomicfoundation/hardhat-verify");
```
If using TypeScript, add this to your `hardhat.config.ts.` [More info on using typescript with hardhat available here](https://hardhat.org/guides/typescript.html#typescript-support).
```ts theme={null}
import "@nomicfoundation/hardhat-verify";
```
## Config File and Unsupported Networks
Your basic [Hardhat config file](https://hardhat.org/config/) (`hardhat.config.js` or `hardhat.config.ts`) will be setup to support the network you are working on. In this example we use the Optimism Sepolia test network and a `.js` file.
Here we add an RPC url without an API key, however some value is still required. You can use any arbitrary string. [More info](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#multiple-api-keys-and-alternative-block-explorers).
If you prefer, you can migrate to [hardhat-toolbox](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox) to use a plugin bundle.
In order to use Blockscout explorer for the verification, you have to specify the explorer details under a `customChains` object. It includes:
* `chainID` - Network chain ID
* `apiURL` - Block explorer API URL
* `browserURL` - Block explorer URL
Find an extensive list of ChainIDs at [https://chainlist.org/](https://chainlist.org/).
For example, here we added Blockscout api endpoints for the Optimism Sepolia network to the config file. Note the network name in `customChains` must match the network name in the `apiKey` object.
```javascript theme={null}
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-verify";
const PRIVATE_KEY = vars.get("PRIVATE_KEY");
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
'optimism-sepolia': {
url: 'https://sepolia.optimism.io',
accounts: [PRIVATE_KEY],
},
},
etherscan: {
apiKey: {
// Is not required by blockscout. Can be any non-empty string
'optimism-sepolia': "abc"
},
customChains: [
{
network: "optimism-sepolia",
chainId: 11155420,
urls: {
apiURL: "https://optimism-sepolia.blockscout.com/api",
browserURL: "https://optimism-sepolia.blockscout.com/",
}
}
]
},
sourcify: {
enabled: false
}
};
export default config;
```
## Deploy and Verify
For deployment we will use [Hardhat Ignition](https://hardhat.org/ignition/docs/getting-started#overview) - built-in Hardhat deployment system.
### Deploy
```txt theme={null}
> npx hardhat ignition deploy ./ignition/modules/Lock.ts --network optimism-sepolia
β Confirm deploy to network optimism-sepolia (11155420)? β¦ yes
Compiled 1 Solidity file successfully (evm target: paris).
Hardhat Ignition π
Deploying [ LockModule ]
Batch #1
Executed LockModule#Lock
[ LockModule ] successfully deployed π
Deployed Addresses
LockModule#Lock - 0xFE826b33e425f99ce962ACB91752DB41F302EFEA
```
### Verify
The plugin requires you to include constructor arguments with the verify task and ensures that they correspond to expected ABI signature. However, Blockscout ignores those arguments, so you may specify any values that correspond to the ABI.
```sh theme={null}
npx hardhat verify --network DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
```
Optimism Sepolia example.
```sh theme={null}
> npx hardhat verify --network optimism-sepolia 0xFE826b33e425f99ce962ACB91752DB41F302EFEA 1234
Successfully submitted source code for contract
contracts/Lock.sol:Lock at 0xFE826b33e425f99ce962ACB91752DB41F302EFEA
for verification on the block explorer. Waiting for verification result...
Successfully verified contract Lock on the block explorer.
https://optimism-sepolia.blockscout.com/address/0xFE826b33e425f99ce962ACB91752DB41F302EFEA#code
```
### Automatically verified contracts
Sometimes the contract may be automatically verified via [Ethereum Bytecode Database](https://docs.blockscout.com/about/features/ethereum-bytecode-database-microservice#solution-ethereum-bytecode-database-blockscout-ebd) service. In that case you may see the following response:
```txt theme={null}
The contract 0xFE826b33e425f99ce962ACB91752DB41F302EFEA has already been verified on Etherscan.
https://optimism-sepolia.blockscout.com/address/0xFE826b33e425f99ce962ACB91752DB41F302EFEA#code
```
In that case, you may try to enforce using `--force` flag\*.
It prevents Hardhat from checking if the contract is already verified, and force it to send verification request anyway. Notice, that it is helpful only if the contract was automatically verified **partially**. That way, a new verification sources would be saved. If the contract was **fully** verified already, that just returns an error.
```sh theme={null}
npx hardhat verify --network DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1" --force
```
* The flag is available starting from `@nomicfoundation/hardhat-verify@2.0.7`
## Confirm Verification on BlockScout
Go to your BlockScout instance and paste the contract address into the search bar.
Scroll down to see verified status. A green checkmark β means the contract is verified.
If your screen size is limited, you may need to click the 3 dots to view and click through to the contract.
Scroll down to see and interact with the contract code.
## Video example
Community video created by Carlos Rodriguez for the Soneium Minato testnet, but can be applicable to any chain.
## FAQ
Although you receive an error, the contracts should be verified during the previous steps and you can ignore. Check in the explorer to make sure the contracts have been verified.
## Resources
Learn more about plugin configs, troubleshooting etc. at [https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)
# Sourcify Plugin For Hardhat
Source: https://docs.blockscout.com/devs/verification/hardhat-verification-plugin/sourcify-plugin-for-hardhat
Similar to the [hardhat verification plugin](/devs/verification/hardhat-verification-plugin), this plugin submits the contract source and other info of all deployed contracts to Sourcify.
### Verify
Similar to the verification approach described in the [hardhat verification plugin](/devs/verification/hardhat-verification-plugin), you can verify the contract source code in Sourcify as well by setting the following in the hardhat config file:
```javascript theme={null}
// ...
const config: HardhatUserConfig = {
// ...
sourcify: {
enabled: true
},
// ...
};
export default config;
```
```sh theme={null}
npx hardhat verify --network DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
```
Optimism Sepolia example:
```sh theme={null}
> npx hardhat verify --network optimism-sepolia 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba 1234
Successfully submitted source code for contract
contracts/Lock.sol:Lock at 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba
for verification on the block explorer. Waiting for verification result...
Successfully verified contract Lock on the block explorer.
https://optimism-sepolia.blockscout.com/address/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba#code
Successfully verified contract Lock on Sourcify.
https://repo.sourcify.dev/contracts/full_match/11155420/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba/
```
## Confirm Verification on Blockscout
Go to your BlockScout instance and paste the contract address into the search bar.
Scroll down to see verified status. A green checkmark β means the contract is verified.
If your screen size is limited, you may need to click the 3 dots to view and click through to the contract.
Scroll down to see and interact with the contract code.
# Interacting with Smart Contracts
Source: https://docs.blockscout.com/devs/verification/interacting-with-smart-contracts
Use Blockscout to Read and Write to Smart Contracts
Once a contract is verified, contract methods are exposed and contract interaction is possible directly from Blockscout.
In the following examples we use Blockscout on Gnosis Chain. You can interact with verified contracts on any supported chain. Make sure your web3 wallet (like MetaMask) is also connected to that chain when reading / writing to a contract.
## Read Contract
Read actions let you check various contract attributes. You will need to connect a web3 wallet to make a query, though a query does not require a transaction or any gas costs.
1\) Find the contract address you want to interact with and enter into the search bar. In this example we search for USDC on Gnosis Chain.
2\) We select the first option in search and are taken to the token page. We can interact from here, but would prefer to see more information about the contract, so we click through to the contract page.
3\) Scrolling down past the contract details we see the code is verified by the checkmarkβ . If the code is not verified, it is not possible to read or write to a contract (unless a verified contract with the same bytecode is located in the Blockscout database. In this case read/write will also be available).
4\) We know this is a proxy implementation by the fact that there are options to either read/write to the contract or to the proxy. Proxy means that the contract is upgradeable, and the admin can set a new proxy address for the primary contract if upgrades are required.
We will choose to **Read Proxy**, since it contains all the relevant methods for the current contract implementation.
5\) We can see the various methods within the proxy contract. Some show current values and others are queryable. An easy example to query is 8) `balanceOf` method.
6\) This method expects an address and will output an integer. Simply paste in an 0x address and press **Query** to see the balance in USDC held by that particular address. If your web3 wallet is not connected at this point, you will be prompted to connect.
The result shows this address holds 1,000,000 of the token, which converts to 1 USDC. *(Note ERC20 tokens allow for custom decimal point precision. USDC uses 6 decimal precision. Many others use 18 (to denote wei) so be sure to check the token implementation for conversion info).*
## Write Contract
Many write functions can only be performed by an approved owner. Connect the owner wallet when performing gated functions.
1\) We'll use Blockscout to transfer 0.50 USDC from 1 address to another. You can perform this action directly through a wallet UI, we use the Blockscout interface here for demonstration purposes. See steps 1-3 above for accessing USDC on Gnosis Chain, or simply type the contract address (*0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83*) into the search bar. Scroll down and select **Write Proxy**.
2\) We scroll down to find the `transferFrom` method.
Boxes are filled with the following information:
1. `_sender(address)`: The `0x` address sending the USDC. Note this account is the one to connect to Blockscout to write to the contract.
2. `_recipient(address)`: The `0x` address receiving the USDC.
3. `_amount(uint256)`: Amount to transfer. We use 6 decimals of precision for USDC - for other tokens this can differ. Here we enter 500000 to denote \$0.50.
3\) We press the **Write** button, and MetaMask or another web3 wallet takes us through the transaction. If a wallet is not connected, there will be several prompts to connect an account to Blockscout. Once connected, we confirm the transaction.
The connected wallet must contain enough native tokens (in this case xDai) to pay gas for the transaction.
4\) We can check our wallet to confirm the transaction, and can view tx details in Blockscout (or return to the [Read Contract](/devs/verification/interacting-with-smart-contracts#read-contract) `balanceOf` method to view new balances for the addresses).
Transaction hash: [0x2c93c4e6618b30c552b95ce2eef16b6e663d99aa2f4a8ea55a70b693de70f113](https://gnosis.blockscout.com/tx/0x2c93c4e6618b30c552b95ce2eef16b6e663d99aa2f4a8ea55a70b693de70f113)
# Remix Verification
Source: https://docs.blockscout.com/devs/verification/remix-verification
Since [v0.56.0](https://github.com/remix-project-org/remix-project/releases/tag/v0.56.0) Remix IDE comes with a built-in verification plugin that allows you to verify your contracts on multiple verifiers.
To verify your contracts on Remix:
* Turn on the plugin "CONTRACT VERIFICATION" from the plugin manager.
* On the File Explorer, select and compile the contract you want to verify.
* On the Contract Verification plugin, select the Contract Name, Chain, and input the contract address. Add constructor arguments if needed.
* Click "Verify". You can see the process on the "Receipts" tab.
You can find more information about the plugin in the [Remix documentation](https://remix-ide.readthedocs.io/en/latest/contract_verification.html#verify-page).
# Stylus Verification
Source: https://docs.blockscout.com/devs/verification/stylus-verification
Verify stylus contracts with the Blockscout API
The original article appeared in the [Stylus Saturdays blog](https://stylus-saturdays.com/p/how-to-verify-your-stylus-contracts)
## **How to verify your Stylus contracts using the Blockscoutβs API**
We support verifying Stylus contracts located in public GitHub repositories. The swagger file for our API endpoint to request the verification can be found [here](https://app.swaggerhub.com/apis/blockscout-f58/stylus-verifier/v1#/StylusSdkRsVerifier/StylusSdkRsVerifier_VerifyGithubRepository). The endpoint accepts the following fields: `deployment_transaction`, `rpc_endpoint`, `cargo_stylus_version`, `repository_url`, `commit`, and `path_prefix`
The `path_prefix` is required so that repositories with several contract crates inside can be used. The repository [https://github.com/blockscout/cargo-stylus-test-examples](https://github.com/blockscout/cargo-stylus-test-examples) contains some great examples.
When a user visits the verification UI, they provide the `cargo_stylus_version`, `repository_url`, `commit`, and `path_prefix` values. These values, along with the address of the contract being verified, are sent to an Elixir backend. The backend retrieves the `deployment_transaction` from the internal database, and sends the data it collected so far, and the `rpc_endpoint`, to a separate verification service.
The service validates the repository, clones the repo the user provided, and checks out the commit hash. If `path_prefix` is provided, it enters the corresponding `prefix`, which is calculated relative to the repository root directory.
Stylus requires the Rust toolchain version to be specified in a `rust-toolchain.toml` file. The file has to be located inside the working directory.
For verification, Blockscout uses the command `cargo stylus verify` `--no-verify --endpoint {rpc_endpoint} --deployment-tx {deployment_transaction}`\`.
We opt out of running verification inside in-stylus docker container by adding the `--no-verify` flag. We opt out because `cargo-stylus` requires the docker daemon to be run locally, but we would like to run the service and docker daemon on different machines. We implemented our own docker container startup process which allows us to run containers on the remote docker daemon.
`cargo stylus verify` prints the result into console. We parse the `stdout` and look for the line: "`Verified - contract matches local project's file hashes`". If found, the verification is considered successful, otherwise the verification fails.
If successful, we also attempt to retrieve the contract ABI as it is not returned by the verify command. To get the abi, we run the `cargo stylus export-abi` command, and parse its result. It prints the ABIs of all included contracts, and the verified contract ABI is printed as the last one. The name of this ABI is also used as a contract name inside a response.
If you need the code, the main function is implemented here: [https://github.com/blockscout/blockscout-rs/blob/main/stylus-verifier/stylus-verifier-logic/src/stylus\_sdk\_rs.rs#L76](https://github.com/blockscout/blockscout-rs/blob/main/stylus-verifier/stylus-verifier-logic/src/stylus_sdk_rs.rs#L76)
An example of making a request to the Blockscout API for verification:
```bash theme={null}
curl 'https://arbitrum.blockscout.com/api/v2/smart-contracts//verification/via/stylus-github-repository' -H 'Content-type: application/json' -d '{"cargo_stylus_version":"v0.5.6","repository_url":"https://github.com/OffchainLabs/stylus-erc20","commit":"d109002ffff3df7589cbbc92f8f104567a84f085","path_prefix":"","license_type":"none"}'
```
# Verification via thirdweb
Source: https://docs.blockscout.com/devs/verification/verification-via-thirdweb
[Thirdweb](https://thirdweb.com/) offers a complete web3 development kit including the ability to quickly deploy prebuilt contracts and start interacting with them on many chains. During this process flow it is also easy to verify contracts using Blockscout APIs.
[Follow these instructions to verify your contracts via the Blockscout API with thirdweb.](https://support.thirdweb.com/other-faqs/tFbbEYCSbJ1GTeXoPs4QFw/blockscout-api-contract-verification/qpa9r79QkgH31HFsvGissC)
# Discord Channel
Source: https://docs.blockscout.com/discord-channel
# Discussion
Source: https://docs.blockscout.com/discussion
# Developer FAQs
Source: https://docs.blockscout.com/faqs/developer-faqs
FAQs for developers
## Developer FAQs
The easiest way is by using [Autoscout](https://deploy.blockscout.com/). Other methods are listed in [https://docs.blockscout.com/setup/deployment](https://docs.blockscout.com/setup/deployment)
BlockScout can be resource intensive. If your instance is running slowly:
* clear the cache - the application cache is cleared on restart by running: `sudo systemctl restart explorer.service`
* increase the memory limit for indexers using theΒ [INDEXER\_MEMORY\_LIMIT](/setup/env-variables/backend-env-variables#indexer-management:~:text=INDEXER%5FMEMORY%5FLIMIT)Β ENV if indexing is slow.
* increase the number of CPUs if CPU is running at 100% on the web app server
* increase the memory if memory consumption is high on the web app server
* increase the number of CPUs or/and increase the memory on the database server if consumption is high.
Instructions for accessing and upgrading CPUs/memory will differ based on your setup. If you are running BlockScout on AWS, these settings can be accessed through your AWS services portal.
Use `git clone https://github.com/blockscout/blockscout.git -b `
**Exchange Rates Coin Name**
* Specify coin name for exchange rates fetcher with the `COIN` [ENV variables](/setup/env-variables)
BlockScout utilizes the `COIN` environment variable which pulls the associated market data from the Coinmarketcap.com API or CoinGecko API to provide pricing data throughout the application.
**Displayed Coin Symbol**
In order to set displayed coin symbol, instance maintainer should set `COIN_NAME` runtime environment variable:
```
export COIN_NAME=
```
For instance, in case of POA instance of Blockscout:
```
export COIN_NAME=POA
```
1. Visit CodeDeploy in AWS. You will see a list of your deployments. Select the deployment id to view details `https://console.aws.amazon.com/codesuite/codedeploy/deployments?region=us-east-1`
2. Deployment status consists of several steps. Once step 2 is complete (application is installed on replacement instances), you manually reroute traffic. Click the `Reroute traffic` button to initiate.
3. Once traffic is rerouted, you'll be asked to terminate the original instance. Click the **Terminate** button to initiate.
4. Once complete, use the public DNS address of the Amazon EC2 instance to view in a web browser. (To get the public DNS value, choose your Amazon EC2 instance in the Amazon EC2 console, and look for the value in **Public DNS** in the **Description** tab).
Currently the best existing way is through docker compose [https://github.com/blockscout/blockscout/tree/master/docker-compose](https://github.com/blockscout/blockscout/tree/master/docker-compose).
We are currently working on deployment through Kubernetes (K8s) and other methods for easily spinning up an instance on AWS.
#### Missing Assets
1. Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard.
2. Connect to the host via SSH `ssh -i ec2-user@`, where `` is host's private key file, `` is the public ip of the host, that can be found in the AWS dashboard.
3. Go to assets folder `cd /opt/app/apps/block_scout_web/priv/static`
4. Add missing assets there or to `./images` folder depending on what is missing. Refresh Blockscout instance page. For example, if `favicon.ico` is missing in `./images` folder, just copy it from the root assets folder \`cp favicon.ico ./images/. You should see now the missing assets.
#### Missing Version in Footer
The app version number should be in the footer of BlockScout instance
1. Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard
2. Connect to the host via SSH `ssh -i ec2-user@`, where `` is host's private key file, `` is the public ip of the host, that can be found in the AWS dashboard.
3. Go to layout folder `/opt/app/apps/block_scout_web/lib/block_scout_web/templates/layout`
4. Open `_footer.html.eex` footer template in the favorite text editor. For example `nano ./_footer.html.eex` and fix the line `<% version = version() %>` (it is in the bottom of the file) with the hardcoded new version, for example, `<% version = 'v1.3.3-beta' %>` and save.
5. Restart the Blockscout instance with `sudo systemctl restart explorer.service`
You may receive this error after making changes to a specific BlockScout application.
`(Gettext.Error) translation with msgid '......' has a non-empty msgstr`
To update gettext, run the following command **in the app's folder where the changes were made**.
1. Go to the ./apps/name\_of\_app folder where the changes were made.
2. Run `mix gettext.extract βmerge`
3. Repeat for other app folders as required.
More information on Gettext is [available here](https://hexdocs.pm/gettext/Mix.Tasks.Gettext.Extract.html).
See the [Branding configs](/setup/configuration-options/branding-configs) page for details related to different UI elements.
For updates like adding elements/links etc you will need to change .eex templates. When changing .eex templates you don't need to rebuild. Run the application in dev mode (MIX\_ENV=dev), and change the template. You'll see changes on-the-fly. When changing js/scss while running the application, you need to run `mix phx.digest` to apply the changes.
Use the JSON RPC `listcontracts` endpoint. For example, to view verified contracts, use the following query. Pagination is available
```sh theme={null}
curl -X GET "
https://gnosis.blockscout.com/api?module=contract&action=listcontracts&page=1&offset=50&filter=verified
" -H "accept: application/json"
```
One reason may be related to the CoinGecko API refusing Blockscout requests without an API key.
If impacted, apply this pull request to your instance:
[https://github.com/blockscout/blockscout/pull/5613](https://github.com/blockscout/blockscout/pull/5613)
It implements CoinGecko API key management and alternative CoinMarketCap exchange rates.
There are several ways:
* Use the [API v2 endpoints](/devs/verification/blockscout-smart-contract-verification-api)
* Use the [RPC endpoints for verification](https://docs.blockscout.com/for-users/api/rpc-endpoints/contract#verify-a-contract-with-its-source-code-and-contract-creation-information)
Change the Explorer.ExchangeRates variable from `enabled: true` to `enabled: false`
* config :explorer, Explorer.ExchangeRates, `enabled: false`, store: :ets
[https://github.com/poanetwork/blockscout/blob/7aeecb2a04838cda0289a7fe432db74481cf575a/apps/explorer/config/config.exs#L32](https://github.com/poanetwork/blockscout/blob/7aeecb2a04838cda0289a7fe432db74481cf575a/apps/explorer/config/config.exs#L32)
You may want to do this if you are creating a new instance or resyncing a new node.
1. Backup the `smart_contracts` table
2. Restore this table following the resync.
Yes you can. The `ethereum_json_rpc_http` variable can be set to any url, it does not need to be a localhost. Client variant env variable should be specified in either case.
No, it is not required. If ws is disabled, leave the `ETHEREUM_JSONRPC_WS_URL` env var empty or unset it.
Try increasing time for the `ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT` [ENV variable](/setup/env-variables#indexer-management). The default is 5 sec.
In a self-hosted or locally deployed instance, when attempting to do a **write transaction** on a verified contract, the following errors may appear:
**Unauthorized**
"You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain"
"No "from" address specified in neither the give options, nor the default options."
**To Troubleshoot:**
* Check that you set the correct `CHAIN_ID` env variable
* Check correct variable for `NETWORK_ID`
Yes, the [FAVICON\_MASTER\_URL](https://docs.blockscout.com/setup/env-variables/frontend-common-envs/envs#favicon:~:text=Version-,FAVICON_MASTER_URL,-string) ENV accepts a URL to a jpg/png/svg image.
Yes, Blockscout supports ERC-20, ERC-721, ERC-1155 and ERC-404 token standards.
Ubuntu 24.04 has been configured in Blockscout CI
We recommend using ElixirLS: Elixir support and debugger
Some customization is available by setting environments variables [https://docs.blockscout.com/setup/env-variables/backend-env-variables](https://docs.blockscout.com/setup/env-variables/backend-env-variables).
[https://blockscout.notion.site/OP-ENV-variable-values-defining-1003d73641f880b58e28ded1671256ab](https://blockscout.notion.site/OP-ENV-variable-values-defining-1003d73641f880b58e28ded1671256ab?source=copy_link)
Use the compatibility table to find the correct version.Β Β [https://docs.blockscout.com/setup/requirements/back-front-compatibility-matrix](https://docs.blockscout.com/setup/requirements/back-front-compatibility-matrix)
No, Blockscout uses a dedicated endpoint. Contact Cryptorank for API key.
UseΒ host.docker.internal instead of 127.0.0.1 e.g.
[http://host.docker.internal:8545/](http://host.docker.internal:8545/)
The footer can be customized with the [NEXT\_PUBLIC\_FOOTER\_LINKS](https://docs.blockscout.com/setup/env-variables/frontend-common-envs/envs#footer) ENV.
# User FAQs
Source: https://docs.blockscout.com/faqs/faqs
FAQs for users
If you have a question that isn't answered here, please contact us in [our Discord](https://discord.gg/blockscout) and the team and community can help troubleshoot your issue.
## User FAQs
This label appears next to a transaction to signify whether a transaction was sent or received by a particular address.
* **In:** A transaction was sent to the address
* **Out** A transaction was initiated from the address
**There are 3 transaction types which can be accessed from the tabs menu for an EOA (Externally Owned Address) or Smart Contract.**
**Transactions:**
An EOA, commonly known as a wallet address, initiates a transaction. Both incoming and outgoing transactions are recorded here, and includes any transaction that requires a gas fee (in the native token ETH, xDai etc) for execution.
**Token Transfers:**
Transactions of ERC-20 or ERC-721 tokens. This can include DeFi transactions (like adding or removing liquidity), EOA transfers, airdrops or other transactions where non-native tokens are sent and received.
**Internal Transactions:**
Transactions initiated and executed between smart contracts. Internal transactions are the result of an external transaction (EOA to contract). This initial transaction can then trigger many internal transactions between contracts as functions are called.
If you request too much data at the same time you may receive a timeout. Decreasing the period of time for an export (**1 week timeframe** is recommended for addresses with lots of transactions) can reduce these errors.
Yes! The contract should be verified (or the bytecode matches an existing contract) to enable reading and writing to contracts and proxy contracts. [More info here](/devs/verification/interacting-with-smart-contracts).
There are multiple methods including options from the Blockscout UI as well as an integration directly with Hardhat.
**Blockscout UI:**
* [Via flattened source code (Solidity)](/devs/verification#via-flattened-source-code)
* [Via standard JSON input](/faqs/faqs#via-standard-json-input)
* [Via Sourcify: Sources and metadata JSON file](/devs/verification/contracts-verification-via-sourcify)
* [Vyper contract](/devs/verification#vyper-contract)
**Hardhat:**
* [Hardhat Verification Plugin](/devs/verification/hardhat-verification-plugin)
* [Sourcify Plugin for Hardhat](/devs/verification/hardhat-verification-plugin/sourcify-plugin-for-hardhat)
At [https://chains.blockscout.com](https://chains.blockscout.com)
Tokens can be swapped using [https://swap.blockscout.com](https://swap.blockscout.com)
# Integrating Blockscout into your Application
Source: https://docs.blockscout.com/get-started/integrating-data
Using APIs, SDK, and other tools with Blockscout
Blockscout features integration points for different applications.
## APIs
* [JSON-RPC API ](/devs/apis/rpc) calls that align with the Ethereum [JSON-RPC specifications](https://ethereum.org/en/developers/docs/apis/json-rpc/)
* [REST API](/devs/apis/rest) provides an intuitive interface for all explorer information
* [Additional microservice APIs](https://blockscout.github.io/swaggers/) includes items like the Blockscout name service, Merits, Contract Verifier and others.
## SDK
* The [Blockscout SDK](/devs/blockscout-sdk) provides access to simple explorer-based notifications directly into an application.
## MCP
* The [MCP Server](/devs/mcp-server) wraps Blockscout APIs and exposes blockchain dataβbalances, tokens, NFTs, contract metadataβvia the Model Context Protocol (MCP) so that AI agents and tools (like Claude, Cursor, or IDEs) can access and analyze it contextually.
## Chainscout
* The [Chainscout list](/devs/chainscout-chains-list) provides a list of all known projects using Blockscout along with chain IDs and other relevant information.
# Migration Guide
Source: https://docs.blockscout.com/get-started/migration-guide
Whether you are a developer, project, or blockchain user, learn how to migrate from other explorers to Blockscout
* Blockscout is transparent, open-source software. Supported by the community for the community good.
* Blockscout adds new features regularly and offers support quickly.
* Blockscout provides fast and reliable chain information, and robust APIs for developers.
* Blockscout is a proven explorer with a long track record, ecosystem-wide support, high data availability, and a rich feature set
*
* other explorer do not offer.
* Deep Search
* Advanced Contract Interaction
* JSON RPC & REST APIs
* User Operations
* Dapp Marketplace
* Enhanced Metadata
* DEX tracker
* Interop explorer in progress
## Switching Links
Change links in your application to point to Blockscout
* **Update primary links**. Update all code within an application by replacing the front part of the url. [Link Switch Guide](/devs/replace-links)
* **Update wallet links**: Many wallets can be updated manually to switch the primary explorer link to Blockscout. [Wallet Update Guide](https://www.blog.blockscout.com/changing-wallet-block-explorer-urls-to-blockscout/)
* **Link conversions**: Some Blockscout links are not 1-to-1 with Etherscan, mostly for newer features such as blobs and user ops. Expand to see the full link conversion table, and scroll horizontally to view all link information. [URL Comparison Guide](https://blockscout.notion.site/2173d73641f8808db0a2c184ff2a6194?v=2173d73641f8801085d4000c046abd78\&pvs=143)
## API updates
No API key is required for Blockscout, but you can use our [free API key](/using-blockscout/my-account/api-keys) to access higher limits if needed. If you have higher or custom needs, [contact us to discuss individual situations.](https://discord.gg/blockscout)
* **JSON RPC**
JSON RPC calls follow the same query structure as Etherscan. Blockscout supports most of the same calls. Replace the front part of the url from [https://api.etherscan.io/v2/api?chainid=](https://api.etherscan.io/v2/api?chainid=10)X to [**https://your-explorer-instance/api**](https://your-explorer-instance/api)
* [Docs](/devs/apis/rpc)
* [JSON RPC Postman collection example ](https://www.postman.com/blockscout/optimistic-etherscan-api)
### **1. Account/Address Endpoints**\\
`module=account`
| | Blockscout | Etherscan | Purpose |
| :--------------------------- | :--------- | :-------- | :------------------------------------------------------ |
| `action=eth_get_balance` | β | β | Mimics Ethereum JSON RPC's eth\_getBalance |
| `action=balance` | β | β | Get Ether Balance for Single Address |
| `action=balancemulti` | β | β | Get Ether Balance for Multiple Addresses |
| `action=pendingtxlist` | β | β | Get Pending Transactions by Address |
| `action=txlist` | β | β | Get Normal Transactions by Address |
| `action=txlistinternal` | β | β | Get Internal Transactions by Address |
| `action=tokentx` | β | β | Get ERC20 Token Transfers |
| `action=tokennfttx` | β | β | Get ERC721 Token Transfers |
| `action=token1155tx` | β | β | Get ERC1155 Token Transfers |
| `action=token404tx` | β | β | Get ERC-404 token transfer events by address |
| `action=tokenbalance` | β | β | Get Token Balance for Address |
| `action=tokenlist` | β | β | Get list of tokens owned by address |
| `action=getminedblocks` | β | β | Get list of blocks mined by address |
| `action=listaccounts` | β | β | Get a list of accounts and their balances |
| `action=txsBeaconWithdrawal` | β | β | Get Beacon Chain Withdrawals by Address and Block Range |
| `action=balancehistory` | β | β Β (PRO) | Get Historical Ether Balance for an Address By BlockNo |
### **2. Contract Endpoints**
### `module=contract`
| | Blockscout | Etherscan | Purpose |
| :------------------------------ | :--------- | :-------- | :-------------------------------------------------------------- |
| `action=listcontracts` | β | β | Get list of any deployed contract |
| `action=getabi` | β | β | Get Contract ABI for verified contracts |
| `action=getsourcecode` | β | β | Get contract source code for a verified contract |
| `action=getcontractcreation` | β | β | Get contract creator address hash and creation transaction hash |
| `action=verify` | β | β | Verify Contract with Source Code |
| `action=verifysourcecode` | β | β | Verify Contract with JSON file |
| `action=checkverifystatus` | β | β | Check Verification Status |
| `action=verifyproxycontract` | β | β | Get Internal Transactions by Address |
| `action=checkproxyverification` | β | β | Get ERC20 Token Transfers |
| `action=verify_via_scourcify` | β | β | Verify a contract through |
| Sourcify | | | |
| `action=verify_vyper_contract` | β | β | Verify a Vyper contract |
### **3. Transaction Endpoints**
### `module=transaction`
| | Blockscout | Etherscan | Purpose |
| :-------------------------- | :--------- | :-------- | :------------------------------------------------------------ |
| `action=gettxinfo` | β | β | Get Transaction info including block number, sender, gas, +++ |
| `action=gettxreceiptstatus` | β | β | Get Transaction Receipt Status |
| `action=getstatus` | β | β | Get Transaction Execution Status |
### **4. Block Endpoints**
**module=block**
| | Blockscout | Etherscan | Purpose |
| :------------------------------------------- | :--------- | :-------- | :------------------------------------------------------------- |
| `action=getblockreward` | β | β | Get Block Rewards |
| `action=getblockcountdown` | β | β | Get Block Countdown |
| `action=getblocknobytime` | β | β | Get Block Number by Time |
| `action=eth_block_number` | β | β | Mimics Ethereum JSON RPC's eth\_blockNumber. |
|
`action=dailyavgblocksize` | β | β Β (PRO) | Get Daily Average Block Size |
| `action=dailyblkcount` | β | β Β (PRO) | Get Daily Block Count and Rewards |
| `action=dailyblockrewards` | β | β Β (PRO) | Get Daily Block Rewards |
| `action=dailyavgblocktime` | β | β Β (PRO) | Get Daily Average Time for A Block to be Included in the chain |
| `action=dailyuncleblkcount` | β | β Β (PRO) | Get Daily Uncle Block Count and Rewards |
### **5. Token Endpoints**
### `module=token`
Note other endpoints contain token specific information including `module=stats` and `module=account`.
| | Blockscout | Etherscan | Purpose |
| :---------------------- | :--------- | :-------- | :---------------------------- |
| action=getToken | β | β | Get Token Information |
| action=getTokenHolders | β | β | Get Token Holders |
| action=bridgedtokenlist | β | β | Get Bridged Tokens |
| action=tokenholderlist | β | β Β (PRO) | Get Token Holders |
| action=tokenholdercount | β | β Β (PRO) | Number of ERC20 token holders |
| action=tokeninfo | β | β Β (PRO) | Token project info |
### **6. Logs/Events Endpoints**
### `module=logs`
Both Etherscan and Blockscout use the getLogs endpoint which includes enhanced filtering capabilities
* β `action=getLogs` - Get Event Logs by Address/Topics/Block Range
### **7. Proxy/ETH RPC Endpoints**
Etherscan uses the Proxy module `module=proxy` to retrieve standard Ethereum JSON-RPC methods.
For Blockscout, send requests to `https://explorer.optimism.io/api/eth-rpc`
The following methods are supported:
* eth\_blockNumber
* eth\_getBalance
* eth\_getLogs
* eth\_gasPrice
* eth\_getTransactionByHash
* eth\_getTransactionReceipt
* eth\_chainId
* eth\_maxPriorityFeePerGas
* eth\_getTransactionCount
* eth\_getCode
* eth\_getStorageAt
* eth\_estimateGas
* eth\_getBlockByNumber
* eth\_getBlockByHash
* eth\_sendRawTransaction
* eth\_call
### **8. Stats/Network Information**
### `module=stats`
In addition to these stats, Blockscout provides general chain stats via the [REST API](/devs/apis/rest).
| | Blockscout | Etherscan | Purpose |
| :-------------------- | :--------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------- |
| tokensupply | β | β | Get Token Information |
| ethsupplyexchange | β | β | total supply in Wei from exchange |
| ethsupply | β | β | Get total supply in Wei from DB |
| ethsupply2 | β | β | Get amount of Ether in circulation, ETH2 Staking rewards, EIP1559 burnt fees, and total withdrawn ETH from the beacon chain |
| coinsupply | β | β | Get total coin supply from DB minus burnt number |
| ethprice | β | β | Get latest price of native coin in USD and BTC |
| coinprice | β | β | Get latest price of native coin in USD and BTC in more general format |
| totalfees | β | β | Get total transaction fees in Wei paid by users to validators per day |
| chainsize | β | β | Get the size of the Ethereum blockchain, in bytes, over a date range. |
| nodecount | β | β (PRO) | Get total number of discoverable Ethereum nodes |
| dailytxnfee | β | β (PRO) | Get Daily Network Transaction Fee |
| dailynewaddress | β | β (PRO) | Get Daily New Address Count |
| dailynetutilization | β | β (PRO) | Get Daily Network Utilization |
| dailyavghashrate | β | β (PRO) | Get Daily Average Network Hash Rate |
| dailytx | β | β (PRO) | Get Daily Transaction Count |
| dailyavgnetdifficulty | β | β (PRO) | Get Daily Average Network Difficulty |
| ethdailyprice | β | β (PRO) | Get Ether Historical Price |
### **9. Gas Tracking**
**Etherscan Gas Tracker** (`module=gastracker`)
* β `action=gasoracle` - Get Gas Oracle
* β `action=gasestimate` - Get Gas Estimate
**Blockscout**
* β Gas information integrated into transaction and block data
* **REST API** availability/swagger
Blockscout also provides a RESTful API which serves itβs frontend and is available for developers to use.
* [Documentation and playground](/devs/apis/rest)
* [Microservice and related swagger definitions](https://blockscout.github.io/swaggers/)
* A **GraphQL** playground is built into the explorer. Explore queries and schemas from the interface by visiting [**https://your-instance-here/graphiql**](https://your-instance-here/graphiql)
## Contract verification process
Blockscout offers advanced contract verification and interaction possibilities. Pre-existing contracts in various contexts are verified automatically (partial verification - which exposes the contract and methods) via the [Ethereum bytecode DB.](/about/features/ethereum-bytecode-database-microservice)
New contracts (Solidity, Vyper, Yul) can be verified via dev tools or directly in the Blockscout UI. \
[Contract verification guide](/devs/verification/blockscout-smart-contract-verification-api)
Dev tools widely support the Blockscout explorer. For example:
* Ethers.js: [https://docs.ethers.org/v6/api/providers/thirdparty/#providers-blockscout](https://docs.ethers.org/v6/api/providers/thirdparty/#providers-blockscout)
* Hardhat: [https://www.npmjs.com/package/@ericxstone/hardhat-blockscout-verify](https://www.npmjs.com/package/@ericxstone/hardhat-blockscout-verify)
* Foundry: [https://docs.blockscout.com/devs/verification/foundry-verification](https://docs.blockscout.com/devs/verification/foundry-verification)
* Remix: [https://www.blog.blockscout.com/deploy-and-verify-your-contract-using-remix-and-blockscout/](https://www.blog.blockscout.com/deploy-and-verify-your-contract-using-remix-and-blockscout/)
## My Account
Blockscout My Account lets you create watchlists, customize your explorer with private tags, create free API keys for extended use and more. [My Account Guide](/using-blockscout/my-account)
# Making the most of your explorer experience
## Switching from Etherscan
If you are used to using Etherscan, it is easy to switch to Blockscout. Most information is presented in a similar manner and in similar places in the UI with parity in data presentation.
## **Additional Blockscout feature set**
[******An itemized list of over 60 features and views available on Blockscout that are not available on Optimistic Etherscan is available here.******](https://docs.google.com/spreadsheets/d/1HGw9bh5Iq3xBZlrnrwVOzD_0844zt7PPakkuxVsiS1g/edit?usp=sharing)
* **DAppscout** DApp marketplace providing dapp discovery and interaction features.
* **BENS in addition to ENS support, protocols can submit their subgraphs to be supported. Blockscout allows multiple protocols to co-exist within a single network.**
* **Ads and banner control** - Ability to add and curate own ads/banners
* **Public tagging - a central microservice allows tags enabled on mainnet to be shown on other chains. This is especially useful for malicious address display.**
* **Vera and BytecodeDB Bytecode match works for verification info on multiple chains**
* **Roadmap, research and rollup-specific features**
* Rollup-specific feature support (e.g. Fault proofs)
* DA support (e.g. [Celestia](https://github.com/blockscout/blockscout/pull/10199))
## **Additional Etherscan feature set (features not yet available on Blockscout)**
* Page views not included in the Blockscout UI
* [NFT Latest Transfers](https://optimistic.etherscan.io/nft-transfers)
* [NFT Latest Mints](https://optimistic.etherscan.io/nft-latest-mints)
Developer tools not included in Blockscout
* [EVM bytecode decompiler (experimental)](https://optimistic.etherscan.io/bytecode-decompiler)
* [Contract > Similar contracts](https://optimistic.etherscan.io/find-similar-contracts)
* [Contract > Diff checker](https://optimistic.etherscan.io/contractdiffchecker)
* [Contract > Bytecode to Opcode Disassembler](https://optimistic.etherscan.io/opcode-tool)
* [Vyper Online Compiler](https://optimistic.etherscan.io/vyper)
* [AI Code reader](https://optimistic.etherscan.io/code-reader)
Tools and services not included in Blockscout
Blockscout does not include some add-on tooling such as the
[input data converter](https://etherscan.io/inputdatadecoder), [unit converter](https://etherscan.io/unitconverter), [token approvals](https://etherscan.io/tokenapprovalchecker) and [verified signatures](https://etherscan.io/verifiedSignatures). These are readily available through 3rd party applications and/or currently not considered as high-priority features.
## Using Dappscout
Dappscout is a decentralized application marketplace built into Blockscout. It features a list of dapps available on Optimism. [Dappscout Guide](/using-blockscout/blockscout-apps)
# Running Blockscout
Source: https://docs.blockscout.com/get-started/running-blockscout
Hosting, ENVs and other info
Blockscout also provides several hosting options for projects who do not want to run their own explorers.
* [Autoscout](/using-blockscout/autoscout) allows you to setup an explorer in minutes. Hosted on Blockscout's cloud infra.
* [Explorer as a Service](https://eaas.blockscout.com/) provides an SLA, optimized on prem hosting, and explorer customization.
Blockscout open-source software can be forked and used by any project to quickly setup an full-featured explorer environment. Be sure to [check the requirements](/setup/requirements) and tune your environment before deploying an explorer.
## **Deployment Options**
Common deployment methods below, there are additional deployment methods as well described in the [deployment ](/setup/deployment)section.
* [Docker Deployment](/setup/deployment/docker-compose-deployment)
* [Kubernetes Deployment](/setup/deployment/kubernetes-deployment)
* [Manual Deployment](/setup/deployment/manual-deployment-guide)
## **Configuration**
* [ENV Variables](/setup/env-variables)
* [Backend](/setup/env-variables/backend-env-variables)
* [Frontend](/setup/env-variables/frontend-common-envs)
* [L2s and chain specific variables](/setup/env-variables/backend-envs-chain-specific)
* [Microservices](/setup/microservices)
* Includes many plugin services written in Rust and available via the [Microservices RS repository](https://github.com/blockscout/blockscout-rs).
* [Configs](/setup/configuration-options)
* Additional available configurations beyond ENV updates.
* [Architecture](/setup/information-and-settings)
* Describes the Blockscout architecture including an [indexer architecture overview.](/setup/information-and-settings/indexer-architecture-overview)
# Using an Explorer
Source: https://docs.blockscout.com/get-started/using-an-explorer
Retrieving and interacting with blockchain data
An explorer acts as a comprehensive frontend to the blockchain backend. It indexes, fetches, and organizes onchain data along with relevant metadata regarding transactions, blocks, tokens and addresses. Explorers provide all of this information in an organised, human readable format.
Included in the data that explorers provide is smart contract information, the code and methods as well as ways to interaction capabilities. Contract transparency and interaction is only available once a contract is verified.
Direct access to blockchain data is available via the explorer UI as well as through various API endpoints. Blockscout provides both JSON RPC and REST APIs for projects who need direct access to data via API calls.
* **Explorer Basics**
* Searching [blocks](/using-blockscout/overviews/blocks)
* [Transaction ](/using-blockscout/overviews/transaction-fields)details
* [Address ](/using-blockscout/overviews/address-page)information
* [Contract](/devs/verification/interacting-with-smart-contracts) interactions
* [Menu](/using-blockscout/overviews/top-menu) and [Glossary](/using-blockscout/overviews/glossary-of-terms)
* **Account Features**
* [My Account setup](/using-blockscout/my-account) and features
* [API keys ](/using-blockscout/my-account/api-keys)for personal use (an API key is not needed, but can be freely added for additional limits)
* [Watchlists](/using-blockscout/my-account/watchlist) and notifications
* **Scout Apps**
* [Swapscout ](/using-blockscout/swapscout)cross-chain swaps/bridging
* [Revokescout](/using-blockscout/revokescout) revoke token approvals
* [Dappscout](/using-blockscout/revokescout) apps marketplace
* [Autoscout](/using-blockscout/autoscout) self-service explorer launchpad
# GitHub Repo
Source: https://docs.blockscout.com/github-repo
# What is WaaS
Source: https://docs.blockscout.com/guides/developer-support/waas
Blockscout's wallet as a service provides instant access to a robust global ecosystem wallet
[Contact the Blockscout team](https://eaas.blockscout.com/?utm_medium=header#contact) if you are ready to integrate a global wallet and start onboarding new users today.
## What is WaaS?
Blockscout's WaaS offers ready-made wallet infrastructure for supported blockchains.
* Developers can integrate directly into their applications [via the SDK](https://www.npmjs.com/package/@blockscout/rootstock-global-wallet), providing a full-featured wallet which can include a swap functionality, a fiat on/off ramp, and more.
* Wallets are created with familiar methods like email or passkey login. WaaS makes wallet creation and usage as easy as creating any standard online account.
* Users can immediately begin using the wallet. Account abstraction allows for multi-token fee payment, and gas sponsorship capabilities provide no-cost transaction fees when activated.
## WaaS benefits
**1) Stronger onboarding**\
New users can onboard instantly through email, social login, passkeys, or a classic wallet, creating a fast, frictionless experience.
**2) Seamless experience across the ecosystem**\
Once logged in, the same embedded smart wallet can be used across all participating applications, improving retention and promoting activity. Integrated features like wallet connect provide instant connection to all web3 applications.
**3) Better developer environment**\
Developers can integrate the ecosystem wallet SDK, shortening build time and providing consistent UX across the chain.
**4) On ramp and gas sponsorship**\
On and off-ramp features can be easily implemented, offering a full fiat-to-crypto experience. Gas sponsorship options allow for instant usage.
##
# Integration Guide
Source: https://docs.blockscout.com/guides/developer-support/wallet-as-a-service-waas/integration-guide
Integrate the global wallet SDK into your app on a supported chain
To learn about integrating with additional TypeScript frameworks, see our [wallet example repository.](https://github.com/blockscout/global-wallet-examples)
Examples use the **Rootstock ecosystem** where our wallet is currently integrated. If you are interested in wallet support for your ecosystem, [Contact the Blockscout team](https://eaas.blockscout.com/?utm_medium=header#contact) today.
## Resources
* WaaS Developer SDK npm package: [https://www.npmjs.com/package/@blockscout/rootstock-global-wallet](https://www.npmjs.com/package/@blockscout/rootstock-global-wallet)
* SDK integration use case examples: [https://github.com/blockscout/global-wallet-examples](https://github.com/blockscout/global-wallet-examples)
* Blockscout WaaS explainer: [https://www.blog.blockscout.com/what-is-wallet-as-a-service-waas-simplifying-web3-onboarding-ecosystem-approach](https://www.blog.blockscout.com/what-is-wallet-as-a-service-waas-simplifying-web3-onboarding-ecosystem-approach/)
## Installation
1. Install the global wallet SDK
```shellscript theme={null}
npm install @blockscout/rootstock-global-wallet
```
2. Import into your project
```shellscript theme={null}
import "@blockscout/rootstock-global-wallet/ethereum";
```
The wallet is now available for usage!
## Gas Sponsorship / Paymasters
Gas sponsorship is available through provider interagrations. In this example we use [**Gelato**](https://gelato.cloud/); various providers such as [Pimlico](https://docs.pimlico.io/references/paymaster), [ZeroDev](https://docs.zerodev.app/sdk/infra/intro) or [Biconomy](https://legacy-docs.biconomy.io/Paymaster/integration) can also be used.
## Get started with Gelato
1. Request API Key
To enable the paymaster for the global wallet, you need to have an API key first. To get an API key, [please fill out the form](https://airtable.com/app6JasG7IwPqc0wV/pagJJIIMeuVH7gbPj/form) and we will send you one.
2. Install Gelato and dependencies
```shellscript wrap theme={null}
npm install @gelatonetwork/smartwallet @dynamic-labs/sdk-react-core @dynamic-labs/ethereum @dynamic-labs/wagmi-connector @tanstack/react-query wagmi viem
```
3. Create `.env` variable and add API key
```shellscript theme={null}
NEXT_PUBLIC_GELATO_API_KEY=your_gelato_api_key
```
4. Create a Gelato Smart Wallet Client for sponsored operations
```javascript theme={null}
const App = () => {
const sendTransaction = async () => {
const { primaryWallet, handleLogOut } = useDynamicContext();
if (!primaryWallet || !isEthereumWallet(primaryWallet)) {
return;
}
const connector = primaryWallet.connector;
if (!connector || !isDynamicWaasConnector(connector)) {
return;
}
if (chain.id) {
await primaryWallet.switchNetwork(chain.id);
}
const client = await primaryWallet.getWalletClient();
client.account.signAuthorization = async (parameters) => {
const preparedAuthorization = await prepareAuthorization(
client,
parameters
);
const signedAuthorization = await connector.signAuthorization(
preparedAuthorization
);
return {
address: preparedAuthorization.address,
chainId: preparedAuthorization.chainId,
nonce: preparedAuthorization.nonce,
r: signedAuthorization.r,
s: signedAuthorization.s,
v: signedAuthorization.v,
yParity: signedAuthorization.yParity,
} as SignAuthorizationReturnType;
};
const smartWalletClient = await createGelatoSmartWalletClient(client, {
apiKey: process.env.NEXT_PUBLIC_GELATO_API_KEY,
scw: { type: "gelato" }, // use gelato, kernel, safe, or custom
});
};
return (
`, etc.) | - | - | `{"name":"Montserrat","url":"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"}` | v1.35.0+ |
| NEXT\_PUBLIC\_FONT\_FAMILY\_BODY | `FontFamily`, see full description [below](/setup/env-variables/frontend-common-envs/envs#font-family-configuration-properties) | Main typeface to use in page content elements. | - | - | `{"name":"Raleway","url":"https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap"}` | v1.35.0+ |
| NEXT\_PUBLIC\_MAX\_CONTENT\_WIDTH\_ENABLED | `boolean` | Set to `true` to restrict the page content width on extra-large screens. | - | `true` | `false` | v1.34.1+ |
#### Network explorer configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| -------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------------------------- |
| logo | `string` | URL to explorer logo file. Should be at least 40x40. | - | - | `https://foo.app/icon.png` |
| title | `string` | Displayed name of the explorer | Required | - | `Anyblock` |
| baseUrl | `string` | Base url of the explorer | Required | - | `https://explorer.anyblock.tools` |
| paths | `RecordβΉ"tx" \| "block" \| "address" \| "token", stringβΊ` | Map of explorer entities and their paths. Path can be a template with `:id` or `:id_lowercase` param, or a string (see note below) | Required | - | `{"tx":"/ethereum/poa/core/tx"}` |
*Note* If a path template contains `:id` or `:id_lowercase`, it will be replaced with the entity-id in its original case or lowercased respectively. If neither parameter is present, the entity-id will be appended to the end of the path in lowercase. For example, with baseUrl `https://explorer.anyblock.tools`:
* Path `{"tx":"/ethereum/poa/core/tx/:id/details"}` and entity-id `0x123...AbC` results in `https://explorer.anyblock.tools/ethereum/poa/core/tx/0x123...AbC/details`
* Path `{"tx":"/ethereum/poa/core/tx/:id_lowercase/details"}` and entity-id `0x123...AbC` results in `https://explorer.anyblock.tools/ethereum/poa/core/tx/0x123...abc/details`
* Path `{"tx":"/ethereum/poa/core/tx"}` and entity-id `0x123...AbC` results in `https://explorer.anyblock.tools/ethereum/poa/core/tx/0x123...abc`
#### Contract code IDE configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| --------- | -------- | --------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------------------------------------------------ |
| title | `string` | Displayed name of the IDE | Required | - | `Remix IDE` |
| url | `string` | URL of the IDE with placeholders for contract hash (`{hash}`) and current domain (`{domain}`) | Required | - | `https://remix.blockscout.com/?address={hash}&blockscout={domain}` |
| icon\_url | `string` | URL of the IDE icon | Required | - | `https://example.com/icon.svg` |
#### Font family configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| -------- | -------- | ---------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------------------------------------------------------------------------------- |
| name | `string` | Font family name; used to define the `font-family` CSS property. | Required | - | `Montserrat` |
| url | `string` | URL for external font. Ensure the font supports the following weights: 400, 500, 600, and 700. | Required | - | `https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap` |
## App features
*Note* The variables which are marked as required should be passed as described in order to enable the particular feature, but they are not required in the entire app context.
### My account
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ---------------------------------------------- | ------- |
| NEXT\_PUBLIC\_IS\_ACCOUNT\_SUPPORTED | `boolean` | Set to true if network has account feature | Required | - | `true` | v1.0.x+ |
| NEXT\_PUBLIC\_RE\_CAPTCHA\_APP\_SITE\_KEY | `boolean` | See [below](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#google-recaptcha) | Required | - | `` | v1.0.x+ |
| NEXT\_PUBLIC\_AUTH0\_CLIENT\_ID | `string` | **DEPRECATED** Client id for [Auth0](https://auth0.com/) provider | - | - | `` | v1.0.x+ |
| NEXT\_PUBLIC\_AUTH\_URL | `string` | **DEPRECATED** Account auth base url; it is used for building login URL (`${ NEXT_PUBLIC_AUTH_URL }/auth/auth0`) and logout return URL (`${ NEXT_PUBLIC_AUTH_URL }/auth/logout`); if not provided the base app URL will be used instead | - | - | `https://blockscout.com` | v1.0.x+ |
| NEXT\_PUBLIC\_LOGOUT\_URL | `string` | **DEPRECATED** Account logout url. Required if account is supported for the app instance. | - | - | `https://blockscoutcom.us.auth0.com/v2/logout` | v1.0.x+ |
### Gas tracker
This feature is **enabled by default**. To switch it off pass `NEXT_PUBLIC_GAS_TRACKER_ENABLED=false`.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------- | ------------- | -------- |
| NEXT\_PUBLIC\_GAS\_TRACKER\_ENABLED | `boolean` | Set to true to enable "Gas tracker" in the app | Required | `true` | `false` | v1.25.0+ |
| NEXT\_PUBLIC\_GAS\_TRACKER\_UNITS | `ArrayβΉ"usd" \| "gwei"βΊ` | Array of units for displaying gas prices on the Gas Tracker page, in the stats snippet on the Home page, and in the top bar. The first value in the array will take priority over the second one in all mentioned views. If only one value is provided, gas prices will be displayed only in that unit. | - | `[ "usd", "gwei" ]` | `[ "gwei" ]` | v1.25.0+ |
### Advanced filter
This feature is **enabled by default**. To switch it off pass `NEXT_PUBLIC_ADVANCED_FILTER_ENABLED=false`.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------- | --------- | ------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_ADVANCED\_FILTER\_ENABLED | `boolean` | Set to true to enable "Advanced filter" page in the app | Required | `true` | `false` | v1.37.0+ |
### Address verification in "My account"
*Note* all ENV variables required for [My account](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#my-account) feature should be passed alongside the following ones:
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------- | -------- | ------------------------------ | -------------- | ------------- | ------------------------------------------------ | ------- |
| NEXT\_PUBLIC\_CONTRACT\_INFO\_API\_HOST | `string` | Contract Info API endpoint url | Required | - | `https://contracts-info.services.blockscout.com` | v1.1.0+ |
| NEXT\_PUBLIC\_ADMIN\_SERVICE\_API\_HOST | `string` | Admin Service API endpoint url | Required | - | `https://admin-rs.services.blockscout.com` | v1.1.0+ |
### Blockchain interaction (writing to contract, etc.)
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | -------------------------- | ------- |
| NEXT\_PUBLIC\_WALLET\_CONNECT\_PROJECT\_ID | `string` | Project id for [WalletConnect](https://cloud.walletconnect.com/) integration | Required | - | `` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_RPC\_URL | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_NAME | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `Gnosis Chain` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_ID | `number` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `99` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_CURRENCY\_NAME | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `Ether` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_CURRENCY\_SYMBOL | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `ETH` | v1.0.x+ |
| NEXT\_PUBLIC\_NETWORK\_CURRENCY\_DECIMALS | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | - | `18` | `6` | v1.0.x+ |
### Banner ads
Ads are enabled by default on all self-hosted instances. If you would like to disable ads, you can disable using the [Autoscout hosted service](/using-blockscout/autoscout).
### Text ads
Ads are enabled by default on all self-hosted instances. If you would like to disable ads, you can disable using the [Autoscout hosted service](/using-blockscout/autoscout).
### Beacon chain
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------- | --------- | ---------------------------------------------- | -------------- | ------------------------------------- | ------------- | ------- |
| NEXT\_PUBLIC\_HAS\_BEACON\_CHAIN | `boolean` | Set to true for networks with the beacon chain | Required | - | `true` | v1.0.x+ |
| NEXT\_PUBLIC\_BEACON\_CHAIN\_CURRENCY\_SYMBOL | `string` | Beacon network currency symbol | - | `NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL` | `ETH` | v1.0.x+ |
### User operations (ERC-4337)
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ---------------------------- | --------- | ---------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_HAS\_USER\_OPS | `boolean` | Set to true to show user operations related data and pages | - | - | `true` | v1.23.0+ |
### Rollup chain
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------- | ------------- | -------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_ROLLUP\_TYPE | `"optimistic" \| "arbitrum" \| "shibarium" \| "zkEvm" \| "zkSync" \| "scroll"` | Rollup chain type | Required | - | `"optimistic"` | v1.24.0+ |
| NEXT\_PUBLIC\_ROLLUP\_L1\_BASE\_URL | `string` | Blockscout base URL for L1 network. **DEPRECATED** **`Use NEXT_PUBLIC_ROLLUP_PARENT_CHAIN instead`** | Required | - | `http://eth-goerli.blockscout.com` | v1.24.0+ |
| NEXT\_PUBLIC\_ROLLUP\_L2\_WITHDRAWAL\_URL | `string` | URL for L2 -> L1 withdrawals (Optimistic stack only) | Required for `optimistic` rollups | - | `https://app.optimism.io/bridge/withdraw` | v1.24.0+ |
| NEXT\_PUBLIC\_ROLLUP\_STAGE\_INDEX | `"1" \| "2"` | Reflects the maturity and decentralization level of the chain based on [L2BEAT's framework](https://medium.com/l2beat/introducing-stages-a-framework-to-evaluate-rollups-maturity-d290bb22befe). The label will be added to the sidebar according to the provided stage index. Not applicable for testnets. | - | - | `"1"` | v2.1.0+ |
| NEXT\_PUBLIC\_FAULT\_PROOF\_ENABLED | `boolean` | Set to `true` for chains with fault proof system enabled (Optimistic stack only) | - | - | `true` | v1.31.0+ |
| NEXT\_PUBLIC\_HAS\_MUD\_FRAMEWORK | `boolean` | Set to `true` for instances that use MUD framework (Optimistic stack only) | - | - | `true` | v1.33.0+ |
| NEXT\_PUBLIC\_INTEROP\_ENABLED | `boolean` | Enables "Interop messages" page (Optimistic stack only) | - | `false` | `true` | v1.39.0+ |
| NEXT\_PUBLIC\_ROLLUP\_HOMEPAGE\_SHOW\_LATEST\_BLOCKS | `boolean` | Set to `true` to display "Latest blocks" widget instead of "Latest batches" on the home page | - | - | `true` | v1.36.0+ |
| NEXT\_PUBLIC\_ROLLUP\_OUTPUT\_ROOTS\_ENABLED | `boolean` | Enables "Output roots" page (Optimistic stack only) | - | `false` | `true` | v1.37.0+ |
| NEXT\_PUBLIC\_ROLLUP\_PARENT\_CHAIN\_NAME | `string` | Set to customize L1 transaction status labels in the UI (e.g., "Sent to "). This setting is applicable only for Arbitrum-based chains. **DEPRECATED** **`Use NEXT_PUBLIC_ROLLUP_PARENT_CHAIN instead`** | - | - | `DuckChain` | v1.37.0+ |
| NEXT\_PUBLIC\_ROLLUP\_PARENT\_CHAIN | `ParentChain`, see details [below](/setup/env-variables/frontend-common-envs/envs#parent-chain-configuration-properties) | Configuration parameters for the parent chain. | - | - | `{"baseUrl":"https://explorer.duckchain.io"}` | v1.38.0+ |
| NEXT\_PUBLIC\_ROLLUP\_DA\_CELESTIA\_NAMESPACE | `string` | Hex-string for creating a link to the transaction batch on the Seleneium explorer. "0x"-format and 60 symbol length. Available only for Arbitrum roll-ups. | - | - | `0x00000000000000000000000000000000000000ca1de12a9905be97beaf` | v1.38.0+ |
| NEXT\_PUBLIC\_ROLLUP\_DA\_CELESTIA\_CELENIUM\_URL | `string` | URL for the Selenium explorer. It is used to create links to the Data Availability Blobs page. The URL should contain the full path without any search parameters related to the blob, as these will be constructed at runtime for each blob separately. Available only for Optimistic or Arbitrum roll-ups. | - | - | `https://mocha.celenium.io/blob` | v2.0.2+ |
#### Parent chain configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| --------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ------------- | -------------------------------------------- |
| id | `number` | Chain id, see [https://chainlist.org](https://chainlist.org) for the reference. | - | - | `42` |
| name | `string` | Displayed name of the chain. Set to customize L1 transaction status labels in the UI (e.g., "Sent to "). Currently, this setting is applicable only for Arbitrum-based chains. | - | - | `DuckChain` |
| baseUrl | `string` | Base url of the chain explorer. | Required | - | `https://explorer.duckchain.io` |
| rpcUrls | `ArrayβΉstringβΊ` | Chain public RPC server urls, see [https://chainlist.org](https://chainlist.org) for the reference. | - | - | `["https://rpc.duckchain.io"]` |
| currency | `{ name: string; symbol: string; decimals: number; }` | Chain currency config. | - | - | `{ name: Quack, symbol: QUA, decimals: 18 }` |
| isTestnet | `boolean` | Set to true if network is testnet. | - | - | `true` |
### Export data to CSV file
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------- | ------- |
| NEXT\_PUBLIC\_RE\_CAPTCHA\_APP\_SITE\_KEY | `string` | See [below](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#google-recaptcha) | true | - | `` | v1.0.x+ |
### Google analytics
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------- | -------- | ------------------------------------------------------------------------- | -------------- | ------------- | ------------- | ------- |
| NEXT\_PUBLIC\_GOOGLE\_ANALYTICS\_PROPERTY\_ID | `string` | Property ID for [Google Analytics](https://analytics.google.com/) service | true | - | `UA-XXXXXX-X` | v1.0.x+ |
### Mixpanel analytics
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------- | -------- | --------------------------------------------------------------------- | -------------- | ------------- | --------------- | ------- |
| NEXT\_PUBLIC\_MIXPANEL\_PROJECT\_TOKEN | `string` | Project token for [Mixpanel](https://mixpanel.com/) analytics service | true | - | `` | v1.1.0+ |
### GrowthBook feature flagging and A/B testing
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------- | -------- | ------------------------------------------------------------------- | -------------- | ------------- | --------------- | -------- |
| NEXT\_PUBLIC\_GROWTH\_BOOK\_CLIENT\_KEY | `string` | Client SDK key for [GrowthBook](https://www.growthbook.io/) service | true | - | `` | v1.22.0+ |
### GraphQL API documentation
This feature is **always enabled**, but you can disable it by passing `none` value to `NEXT_PUBLIC_GRAPHIQL_TRANSACTION` variable.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------ | -------------- | ------------- | -------------------------------------------------------------------- | ------- |
| NEXT\_PUBLIC\_GRAPHIQL\_TRANSACTION | `string` | Txn hash for default query at GraphQl playground page. Pass `none` to disable the feature. | - | - | `0x4a0ed8ddf751a7cb5297f827699117b0f6d21a0b2907594d300dc9fed75c7e62` | v1.0.x+ |
### REST API documentation
This feature is **always enabled**, but you can disable it by passing `none` value to `NEXT_PUBLIC_API_SPEC_URL` variable.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ---------------------------- | -------- | ----------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------- |
| NEXT\_PUBLIC\_API\_SPEC\_URL | `string` | Spec to be displayed on `/api-docs` page. Pass `none` to disable the feature. | - | `https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml` | `https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml` | v1.0.x+ |
### Marketplace
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_MARKETPLACE\_ENABLED | `boolean` | `true` means that the marketplace page will be enabled | Required | - | `true` | v1.24.1+ |
| NEXT\_PUBLIC\_MARKETPLACE\_CONFIG\_URL | `string` | URL of configuration file (`.json` format only) which contains list of apps that will be shown on the marketplace page. See [below](/setup/env-variables/frontend-common-envs/envs#marketplace-app-configuration-properties) list of available properties for an app. Can be replaced with NEXT\_PUBLIC\_ADMIN\_SERVICE\_API\_HOST | Required | - | `https://example.com/marketplace_config.json` | v1.0.x+ |
| NEXT\_PUBLIC\_ADMIN\_SERVICE\_API\_HOST | `string` | Admin Service API endpoint url. Can be used instead of NEXT\_PUBLIC\_MARKETPLACE\_CONFIG\_URL | - | - | `https://admin-rs.services.blockscout.com` | v1.1.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_SUBMIT\_FORM | `string` | Link to form where authors can submit their dapps to the marketplace | Required | - | `https://airtable.com/shrqUAcjgGJ4jU88C` | v1.0.x+ |
| NEXT\_PUBLIC\_MARKETPLACE\_SUGGEST\_IDEAS\_FORM | `string` | Link to form where users can suggest ideas for the marketplace | - | - | `https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form` | v1.24.0+ |
| NEXT\_PUBLIC\_NETWORK\_RPC\_URL | `string` | See in [Blockchain parameters](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-parameters) section | Required | - | `https://core.poa.network` | v1.0.x+ |
| NEXT\_PUBLIC\_MARKETPLACE\_CATEGORIES\_URL | `string` | URL of configuration file (`.json` format only) which contains the list of categories to be displayed on the marketplace page in the specified order. If no URL is provided, then the list of categories will be compiled based on the `categories` fields from the marketplace (apps) configuration file | - | - | `https://example.com/marketplace_categories.json` | v1.23.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_SECURITY\_REPORTS\_URL | `string` | URL of configuration file (`.json` format only) which contains app security reports for displaying security scores on the Marketplace page | - | - | `https://example.com/marketplace_security_reports.json` | v1.28.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_FEATURED\_APP | `string` | ID of the featured application to be displayed on the banner on the Marketplace page | - | - | `uniswap` | v1.29.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_BANNER\_CONTENT\_URL | `string` | URL of the banner HTML content | - | - | `https://example.com/banner` | v1.29.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_BANNER\_LINK\_URL | `string` | URL of the page the banner leads to | - | - | `https://example.com` | v1.29.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_RATING\_AIRTABLE\_API\_KEY | `string` | Airtable API key | - | - | - | v1.33.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_RATING\_AIRTABLE\_BASE\_ID | `string` | Airtable base ID with dapp ratings | - | - | - | v1.33.0+ |
| NEXT\_PUBLIC\_MARKETPLACE\_GRAPH\_LINKS\_URL | `string` | URL of the file (`.json` format only) which contains the list of The Graph links to be displayed on the Marketplace page | - | - | `https://example.com/graph_links.json` | v1.36.0+ |
#### Marketplace app configuration properties
| Property | Type | Description | Compulsoriness | Example value |
| ---------------- | --------------- | -------------------------------------------------------------------------------------------- | -------------- | ----------------------------------- |
| id | `string` | Used as slug for the app. Must be unique in the app list. | Required | `app` |
| external | `boolean` | `true` means that the application opens in a new window, but not in an iframe. | - | `true` |
| title | `string` | Displayed title of the app. | Required | `The App` |
| logo | `string` | URL to logo file. Should be at least 288x288. | Required | `https://foo.app/icon.png` |
| shortDescription | `string` | Displayed only in the app list. | Required | `Awesome app` |
| categories | `ArrayβΉstringβΊ` | Displayed category. | Required | `[Security, Tools]` |
| author | `string` | Displayed author of the app | Required | `Bob` |
| url | `string` | URL of the app which will be launched in the iframe. | Required | `https://foo.app/launch` |
| description | `string` | Displayed only in the modal dialog with additional info about the app. | Required | `The best app` |
| site | `string` | Displayed site link | - | `https://blockscout.com` |
| twitter | `string` | Displayed twitter link | - | `https://twitter.com/blockscoutcom` |
| telegram | `string` | Displayed telegram link | - | `https://t.me/poa_network` |
| github | `string` | Displayed github link | - | `https://github.com/blockscout` |
| internalWallet | `boolean` | `true` means that the application can automatically connect to the Blockscout wallet. | - | `true` |
| priority | `number` | The higher the priority, the higher the app will appear in the list on the Marketplace page. | - | `7` |
### Solidity to UML diagrams
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ---------------------------------------- | -------- | ---------------------------------------- | -------------- | ------------- | -------------------------------------------- | -------- |
| NEXT\_PUBLIC\_VISUALIZE\_API\_HOST | `string` | Visualize API endpoint url | Required | - | `https://visualizer.services.blockscout.com` | v1.0.x+ |
| NEXT\_PUBLIC\_VISUALIZE\_API\_BASE\_PATH | `string` | Base path for Visualize API endpoint url | - | - | `/poa/core` | v1.29.0+ |
### Blockchain statistics
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------ | -------- | ------------------------------------ | -------------- | ------------- | --------------------------------------- | -------- |
| NEXT\_PUBLIC\_STATS\_API\_HOST | `string` | Stats API endpoint url | Required | - | `https://stats.services.blockscout.com` | v1.0.x+ |
| NEXT\_PUBLIC\_STATS\_API\_BASE\_PATH | `string` | Base path for Stats API endpoint url | - | - | `/poa/core` | v1.29.0+ |
### Web3 wallet integration (add token or network to the wallet)
This feature is **enabled by default** with the `[metamask]` value. To switch it off pass `NEXT_PUBLIC_WEB3_WALLETS=none`.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ---------------- | ---------------- | -------- |
| NEXT\_PUBLIC\_WEB3\_WALLETS | `ArrayβΉ"metamask" \| "coinbase" \| "token_pocket"βΊ` | Array of Web3 wallets which will be used to add tokens or chain to. The first wallet which is enabled in user's browser will be shown. | - | `[ "metamask" ]` | `[ "coinbase" ]` | v1.10.0+ |
| NEXT\_PUBLIC\_WEB3\_DISABLE\_ADD\_TOKEN\_TO\_WALLET | `boolean` | Set to `true` to hide icon "Add to your wallet" next to token addresses | - | - | `true` | v1.0.x+ |
### Transaction interpretation
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_TRANSACTION\_INTERPRETATION\_PROVIDER | `"blockscout" \| "noves" \| "none"` | Transaction interpretation provider that displays human readable transaction description | - | `none` | `blockscout` | v1.21.0+ |
### External transactions
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_TX\_EXTERNAL\_TRANSACTIONS\_CONFIG | `{ chain_name: string; chain_logo_url: string; explorer_url_template: string; }` | Configuration of the external transactions links that should be added to the transaction details. | - | - | `{ "chain_name": "ethereum", "chain_logo_url": "https://example.com/logo.png", "explorer_url_template": "https://explorer.com/tx/{hash}" }` | v1.38.0+ |
### Verified tokens info
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------- | -------- | ------------------------------ | -------------- | ------------- | ------------------------------------------------ | ------- |
| NEXT\_PUBLIC\_CONTRACT\_INFO\_API\_HOST | `string` | Contract Info API endpoint url | Required | - | `https://contracts-info.services.blockscout.com` | v1.0.x+ |
### Name service integration
This feature allows resolving blockchain addresses using human-readable domain names.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------- | -------- | ----------------------------- | -------------- | ------------- | -------------------------------------- | -------- |
| NEXT\_PUBLIC\_NAME\_SERVICE\_API\_HOST | `string` | Name Service API endpoint url | Required | - | `https://bens.services.blockscout.com` | v1.22.0+ |
### Metadata service integration
This feature allows name tags and other public tags for addresses.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------------ | -------- | --------------------------------- | -------------- | ------------- | ------------------------------------------ | -------- |
| NEXT\_PUBLIC\_METADATA\_SERVICE\_API\_HOST | `string` | Metadata Service API endpoint url | Required | - | `https://metadata.services.blockscout.com` | v1.30.0+ |
### Public tag submission
This feature allows you to submit an application with a public address tag.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------------------------ | -------- |
| NEXT\_PUBLIC\_METADATA\_SERVICE\_API\_HOST | `string` | Metadata Service API endpoint url | Required | - | `https://metadata.services.blockscout.com` | v1.30.0+ |
| NEXT\_PUBLIC\_ADMIN\_SERVICE\_API\_HOST | `string` | Admin Service API endpoint url | Required | - | `https://admin-rs.services.blockscout.com` | v1.1.0+ |
| NEXT\_PUBLIC\_RE\_CAPTCHA\_APP\_SITE\_KEY | `string` | See [below](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#google-recaptcha) | true | - | `` | v1.0.x+ |
### Data Availability
This feature enables views related to blob transactions (EIP-4844), such as the Blob Txns tab on the Transactions page and the Blob details page.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------------- | --------- | ---------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_DATA\_AVAILABILITY\_ENABLED | `boolean` | Set to true to enable blob transactions views. | Required | - | `true` | v1.28.0+ |
### Bridged tokens
This feature allows users to view tokens that have been bridged from other EVM chains. Additional tab "Bridged" will be added to the tokens page and the link to original token will be displayed on the token page.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_BRIDGED\_TOKENS\_CHAINS | `ArrayβΉBridgedTokenChainβΊ` where `BridgedTokenChain` can have following [properties](/setup/env-variables/frontend-common-envs/envs#bridged-token-chain-configuration-properties) | Used for displaying filter by the chain from which token where bridged. Also, used for creating links to original tokens in other explorers. | Required | - | `[{"id":"1","title":"Ethereum","short_title":"ETH","base_url":"https://eth.blockscout.com/token"}]` | v1.14.0+ |
| NEXT\_PUBLIC\_BRIDGED\_TOKENS\_BRIDGES | `ArrayβΉTokenBridgeβΊ` where `TokenBridge` can have following [properties](/setup/env-variables/frontend-common-envs/envs#token-bridge-configuration-properties) | Used for displaying text about bridges types on the tokens page. | Required | - | `[{"type":"omni","title":"OmniBridge","short_title":"OMNI"}]` | v1.14.0+ |
#### Bridged token chain configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| ------------ | -------- | ----------------------------------------------------------------------------------- | -------------- | ------------- | ---------------------------------- |
| id | `string` | Base chain id, see [https://chainlist.org](https://chainlist.org) for the reference | Required | - | `1` |
| title | `string` | Displayed name of the chain | Required | - | `Ethereum` |
| short\_title | `string` | Used for displaying chain name in the list view as tag | Required | - | `ETH` |
| base\_url | `string` | Base url to original token in base chain explorer | Required | - | `https://eth.blockscout.com/token` |
*Note* The url to original token will be constructed as `/`, e.g `https://eth.blockscout.com/token/`
#### Token bridge configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| ------------ | -------- | --------------------------------------------------------------------- | -------------- | ------------- | ------------- |
| type | `string` | Bridge type; should be matched to `bridge_type` field in API response | Required | - | `omni` |
| title | `string` | Bridge title | Required | - | `OmniBridge` |
| short\_title | `string` | Bridge short title for displaying in the tags | Required | - | `OMNI` |
### SafeCore address tags
For the smart contract addresses which are [Safe accounts](https://safe.global/) public tag "Multisig: Safe" will be displayed in the address page header alongside to Safe logo.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_SAFE\_TX\_SERVICE\_URL | `string` | The Safe transaction service URL. See full list of supported networks [here](https://docs.safe.global/api-supported-networks). | - | - | `uniswap` | v1.26.0+ |
### Address profile API
This feature allows the integration of an external API to fetch user info for addresses or contracts. When configured, if the API returns a username, a public tag with a custom link will be displayed in the address page header.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_ADDRESS\_USERNAME\_TAG | `{api_url: string; tag_link_template: string; tag_icon: string; tag_bg_color: string; tag_text_color: string}` | Address profile API tag configuration properties. See [below](/setup/env-variables/frontend-common-envs/envs#user-profile-api-configuration-properties). | - | - | `uniswap` | v1.35.0+ |
#### Address profile API configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| ------------------- | -------- | ---------------------------------------------------------------------------------------------------- | -------------- | ------------- | ----------------------------------- |
| api\_url\_template | `string` | User profile API URL. Should be a template with `{address}` variable | Required | - | `https://example-api.com/{address}` |
| tag\_link\_template | `string` | External link to the profile. Should be a template with `{username}` variable | - | - | `https://example.com/{address}` |
| tag\_icon | `string` | Public tag icon (.svg) url | - | - | `https://example.com/icon.svg` |
| tag\_bg\_color | `string` | Public tag background color (escape "#" symbol if you use HEX color codes or use rgba-value instead) | - | - | `\\#000000` |
| tag\_text\_color | `string` | Public tag text color (escape "#" symbol if you use HEX color codes or use rgba-value instead) | - | - | `\\#FFFFFF` |
### Address XStar XHS score
This feature allows the integration of an XStar API to fetch XHS score for addresses. When configured, if the API returns a score, a public tag with that score will be displayed in the address page header.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------- | -------- | --------------------------------------------------------------------------------------- | -------------- | ------------- | ---------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_XSTAR\_SCORE\_URL | `string` | XStar XHS score documentation URL for the address tag. Enables the XStar score feature. | - | - | `https://docs.xname.app/the-solution-adaptive-proof-of-humanity-on-blockchain/xhs-scoring-algorithm` | v1.36.0+ |
### SUAVE chain
For blockchains that implement SUAVE architecture additional fields will be shown on the transaction page ("Allowed peekers", "Kettle"). Users also will be able to see the list of all transactions for a particular Kettle in the separate view.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_IS\_SUAVE\_CHAIN | `boolean` | Set to true for blockchains with [SUAVE architecture](https://writings.flashbots.net/mevm-suave-centauri-and-beyond) | Required | - | `true` | v1.14.0+ |
### Celo chain
For blockchains that use the Celo platform. *Note*, that once the Celo mainnet becomes an L2 chain, these variables will be migrated to the Rollup configuration section.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_CELO\_ENABLED | `boolean` | Indicates that it is a Celo-based chain. | - | - | `true` | v1.37.0+ |
| NEXT\_PUBLIC\_CELO\_L2\_UPGRADE\_BLOCK | `number` | Indicates the block number when the Celo-type chain transitioned to L2. This is used to display links to the Epoch block page from a regular block page. | - | - | `26369280` | v1.37.0+ |
### Ton Application Chain (TAC)
For Ton Application Chains, this feature enables additional views, such as a list of cross-chain operations and a detailed page for a specific cross-chain operation, as well as extra fields on the transaction page.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------------------------------ | ------- |
| NEXT\_PUBLIC\_TAC\_OPERATION\_LIFECYCLE\_API\_HOST | `string` | URL for the TAC Operation Lifecycle service. | Required | - | `https://tac-operation-lifecycle.blockscout.com` | v2.1.0+ |
| NEXT\_PUBLIC\_TAC\_TON\_EXPLORER\_URL | `string` | URL of the Ton chain explorer. This is used to build links to transactions and addresses on the Ton chain. | Required | - | `https://tonscan.org` | v2.1.0+ |
### MetaSuites extension
Enables [MetaSuites browser extension](https://github.com/blocksecteam/metasuites) to integrate with the app views.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------- | --------- | --------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_METASUITES\_ENABLED | `boolean` | Set to true to enable integration | Required | - | `true` | v1.26.0+ |
### Validators list
The feature enables the Validators page which provides detailed information about the validators of the PoS chains.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------- | ----------------------------------------- | ----------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_VALIDATORS\_CHAIN\_TYPE | `"stability" \| "blackfort" \| "zilliqa"` | Chain type | Required | - | `"stability"` | v1.25.0+ |
### Sentry error monitoring
*Note* This feature is **deprecated**. All ENV variables will be removed in the future releases.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------- | --------- | ------------------------------------------------------- | -------------- | ------------- | --------------- | -------- |
| NEXT\_PUBLIC\_SENTRY\_DSN | `string` | Client key for your Sentry.io app | Required | - | `` | v1.0.x+ |
| SENTRY\_CSP\_REPORT\_URI | `string` | URL for sending CSP-reports to your Sentry.io app | - | - | `` | v1.0.x+ |
| NEXT\_PUBLIC\_SENTRY\_ENABLE\_TRACING | `boolean` | Enables tracing and performance monitoring in Sentry.io | - | `false` | `true` | v1.17.0+ |
### Rollbar error monitoring
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------ | -------- | ------------------------------------- | -------------- | ------------- | --------------- | -------- |
| NEXT\_PUBLIC\_ROLLBAR\_CLIENT\_TOKEN | `string` | Client token for your Rollbar project | Required | - | `` | v1.37.x+ |
### OpenTelemetry
OpenTelemetry SDK for Node.js app could be enabled by passing `OTEL_SDK_ENABLED=true` variable. Configure the OpenTelemetry Protocol Exporter by using the generic environment variables described in the [OT docs](https://opentelemetry.io/docs/specs/otel/protocol/exporter/#configuration-options). Note that this Next.js feature is currently experimental. The Docker image should be built with the `NEXT_OPEN_TELEMETRY_ENABLED=true` argument to enable it.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------ | --------- | ----------------------------------- | -------------- | ------------- | ------------- | -------- |
| OTEL\_SDK\_ENABLED | `boolean` | Run-time flag to enable the feature | Required | `false` | `true` | v1.18.0+ |
### DeFi dropdown
If the feature is enabled, a single button or a dropdown (if more than 1 item is provided) will be displayed at the top of the explorer page, which will take a user to the specified application in the marketplace or to an external site.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_DEFI\_DROPDOWN\_ITEMS | `[{ text: string; icon: string; dappId?: string, url?: string }]` | An array of dropdown items containing the button text, icon name and dappId in DAppscout or an external url | - | - | `[{"text":"Swap","icon":"swap","dappId":"uniswap"},{"text":"Payment link","icon":"payment_link","dappId":"peanut-protocol"}]` | v1.31.0+ |
### Multichain balance button
If the feature is enabled, a Multichain balance button will be displayed on the address page, which will take you to the portfolio application in the marketplace or to an external site.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_MULTICHAIN\_BALANCE\_PROVIDER\_CONFIG | `[{ name: string; url_template: string; dapp_id?: string; logo: string }]` | Multichain portfolio application config See [below](/setup/env-variables/frontend-common-envs/envs#multichain-button-configuration-properties) | - | - | `[{ "name": "zerion", "url_template": "https://app.zerion.io/{address}/overview", "logo": "https://example.com/icon.svg"}]` | v1.31.0+ |
#### Multichain button configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| ------------- | -------- | ------------------------------------------------------------------------------------------- | -------------- | ------------- | ------------------------------------------ |
| name | `string` | Multichain portfolio application name | Required | - | `zerion` |
| url\_template | `string` | Url template to the portfolio. Should be a template with `{address}` variable | Required | - | `https://app.zerion.io/{address}/overview` |
| dapp\_id | `string` | Set for open a Blockscout dapp page with the portfolio instead of opening external app page | - | - | `zerion` |
| logo | `string` | Multichain portfolio application logo (.svg) url | - | - | `https://example.com/icon.svg` |
### Get gas button
If the feature is enabled, a Get gas button will be displayed in the top bar, which will take you to the gas refuel application in the marketplace or to an external site.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| NEXT\_PUBLIC\_GAS\_REFUEL\_PROVIDER\_CONFIG | `{ name: string; url_template: string; dapp_id?: string; logo?: string }` | Get gas button config. See [below](/setup/env-variables/frontend-common-envs/envs#get-gas-button-configuration-properties) | - | - | `{ "name": "Need gas?", "dapp_id": "smol-refuel", "url_template": "https://smolrefuel.com/?outboundChain={chainId}", "logo": "https://example.com/icon.png" }` | v1.33.0+ |
#### Get gas button configuration properties
| Variable | Type | Description | Compulsoriness | Default value | Example value |
| ------------- | -------- | ------------------------------------------------------------------------ | -------------- | ------------- | ------------------------------------------------- |
| name | `string` | Text on the button | Required | - | `Need gas?` |
| url\_template | `string` | Url template, may contain `{chainId}` variable | Required | - | `https://smolrefuel.com/?outboundChain={chainId}` |
| dapp\_id | `string` | Set for open a Blockscout dapp page instead of opening external app page | - | - | `smol-refuel` |
| logo | `string` | Gas refuel application logo url | - | - | `https://example.com/icon.png` |
### Save on gas with GasHawk
The feature enables a "Save with GasHawk" button next to the "Gas used" value on the address page.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ------------------------------------ | --------- | ----------------------------------- | -------------- | ------------- | ------------- | -------- |
| NEXT\_PUBLIC\_SAVE\_ON\_GAS\_ENABLED | `boolean` | Set to "true" to enable the feature | - | - | `true` | v1.35.0+ |
### Rewards service API
This feature enables Blockscout Merits program. It requires that the [My account](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#my-account) and [Blockchain interaction](https://github.com/blockscout/docs/blob/master/setup/env-variables/frontend-common-envs/ENVS.md#blockchain-interaction-writing-to-contract-etc) features are also enabled.
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| ----------------------------------------- | -------- | ----------- | -------------- | ------------- | --------------------- | -------- |
| NEXT\_PUBLIC\_REWARDS\_SERVICE\_API\_HOST | `string` | API URL | - | - | `https://example.com` | v1.36.0+ |
### DEX pools
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------- | --------- | --------------------------------- | -------------- | ------------- | ------------------------------------------------ | -------- |
| NEXT\_PUBLIC\_DEX\_POOLS\_ENABLED | `boolean` | Set to true to enable the feature | Required | - | `true` | v1.37.0+ |
| NEXT\_PUBLIC\_CONTRACT\_INFO\_API\_HOST | `string` | Contract Info API endpoint url | Required | - | `https://contracts-info.services.blockscout.com` | v1.0.x+ |
### Badge claim link
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| -------------------------------------- | -------- | ---------------------------------------------- | -------------- | ------------- | --------------------- | -------- |
| NEXT\_PUBLIC\_GAME\_BADGE\_CLAIM\_LINK | `string` | Provide to enable the easter egg badge feature | - | - | `https://example.com` | v1.37.0+ |
## External services configuration
### Google ReCaptcha
To obtain the variable values, please refer to the [reCAPTCHA documentation](https://developers.google.com/recaptcha) and check the [Blockscout reCAPTCHA config docs](https://docs.blockscout.com/setup/configuration-options/recaptcha). Please note that we currently support only **reCAPTCHA v2 in invisible mode**, read more [here](https://developers.google.com/recaptcha/docs/versions#recaptcha_v2_invisible_recaptcha_badge).
| Variable | Type | Description | Compulsoriness | Default value | Example value | Version |
| --------------------------------------------- | -------- | ------------------------------------------- | -------------- | ------------- | ----------------- | ------- |
| NEXT\_PUBLIC\_RE\_CAPTCHA\_V3\_APP\_SITE\_KEY | `string` | **DEPRECATED** Google reCAPTCHA v3 site key | - | - | `` | v1.36.x |
| NEXT\_PUBLIC\_RE\_CAPTCHA\_APP\_SITE\_KEY | `string` | Google reCAPTCHA v2 site key | - | - | `` | v1.0.x+ |
# Indexing
Source: https://docs.blockscout.com/setup/indexing
Indexing process, monitoring, and troubleshooting for Blockscout.
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. [**Get Started Now**](/using-blockscout/autoscout) **and have your explorer up-and-running in minutes.**
BlockScout can take some time to fully index a chain. Larger chains require more time. Indexing starts from the head of the chain (the current block) and goes backwards towards the genesis block. The genesis block is the final block indexed during this process.
### Messages during indexing
1. **n% Blocks Indexed - We're indexing this chain right now. Some of the counts may be inaccurate.** This means blocks are still being collected and processed by BlockScout. The message should disappear once the genesis block is indexed.
2. **Blocks With Internal Transactions Indexed - We're indexing this chain right now. Some of the counts may be inaccurate.** This means BlockScout has collected all blocks but is still indexing internal transactions using the archive node tracing api. This message will disappear when `INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=true` is provided.
### Monitoring indexing processes
#### Monitoring blocks/transactions indexing
1. Block count should be close to the number of the blocks in the chain. Query using `SELECT COUNT(1) FROM blocks;` \~= num of blocks in the chain.
2. The number of missing blocks in the chain can be monitored with this query:
```sql theme={null}
SELECT COUNT(DISTINCT b1.number)
FROM generate_series(0, (SELECT MAX(number) FROM blocks)) AS b1(number)
WHERE NOT EXISTS (
SELECT 1 FROM blocks b2 WHERE b2.number=b1.number AND b2.consensus
);
```
#### Monitoring internal transactions indexing
Internal transaction fetching can be monitored with this query: `SELECT COUNT(1) FROM pending_block_operations;` It should move towards zero during internal transaction processing.
# How Do I Fix Indexer Timeouts?
Source: https://docs.blockscout.com/setup/indexing/how-do-i-fix-indexer-timeouts
BlockScout utilizes two separate indexers in order to index the network history as well as keep up with new incoming blocks. Due to this process, a node may become overloaded and not respond to BlockScout's RPC requests within the designated timeout period.
The indexer umbrella application can be tweaked to meet your node's size and responsiveness. Outlined below are the locations and adjustments that can be made to each fetcher.
Fetchers are available at [https://github.com/blockscout/blockscout/tree/master/apps/indexer/lib/indexer/fetcher](https://github.com/blockscout/blockscout/tree/master/apps/indexer/lib/indexer/fetcher)
| Fetcher | Description | Batch size | Concurrency |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------ |
| [Catchup Block Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/block/catchup/fetcher.ex#L24) | This fetcher indexes blocks, transactions and receipts starting from the tip of the chain working backward to the Genesis block. | 10 `INDEXER_CATCHUP_BLOCKS_BATCH_SIZE` | 10 `INDEXER_CATCHUP_BLOCKS_CONCURRENCY` |
| [Transaction Receipts Fetcher](https://github.com/blockscout/blockscout/blob/4b272cf61dc14da76416be63f1f1df044b03a4b9/apps/indexer/lib/indexer/block/fetcher.ex#L85-L86) | Transaction receipts fetcher. | 250 `INDEXER_RECEIPTS_BATCH_SIZE` | 10 `INDEXER_RECEIPTS_CONCURRENCY` |
| [Internal Transaction Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/internal_transaction/fetcher.ex#L20) | This fetcher indexes internal transactions. For the real-time fetcher this process is done synchronously and for the catchup fetcher, this process is done asynchronously. | 10 `INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE` | 4 `INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY` |
| [Coin Balance Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/coin_balance/fetcher.ex#L22) | This fetcher indexes each coin balance at the block height the address was interacted with. | 100 `INDEXER_COIN_BALANCES_BATCH_SIZE` | 4 `INDEXER_COIN_BALANCES_CONCURRENCY` |
| [Uncle Block Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/block/uncle/fetcher.ex#L22) | This fetcher indexes non-consensus blocks, transactions, and receipts. | 10 | 10 |
| [Token Balance Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/token_balance/fetcher.ex#L29) | This fetcher indexes token balances. Note you may experience some token balances that cannot be fetched due to a malformed smart contract or other functions that do not allow a balance to be fetched. | 100 `INDEXER_TOKEN_BALANCES_BATCH_SIZE` | 10 `INDEXER_TOKEN_BALANCES_CONCURRENCY` |
| [Token Fetcher](https://github.com/blockscout/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/indexer/lib/indexer/token/fetcher.ex#L18) | This indexer fetches the metadata for a token contract | 1 | 10 |
| [Block Reward Fetcher](https://github.com/blockscout/blockscout/blob/4b272cf61dc14da76416be63f1f1df044b03a4b9/apps/indexer/lib/indexer/fetcher/block_reward.ex#L28-L29) | Block reward fetcher. | 10 `INDEXER_BLOCK_REWARD_BATCH_SIZE` | 10 `INDEXER_BLOCK_REWARD_CONCURRENCY` |
| [Token Instance Realtime Fetcher](https://github.com/blockscout/blockscout/blob/4b272cf61dc14da76416be63f1f1df044b03a4b9/apps/indexer/lib/indexer/fetcher/token_instance/realtime.ex#L16-L17) | Token instance realtime fetcher. | 1 `INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE` | 10 `INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY` |
| [Token Instance Retry Fetcher](https://github.com/blockscout/blockscout/blob/4b272cf61dc14da76416be63f1f1df044b03a4b9/apps/indexer/lib/indexer/fetcher/token_instance/retry.ex#L16-L17) | Token instance retry fetcher. | 10 `INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY` | 10 `INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE` |
| [Token Instance Sanitize Fetcher](https://github.com/blockscout/blockscout/blob/4b272cf61dc14da76416be63f1f1df044b03a4b9/apps/indexer/lib/indexer/fetcher/token_instance/sanitize.ex#L16-L17) | Token instance sanitize fetcher. | 10 `INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE` | 10 `INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY` |
## Understanding Errors and Timeouts
`application=indexer fetcher=coin_balance count=500 error_count=500 [error] failed to fetch: :timeout`
In the error provided above, we can tell that the **indexer** application failed to fetch **500** **coin balances** due to a **timeout** error. Usually, when an indexer starts to receive timeouts, many more timeouts from other fetchers will occur as well.
### Resolving Timeout Issues
The best action to take when fetchers start to receive timeouts is to lower the batch size and concurrency of a few fetchers which will put less pressure on the node.
The two indexers that cause the most strain to the node are the block fetcher and the internal transactions fetcher. It would be advised to cut these fetchers values in half and restart the application. A restart of the node may also be required.
### Other Actions
BlockScout comes equipped with functionality to automatically stop sending requests for `n` seconds if timeouts are detected. You may adjust these settings by setting a different value for `wait_per_timeout`.
[https://github.com/poanetwork/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/ethereum\_jsonrpc/config/config.exs#L3-L9](https://github.com/poanetwork/blockscout/blob/1475e3bfd002d9397efd0f0cc29c20f39a70d023/apps/ethereum_jsonrpc/config/config.exs#L3-L9)
Content moved from [https://forum.poa.network/t/faq-how-do-i-fix-indexer-timeouts/1829](https://forum.poa.network/t/faq-how-do-i-fix-indexer-timeouts/1829)
# How Do I Update Memory Consumption To Fix Indexer Memory Errors?
Source: https://docs.blockscout.com/setup/indexing/how-do-i-update-memory-consumption-to-fix-indexer-memory-errors
During the indexing phase, many fetching processes are run asynchronously due to the load placed on trying to fetch all of the block content at once. These processes are stored in memory to be fetched at set intervals defined in each asynchronous fetcher.
`Indexer.Memory.Monitor` checks if the BEAM memory usage exceeds a set limit (defaults to 1 GiB) and if it does, it asks the process with the most memory that is registered as shrinkable to shrink.
Memory usage is checked once per minute. If the soft-limit is reached, the shrinkable work queues will shed half their load. The shed load will be restored from the database, the same as when a restart of the server occurs, so rebuilding the work queue will be slower, but use less memory.
If all queues are at their minimum size, then no more memory can be reclaimed and an error will be logged.
### Future Work
As mentioned above, future work is entered into memory to be processed later. These same processes are imported into the database to be checked on a server restart and reentered into memory to be processed.
### Updating Memory Consumption
The default Memory limit is 1 GiB and can be edited by setting `INDEXER_MEMORY_LIMIT` environment variable. See [Memory Usage](/setup/configuration-options/memory-usage) for more info.
### Left Bitshift Conversion Table
To perform a left bitshift conversion yourself open the interactive shell.
1\. `iex`
2\. `import Bitwise`
3\. `1 <<< 30` //1073741824
| | | | |
| ---------------------------------------------------------- | -------------- | ----------- | ----- |
| `INDEXER_MEMORY_LIMIT` environment variable value | Left Bitshift | Bytes | GiB |
| `1` or `1gb` or `1g` regardless of the case of the letters | `1 <<< 30` | 1073741824 | 1 |
| `5` or `5gb` or `5g` | `5 <<< 30` | 5368709120 | 5.3 |
| `10` or `10gb` or `10g` | `10 <<< 30` | 10737418240 | 10.7 |
| `15` or `15gb` or `15g` | `15 <<< 30` | 16106127360 | 16.1 |
| `20` or `20gb` or `20g` | `20 <<< 30` | 21474836480 | 21.4 |
| `25` or `25gb` or `25g` | `25 <<< 30` | 26843545600 | 26.8 |
| `30` or `30gb` or `30g` | `30 <<< 30` | 32212254720 | 32.2 |
| `35` or `35gb` or `35g` | `35 <<< 30` | 37580963840 | 37.6 |
| `40` or `40gb` or `40g` | `40 <<< 30` | 42949672960 | 43 |
| `45` or `45gb` or `45g` | `45 <<< 30` | 48318382080 | 48.3 |
| `50` or `50gb` or `50g` | `50 <<< 30` | 53687091200 | 53.7 |
| `100mb` or `100m` regardless of the case of the letters | `100 <<< 20` | 104857600 | 0.105 |
| `500mb` or `500m` | `500 <<< 20` | 524288000 | 0.52 |
| `1500mb` or `1500m` | `1500 <<< 20` | 1572864000 | 1.57 |
| `9536mb` or `9536m` | `9536 <<< 20` | 9999220736 | \~10 |
| `28610mb` or `28610m` | `28610 <<< 20` | 29999759360 | \~30 |
# General Overview
Source: https://docs.blockscout.com/setup/information-and-settings
General overview of Blockscout architecture and settings.
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. [**Get Started Now**](/using-blockscout/autoscout) **and have your explorer up-and-running in minutes.**
The following pages detail Blockscout architecture and organization:
* [Indexer, Web App, API](/setup/information-and-settings/separate-indexer-web-app-and-api)
* [Umbrella Project Organization](/setup/information-and-settings/umbrella-project)
* [Indexer Architecture Overview](/setup/information-and-settings/indexer-architecture-overview)
* [ShareLock](/setup/information-and-settings/sharelock)
* [EVM Version Information](/setup/information-and-settings/evm-version-information)
# EVM Version Information
Source: https://docs.blockscout.com/setup/information-and-settings/evm-version-information
You are asked to provide the EVM version the contract uses during the verification process. If the bytecode does not match the version, we try to verify using the latest EVM version.
For more information, see the [Solidity docs on specifying the EVM version when compiling a contract](https://docs.soliditylang.org/en/v0.8.25/using-the-compiler.html#target-options). Note that backward compatibility is not guaranteed between each version.
| | | | | |
| --------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Date | Mainnet Block # | Relevant changes / opcode specs | EIP details |
| Prague (Pectra) | 07 May 2025 | Block [22,431,084](https://eth.blockscout.com/block/22431084)
Epoch [364032](https://beaconcha.in/epoch/364032) | EIP-7702 enables externally owned accounts (EOAs) to temporarily execute smart contract code, allowing transaction batching, gas sponsorship, and alternative authentication methods. EIP-7251 raises maximum validator balance from 32 ETH to 2048 ETH for reward compounding. EIP-7691 doubles blob throughput (target: 3β6, max: 6β9 blobs per block) to enhance Layer 2 scaling. EIP-2537 adds BLS12-381 curve operations for efficient cryptographic verification. EIP-7002 enables execution layer triggerable validator exits. EIP-6110 reduces validator deposit processing delay from \~9 hours to \~13 minutes. | β’ [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537)
β’ [EIP-7840](https://eips.ethereum.org/EIPS/eip-7840) |
| Cancun | 13 Mar 2024 | [19,426,587](https://eth.blockscout.com/block/19426587) | The block's blob base fee ([EIP-7516](https://eips.ethereum.org/EIPS/eip-7516) and [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844)) can be accessed via the global `block.blobbasefee` or `blobbasefee()` in inline assembly. Introduces `blobhash()` in inline assembly and a corresponding global function to retrieve versioned hashes of blobs associated with the transaction (see [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844)). Opcode `mcopy` is available in assembly (see [EIP-5656](https://eips.ethereum.org/EIPS/eip-5656)). Opcodes `tstore` and `tload` are available in assembly (see [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153)). | β’ [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153)
β’ [EIP-7516](https://eips.ethereum.org/EIPS/eip-7516) |
| Shanghai | 12 Apr 2023 | [17,034,870](https://eth.blockscout.com/block/17034870) | Smaller code size and gas savings due to the introduction of `push0` (see [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855)). | β’ [EIP-3651](https://eips.ethereum.org/EIPS/eip-3651)
β’ [EIP-6049](https://eips.ethereum.org/EIPS/eip-6049) |
| Paris (The Merge) | 15 Sep 2022 | [15,537,394](https://eth.blockscout.com/block/15537394) | Introduces `prevrandao()` and `block.prevrandao`, and changes the semantics of the now deprecated `block.difficulty`, disallowing `difficulty()` in inline assembly (see [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399)). | β’ [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675)
β’ [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399) |
| *Gray Glacier\** | 30 June 2022 | [15,050,000](https://eth.blockscout.com/block/15050000) | Delays the difficulty bomb by an additional 3 months to September 2022. | [https://eips.ethereum.org/EIPS/eip-5133](https://eips.ethereum.org/EIPS/eip-5133) |
| *Arrow Glacier\** | 09 Aug 2021 | [13,773,000](https://eth.blockscout.com/block/13773000) | Delays the difficulty bomb until June 2022. | [https://eips.ethereum.org/EIPS/eip-4345](https://eips.ethereum.org/EIPS/eip-4345) |
| London | 05 Aug 2021 | [12,965,000](https://eth.blockscout.com/block/12965000) | The block's base fee ([EIP-3198](https://eips.ethereum.org/EIPS/eip-3198) and [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)) can be accessed via the global `block.basefee` or `basefee()` in inline assembly. | β’ [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)
β’ [EIP-3554](https://eips.ethereum.org/EIPS/eip-3554) |
| Berlin | 14 Apr 2021 | [12,244,000](https://eth.blockscout.com/block/12244000) | Gas costs for `SLOAD`, `*CALL`, `BALANCE`, `EXT*` and `SELFDESTRUCT` increased. The compiler assumes cold gas costs for such operations. This is relevant for gas estimation and the optimizer. | [https://eips.ethereum.org/EIPS/eip-2070](https://eips.ethereum.org/EIPS/eip-2070) |
| Istanbul | 08 Dec 2019 | [9,069,000](https://eth.blockscout.com/block/9069000) | Opcodes `chainid` and `selfbalance` are available in assembly. | [https://eips.ethereum.org/EIPS/eip-1679](https://eips.ethereum.org/EIPS/eip-1679) |
| Constantinople / Petersburg | 28 Feb 2019 | [7,280,000](https://eth.blockscout.com/block/7280000) | Opcodes `create2`, `extcodehash`, `shl`, `shr` and `sar` are available in assembly. Bitwise shifting operators use shifting opcodes (`shl`,`shr`,`sar`), requiring less gas. | [http://eips.ethereum.org/EIPS/eip-1013](http://eips.ethereum.org/EIPS/eip-1013) |
| Byzantium | 16 Oct 2017 | [4,370,000](https://eth.blockscout.com/block/4370000) | Opcodes `returndatacopy`, `returndatasize` and `staticcall` available in assembly. `staticcall` opcode used when calling non-library view or pure functions, which prevents the functions from modifying state at the EVM level, this even applies to invalid type conversions. Ability to access dynamic data returned from function calls. `revert` opcode introduced, `revert()` will not waste gas. | [http://eips.ethereum.org/EIPS/eip-609](http://eips.ethereum.org/EIPS/eip-609) |
| Spurious Dragon | 22 Nov 2016 | [2,675,000](https://eth.blockscout.com/block/2675000) | Gas cost for the `exp` opcode increased, impacts gas estimation and optimization. | [http://eips.ethereum.org/EIPS/eip-607](http://eips.ethereum.org/EIPS/eip-607) |
| Tangerine Whistle | 18 Oct 2016 | [2,463,000](https://eth.blockscout.com/block/2463000) | Gas cost to access other accounts increased, impacts gas estimation and optimization. All gas sent by default for external calls, previously a certain amount had to be retained. | [http://eips.ethereum.org/EIPS/eip-608](http://eips.ethereum.org/EIPS/eip-608) |
| Homestead | 14 Mar 2016 | [1,150,000](https://eth.blockscout.com/block/1150000) | Oldest version | [http://eips.ethereum.org/EIPS/eip-606](http://eips.ethereum.org/EIPS/eip-606) |
# Indexer Architecture Overview
Source: https://docs.blockscout.com/setup/information-and-settings/indexer-architecture-overview
Learn how the indexing architecture works in Blockscout
## Presentation Highlights
The following presentation describes the past, present and future iterations of Blockscout along with details about how block imports work both synchronously and asynchronously, and a description of the regular and on-demand fetchers.
1MB pdf
## Blockscout indexers
See the pdf β¬οΈ for more details about the Blockscout indexer. The indexing architecture includes all of the following indexers and fetchers
### Primary Indexers
Both indexers utilize synchronous and asynchronous operations.
* Realtime: Imports new block data from the head of the chain.
* Catchup: Imports data down the chain (starting from the head and moving backwards towards the genesis block)
### Secondary fetchers
### Regular
* Internal transactions
* Pending transactions
* Dropped/Replaced transactions
* Contract bytecodes
* Block rewards
* Token catalog
* Token/coin balances
* NFT instances
* Uncles
### On Demand
* Coin/token balances update
* Contract bytecodes fetch/re-check
* Contract source codes lookup
* NFT instance metadata re-fetch
* Token total supply
### Off-chain integrations
* Coin / token price, market cap, tvl sources: CMC, Coingecko, Cryptorank, Defillama
* Smart contract verification: ETH bytecode DB, Sourcify
* Data enrichment: ENS names, public tags, AI interpreters (own, Noves Fi), sc security scanners (Solidityscan), assets portfolio (Zerion)
* Chain initialization data import: pre-mined coins, precompiled smart-contracts
### Chain-specific fetchers
* There are more than a dozen of chain-specific data fetchers to account for chain differences including arbitrum, optimism, polygon zkevm, zksync etc.
### Temporary fetchers
* Used once to resolve possible data inconsistencies.
# Separate Indexer, Web App, And API
Source: https://docs.blockscout.com/setup/information-and-settings/separate-indexer-web-app-and-api
Blockscout supports several modes which run in a single all-in-one application by default.
**Modes**
* [Indexer](/setup/information-and-settings/separate-indexer-web-app-and-api#indexer-mode)
* [Web UI](/setup/information-and-settings/separate-indexer-web-app-and-api#web-application-mode)
* [API](/setup/information-and-settings/separate-indexer-web-app-and-api#api-mode)
* All-in-one (default)
It is possible to run modes separately or in different combinations. For example, you may want to run the `indexer mode + API` to create an indexed db with programmatic access and no UI, or `indexer mode + UI` to leverage Blockscout as a read-only explorer.
Note that the application is limited to 1 running indexer per 1 Blockscout instance. However, the indexer automatically reruns child processes within the Elixir architecture, making it quite fault-tolerant.
To run these modes separately, adjust ENV variables as follows:
After extending the set of environment variables for the instance, recompile the application (or rebuilt the docker image, if this is Docker version) to enable mode settings.
## Indexer mode
To run Blockscout in indexer mode, disable the web application and API:
```javascript theme={null}
export DISABLE_WEBAPP=true
export API_V1_READ_METHODS_DISABLED=true
export API_V1_WRITE_METHODS_DISABLED=true
```
## Web application mode
To run Blockscout in web application mode only, disable the indexer and API read methods (API write functionality is not disabled to support smart contracts verification in the UI).
```javascript theme={null}
export DISABLE_INDEXER=true
export API_V1_READ_METHODS_DISABLED=true
```
If you have a separate web application and indexer and they are connected to the same database (via DATABASE\_URL), you will see new incoming items on the web UI like in the all-in-one mode. This configuration allows you to scale the web UI separately from indexer.
## API mode
To run in API mode, disable the indexer and webapp.
```javascript theme={null}
export DISABLE_INDEXER=true
export DISABLE_WEBAPP=true
```
In API mode the web UI will show the API docs page at the default path (/). In the default all-in-one mode, it is located on the /api-docs page.
## Web UI + API mode
```javascript theme={null}
export DISABLE_INDEXER=true
```
# ShareLock
Source: https://docs.blockscout.com/setup/information-and-settings/sharelock
ShareLock is the row-level locking mechanism used internally by PostgreSQL.
### Deadlocks and prevention
When several DB transactions are acting on multiple rows of the same table, it's possible to incur in a deadlock and so into an error. This can be prevented by enforcing the same consistent order of lock acquisition on *all* the transactions performing `INSERT`, `UPDATE` or `DELETE` on a given table.
On top of this, if multiple DB transactions act on multiple tables a deadlock will occur, even if they follow the order on each table described above, if they acquire locks on said tables in a different order. This can also be prevented by using a consistent order of lock acquisition *between* different tables.
### Imposing the lock acquisition order on a table with Ecto
When `INSERT`ing a list of rows Postgres will respect the order in which they appear in the query, so the reordering can happen beforehand.
For example, this will work:
```python theme={null}
entries = [...]
ordered_entries = Enum.sort_by(entries, & &1.id)
Repo.insert_all(__MODULE__, ordered_entries)
```
Performing `UPDATE`s is trickier because there is no `ORDER BY` clause. The solution to this is to `JOIN` on a subquery that `SELECT`s with the option `FOR UPDATE`.
Using Ecto this can be done, for example, like this:
```csharp theme={null}
query =
from(
entry in Entry,
where: not is_nil(entry.value),
order_by: entry.id,
lock: "FOR UPDATE"
)
Repo.update_all(
from(e in Entry, join: s in subquery(query), on: e.id == s.id),
[set: [value: nil]],
timeout: timeout)
```
`DELETE` has the same quirks as `UPDATE` and it is too solved in the same way.
For example:
```csharp theme={null}
query =
from(
entry in Entry,
where: is_nil(entry.value),
order_by: entry.id,
lock: "FOR UPDATE"
)
Repo.delete_all(from(e in Entry, join: s in subquery(query), on: e.id == s.id))
```
### Imposing the lock acquisition order between tables with Ecto
When using an `Ecto.Multi` to perform `INSERT`, `UPDATE` or `DELETE` on multiple tables the order to keep is between different operation. For example, supposing `EntryA` was established to be modified before `EntryB`, this is not correct:
```ruby theme={null}
Multi.new()
|> Multi.run(:update_b, fn repo, _ ->
# operations with ordered locks on `EntryB`
end)
|> Multi.run(:update_a, fn repo, _ ->
# operations with ordered locks on `EntryA`
end)
|> Repo.transaction()
```
When possible, the simple solution is to move `:update_a` to be before `:update_b`. When not possible, for instance if `:update_a` depends on the result of `:update_b`, this can be solved by acquiring the locks in a separate operation.
For example:
```python theme={null}
Multi.new()
|> Multi.run(:acquire_a, fn repo, _ ->
# acquire locks in order on `EntryA`
end)
|> Multi.run(:update_b, fn repo, _ ->
# operations with ordered locks on `EntryB`
end)
|> Multi.run(:update_a, fn repo, %{acquire_a: values} ->
# operations (no need to enforce order again) on `EntryA`
end)
|> Repo.transaction()
```
Note also that for the same reasons multiple operations on the same table in the same transaction are not safe to perform if they each acquire locks in order, because locks are not released until the transaction is committed.
### Order used for Explorer's tables
This is a complete list of the ordering currently in use on each table. It also specifies the order between tables in the same transaction: locks for a table on top need to be acquired before those from a table on the bottom.
Note that this should always be enforced because as long as there is one DB transaction performing in a different order there is the possibility of a deadlock.
| schema module | table name | ordered by |
| ------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Explorer.Chain.Address | addresses | \[asc: :hash] |
| Explorer.Chain.Address.Name | address\_names | \[asc: :address\_hash, asc: :name] |
| Explorer.Chain.Address.CoinBalance | address\_coin\_balances | \[asc: :address\_hash, asc: :block\_number] |
| Explorer.Chain.Block | blocks | \[asc: :hash] |
| Explorer.Chain.Block.SecondDegreeRelation | block\_second\_degree\_relations | \[asc: :nephew\_hash, asc: :uncle\_hash] |
| Explorer.Chain.Block.Reward | block\_rewards | \[asc: :address\_hash, asc: :address\_type, asc: :block\_hash] |
| Explorer.Chain.Block.EmissionReward | emission\_rewards | \[asc: :block\_range] |
| Explorer.Chain.Transaction | transactions | \[asc: :hash] |
| Explorer.Chain.Transaction.Fork | transaction\_forks | \[asc: :uncle\_hash, asc: :index] |
| Explorer.Chain.Log | logs | \[asc: :transaction\_hash, asc: :index] |
| Explorer.Chain.InternalTransaction | internal\_transactions | \[asc: :transaction\_hash, asc: :index] |
| Explorer.Chain.Token | tokens | \[asc: :contract\_address\_hash] |
| Explorer.Chain.TokenTransfer | token\_transfers | \[asc: :transaction\_hash, asc: :log\_index] |
| Explorer.Chain.TransactionAction | transaction\_actions | \[asc: :hash, asc: :log\_index] |
| Explorer.Chain.Optimism.OutputRoot | op\_output\_roots | \[asc: :l2\_output\_index] |
| Explorer.Chain.Optimism.TxnBatch | op\_transaction\_batches | \[asc: :l2\_block\_number] |
| Explorer.Chain.Optimism.Deposit | op\_deposits | \[asc: :l2\_transaction\_hash] |
| Explorer.Chain.Optimism.DisputeGame | op\_dispute\_games | \[asc: :index] |
| Explorer.Chain.Optimism.FrameSequence | op\_frame\_sequences | \[asc: :id] |
| Explorer.Chain.Optimism.FrameSequenceBlob | op\_frame\_sequence\_blobs | \[asc: :id] |
| Explorer.Chain.Optimism.WithdrawalEvent | op\_withdrawal\_events | \[asc: :withdrawal\_hash, asc: :l1\_event\_type] |
| Explorer.Chain.Optimism.Withdrawal | op\_withdrawals | \[asc: :msg\_nonce] |
| Explorer.Chain.Optimism.EIP1559ConfigUpdate | op\_eip1559\_config\_updates | \[asc: :l2\_block\_number] |
| Explorer.Chain.Optimism.InteropMessage | op\_interop\_messages | \[asc: :nonce, asc: :init\_chain\_id] |
| Explorer.Chain.Address.TokenBalance | address\_token\_balances | \[asc: :address\_hash, asc: :token\_contract\_address\_hash, asc: :block\_number] |
| Explorer.Chain.Address.CurrentTokenBalance | address\_current\_token\_balances | \[asc: :token\_contract\_address\_hash, asc: :token\_id, asc: :address\_hash] |
| Explorer.Chain.Scroll.Batch | scroll\_batches | \[asc: number] |
| Explorer.Chain.Scroll.BatchBundle | scroll\_batch\_bundles | \[asc: final\_batch\_number] |
| Explorer.Chain.Scroll.Bridge | scroll\_bridge | \[asc: :type, asc: message\_hash] |
| Explorer.Chain.Scroll.L1FeeParam | scroll\_l1\_fee\_params | \[asc: :block\_number, asc: tx\_index, asc: name] |
| Explorer.Chain.Shibarium.Bridge | shibarium\_bridge | \[asc: :operation\_hash, asc: l1\_transaction\_hash, asc: l2\_transaction\_hash] |
| Explorer.Chain.StakingPool | staking\_pools | \[asc: :staking\_address\_hash] |
| Explorer.Chain.StakingPoolsDelegator | staking\_pools\_delegators | \[asc: :delegator\_address\_hash, asc: :pool\_address\_hash] |
| Explorer.Chain.ContractMethod | contract\_methods | \[asc: :identified, asc: :abi] |
| Explorer.Market.MarketHistory | market\_history | \[asc: :date] |
| Explorer.Chain.Withdrawal | withdrawals | \[asc: :index] |
| Explorer.Chain.Zkevm.TransactionBatch | zkevm\_transaction\_batches | \[asc: :number] |
| Explorer.Chain.Zkevm.BatchTransaction | zkevm\_batch\_l2\_transactions | \[asc: :hash] |
| Explorer.Chain.Zkevm.LifecycleTransaction | zkevm\_lifecycle\_l1\_transactions | \[asc: :id] |
| Explorer.Chain.Zkevm.Bridge | zkevm\_bridge | \[asc: :type, asc: :index] |
| Explorer.Chain.Zkevm.BridgeL1Token | zkevm\_bridge\_l1\_tokens | \[asc: :address] |
| Explorer.Chain.ZkSync.TransactionBatch | zksync\_transaction\_batches | \[asc: :number] |
| Explorer.Chain.ZkSync.BatchBlock | zksync\_batch\_blocks | \[asc: :hash] |
| Explorer.Chain.ZkSync.BatchTransaction | zksync\_batch\_transactions | \[asc: :hash] |
| Explorer.Chain.ZkSync.LifecycleTransaction | zksync\_lifecycle\_transactions | \[asc: :id] |
| Explorer.Chain.Celo.PendingAccountOperation | celo\_pending\_account\_operations | \[asc: :address\_hash] |
| Explorer.Chain.Celo.Account | celo\_accounts | \[asc: :address\_hash] |
| Explorer.Chain.Celo.ValidatorGroupVote | celo\_validator\_group\_votes | \[asc: :transaction\_hash, asc: :account\_address\_hash, asc: :group\_address\_hash] |
| Explorer.Chain.Celo.Epoch | celo\_epochs | \[asc: :number] |
| Explorer.Chain.Celo.EpochReward | celo\_epoch\_rewards | \[asc: :epoch\_number] |
| Explorer.Chain.Celo.ElectionReward | celo\_election\_rewards | \[asc: :epoch\_number, asc: type, asc: :account\_address\_hash, asc: :associated\_account\_address\_hash] |
| Explorer.Chain.Zilliqa.QuorumCertificate | zilliqa\_quorum\_certificates | \[asc: :block\_hash] |
| Explorer.Chain.Zilliqa.AggregateQuorumCertificate | zilliqa\_aggregate\_quorum\_certificates | \[asc: :block\_hash] |
| Explorer.Chain.Zilliqa.NestedQuorumCertificate | zilliqa\_nested\_quorum\_certificates | \[asc: :block\_hash, asc: proposed\_by\_validator\_index] |
| Explorer.Chain.Zilliqa.Zrc2.TokenAdapter | zilliqa\_zrc2\_token\_adapters | \[asc: :adapter\_address\_hash] |
| Explorer.Chain.Zilliqa.Zrc2.TokenTransfer | zilliqa\_zrc2\_token\_transfers | \[asc: :transaction\_hash, asc: :block\_hash, asc: :log\_index] |
| Explorer.Chain.Filecoin.PendingAddressOperation | filecoin\_pending\_address\_operations | \[asc: :address\_hash] |
# Umbrella Project Organization
Source: https://docs.blockscout.com/setup/information-and-settings/umbrella-project
How the BlockScout project is organized
BlockScout is an Elixir [umbrella project](https://elixir-lang.org/getting-started/mix-otp/dependencies-and-umbrella-projects.html). Each directory under `apps/` is a separate [Mix](https://hexdocs.pm/mix/Mix.html) project and [OTP application](https://hexdocs.pm/elixir/Application.html), but the projects can use each other as a dependency in their `mix.exs`.
Each OTP application has a restricted domain.
Table is horizontally scrollable.
| | | | |
| ----------------------- | ------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Directory | OTP Application | Namespace | Purpose |
| `apps/ethereum_jsonrpc` | `:ethereum_jsonrpc` | `EthereumJSONRPC` | Ethereum JSONRPC client. It is allowed to know `Explorer`'s param format, but it cannot directly depend on `:explorer` |
| `apps/explorer` | `:explorer` | `Explorer` | Storage for the indexed chain. Can read and write to the backing storage. MUST be able to boot in a read-only mode when run independently from `:indexer`, so cannot depend on `:indexer` as that would start `:indexer` indexing. |
| `apps/block_scout_web` | `:block_scout_web` | `BlockScoutWeb` | Phoenix interface to `:explorer`. The minimum interface to allow web access should go in `:block_scout_web`. Any business rules or interface not tied directly to `Phoenix` or `Plug` should go in `:explorer`. MUST be able to boot in a read-only mode when run independently from `:indexer`, so cannot depend on `:indexer` as that would start `:indexer` indexing. |
| `apps/indexer` | `:indexer` | `Indexer` | Uses `:ethereum_jsonrpc` to index chain and batch import data into `:explorer`. Any process, `Task`, or `GenServer` that automatically reads from the chain and writes to `:explorer` should be in `:indexer`. This restricts automatic writes to `:indexer` and read-only mode can be achieved by not running `:indexer`. |
# Microservices
Source: https://docs.blockscout.com/setup/microservices
Overview of Blockscout microservices and their deployment.
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. [**Get Started Now**](/using-blockscout/autoscout) **and have your explorer up-and-running in minutes.**
Blockscout microservices are individual components written in Rust designed to provide full functionality to the explorer. This architecture allows for better scalability, easier maintenance, and more flexible deployment options.
Information about Blockscout microservices and how to run them is available here:
Services Include:
1. [blockscout-ens](https://github.com/blockscout/blockscout-rs/blob/main/blockscout-ens) - indexed data of domain name service for blockscout instances.
2. [da-indexer](https://github.com/blockscout/blockscout-rs/blob/main/da-indexer) - collects blobs from different DA solutions (e.g, Celestia)
3. [eth-bytecode-db](https://github.com/blockscout/blockscout-rs/blob/main/eth-bytecode-db) - Ethereum Bytecode Database. Cross-chain smart-contracts database used for automatic contracts verification
4. [proxy-verifier](https://github.com/blockscout/blockscout-rs/blob/main/proxy-verifier) - backend for the standalone multi-chain verification service
5. [sig-provider](https://github.com/blockscout/blockscout-rs/blob/main/sig-provider) - aggregator of ethereum signatures for transactions and events
6. [smart-contract-verifier](https://github.com/blockscout/blockscout-rs/blob/main/smart-contract-verifier) - smart-contracts verification
7. [stats](https://github.com/blockscout/blockscout-rs/blob/main/stats) - service designed to calculate and present statistical information from a Blockscout instance
8. [user-ops-indexer](https://github.com/blockscout/blockscout-rs/blob/main/user-ops-indexer) - service designed to index, decode and serve user operations as per the ERC-4337 standard
9. [visualizer](https://github.com/blockscout/blockscout-rs/blob/main/visualizer) - service for evm visualization such as:
a. Solidity contract visualization using [sol2uml](https://www.npmjs.com/package/sol2uml)
# Blockscout ENS (BENS) Name Service Integration
Source: https://docs.blockscout.com/setup/microservices/blockscout-ens-bens-name-service-integration
BENS service extends Blockscout support for name services
Blockscout now support Name Services for various chains including ENS for Ethereum. Search by name in the search bar or used the dedicated Name Services lookup page accessible from the Blockchain menu.
On the Name Services page search by name or address and view registration and expiration date for all names.
## Adding Name Service Support
Protocols can add Name Service support for Blockscout instances on various chains. The BENS microservice was first introduced in [Blockscout v5.4](https://github.com/blockscout/blockscout/releases/tag/v5.4.0-beta), and several bugs were fixed in\*\* **[**Blockscout v6.0**](https://github.com/blockscout/blockscout/releases/tag/v6.0.0-beta)**, which is the recommended minimum version for integration.\*\*
You'll complete the following steps to add Name Service Support to Blockscout:
1. [Use this guide to create a subgraph](https://github.com/blockscout/blockscout-rs/blob/main/blockscout-ens/graph-node/subgraph-writer/README.md#howto-create-subgraph-for-your-domain-name-protocol). Our template uses the ENS subgraph structure, so the closer your project is the ENS the easier the integration.
a. Subgraph should support [this graphql schema](https://github.com/blockscout/blockscout-rs/blob/main/blockscout-ens/graph-node/subgraphs/ens-subgraph/schema.graphql)
2. [Submit your subgraph](https://github.com/blockscout/blockscout-rs/blob/main/blockscout-ens/graph-node/subgraphs/README.md#deploy-subgraph-to-graph-node) to graph-node.
3. Submit a PR to the [blockscout-rs](https://github.com/blockscout/blockscout-rs/pulls) repository (hosted version) or integrate with your Blockscout fork.
a. [Example PR for BNS](https://github.com/blockscout/blockscout-rs/pull/748) (Base Name Service)
4. Enable BENS service on the instance using the [`MICROSERVICE_BENS_ENABLED`](/setup/env-variables#blockscout-ens)` `& [`MICROSERVICE_BENS_URL`](/setup/env-variables#blockscout-ens) env variables.
### FAQs
This may be the result of missing information/functions in the subgraph. When a subgraph sees that a domain name has been registered, it only has the `label_hash` of this name. Therefore, the subgraph has to guess the name using a rainbow table (make sure to load ens-rainbow table) OR find this name later in other events, such as `handleNameChanged` or any other event that has a name field.
Try to determine events with a name field, write code that will update domain name using `maybeSaveDomainName()` or other functions you prefer. For example, the ens-subgraph uses the `setNamePreimage` function, which performs the same function for second-level-eth domains only.
**Reverse Records**
It may also be the case that unknown names are reverse records. These are not resolved by design, and users don't typically need to see them.
The easiest way is to use docker.
`docker run --platform linux/x86_64 -p 8050:8050 --rm --name bens --env-file .env `[`ghcr.io/blockscout/bens:latest`](http://ghcr.io/blockscout/bens:latest)
To build locally without docker you should install `protoc` and `protoc-gen-openapiv2` . A complete guide for a local build is not yet available.
The primary name is the first name created which has not yet expired.
# Smart Contract Verification
Source: https://docs.blockscout.com/setup/microservices/smart-contract-verification
Details about the verification microservice
A microservice written in Rust provides fast and efficient contract verification. The application runs as an HTTP server and verification requests are made using a REST API.
* [Basic Info](/setup/microservices/smart-contract-verification#basic-info)
* [Library Initialization](/setup/microservices/smart-contract-verification#library-initialization)
* [Solidity and Vyper Verification](/setup/microservices/smart-contract-verification#solidity-and-vyper-verification)
* [Sourcify Verification](/setup/microservices/smart-contract-verification#sourcify-verification)
* [Verification Algorithm](/setup/microservices/smart-contract-verification#verification-algorithm)
* [Http API](/setup/microservices/smart-contract-verification#verification-http-api)
## Basic Info
### **Location**
* Application: [https://github.com/blockscout/blockscout-rs/tree/main/smart-contract-verifier](https://github.com/blockscout/blockscout-rs/tree/main/smart-contract-verifier)
* Http API: [https://github.com/blockscout/blockscout-rs/blob/main/smart-contract-verifier/smart-contract-verifier-http](https://github.com/blockscout/blockscout-rs/blob/main/smart-contract-verifier/smart-contract-verifier-http/README.md)
* Latest release information and changelogs: [https://github.com/blockscout/blockscout-rs/releases](https://github.com/blockscout/blockscout-rs/releases)
### **Activation**
* Update Blockscout to the 4.1.8+ release
* Add the following ENV variables:
* `MICROSERVICE_SC_VERIFIER_ENABLED=true`
* `MICROSERVICE_SC_VERIFIER_URL=...` (verifier endpoint, see [http configuration](https://github.com/blockscout/blockscout-rs/tree/main/smart-contract-verifier/smart-contract-verifier-http) for more details)
* If running locally, the smart-contract-verifier is integrated with [`docker-compose`](https://github.com/blockscout/blockscout/tree/master/docker-compose)\`\`
* Registry of docker images is available via the docker-compose file. For registry information see: [https://github.com/blockscout/blockscout-rs/pkgs/container/smart-contract-verifier](https://github.com/blockscout/blockscout-rs/pkgs/container/smart-contract-verifier)
### Architecture
The service consists of 2 parts, a verification library and a transport layer that serves requests.
* **Verification Library**: Provides verification and a communication interface for verification functions. Includes modules for Solidity, Sourcify, and Vyper.
* **Transport Layer**: Verification requests are sent via HTTP.
### Benefits
We've seen a 10X improvement in verification speed over the previous implementation. Benefits of the new microservice include:
* **Scalability**: Remove CPU intensive tasks from the primary Blockscout instance. Modularity provides the ability to scale quickly.
* **Speed**: Using native compilers greatly increases compilation speed relative to the JS wrapped versions running on Node.js used previously.
* **Improved efficiency**. New algorithm supports contracts that contain several metadata hashes, improving efficiency.
## Library Initialization
On startup, the library must retrieve all available compilers. Compiler information consists of a link to download the compiler and its hashsum \[[example](https://github.com/blockscout/solc-bin/blob/main/list.json)]. A separate thread also starts during initialization to update this list periodically.
Library processes differ based on verification for Solidity/Vyper contracts or verification via Sourcify. Both are detailed below.
## Solidity and Vyper Verification
Verification processes are similar for contracts written in Solidity and Vyper.
For Solidity contracts, verification is available for multiple files or standard json input. Single file verification is also possible - users still verify via the multiple file method and only upload a single file.
For Vyper contracts, only multiple file verification is available.
### Request Values
Each request contains the following values:
* **Deployed bytecode**: bytecode of the contract stored on chain
* **Creation transaction (tx) input**: input data provided in transaction to create the contract
* **Compiler version**: Version of compiler used to compile the contract
* **Content**: Verification method related fields. E.g. for Solidity multiple files those fields are:
* **Sources**: mapping from source files to their contents
* **Evm version**: version of the EVM used to compile sources
* **Optimization runs**: optional parameter that enables optimizations and specifies number of optimization runs
* **Contract libraries**: optional parameter that specifies addresses of the contract libraries used in compiled contracts
### Verification Steps
1. **Download the compiler** using the specified compiler version from the url retrieved on [initialization](/setup/microservices/smart-contract-verification#initialization) (or update).
2. **Compilation**: compile using the provided and slightly modified (see [Verification Algorithm](/setup/microservices/smart-contract-verification#verification-algorithm) section) sources.
3. **Verification**: compare compiler output from step 2 with bytecodes (deployed bytecode and creation tx input) provided by the caller. During verification all contracts obtained through local compilation are checked one by one, and if any corresponds to provided bytecodes, the verification is considered successful. Contract paths and names are already indexed from available contracts, and constructor arguments are extracted.
4. **Return Values**: See below.
### Returned Values
As a result of successful verification the following struct is returned:
* **Compiler input**: Data used as an input for the compiler
* **Compiler version**: version of the compiler used in verification (corresponds to the version provided in request)
* **File path**: path of the file containing verified contract
* **Contract name**: name of the verified contract
* **Abi**: application binary interface of the verified contract ([https://docs.soliditylang.org/en/v0.8.13/abi-spec.html?highlight=abi](https://docs.soliditylang.org/en/v0.8.13/abi-spec.html?highlight=abi))
* **Constructor arguments**: optionally returned constructor arguments used during on chain creation of the contract.
In case of an error, enum is returned with the corresponding error and its description (e.g. if compilation failed, a Compilation error is returned with the error data obtained from the compiler).
## Sourcify Verification
The request is sent via proxy to the [Sourcify](https://sourcify.dev/) service. It accepts the following arguments:
1. Address of the contract to be verified.
2. Chain id where the contract is deployed.
3. Files required for Sourcify verification.
4. (optionally)Contract index, if the provided files contain multiple metadata files (i.e. multiple contracts).
These arguments are sent to the Sourcify Api, which returns the verification status.
### **Successful Verification**
Either the data provided was valid and the contract was verified by Sourcify, or the contract was previously verified. To obtain the actual data used for verification we send another request to retrieve source files used in verification. We expect data used for verification to be in the `metadata.json` file, so it is parsed and the information retrieved. This includes file and contract names, compiler and evm versions, info about optimizations, contract libraries, abi, and sources.
**Note**: Constructor arguments cannot currently be obtained from the metadata via Sourcify. This requires the input used for contract creation transaction and the bytecode resulting from local compilation, which are not provided.
### Failed Verification
If verification fails we return an error with description obtained from Sourcify response
## Verification Algorithm
Verification is divided into 2 parts to effectively deal with metadata hash differences in contracts. Often, very similar contracts will have very different metadata hashes based on small changes within the contract (ie an extra space in the source code). To address this, the algorithm:
1. Extracts all metadata hash fields from c\_reationTxInput\_.
2. Compares non-metadata sections of the onchain bytecode with the results of local compilation.
Metadata hashes are extracted by compiling the same contract twice (with a slight modification to the 2nd contract that does not change any other aspect of the resultant bytecode). The resulting c\_reationTxInput\_s are compared and metadata hashes extracted by finding which parts of the inputs differ.
### Example
An additional space in the source code can be used for the modification process. In **Example 1** and **Example 2** the only difference between both contracts is a space in the beginning of **Example 2**. However, this still completely changes the metadata hash (metadata hash differences shown in **bold red**).
**Note**: To update the metadata hash in production we use an additional library passed into the compiler. It does not effect the resultant bytecode, but the compilation input is altered, leading to updated metadata and an updated metadata hash.
#### Example 1
```javascript theme={null}
// pragma solidity ^0.8.7; contract Main {}
```
*creationTxInput:* 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822**12203cc19b771ee83d8cc6995191bd9092a82f3e66b95aacaf1cfc893d3dc27abcd2**64736f6c63430008070033
#### Example 2
```javascript theme={null}
// pragma solidity ^0.8.7; contract Main {}
```
*creationTxInput:* 6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822**1220b3902f5797f05bb62858c8d41f09402093c85957c4ae1d773e4eb1cb2000f093**64736f6c63430008070033
### Verification Process
1. Compile the original contracts using data provided by the caller then compile those contracts again while passing in the additional library. The result is two slightly different `CreationTxInputs` if there is any encoded metadata.
2. Separate the `MainPart` and the `MetadataPart`.
a. `MainPart` consists of consecutive bytes which are not related to the metadata hash (all bytes are the same for both local c\_reationTxInputs\_). `MetadataPart` consists of consecutive bytes related to metadata hash (some bytes differ between local c\_reationTxInputs\_).
3. Iterate through the two local contracts byte by byte to find the first byte that differs.
a. If there are no such bytes, then there is no metadata hash and the whole *creationTxInput* consists of just one `MainPart`.
b. If any differences are found, identify it as a hash section of the metadata hash.
c. Iterate back byte by byte to find the beginning of that metadata hash. When we find the beginning we know where that metadata hash starts and ends. All non-categorized bytes before the start are identified as the `MainPart` and bytes between the start and end identified as the `MetadataPart`. Continue until there are no uncategorized bytes.
d. Once the entire local *creationTxInput* is categorized, we compare those parts with the corresponding remote *creationTxInput* bytes. For the `MainPart` remote *creationTxInput* must have exact equivalence. For the `MetadataPart` we compare some parts of the metadata (e.g. that encoded solc versions are the same), but in general we do not require them to be equal.
**Example**
***LocalCreationTxInput1:*** 608060405234801561001057600080fd5b506040518060200161002190610050565b6020820181038252601f19601f820116604052506000908051906020019061004a92919061005c565b5061015f565b605c806101ac83390190565b8280546100689061012e565b90600052602060002090601f01602090048101928261008a57600085556100d1565b82601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b5b808211156100fb5760008160009055506001016100e3565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061014657607f821691505b602082108103610159576101586100ff565b5b50919050565b603f8061016d6000396000f3fe6080604052600080fdfea2646970667358221220187a584947e37ebca43172929f7e159fe28696b0edd97bbfad5b0a265f6f886964736f6c634300080e00336080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220805aa9fe4ec055702024afa5ac21c2104f0b14be0ffab086f0d6e9b5701073f864736f6c634300080e0033
**Parts 1:** \`\`\[ MainPart(608060405234801561001057600080fd5b506040518060200161002190610050565b6020820181038252601f19601f820116604052506000908051906020019061004a92919061005c565b5061015f565b605c806101ac83390190565b8280546100689061012e565b90600052602060002090601f01602090048101928261008a57600085556100d1565b82601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b5b808211156100fb5760008160009055506001016100e3565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061014657607f821691505b602082108103610159576101586100ff565b5b50919050565b603f8061016d6000396000f3fe6080604052600080fdfe), MetadataPart(a264697066735822**1220187a584947e37ebca43172929f7e159fe28696b0edd97bbfad5b0a265f6f8869**64736f6c634300080e0033), MainPart(6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfe), MetadataPart(a264697066735822**1220805aa9fe4ec055702024afa5ac21c2104f0b14be0ffab086f0d6e9b5701073f8**64736f6c634300080e0033) ]
***LocalCreationTxInput2:*** 608060405234801561001057600080fd5b506040518060200161002190610050565b6020820181038252601f19601f820116604052506000908051906020019061004a92919061005c565b5061015f565b605c806101ac83390190565b8280546100689061012e565b90600052602060002090601f01602090048101928261008a57600085556100d1565b82601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b5b808211156100fb5760008160009055506001016100e3565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061014657607f821691505b602082108103610159576101586100ff565b5b50919050565b603f8061016d6000396000f3fe6080604052600080fdfea26469706673582212202e82fb6222f966f0e56dc49cd1fb8a6b5eac9bdf74f62b8a5e9d8812901095d664736f6c634300080e00336080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220bd9f7fd5fb164e10dd86ccc9880d27a177e74ba873e6a9b97b6c4d7062b26ff064736f6c634300080e0033
**Parts 2:**
\[ MainPart(608060405234801561001057600080fd5b506040518060200161002190610050565b6020820181038252601f19601f820116604052506000908051906020019061004a92919061005c565b5061015f565b605c806101ac83390190565b8280546100689061012e565b90600052602060002090601f01602090048101928261008a57600085556100d1565b82601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b5b808211156100fb5760008160009055506001016100e3565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061014657607f821691505b602082108103610159576101586100ff565b5b50919050565b603f8061016d6000396000f3fe6080604052600080fdfe),
MetadataPart(a264697066735822**12202e82fb6222f966f0e56dc49cd1fb8a6b5eac9bdf74f62b8a5e9d8812901095d6**64736f6c634300080e0033),
MainPart(6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfe),
MetadataPart(a264697066735822**1220bd9f7fd5fb164e10dd86ccc9880d27a177e74ba873e6a9b97b6c4d7062b26ff0**64736f6c634300080e0033)
]
#### Constructor arguments
Constructor arguments are extracted at the end of the verification process. Constructor arguments are appended at the end of the *creationTxInput* returned by the compiler. So, to extract these arguments we remove parts presented in local *creationTxInput*, and consider everything else as likely constructor arguments.
After that we attempt to map potential constructor args to the constructor abi of the contract. If successful, extracted args are returned as actual constructor arguments.
## Verification Http Api
Currently, verification requests are sent via HTTP requests. This module runs an HTTP server and provides endpoints through which external services (main Blockscout instance, in our case) send verification requests and receive responses. Endpoints provided by the service and configuration details are described in the [corresponding Readme file](https://github.com/blockscout/blockscout-rs/tree/main/smart-contract-verifier-http).
Currently only synchronous endpoints are available. In the future a new service that handles asynchronous requests on top of the current smart-contract-verifier may be implemented.
# Requirements
Source: https://docs.blockscout.com/setup/requirements
System, hardware, and software requirements for running Blockscout.
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. [**Get Started Now**](/using-blockscout/autoscout) **and have your explorer up-and-running in minutes.**
See the submenu for requirements information
* [General requirements and software dependencies](/setup/requirements/requirements)
* [Hardware and hosting requirements](/setup/requirements/resource-requirements)
* [DB storage requirements](/setup/requirements/database-storage-requirements)
* [Client setting requirements](/setup/requirements/client-settings) (Geth, Erigon, Nethermind etc)
* [Node Tracing Requirements](/setup/requirements/node-tracing-json-rpc-requirements) by Client
# Backend/Frontend Compatibility Matrix
Source: https://docs.blockscout.com/setup/requirements/back-front-compatibility-matrix
| frontend/backend | v9.3.x | v9.2.x | v9.1.x | v9.0.x | v8.1.x | v8.0.x | v7.0.x | v6.10.x | v6.9.x | v6.8.x | v6.7.x | v6.6.x | v6.5.x | v6.4.x | v6.3.x | v6.2.x | v6.1.x | v6.0.x | v5.4.x | v5.3.x | v5.2.x | v5.1.x | v5.0.x |
| ---------------- | :----- | :----- | :----- | :----- | ------ | ------ | ------ | ------- | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| v2.5.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.4.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.3.1+ | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.3.0 | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.2.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.1.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v2.0.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.38.1+ | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.37.6+ | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.37.5- | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.36.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.35.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.34.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.33.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.32.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.31.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.30.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.29.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.28.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.27.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.26.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.25.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.24.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.23.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.22.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.21.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.20.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.19.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.18.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.17.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.16.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.15.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.14.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.13.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.12.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.11.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.10.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.9.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.8.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.7.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.6.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.5.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.4.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.3.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.2.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.1.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
| v1.0.x | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β | β |
# Client Setting Requirements
Source: https://docs.blockscout.com/setup/requirements/client-settings
π [Autoscout is now available](/using-blockscout/autoscout), providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. [**Get Started Now**](/using-blockscout/autoscout) **and have your explorer up-and-running in minutes.**
## Supported JSON RPC Clients
BlockScout currently supports [Geth](https://github.com/ethereum/go-ethereum), [Erigon](https://github.com/erigontech/erigon), [Nethermind](https://github.com/NethermindEth/nethermind), [Reth](https://github.com/paradigmxyz/reth), [Besu](https://github.com/hyperledger/besu), [RSKj](https://github.com/rsksmart/rskj), [Lotus](https://github.com/filecoin-project/lotus), and [Anvil](https://book.getfoundry.sh/anvil/) JSON RPC clients. To define the JSON RPC node variant, it's advised to define the `ETHEREUM_JSONRPC_VARIANT` environment variable\*. Correct values include:
| JSON RPC Client | Value | Note |
| --------------- | -------------- | ------------------------------------------------------------------------------------------- |
| Geth | \`geth\` | Default. This value is applicable for both Geth and Reth JSON RPC clients |
| Erigon | \`erigon\` | It is suggested to use `erigon` variant for Reth JSON RPC client. |
| Nethermind | \`nethermind\` | This value is applicable for Reth and deprecated OpenEthereum (aka Parity) JSON RPC clients |
| Besu | \`besu\` | |
| RSKj | \`rsk\` | |
| Lotus | \`filecoin\` | |
| Anvil | \`anvil\` | |
\*If the variable is not set, JSON RPC variant will be chosen based on `CHAIN_TYPE` variable according to the mapping [https://github.com/blockscout/blockscout/blob/a2625803c831fb86e38ffe0e28d94bfd697914ce/apps/ethereum\_jsonrpc/lib/ethereum\_jsonrpc/variant.ex#L114-L120](https://github.com/blockscout/blockscout/blob/a2625803c831fb86e38ffe0e28d94bfd697914ce/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex#L114-L120)
```ruby theme={null}
defp get_default_variant do
case Application.get_env(:explorer, :chain_type) do
:rsk -> "rsk"
:filecoin -> "filecoin"
_ -> "geth"
end
end
```
BlockScout currently requires a full archive node in order to import every state change for every address on the target network.
## Configs
| Application | Environment | Config path |
| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Explorer | Dev | [https://github.com/blockscout/blockscout/tree/master/apps/explorer/config/dev](https://github.com/blockscout/blockscout/tree/master/apps/explorer/config/dev) |
| | Prod | [https://github.com/blockscout/blockscout/tree/master/apps/explorer/config/prod](https://github.com/blockscout/blockscout/tree/master/apps/explorer/config/prod) |
| Indexer | Dev | [https://github.com/blockscout/blockscout/tree/master/apps/indexer/config/dev](https://github.com/blockscout/blockscout/tree/master/apps/indexer/config/dev) |
| | Prod | [https://github.com/blockscout/blockscout/tree/master/apps/indexer/config/prod](https://github.com/blockscout/blockscout/tree/master/apps/indexer/config/prod) |
## Variables to connect to JSON RPC client
| Name | Environment Variable | Default Value | Description |
| ---------------------------------------- | ---------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **HTTP Endpoint** | `ETHEREUM_JSONRPC_HTTP_URL` | http\://localhost:8545 | The HTTP Endpoint is used to fetch `blocks`, `transactions`, `receipts`, `coin/token balances`. |
| **Fallback HTTP Endpoint** | `ETHEREUM_JSONRPC_FALLBACK_HTTP_URL` | (empty) | Fallback JSON RPC HTTP url. |
| **Tracing Endpoint** | `ETHEREUM_JSONRPC_TRACE_URL` | http\://localhost:8545 | The Tracing endpoint is used to fetch `internal transactions` and `block traces`. In most cases this endpoint is identical to the HTTP Endpoint. |
| **Fallback Tracing Endpoint** | `ETHEREUM_JSONRPC_FALLBACK_TRACE_URL` | (empty) | Fallback JSON RPC tracing url. |
| **Eth\_call Requests Endpoint** | `ETHEREUM_JSONRPC_ETH_CALL_URL` | (empty) | JSON RPC url for `eth_call` method requests. |
| **Fallback Eth\_call Requests Endpoint** | `ETHEREUM_JSONRPC_FALLBACK_ETH_CALL_URL` | (empty) | Fallback JSON RPC `eth_call` url. |
| **WebSockets Endpoint** | `ETHEREUM_JSONRPC_WS_URL` | ws\://localhost:8546 | The WebSockets endpoint subscribes to `newHeads` which alerts the indexer to fetch the new block from the subscription. |
## Geth
More information on Geth JSON-RPC [is available here](https://geth.ethereum.org/docs/interacting-with-geth/rpc).
```bash theme={null}
sudo /usr/bin/geth --http --http.addr 0.0.0.0 --port 30303 --http.port 8545 --http.api debug,net,eth,shh,web3,txpool --ws.api "eth,net,web3,network,debug,txpool" --ws --ws.addr 0.0.0.0 --ws.port 8546 --ws.origins "*" --sepolia --datadir=/rinkeby --syncmode "full" --gcmode "archive" --http.vhosts "*"
```
*Tracing and pruning: By default, state for the last 128 blocks kept in memory. Most states are garbage collected. If you are running a block explorer or other service relying on transaction tracing without an archive node (--gcmode=archive), you need to trace within this window! Alternatively, specify the "reexec" tracer option to allow regenerating historical state; and ideally switch to chain tracing which amortizes overhead across all traced blocks.*
## Erigon
More information on Erigon configuration [is available here](https://erigon.gitbook.io/erigon/advanced-usage/configure-erigon).
## Nethermind
More information on Nethermind configuration [is available here](https://docs.nethermind.io/fundamentals/configuration/).
## Reth
More information on Reth configuration [is available here](https://reth.rs/run/config.html).
## RSKj
More information on RSKj configuration [is available here](https://dev.rootstock.io/rsk/node/configure/reference/).
## Besu
More information on Besu configuration [is available here](https://besu.hyperledger.org/stable/public-networks/how-to/configuration-file).
## Lotus
More information on Lotus configuration [is available here](https://lotus.filecoin.io/lotus/configure/defaults/).
## OpenEthereum
```python theme={null}
--jsonrpc-interface all --jsonrpc-apis web3,eth,net,parity,pubsub,traces --ws-interface all --fat-db=on --pruning=archive --ws-apis all --ws-origins all --ws-hosts all
```
# Database Storage Requirements
Source: https://docs.blockscout.com/setup/requirements/database-storage-requirements
The configuration variable `db_storage` can be used to define the amount of storage allocated to your RDS instance. The chart below shows an estimated amount of storage that is required to index individual chains. Note these numbers are estimates and are constantly increasing.
The `db_storage` can only be adjusted 1 time in a 24 hour period on AWS.
| Chain | Storage (GiB) |
| ---------------- | ------------- |
| Ethereum Mainnet | 21000 |
| Ethereum Sepolia | 5200 |
| Gnosis Chain | 21000 |
| Gnosis Chiado | 470 |
| Ethereum Classic | 555 |
*Note*: as of 23.12.2024
# L2 > L1 JSON RPC Method Requests
Source: https://docs.blockscout.com/setup/requirements/l2-greater-than-l1-json-rpc-method-requests
This page documents the requirements for various rollup types when requesting data from the L1 node.
Layer 2 (L2) chains interact with their Layer 1 (L1) counterparts in different ways depending on the rollup type and information required. Blockscout's chain-specific fetchers interact with the L1 node to gather information crucial for tracking the rollup's state, batches, confirmations, and cross-chain messages.
* [Arbitrum](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#arbitrum-rollups)
* [Optimism](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#optimism-rollups)
* [Scroll](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#scroll-l1-fetchers)
* [Shibarium](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#shibarium-l1-fetchers)
* [zkSync](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#zksync-rollups)
* [Polygon zkEVM](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests#polygon-zkevm-l1-fetchers)
The following standard L1 JSON-RPC methods are utilized. Frequency and triggers for these calls are described for each chain below.
| L1 JSON-RPC Method | Purpose |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| `eth_getLogs` | Discover L1 events (Batches, Confirmations, Executions, Messages, Keysets) |
| `eth_getBlockByNumber` | Get L1 Block Timestamps, Chain Head/Safe Block info |
| `eth_getTransactionByHash` | Get L1 Tx Calldata (Batches), Get L1 Tx Originator (L1->L2 Messages) |
| `eth_call` | Get Keyset Creation Block from `SequencerInbox` contract (Used infrequently for Arbitrum chains only) |
***
## Arbitrum Rollups
### L1 JSON-RPC method details
#### Method: `eth_getLogs`
Used periodically to poll for specific L1 events emitted by Arbitrum contracts. The polling intervals are generally configurable (`INDEXER_ARBITRUM_BATCHES_TRACKING_RECHECK_INTERVAL` and `INDEXER_ARBITRUM_TRACKING_MESSAGES_ON_L1_RECHECK_INTERVAL` for new events, faster polling for historical catch-up).
* **Events Polled:**
* `SequencerBatchDelivered` (from `SequencerInbox` contract): To discover new L1 batches containing L2 block data. Polled periodically by the batch tracking worker (`TrackingBatchesStatuses`).
* `SendRootUpdated` (from `Outbox` contract): To discover L2 block confirmations. Polled periodically by the batch tracking worker.
* `OutBoxTransactionExecuted` (from `Outbox` contract): To discover L2-to-L1 message executions on L1. Polled periodically by the batch tracking worker.
* `MessageDelivered` (from `Bridge` contract): To discover L1-to-L2 message initiations on L1. Polled periodically by the L1 message tracking worker (`TrackingMessagesOnL1`).
* `SetValidKeyset` (from `SequencerInbox` contract): To retrieve details about AnyTrust Data Availability Committee keysets. This is triggered **on-demand** when processing an AnyTrust batch that references a keyset hash not yet seen in the database.
***
#### Method: `eth_getBlockByNumber`
* **Fetching Timestamps:**
* Called frequently **in response to processing events** found via `eth_getLogs`. When a relevant event (like batch delivery, confirmation, or message execution) is found in a log, this method is called for the corresponding L1 block number to get its timestamp. This happens in batches triggered by the periodic log polling.
* **Fetching Chain Head/Safe Block:**
* Called periodically (driven by `recheck_interval`) with tags `"latest"` and `"safe"` to determine the current L1 chain head and the safe block for reorg protection and determining finality. Used by batch, confirmation, and execution workers.
* Called once during initialization to determine the starting point if not explicitly configured.
***
Method: `eth_getTransactionByHash`
Called **in response to processing events** found via `eth_getLogs`:
* **Fetching Batch Calldata:**
* When a `SequencerBatchDelivered` event is processed, this method is called for the L1 transaction hash associated with the event to retrieve the transaction's `input` data (calldata). This calldata contains essential batch information, especially for non-blob batches.
* **Fetching L1->L2 Message Originator:**
* When a `MessageDelivered` event (for an L1->L2 message) is processed, this method is called for the L1 transaction hash to retrieve the originator (`from`) address.
***
Method: `eth_call`
Used less frequently than the other calls.
* **Fetching Keyset Creation Block:**
* When processing an AnyTrust batch referencing a previously unknown keyset hash, an `eth_call` is made to the `SequencerInbox` contract's `getKeysetCreationBlock` function to determine the L1 block where the keyset became active. This is triggered **on-demand** during batch processing.
***
## Optimism Rollups
### Optimism L1 fetchers
Method calls are described for each of the Optimism-based fetchers including Deposit, DisputeGame, OutputRoot, TransactionBatch and WithdrawalEvent.
#### Indexer.Fetcher.Optimism.Deposit
* `eth_getLogs` (driven by `INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE` for catchup mode) - one request per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` response to get block timestamp. Batch request is used, so one batch request per one `eth_getLogs` call
#### Indexer.Fetcher.Optimism.DisputeGame
* call to `OptimismPortal`'s `respectedGameType()` public getter (every 60 seconds)
* call to `DisputeGameFactory`'s `gameCount` public getter (every 60 seconds)
* call to `DisputeGameFactory`'s `gameAtIndex` public getter (max 50 items per batch request) and the corresponding batch calls to `extraData`, `resolvedAt`, `status` public getters for each dispute game
* call to `DisputeGameFactory`'s `resolvedAt` public getter (max 50 items per batch request) for max 1000 last unresolved games
* call to `DisputeGameFactory`'s `status` public getter (max 50 items per batch request) for max 1000 last resolved games
#### Indexer.Fetcher.Optimism.OutputRoot
* `eth_getLogs` (driven by `INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE` for catchup mode) - one request per block in realtime mode
#### Indexer.Fetcher.Optimism.TransactionBatch
* `eth_getBlockByNumber` (batch RPC calls containing up to `INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE` requests per batch in catchup mode starting from the start block defined in `SystemConfig` contract) - one request per block in realtime mode
#### Indexer.Fetcher.Optimism.WithdrawalEvent
* `eth_getLogs` (driven by `INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE` for catchup mode) - one request per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` response to get block timestamp. Batch request is used, so one batch request per one `eth_getLogs` call
***
## zkSync Rollups
### **L1 interaction process**
Blockscout's zkSync-specific fetchers verify zkSync batch status and transitions (Committed, Proven, Executed) recorded on the L1.
### **L1 interaction summary**
L1 calls are infrequent and only triggered to confirm L1 state transitions suggested by the L2 node.
* L1 interaction is driven by the `BatchesStatusTracker`. This tracker performs periodic checks based on the `INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL` ENV variable setting.
* Each check phase (`:check_committed`, `:check_proven`, `:check_executed`) *first* queries the L2 node via RPC (`zks_getL1BatchDetails`).
* If (*and only if)* the L2 query indicates a new L1 transaction hash associated with a batch's status change (commit, prove, or execute), the corresponding L1 RPC method (`eth_getTransactionReceipt` or `eth_getTransactionByHash`) is called for that *specific* transaction hash.
### L1 JSON-RPC method details
#### Method: `eth_getTransactionReceipt`
**Purpose**: Retrieves the receipt of an L1 transaction suspected of changing a batch's status (commit or execute). The fetcher specifically looks for event logs within the receipt (`BlockCommit` or `BlockExecution` events) to confirm which batches were affected by that single L1 transaction.
**Frequency:**
* Called conditionally by the `BatchesStatusTracker` process.
* This tracker runs in a loop with a configurable `INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL`.
* Within this loop, it first checks the L2 RPC (`zks_getL1BatchDetails`) for the oldest uncommitted/unexecuted batch.
* If the L2 RPC response indicates a new commit or execute L1 transaction hash associated with that batch, *then* `eth_getTransactionReceipt` is called on the L1 node for that specific transaction hash.
* It does *not* poll L1 constantly; the call is triggered only when a potential status change is detected via L2 RPC data during the periodic check.
***
#### Method: `eth_getTransactionByHash`
**Purpose:** Retrieves the details of an L1 transaction suspected of proving one or more zkSync batches. The fetcher needs the transaction's `input` (calldata) to decode the list of batches proven in that single L1 transaction.
**Frequency**:
* Called conditionally by the `BatchesStatusTracker` process, similar to `eth_getTransactionReceipt`. It also runs within the tracker's periodic `INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL`.
* The tracker checks the L2 RPC (`zks_getL1BatchDetails`) for the oldest unproven batch. If the L2 RPC response indicates a new prove L1 transaction hash, *then* `eth_getTransactionByHash` is called on the L1 node for that specific transaction hash to retrieve its calldata.
* Like the receipt fetch, this is triggered by potential changes detected via L2 RPC during the periodic check, not through constant L1 polling.
***
## Polygon zkEVM L1 fetchers
Method calls are described for each of the zkEVM-based fetchers including BridgeL1, BridgeL1Tokens, and TransactionBatch.
#### Indexer.Fetcher.PolygonZkevm.BridgeL1
* `eth_getLogs` (max 1000 blocks in a range per request for catchup mode) - one request per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` response to get block timestamp (batch request is used with max 50 items per request)
* `eth_getBlockByNumber` to get latest block (every block time in seconds, divided by 2)
* one batch request (with calls to `symbol()` and `decimals()` getters of token contracts) per one `eth_getLogs` call
#### Indexer.Fetcher.PolygonZkevm.BridgeL1Tokens
* one batch request (with calls to `symbol()` and `decimals()` getters of token contracts) per one set of logs taken in realtime mode from the L2 block
#### Indexer.Fetcher.PolygonZkevm.TransactionBatch
* a batch call of `zkevm_batchNumber`, `zkevm_virtualBatchNumber`, `zkevm_verifiedBatchNumber` requests per `INDEXER_POLYGON_ZKEVM_BATCHES_RECHECK_INTERVAL` seconds
* a batch call of `zkevm_getBatchByNumber` requests per `INDEXER_POLYGON_ZKEVM_BATCHES_CHUNK_SIZE` zkEVM batches
***
## Scroll L1 fetchers
Method calls are described for each of the Scroll-based fetchers including Batch and BridgeL1.
#### Indexer.Fetcher.Scroll.Batch
* `eth_getLogs` (driven by `INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE` for catchup mode) - one request per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` response to get block timestamp (batch request is used with max 50 items per request)
* `eth_getBlockByNumber` to get latest block (every block time in seconds, divided by 2)
#### Indexer.Fetcher.Scroll.BridgeL1
* `eth_getLogs` (driven by `INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE` for catchup mode) - one request per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` response (taking into account `SentMessage` events only) to get block timestamp (batch request is used with max 50 items per request)
* `eth_getBlockByNumber` to get latest block (every block time in seconds, divided by 2)
## Shibarium L1 fetchers
Method calls are described for each of the Scroll-based fetchers including L1 and RollupL1ReorgMonitor.
#### Indexer.Fetcher.Shibarium.L1
* three `eth_getLogs` requests per chunk for catchup mode (max 1000 blocks in a chunk) - three requests per block in realtime mode
* `eth_getBlockByNumber` for each block within `eth_getLogs` responses (taking into account deposit events only) to get block timestamp (batch request is used with max 50 items per request)
* `eth_getBlockByNumber` to get latest block (every block time in seconds, divided by 2)
#### Indexer.Fetcher.RollupL1ReorgMonitor
* `eth_getBlockByNumber` to get latest block (every block time in seconds, divided by 2)
# Node Tracing / JSON RPC Requirements
Source: https://docs.blockscout.com/setup/requirements/node-tracing-json-rpc-requirements
### Standard JSON RPC Requirements
* Archive node with JSON RPC interface should strictly follow input/output interface described in [https://ethereum.github.io/execution-apis/api-documentation/](https://ethereum.github.io/execution-apis/api-documentation/)
* WebSocket interface (optional/highly recommended to enable) is used to subscribe to new block heads. Otherwise, Blockscout will trigger new blocks fetching by periodical polling the JSON RPC `eth_blockNumber` method.
* Support for the following standard Ethereum JSON RPC methods (documented at [https://ethereum.github.io/execution-apis/api-documentation/](https://ethereum.github.io/execution-apis/api-documentation/))
* `eth_blockNumber`
* `eth_call`
* `eth_getBalance`
* `eth_getCode`
* `eth_getBlockByHash`
* `eth_getBlockByNumber`
* `eth_getTransactionByHash`
* `eth_getTransactionByBlockHashAndIndex`
* `eth_getTransactionByBlockNumberAndIndex`
* `eth_getTransactionReceipt`
* `eth_getUncleByBlockHashAndIndex`
* `eth_getLogs`
### **Fetching Pending Transactions**
*Note pending transactions must be supported by the RPC node to enable this functionality with Blockscout*
| Client | Method |
| ----------------------- | ---------------------------- |
| Nethermind OpenEthereum | `parity_pendingTransactions` |
| Geth Erigon | `txpool_content` |
### Enable Tracing to Fetch Internal Transactions
| Client | Method |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Erigon Nethermind OpenEthereum | β’ `trace_replayBlockTransactions` (fetching of internal transactions)
`callTracer` is used by default, starting from the Blockscout 5.1.0 release. To switch to a custom JS tracer, the Blockscout maintainer should set the `export INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE=js` environment variable. Prior to the 5.1.0 release, js tracer was a default option. |
| RSK | β’ `trace_block` (fetching of internal transactions) |
### JSON RPC Performance Benchmarks
Time measures for response time of crucial JSON RPC methods for indexing in Blockscout. [Ways to improve speed](/faqs/faqs#how-do-i-speed-up-my-self-hosted-instance).
1. `eth_getBlockByNumber` without transaction receipts for a block with 15 transactions: Desired response time is \< 0.5s. For instance, in case of the Gnosis chain archive node, the response time for the block with \~20 transactions is \~0.4s.
2. `eth_getTransactionReceipt` for random transactions desired response time is \< 0.5s. For the Gnosis chain archive node the response time is \~0.3 - 0.4s.
3. Batched `eth_getTransactionReceipt` for 15 transactions acceptable response time is Less than 1s. For the Gnosis chain archive node, it is \~0.6 - 0.7s
### Rate Limit
The desired rate limit for RPC endpoint is 200 req/sec for the indexing phase and 100 req/sec for the indexed chain.
### EVM Requirements & Clients
* All EVM chains must [define these variables](/setup/env-variables#required-env-variables) during configuration.
* BlockScout currently supports Erigon, Geth, Nethermind, Hyperledger Besu, and Anvil clients. Define the node variant using the `ETHEREUM_JSONRPC_VARIANT` environment variable. [More information](/setup/requirements/client-settings)
### L2 -> L1 JSON RPC Methods
* Find information on JSON RPC method use with [different L2 types.](/setup/requirements/l2-greater-than-l1-json-rpc-method-requests)
# General Backend Requirements / Blockscout Backend Prerequisites
Source: https://docs.blockscout.com/setup/requirements/requirements
Install the software below prior to Blockscout installation. For additional requirements see:
* [Database Storage Requirements](/setup/requirements/database-storage-requirements): Storage required for common chains to give a sense of needed storage
* [Node Tracing Requirements](/setup/requirements/node-tracing-json-rpc-requirements): JSON RPC methods
* [Client Setting Requirements](/setup/requirements/client-settings): Settings related to client implementations (ie Geth, OpenEthereum, etc)
* [Hardware/Hosting Requirements](/setup/requirements/resource-requirements): Base requirements for a hosted instance of Blockscout.
| Dependency | Mac | Linux |
| ---------------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Erlang/OTP 26](https://github.com/erlang/otp) | `brew install erlang` | [Erlang Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L134) |
| [Elixir 1.15.x](https://elixir-lang.org/) | `brew install elixir` | [Elixir Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L138) |
| [Postgres 12, 13, 14](https://www.postgresql.org/) | `brew install postgresql` | [Postgres Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L187) |
| [Node.js 18.x.x](https://nodejs.org/en/) | `brew install node` | [Node.js Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L66) |
| [Automake](https://www.gnu.org/software/automake/) | `brew install automake` | [Automake Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L72) |
| [Libtool](https://www.gnu.org/software/libtool/) | `brew install libtool` | [Libtool Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L62) |
| [Inotify-tools](https://github.com/rvoicilas/inotify-tools/wiki) | Not Required | Ubuntu - `apt-get install inotify-tools` |
| [GCC Compiler](https://gcc.gnu.org/) | `brew install gcc` | [GCC Compiler Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L70) |
| [GMP](https://gmplib.org/) | `brew install gmp` | [Install GMP Devel](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L74) |
| Make | - | `sudo apt install make`if Debian 9 |
| G++ Compiler | - | `sudo apt install g++`if Debian 9 |
Additional requirements for Blockscout versions below 5.1.3:
| Dependency | Mac | Linux |
| ---------- | --- | ------------------------------------------------------- |
| Rust | - | [Install Rust](https://www.rust-lang.org/tools/install) |
| Cargo | - | Ubuntu - `apt-get install cargo` |
# Hardware & Hosting Requirements
Source: https://docs.blockscout.com/setup/requirements/resource-requirements
Resource requirements may vary based on chain size and other parameters. This mainly impacts [database storage](/setup/requirements/database-storage-requirements) requirements. Basic [prerequisites](/setup/requirements/requirements) and settings can be found throughout the [Information and Settings](/setup/information-and-settings) section for developers.
BlockScout requires a full archive node to import every state change for every address on the target network.
## Recommended Base Hardware
EVM chains can differ in size and requirements, these are the recommendations for optimal performance.
| CPU | 16 core, 32 thread |
| --- | ------------------ |
| RAM | 128GB |
## Hosting Requirements
Minimums are listed for an AWS Cloud instance and can be inferred to other hosting providers.
| | |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Application | β’ 1x EC2 m5a.xlarge instance running Linux
β’ 8GB of EBS General Purpose SSD (NVMe) |
| Database | β’ 1x RDS Database running on db.t3.large using PostgreSQL v12+
β’ 500GB of General Purpose SSD (depending on chain size)
β’ See [Database Storage Requirements](/setup/requirements/database-storage-requirements) for chain-relevant baselines. |
| Amazon Elastic Load Balancing | β’ Average 100 new connections/sec per Elastic Load Balancer |
Requirements will vary based on chain. For example, these are the recommended requirements for a Harmony Explorer Node:
**Setup**: AWS i3en.12xlarge or equivalent, with local disk storage **Storage**: \~24TB (4x NVMe SSD) is recommended for Archival Explorer Nodes on Shard 0 **OS**: Latest Ubuntu Linux (LTS Version) **Network**: 100M+ bandwidth
For additional information, see:
* [General Requirements:](/setup/requirements/requirements) Software required for deployment
* [Database Storage Requirements](/setup/requirements/database-storage-requirements): Storage required for common chains to give a sense of needed storage
* [Node Tracing Requirements](/setup/requirements/node-tracing-json-rpc-requirements): JSON RPC methods
* [Client Setting Requirements](/setup/requirements/client-settings): Settings related to client implementations (ie Geth, OpenEthereum, etc)
# Testing
Source: https://docs.blockscout.com/setup/testing
How to test Blockscout, including requirements, commands, and environment setup.
### Requirements
* Install `chromedriver` . It is required to run tests from `./apps/block_scout_web` of the Umbrella application.
* This set of environment variables is required for each run of the test (`mix test`) suite:
```bash theme={null}
export MIX_ENV=test
export POSTGRES_DB=explorer_test
export POSTGRES_PASSWORD=postgres
export POSTGRES_USER=postgres
export CHAIN_ID=77
```
Since v6.6.0, there are more flexible options for configuring the database used in testing. Refer to the `TEST_DATABASE_URL` and `DATABASE_READ_ONLY_API_URL` environment variables for more details.
```bash theme={null}
export MIX_ENV=test
export TEST_DATABASE_URL=postgresql://postgres:postgres@postgres-host:5432/explorer_test
export CHAIN_ID=77
```
### Running tests
1. Build assets. `cd apps/block_scout_web/assets && npm run build; cd -`
2. Format Elixir code. `mix format`
3. Lint Elixir code. `mix credo --strict`
4. Run the dialyzer. `mix dialyzer --halt-exit-status`
5. Check the Elixir code for vulnerabilities. `cd apps/explorer && mix sobelow --config; cd -` `cd apps/block_scout_web && mix sobelow --config; cd -`
6. Lint JavaScript code. `cd apps/block_scout_web/assets && npm run eslint; cd -`
7. Test JavaScript code. `cd apps/block_scout_web/assets && npm run test; cd -`
8. Run separate test suites for the Umbrella application - `indexer` `mix do ecto.create --quiet, ecto.migrate && cd apps/indexer && mix do compile, test --no-start && cd -`
- `explorer` `mix do ecto.create --quiet, ecto.migrate && cd apps/explorer && mix do compile, test --no-start && cd -`
- `block_scout_web` `mix do ecto.create --quiet, ecto.migrate && cd apps/block_scout_web && mix do compile, test --no-start && cd -`
- `ethereum_jsonrpc` `mix do ecto.create --quiet, ecto.migrate && cd apps/ethereum_jsonrpc && mix do compile, test --no-start && cd -`
### **Nethermind**
**Mox**
**This is the default setup. **`mix test --no-start`** will work on its own, but to be explicit, use the following setup**:
```bash theme={null}
ETHEREUM_JSONRPC_CASE=EthereumJSONRPC.Case.Nethermind.Mox \
ETHEREUM_JSONRPC_WEB_SOCKET_CASE=EthereumJSONRPC.WebSocket.Case.Mox \
mix test --no-start --exclude no_nethermind
```
**HTTP / WebSocket**
```bash theme={null}
ETHEREUM_JSONRPC_CASE=EthereumJSONRPC.Case.Nethermind.HTTPWebSocket \
ETHEREUM_JSONRPC_WEB_SOCKET_CASE=EthereumJSONRPC.WebSocket.Case.Nethermind \
mix test --no-start --exclude no_nethermind
```
| Protocol | URL |
| --------- | ----------------------- |
| HTTP | `http://localhost:8545` |
| WebSocket | `ws://localhost:8546` |
### **Geth**
**Mox**
```bash theme={null}
ETHEREUM_JSONRPC_CASE=EthereumJSONRPC.Case.Geth.Mox \
ETHEREUM_JSONRPC_WEB_SOCKET_CASE=EthereumJSONRPC.WebSocket.Case.Mox \
mix test --no-start --exclude no_geth
```
**HTTP / WebSocket**
```bash theme={null}
ETHEREUM_JSONRPC_CASE=EthereumJSONRPC.Case.Geth.HTTPWebSocket \
ETHEREUM_JSONRPC_WEB_SOCKET_CASE=EthereumJSONRPC.WebSocket.Case.Geth \
mix test --no-start --exclude no_geth
```
| Protocol | URL |
| --------- | ------------------------------------------------- |
| HTTP | `https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY` |
| WebSocket | `wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY` |
# Autoscout Explorer Launchpad
Source: https://docs.blockscout.com/using-blockscout/autoscout
Deploy a production-ready instance on the cloud in 5 minutes
Autoscout is a self-service launchpad for chains and rollups looking to deploy an explorer quickly on hosted infrastructure. It is optimized for many chain types including Optimistic and Arbitrum Orbit rollups and zk rollups including Polygon zkEVM and zkSync.
Autoscout is now available at [https://deploy.blockscout.com/](https://deploy.blockscout.com/)
### Get Started with Autoscout
1. **Create an account:** To get started, go to [https://deploy.blockscout.com/](https://deploy.blockscout.com/), create an account, and login to get started.
2. **Purchase credits:** You will need credits to launch your explorer. Each credit costs \$1.00. Purchase via Stripe with a credit card; a crypto option is coming soon. Credits are deducted in real time, see the pricing table below for costs.
**You can start with any amount of credits to test your instance. Instances cost between 0.35 - 1.35 credits per hour, depending on the size.**
a. If you are testing the service, request test credits in the [Blockscout Discord](https://discord.gg/blockscout) `#autoscout` channel. Share your email and request and we will top off your account for testing.
3. **Add a new instance:** Click the Add instance button to get started.
4. **Add your network info**: See below for info on configuration and parameters.
5. **Deploy your explorer:** Click save and deploy to start the deployment process. In 5-10 minutes your explorer will be live and indexing your chain. Once deployed you can access your explorer link.
## Autoscout Pricing
Autoscout is a pay-as-you-go service. **Start with any amount of credits** and **increase the balance at any time**.
If your account runs out of credits your instance will be stopped until you top your account back up. If this happens, you will need to relaunch (and reindex) your instance once you add additional credits. Instances will scale based on daily transactions, so be sure to monitor and top up accordingly.
| Size | Hourly | Daily | Weekly | Monthly |
| ------------------------ | ------ | ----- | ------ | ------- |
| xSmall brand new chain | .35 | 8.50 | 60 | 252 |
| Small \<50K tx per day | .485 | 12 | 84 | 349 |
| Medium \<150K tx per day | .972 | 24 | 168 | 700 |
| Large \<1M tx per day | 1.32 | 32 | 224 | 950 |
## Create Instance
There are several tabs to fill out to launch your instance; Info, Branding, and Rollup config (if needed). Plugins (currently the only live plugin is stats) can be added once your instance is fully indexed.
You can edit parameters at any time, but this typically requires relaunching and reindexing the instance.
### Info
The following parameters are in the Info section. \* parameters are required.
* **Instance size\***: Select based on the number of transactions anticipated for the instance. The costs are currently placeholders, but your credits will be impacted according to chain usage.
* **Chain name**: The chain name will be shown in the top explorer banner.
* **Instance name\***: A label for your instance, it is reflected in the url of the instance ie [https://instance-name.cloud.blockscout.com/](https://instance-name.cloud.blockscout.com/)
* **Chain ID**: If you don't know the chain ID you can get with the `eth_chainId` JSON-RPC method.
* **Node type:** Choose from the list of clients for the archive node:
* Besu, Erigon, Anvil, Geth, Parity
* **Gas token symbol**: Will show in the interface, for example ETH if your chain uses Ether for gas.
* **Mainnet or Testnet**: Select the type of chain, if Testnet a label will be added to the instance.
* **This chain is a Rollup**: If selected, another field will appear to select **Arbitrum, Optimism, Polygon zkEVM or zkSync**. You will then fill out additional information in the Rollup Config tab.
* **HTTP RPC URL\***: The **archive node** url ([https://your-rpc-url](https://your-rpc-url)) [***Note: archive node is required for internal transactions and token/coin historical balances. Tracing should be enabled for internal transactions.***](/setup/requirements/node-tracing-json-rpc-requirements)
* **WS URL**: The websocket url (wss\://ws.your-websocket-url)
* **Chain spec URL**: URL to chain specification path json (Sepolia example: [chainspec.json](https://github.com/ethpandaops/ethereum-genesis-generator/blob/v4.1.8/apps/el-gen/sepolia/chainspec.json) or [genesis.json](https://github.com/ethpandaops/ethereum-genesis-generator/blob/v4.1.8/apps/el-gen/sepolia/genesis.json)). You will use the raw JSON file; in the Sepolia example this url is [https://raw.githubusercontent.com/ethpandaops/ethereum-genesis-generator/v4.1.8/apps/el-gen/sepolia/chainspec.json](https://raw.githubusercontent.com/ethpandaops/ethereum-genesis-generator/v4.1.8/apps/el-gen/sepolia/chainspec.json)
* **Custom Domain**: You can use a custom domain for your instance but must configure your DNS and add a DNS `CNAME` record pointing to `autoscout.cname.blockscout.com`
* **Domain redirect(s):** Any additional domain names to redirect to the instance, comma separated.
* **Public RPC URL**: Enables 'add to MetaMask button'. Can be the same as the RPC URL if this is a public node.
* **WalletConnect project ID:** Enables the ability for Read and Write functionality with smart contracts. [Learn more about setting one up here](/setup/configuration-options/walletconnect-project-id-for-contract-read-write).
* **Google Analytics property ID**: Add the ID for your GA account if desired.
### Branding
* **Announcement banner:** Add an optional banner to the top of your instance, can include HTML code.
* **Default color theme**: Choose between a light theme and 3 variations of a darker theme.
* **Default address identicon:** Select from 4 different options for default identicons in your instance.
* **Vertical or Horizontal menu**: Select vertical for a side menu or horizontal for a top menu.
* **Full logo URL**: Add a url link to your full logo image in horizontal format. Supported formats: image/jpeg, image/gif, image/png. Add one for light mode and one for dark mode if desired (users can switch modes manually).
* **Logo sign (square) URL**: Add a url link to your square logo image in horizontal format. Supported formats: image/jpeg, image/gif, image/png. Add one for light mode and one for dark mode if desired (users can switch modes manually).
* **Header background gradient and text color**: Choose your desired background color gradients with the selector and choose your preferred text color. You will see a preview in the interface.
* **Favicon and OG image URL**: Add your favicon and [OG image](https://ogp.me/). OG image specs: Minimum image size is 200Γ20pixels (recommended: 1200Γ600); maximum supported file size is 8 MB; 2:1 aspect ratio; supported formats: image/jpeg, image/gif, image/png
* **OG description**: Add a description for Open Graph Previews
* **Enable enhanced OG tags**: Toggle if you want to render OG tags for API data pages
* **Enable enhanced SEO**: Toggle if you want to rerender page titles for Stats and Tokens pages to enhance SEO
* **API documentation links**: Toggle to show/hide different API links in the navigation menu
* **Other Navigation links**: Add custom navigation links to the other section of the primary navigation menu
* **Footer links**: Add up to 3 columns along with titles and urls for the links you want added to each column.
* **Ads**: Select providers for Ads on your instance
### Indexer
Indexer information uses the following variables under the hood. If no information is fiileed in , default variables are used.
| Variable | Default |
| ------------------------------------------- | ------- |
| `INDEXER_RECEIPTS_BATCH_SIZE` | 250 |
| `INDEXER_RECEIPTS_CONCURRENCY` | 10 |
| `INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE` | 10 |
| `INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY` | 4 |
| `INDEXER_CATCHUP_BLOCKS_BATCH_SIZE` | 10 |
| `INDEXER_CATCHUP_BLOCKS_CONCURRENCY` | 10 |
| `INDEXER_COIN_BALANCES_BATCH_SIZE` | 100 |
| `INDEXER_COIN_BALANCES_CONCURRENCY` | 4 |
| `INDEXER_TOKEN_BALANCES_BATCH_SIZE` | 100 |
| `INDEXER_TOKEN_BALANCES_CONCURRENCY` | 10 |
### Disable pending transactions fetcher
Leave this setting alone if your RPC supports pending transactions. However, **If your RPC node does not support pending transactions, please toggle this switch to disable.**
\*\*Check pending TX support \*\*by sending a request for one of the common methods (`eth_getBlockByNumber` with `"pending"` or `txpool_content`) and observe the response. A successful, valid response confirms support.Β
**Block transformer:** Leave as base unless you are using clique.
[Find additional info variables relevant to indexer setup here](https://docs.blockscout.com/setup/env-variables/backend-env-variables#indexer-management)
### Rollup Config
If your chain is a rollup you will select this in the info screen and then fillout the associated Rollup config info.
* Read the [Rollup deployment and config details](https://docs.blockscout.com/setup/deployment/rollup-deployment#arbitrum)
* [Arbitrum](/setup/env-variables/backend-envs-chain-specific#arbitrum-management) ENV variables
* [Optimism](/setup/env-variables/backend-envs-chain-specific#optimism-rollup-management) ENV variables
* [Polygon zkEVM](https://docs.blockscout.com/setup/env-variables/backend-envs-chain-specific#polygon-zkevm-rollup-management) ENV variables
* [zkSync](https://docs.blockscout.com/setup/env-variables/backend-envs-chain-specific#zksync-rollup-management) ENV variables
## FAQ
There could be several reasons for this. Your RPC may not be an archive node and [tracing](/setup/requirements/node-tracing-json-rpc-requirements) may not be turned on for that node. Once you switch to an RPC with tracing enabled internal transactions will still not be indexed until you spin up a new instance. In this case you will need to shut down your instance and create a new one.
Yes, there is but it requires an API key to use. It can be useful if you are spinning up many instances or need to check on many instances at the same time. Contact us in Discord #autoscout channel to request an API key. See the API Swagger Docs for more info: [https://blockscout.github.io/swaggers/services/autoscout/main/index.html](https://blockscout.github.io/swaggers/services/autoscout/main/index.html)
These are the fields you need to fill out in Cloudflare:
* **Type:** CNAME
* **Name:** your-explorer-name (instance name)
* **Content:** autoscout.cname.blockscout.com
* **Proxy status:** DNS only
* **TTL:** Auto
Make sure to set your Custom domain in the Autoscout interface.
You will receive several automated emails when your Autoscout credits/funds are running out. They are sent according to the following schedule:
| **Days before running out of funds** | **Automated email** |
| ------------------------------------ | ------------------- |
| 5 days | Initial email |
| 3 days | Reminder email |
| 1 day | Final reminder |
Updating is easy! Simply **restart** your instance and it is automatically updated to the latest version.
# Dappscout Apps Marketplace
Source: https://docs.blockscout.com/using-blockscout/blockscout-apps
Dappscout is a curated collection of on-chain applications
π‘ Submit your dapp now [with this quick form](https://airtable.com/appiy5yijZpMMSKjT/shr6uMGPKjj1DK7NL)!
Dappscout Apps Marketplace provides a curated list of apps available to on-chain users. Projects can submit their project for review, and once accepted, the project is listed in the marketplace.
## Direct Interface
Dapps are either embedded into the interface directly (like this [Uniswap example](https://optimism.blockscout.com/apps/uniswap)) or added as 3rd party links. When embedded, a user can connect their web3 wallet once to Blockscout, then use it with all of the supported Dapps. This saves time and makes for a seamless user experience when switching between multiple applications.
To enable direct embedding, Dapps need to:
1. Support iframe embedding on 3rd party domains.
2. Integrate the [Safe Apps SDK](https://docs.safe.global/apps-sdk-overview).
*See *[*Dapp integration*](/using-blockscout/blockscout-apps/dapp-integration)* for more details.*
## Dapps you can Trust
Dappscout marketplace provides additional security and peace of mind when interacting with various Dapps on a chain. Rather than accessing potentially fake links, scam sites or compromised interfaces, all Dapps in Blockscout are vetted and added by the curation team. Dappscout Dapps are safe and secure for users.
## Dappscout Submissions
There are several ways to submit a DApp. You will fill out a form with basic information to get started.
* Use this form to [submit directly](https://airtable.com/appiy5yijZpMMSKjT/shr6uMGPKjj1DK7NL).
* Use the submit app button within the marketplace.
## Blockscout Native Dapps
In addition to 3rd party apps, Blockscout is developing native apps for the Marketplace. These include:
* [Swapscout](/using-blockscout/swapscout): Swapping and bridging application.
* Revokescout: Manage and revoke contract approvals.
## Dapp Star Ratings
Users can rate dapps on a 1-5 star basis. A user must connect their wallet to the explorer, and that wallet must have atleast 5 transactions on the chain in order to rate a dapp. Dapps can be sorted by rating score and the number of ratings.
A full rundown on the process is available in this blog post:
Blockscout | Multichain Block Explorer For EVM Chains
Please note: The star rating system is currently experimental. This feature was released in beta testing to assess user interest in ratings and reviews. Current results may be affected by rating biases, including automated or mass submissions. We're actively improving the system based on user feedback.
# DApp Integration
Source: https://docs.blockscout.com/using-blockscout/blockscout-apps/dapp-integration
Prepare your DApp for submission to the DAppscout marketplace
Embedded DApps allow users to connect with a single wallet, providing a seamless user experience that eliminates the need to visit different urls and connect a wallet each time. See the[How to Integrate](/using-blockscout/blockscout-apps/dapp-integration#how-to-integrate)section below to prepare your DApp.
## Integration Levels
There are several levels on integration with DAppscout.
Our goal is to have as many fully integrated apps as possible!
1. **Fully Integrated Apps**
* Apps that are opened in an iFrame on \*.blockscout.com domains and have integrated the Safe Apps SDK
2. **Partially Integrated Apps**
* Apps that are opened in an iFrame on \*.blockscout.com domains, but have not integrated the Safe Apps SDK for various reasons
3. **Non-Integrated Apps**
* Apps that are not opened in an iFrame on \*.blockscout.com domains and have not integrated the Safe Apps SDK for various reasons
Fully integrated DApps list higher within the default view
## Integration Benefits
Fully integrated apps receive the following benefits
1. **Top Places in the Ranking for Users**
* All fully integrated apps will appear at the top of the list in their categories.
2. **Free Promo Through Ads**
* Protocols will receive free promotion on Blockscout for a limited time.
3. **Co-Marketing with Blockscout**
* In addition to free promotion, weβll prepare a co-marketing campaign on social media and our blog.
4. **A Special Quality Mark**
* All fully integrated DApps have a green βFully-Integratedβ symbol which shows users it is ready for use.
## How to Integrate
To fully integrate your protocol into DAppscout, you will need to do 3 things.
1. Enable iFrames for the \*.blockscout.com domain
2. Integrate the Safe Apps SDK
3. Submit your DApp via the form
### 1) Enable iFrame support
Both fully and partially integrated apps in the marketplace are embedded using iFrames, and it is necessary to enable iFrame support for our domain - \*.blockscout.com. This can typically be done via the `frame-ancestors` directive of the `Content-Security-Policy` header in your application. For additional examples, please see [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
Also, check your [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings, these may need to be modified for the \*.blockscout domain
### 2) Integrate the Safe Apps SDK
DAppscout uses the Safe Apps SDK to automatically connect a wallet linked to Blockscout to any of the apps in our marketplace. This allows a visitor to connect a wallet once and then open any app without needing to connect the wallet again
To enable this functionality, Safe Apps SDK needs to be integrated for your protocol, and the \*.blockscout.com domain added as an exception.
The [SAFE SDK documentation page](https://docs.safe.global/apps-sdk-get-started) provides resources to help you through the process. You will need to pass \*.[blockscout.com](http://blockscout.com/) as an additional option to the SafeAppsSDK function into the code [here](https://github.com/safe-global/safe-apps-sdk/tree/main/packages/safe-apps-sdk#documentation).
For additional integration options, check the list of other Safe packages for Safe Apps at [https://github.com/safe-global/safe-apps-sdk?tab=readme-ov-file#packages](https://github.com/safe-global/safe-apps-sdk?tab=readme-ov-file#packages)
If you integrate any of these packages, DAppscout can use them to automatically connect a wallet to your app.
After integrating the Safe Apps, make sure you have added the \*.blockscout.com domain as an exception to the SDK. Otherwise, we cannot utilize the Safe Apps SDK on our website
It is not necessary to have the Safe app/smart contracts on a network where your app is deployed. Itβs only necessary to integrate Safe Apps SDK for your application.
### 3) Submit your DApp
To submit your DApp to a marketplace, simply click on the submit DApp button. You will be taken to a form where you will fill out the needed information including contract addresses, description, logo, and links. Once your DApp is submitted, the DAppscout team will reach out with any questions and add your DApp to the marketplace.
# Multisend
Source: https://docs.blockscout.com/using-blockscout/essential-dapps/multisend
Multisend Essential Dapp
Multisend lets you send ERC20 tokens to multiple addresses at once rather than sending transactions one by one. With just a few clicks, you can create and send bulk transactions automatically, saving significant time and automating the process. Private keys and account information stay secure.
Multisend is useful when distributing tokens to many addresses, for example in an airdrop to a lot of recipients or payroll where you are sending many of the same ERC20 tokens to different addresses.
## Get Started
1. **Connect your wallet** to Blockscout (if needed)
2. **Find the Multisend app** in the Essential Dapps Menu
3. Click on the token field and **select the token** you want to send.
4. **Specify a list of addresses and amounts in CSV format** (for example `0x5c36bd76a6c138187c43da92f66f37e23b4017fa,12`) with 1 address and amount per line. You can upload a .csv file and the box with auto-populate. *Click the 'Show Sample CSV' button to see the formatted example.*
.eth names are not currently supported, please use full 0x addresses.
5. **Click Proceed** to go to the next step, Validation.
6. In the **Validation** step you will see the amount approved (0 at the moment), the total tokens to be sent, the total number of tokens in the wallet, and the total amount of ETH in the wallet. You will also see the list of recipients and allocations for each address.
Scroll down to see the approval options. You can either approve the exact token amount for this multisend (recommended) or click unlimited approval. With unlimited you will not need to approve sending for future transactions *(this grants unlimited priviledges to the app, which can be a security risk).*
Click **Approve** and confirm in your wallet.
7. Once you have approved the app to send tokens, you will see the approval transaction in the app. Click **Continue** to go to the third step where you will complete the transaction(s).
8. **View the total estimate**. You will see an overview along with the cost estimate. You can change the value of gas price with the gear icon, but this can cause issues and is not generally recommended. If everything looks good, click Proceed and sign the transaction(s) in your wallet. There may be multiple transactions to sign depending on the number of recipients.
That's it! If you'd like to learn more about Multisender, see the video walkthrough below which goes into more details on the standalone application.
### Multisender video walkthrough
# Revoke
Source: https://docs.blockscout.com/using-blockscout/essential-dapps/revoke
Check, manage and revoke your token approvals
Revoke is currently being updated for inclusion in Essential Dapps. It will be released shortly.
Many applications require you to grant approvals so that their contracts can interact with tokens in your wallet. This can be a security issue if you have granted unlimited or high allowances, or have granted approvals and forgotten about them. If an application is hacked or misused in some way, this can result in funds being quickly drained from your wallet.
The Revoke app lets you manage your approvals from a single interface. Easily check, update, and revoke token allowances you may have granted to different applications.
## Access the App
Revoke can be accessed directly via the Essential Dapps menu or as an app via the Dappscout interface in Blockscout on supported chains.
Revoke supports a subset of chains including Ethereum, OP Mainnet, Gnosis, Base and Ink.
## Check and Revoke
1. Select the chain you want to check.
2. Connect the wallet you want to revoke allowances for.
3. Review any allowances and click the Revoke button for those you want to revoke.
4. Confirm the transaction in your web3 wallet. This does not require any gas or transaction fees.
5. Your permissions will update momentarily.
## **FAQ**
This usually happens when the price information in USD is not available for a particular token. In these cases, the token amount is displayed without an associated USD conversion.
Not yet. We're still working on this functionality, and it will be added in future releases.
Yes, you can use any wallet that **WalletConnect** supports.
It's always a good practice to **limit token approvals** when you're not actively using a dapp, especially on **NFT marketplaces**. This reduces the risk of losing funds due to hacks or exploits and helps mitigate the damage caused by phishing scams.
Revoke is designed to provide valuable insights about your tokens and account. Instead of only allowing you to revoke token approvals, we offer a **comprehensive overview** of spender accounts. This way, you can make informed decisions and better understand **who has access** to your tokens.
## **Roadmap**
1. **Public Tags**
We plan to highlight key information about **approved spender contracts**, ensuring users are aware of **who has access** to their tokens. If an approved spender gets hacked or is flagged as a scam, this information will be added to Blockscout, allowing users to react promptly.
2. **Sorting**
To improve user experience, we're introducing sorting options for approvals. Users will be able to sort approvals by **amount, date, and value at risk**.
3. **Bulk Revoke for Multiple Tokens**
We're working on adding a **multi-token revoke feature** in upcoming releases to speed up the process.
# Swap
Source: https://docs.blockscout.com/using-blockscout/essential-dapps/swap
Swap and bridge multi-chain application for Blockscout users
Simple swaps and cross-chain bridging transactions are now available via the dedicated Swap app, powered by [LI.FI](http://li.fi/). All swapping and bridging operations are handled by LI.FIβs smart contracts, and their widget provides a flexible and lightweight interface. Blockscout has integrated the LI.FI widget to create a convenient and user-friendly tool specifically for Blockscout users.
Find Swap now under Essential Dapps on your explorer instance. For example, on Ethereum it is located at [https://eth.blockscout.com/essential-dapps/swap](https://eth.blockscout.com/essential-dapps/swap).
## Swap Features
* **Simple interface for swapping and bridging**. Swap is a convenient, easy-to-use tool for your token management and exchange needs. The clean, straightforward interface is designed for fast and intuitive token exchanges.
* **Flexibility with tokens, chains, and addresses**. Swap currently supports operations on 18 blockchains including**Ethereum, Arbitrum, Base, Polygon, Scroll, zkSync, Optimism, Gnosis, Fuse, Lisk, Unichain, Aurora, Immutable, Soneium, Rootstock, Celo, World Chain, and Ink.** \
\
Swap and bridge operations can be initiated by 1 address and sent to the same address or a different address if desired. If the address receiving a token does not have enough gas tokens to cover fees, a portion of the swap can be converted to automatically cover gas costs.
* **Low integrator fees**. Swap offers low fees (.4%). For example, a \$100 swap incurs a \$0.40 fee.
* **Aggregator fetches the best prices**: The application checks across 32 exchanges and 19 bridges to find the best swap and bridge prices, along with options for different routes if you want faster bridging or prefer to use a specific app or bridge.
* **Li.Fi for consistency and security:** Swap uses Li.Fi under the hood to provide swap and bridging functionality. This audited codebase is used throughout the ecosystem and trusted by many projects to provide safe and secure transfers.
* Earn Merits when using Swap. [See this page](/using-blockscout/merits/earn-merits-when-using-swap) to learn more about earning Merits for using your favorite swap and bridge application.
## Swap Operations
### Connect a wallet
Connect your wallet to Blockscout to access Swap functions.
1. Click connect wallet
2. Choose your preferred wallet and connect
### Swap tokens on the same chain
Swap checks up to 32 exchanges and aggregators to find the best routes.
### Swap and bridge tokens from 1 chain to another
Depending on the token and chain there may be several routes. Check routes for pricing and timing that best suits your needs.
### Swap, bridge and send tokens to another wallet
Swap and bridge from one chain to another. To send to a different wallet, click the wallet icon and enter the wallet address where you are sending funds.
# CSV Exports
Source: https://docs.blockscout.com/using-blockscout/export-to-csv
Export of blockchain entities related to address into a CSV file
Export to CSV gives users a way to easily download and analyze blockchain data. It is available for tabs on the address page including transactions, internal transactions, tokens, and logs.
Note: simplified CSV exports (transactions and transfers only, with no ability to define time periods) exist in Blockscout releases up to 3.5.1. Enhanced CSV export is available from v3.5.2+
You will find the *Download CSV* button under the list of entities related to the tab.
*Note:* under the *Tokens* tab, the list of token transfers will be exported.
After clicking the button you will be forwarded to a */csv-export* page for a given address and given type of export (transactions, internal-transactions, token-transfers, logs).
It is possible to specify an arbitrary period for the data export. By default, the current period is the previous month. After completing the reCaptcha, the data for the chosen period should be exported.
*Tip*: In order to prevent hitting a 30 secs loading timeout, choose the smallest time period possible for your data needs.
# Merits
Source: https://docs.blockscout.com/using-blockscout/merits
## What are Merits?
To learn details about the program please see our dedicated [Merits announcement blog post](https://blog.blockscout.com/blockscout-merits-rewarding-block-explorer-skills).
* Merits are digital rewards that are collected by interacting with Blockscout and participating in various relevant activities.
* Merits do not exist on any single blockchain, but rather are connected to an Externally Owned Account (`0x` address) via the Blockscout dashboard and your web3 wallet.
* Merits can be earned on any chain where the program is supported, and Merits accumulate to an account across blockchains and rollups.
* Merits are designed to make block exploration more fun and engaging, rewarding learning and regular usage.
* Merits do not have any material value, but in the future may unlock access to new features, merchandise, discounts, and other exclusive opportunities and benefits.
* You must login to Merits on Blockscout to see your balance and claim additional Merits.
* You can view more information about your Merits, the leaderboard and badges in the dedicated Merits hub at [https://merits.blockscout.com/](https://merits.blockscout.com/)
The following information relates to using the Blockscout Merits interface. See our [FAQs](/using-blockscout/merits/faqs) for common questions.
Merits are available on a limited number of Blockscout instances to start:
* [Ethereum Mainnet](https://eth.blockscout.com/)
* [Ethereum Sepolia](https://eth-sepolia.blockscout.com/)
* [Ethereum Holesky](https://eth-holesky.blockscout.com/)
More chains will be added as the program rolls out.
## Sign up for Merits
Sign up to start collecting Merits and participating in the program. You will receive 100 Merits for signing up or 200 Merits if you use a referral link/code. There are several ways to signup:
* New account referral signup
* New account signup (no referral)
* Existing account signup
### New account referral signup
We recommend using a referral code to signup as you will receive an additional 100 Merits for a total of 200 Merits. Ask a friend or Blockscout community member (telegram, discord) if you need a code or link.
#### **1) Enter the link you received**
The link will be the instance name followed by `/?ref=XXXXXX` for example [https://eth.blockscout.com/?ref=9V4NUJ](https://eth.blockscout.com/?ref=9V4NUJ)
*Note: if you only have a code and not a link you will enter the code during step 5 of the sign in flow.*
If starting with a referral link you will be forwarded to this page.
If using a six digit referral code, you will go to the Blockscout instance and click on the Merits button to get started.
#### **2) Connect your wallet (EOA)**
Note that this wallet can be used to collect Merits across chains.
#### 3) **Login to account**
Once you have granted permission to connect your wallet, you can login to your account. When confirming in your web3 wallet be sure to check that the site info and wallet info are correct *(in this example we are using a testnet, so the information will be different depending on the instance you are accessing).*
#### 4) **Add email (optional)**
Add your email to enable account watchlist functionality and receive Merit updates.
#### 5) Join the Merits program
Your code should pre-populate. Click Get started and confirm sign-in via your web3 wallet.
#### 6) Congratulations!
You are now enrolled in the Merits program. You can share your referral link on X, or click Open to view the Merits dashboard.
### New account signup (no referral)
We recommend using a referral code to receive additional Merits, however you can signup without one if desired. The flow is the same as the referral sign up with a code. The only difference is you do not toggle the I have a referral code button (step 5 above) to proceed.
### Existing Account Signup
If you already have a Blockscout account, you can still use a referral code to sign up for the Merits program. Login to your Blockscout account and paste in the referral link or press the Merits button to start. Follow the process above starting with step 5.
## Navigate the Merits dashboard
1. **Merits balance and claim**: Displays your current balance and claim eligibility. You can claim 10 Merits 1 time per day. This amount resets the following day. The claim button will also send any available referral Merits to your account. Referral Merits are added when someone you refer completes an activity. Referrals are not available for signing up or daily claims.
2. **Referral data**: Shows how many individuals you have referred to the Merits program.
3. **Streak data *\***: Shows how many days in a row you have claimed your daily Merits.
4. **Referral code and link**: Your referral link and code. Share this code with friends and they will receive additional Merits on signup. You will receive a 10% bonus for rewards earned by your referrals for Blockscout activity. More about referrals is in the [FAQ](/using-blockscout/merits/faqs).
5. **Activity tracking *\***: Tracks your activities and earned Merits for these activities.
6. **Contract verification tracking *\***: Tracks your contract verification activity and related Merits rewards.
7. **Badges *\***: Collection of the Blockscout badges you have earned for completing various Blockscout-based campaigns. For more information, see the [Blockscout Badges site](https://badges.blockscout.com/home).
# Activity Pass
Source: https://docs.blockscout.com/using-blockscout/merits/activity-pass
Get you pass and earn more Merits
Read more about the Activity Pass in this [blog post.](https://www.blog.blockscout.com/earn-rewards-for-block-explorer-routine-activity-pass/)
The Activity Pass opens up new opportunities for Blockscout power users! Activity Pass holders can:
* Earn Merits through various activities such as contract verification, contract interaction, using Blockscout apps like [Revokescout](../revokescout.md) and [Swapscout](../swapscout/), and just using Blockscout for exploring the chain.
* Compete against other Activity Pass hodlers for Performance Rank status and benefits
* Access exclusive offers available only to Activity Pass holders.
### How it works
Get an Activity Pass, then regular Blockscout usage earns your extra Merits.
1. Activity passes become available periodically on the [Merits hub](https://merits.blockscout.com/). They are available in the **Spend Merits** tab.
2. Purchase a pass using your Merits.
3. Login to Blockscout with your Merits wallet.
4. Complete various actions on Blockscout. Your Merits will increase weekly based on your activity and other user's activity.
Bonus: Activity Pass holders can mint an exclusive NFT on the [Blockscout Badges site](https://app.gitbook.com/s/-MjSwkv4zokqCUebt-98/).
### Activity Pass Actions
The following actions will earn you additional Merits when you have an Activity Pass. You need to be **logged into Blockscout with your Merits address** and **hold an Activity Pass on that address** to qualify.
1. Regular Blockscout usage. Checking addresses, balances, tokens, etc. All the things you normally do on Blockscout earn you more Merits.
2. Using Blockscout-related apps like [Swapscout ](../swapscout/)and [Revokescout](../revokescout.md).
3. Verifying contracts through the Blockscout UI. [This guide](https://www.blog.blockscout.com/how-to-verify-your-smart-contract-with-the-blockscout-ui/) shows a simple example using hardhat.
4. Interacting with contracts on the Blockscout UI. [Use Read and Write methods directly from Blockscout](https://docs.blockscout.com/devs/verification/interacting-with-smart-contracts) to interact with contracts.
### Amount of Merits Earned
Merit earnings for Activity Pass holders are based on your effort vs other Pass holders! The higher you rank in the activity, the more Merits you receive. Here is the breakdown of **Merits earned per week** for various activities.
* **Blockscout Usage**: Regular usage when logged into Blockscout
* **Contract Verification**: Verifying contracts with the Blockscout UI
* **Interactions**: Swapscout, Revokescout, and Contract Read/Write
| | Blockscout Usage | Contract Verification | Interactions |
| ------- | ---------------- | --------------------- | ------------ |
| 90%+ | 200 | 400 | 300 |
| 75%-90% | 160 | 320 | 240 |
| 50%-75% | 120 | 240 | 180 |
| 25%-50% | 80 | 160 | 120 |
| 5%-25% | 40 | 80 | 60 |
| >5% | 10 | 20 | 15 |
### FAQs
An Activity Pass is an add-on that allows you to earn additional Merits when using Blockscout.
Activity Passes are available in limited batches via the Merits website. Check back regularly and follow [Blockscout on X ](https://x.com/blockscout) to be informed of new Activity Pass drops.
You can find the full list of Blockscout Explorers eligible for earning Merits by clicking the βEarnβ button on an activity card. At the beginning of the program the following instances are supported:
1. Ethereum Sepolia
2. Ethereum mainnet
3. Gnosis Chiado
4. Gnosis mainnet
5. Ink mainnet
6. Soneium mainnet
Click the βEarnβ button to see the list of Blockscout Explorers where you can earn Merits just by using them. You can also check our documentation for details on specific activities that grant Merits.
Activity Pass Merits are automatically distributed to your account on a **weekly basis.**
Every Monday, all earned Merits are automatically distributed. At the start of each new week, Performance Ranks and previously earned Merits are reset. New week, new achievements!
Performance Rank is your position among all users with Activity Passes who are earning Merits. A higher rank means you are among the top users who have earned the most Merits. The higher your Performance Rank, the more Merits you receive.
Different Performance Ranks result in different amounts of Merits received on a weekly basis. Completing different activities will also earn you different Merit amounts.
***Note: The Merits distribution per Performance Rank may change based on program participation, please stay tuned!***
# Badges
Source: https://docs.blockscout.com/using-blockscout/merits/badges
Earn and collect NFT Scout badges by engaging and exploring the blockchain with Blockscout.
Access the Blockscout badges site at [https://badges.blockscout.com](https://badges.blockscout.com/home)
### What are Blockscout Badges?
Blockscout Badges are digital rewards (NFTs) that you can earn by participating in Blockscout community activities and campaigns.
### What makes each badge special?
Each badge collection has four rarity levels:
* Common
* Rare
* Super Rare
* Legendary
When you mint a badge, you'll randomly receive one of these rarity levels β like opening a mystery box!
### How do I get a badge?
1. Connect your crypto wallet to the Base network
2. Choose the badge collection you want
3. Click 'Mint' if you're eligible
4. Important: Use the same wallet address you used during the campaign, as this proves your eligibility
After minting, you can see your badge by looking up your wallet address on the [Base Blockscout Explorer.](https://base.blockscout.com/)
### Why can't I get a badge?
Each badge is only available to people who participated in specific campaigns during certain time periods. Don't worry though β Blockscout regularly launches new campaigns! Follow our social media to catch the next one.
### Can I trade or sell my badges?
Yes! You can move your badges to different wallets or sell them on NFT marketplaces.
### How many badges can I get?
You can get one badge per campaign you participate in. Collections typically have a limited number of badges available.
### What can I do with my badge?
Right now, your badge shows that you participated in a Blockscout activity. In the future, badges might give you special access to:
* Events
* Exclusive merchandise
* Other special benefits
### Having problems?
Join the [Blockscout badges Discord channel](https://discord.gg/blockscout) for help with any issues.
# Earn Merits when using Swap
Source: https://docs.blockscout.com/using-blockscout/merits/earn-merits-when-using-swap
### Swap & Merits
Swap allows you to swap assets and bridge assets with a convenient, intuitive interface. In addition, users who are signed up to the [Blockscout Merits program](/using-blockscout/merits) will receive Merits for using Swap. Merits are distributed based on several factors:
1. The total 24-hour volume of Swap transfers.
2. The fees generated based on this volume.
3. The total number of unique Swap users within a 24 hour period.
At the end of each 24 hour period (00:00 UTC to 23:59 UTC each day) the number of transactions and fees generated by each unique address are calculated and Merits are distributed automatically.
### Allocation
A set amount of Merits are marked for distribution each day amongst all qualified users. An address receives a percentage of this amount based on the fees their address generates during that period for swaps and bridge transactions. The more fees an address generates, the higher percentage of Merits they receive from the overall allocation.
### Min/Max
* **Minimum**: The minimum amount of Merits distributed to any address that interacts with Swapscout during a 24 hour period is 1% of the total Merits allocation for the day.
* **Maximum**: The maximum amount of Merits distributed to any one address interacting with Swapscout during a 24 hour period is 10% of the total Merits allocation for the day.
### Distribution
Merits are automatically distributed to each account at the end of each day. You can view your current Merits balance by [logging into Merits](/using-blockscout/merits) on a Blockscout instance where the program is active.
# FAQs
Source: https://docs.blockscout.com/using-blockscout/merits/faqs
We will continue adding frequently asked questions to this list. If you have an issue that needs immediate attention, please ask on the [Blockscout Discord](https://discord.gg/blockscout).
### Merits
The blog announcement includes information about the origins of the program, how you can earn Merits, and future directions. [Merits announcement blog post](https://blog.blockscout.com/blockscout-merits-rewarding-block-explorer-skills).
Merits will be rolled out to many Blockscout supported chains in the future. Right now they are available on:
* [Ethereum Mainnet](https://eth.blockscout.com/)
* [Ethereum Sepolia](https://eth-sepolia.blockscout.com/)
* [Ethereum Holesky](https://eth-holesky.blockscout.com/)
Your Merits account is chain agnostic - you can claim Merits and collect referral bonuses on any supported chain.
The daily claim is worth 10 Merits. You can claim one time per day, and the amount resets to 10 Merits at 0:00 UTC each day. To claim, login to the Dashboard and click the claim button.
In your Merits dashboard you will find a referral code and a referral link you can share with your friends. They can follow the link directly or enter the code when signing up to the program for the first time.
You do not receive referral rewards when someone first signs up using your referral code or claims their daily bonus.
However, you will receive rewards (10% of the Merits they earn) for block explorer usage or activities/campaigns they complete. These rewards will accumulate to your account, and you can claim to your account with the claim button in the dashboard.
Activities which earn referral rewards are still in development, and will be listed once they become available.
Learn more in the [Merits announcement blog post](https://blog.blockscout.com/blockscout-merits-rewarding-block-explorer-skills).
Merits are collectible rewards displayed in your Blockscout dashboard. They show your Blockscout adoption, usage, and mastery and promote learning in a gamified way. Right now you don't use them other than to show off your block explorer skills. In the future Merits may unlock access to new features, merchandise, discounts, and other exclusive opportunities and benefits.
Yes you can! Swapscout users who are signed up to the Merits program receive Merits based on their own usage, total usage (how many users use [Swapscout](https://swap.blockscout.com/)) and fees. These Merits are automatically distributed to the account each day at 0:00 UTC. See the [Earn Merits when using Swapscout](/using-blockscout/swapscout/earn-merits-when-using-swapscout)page for more information on this distribution.
Streaks are achieved by claiming Merits on consecutive days within a 24 hour span. You can earn additional Merits for longer streaks. Check the [streak rewards](/using-blockscout/merits/streak-rewards) page for more details.
### Badges
Blockscout Badges is a new initiative by the Blockscout Team, designed to celebrate and recognize our community members for their involvement in key campaigns and contributions.
Most Blockscout Badge collections features four distinct rarity levels, giving users an exciting opportunity to mint a legendary NFT. The rarity tiers include Common, Rare, Super Rare, and Legendary, with each mint offering a randomized chance at unlocking the most coveted level.
Minting a Blockscout NFT is quick and simple. Just connect your preferred wallet and switch to the Base network. Select the NFT collection, and if you are eligible to mint you will be able to click on the βMintβ button. Use the same wallet address you used in the relevant campaign, as your eligibility is tied to that specific address. Once minted, you can view and verify your new Blockscout NFT on the Blockscout Explorer by searching your wallet address and exploring the tokens stored in your wallet
Participants for each NFT were gathered during the designated campaign period. But donβt worryβBlockscout will be launching more NFTs in future campaigns! Be sure to follow our social channels to stay updated on the next exciting opportunity
Yes! All Blockscout Badges are transferable, allowing you to move them to new wallets or sell them on secondary markets
Most collections are limited, with a maximum of one NFT per participant per campaign.
For now your badge is an NFT that proves you completed a certain Blockscout related activity. Show it off with pride! There may be future applications for Blockscout badges like access to events, badge-limited swag or other goodies. Stay tuned for more details.
Please [join our badges discord channel](https://discord.com/invite/blockscout) and we will help troubleshoot your issues or questions
If you donated to previous Gitcoin rounds for Blockscout in 2023 and 2024 you are eligible for the Gitty Up badge. This includes the following rounds:
* Ethereum Infrastructure: 25 Apr 2023 to 09 May 2023
* Ethereum Infrastructure: 15 Aug 2023 to 29 Aug 2023
* Ethereum Core Infrastructure, Research and Development: 15 Nov 2023 to 29 Nov 2023
* Developer Tooling and Libraries: 23 Apr 2024 to 07 May 2024
* GG21: 7 August to 22 August 2024
* Octant Community Round: 12 September to 27 September 2024
You can check the list of all eligible addresses [join our badges discord channel here](https://discord.com/invite/blockscout)
# Leaderboard
Source: https://docs.blockscout.com/using-blockscout/merits/leaderboard
View accounts by Merits
The Merits leaderboard is a part of the standalone Merits hub website available at [https://merits.blockscout.com/](https://merits.blockscout.com/)
The Merits leaderboard displays accounts ordered by the number of Merits each account has earned.
* The leaderboard reflects the current season of earnings, and resets when a new season launches.
* Search is only available by the full address, but is not case sensitive.
* Ranking is determined by the number of Merits earned. If addresses share the same number of Merits, they all share the same rank. In this example, all accounts have 352 Merits, and are all ranked 12.
# Streak Rewards
Source: https://docs.blockscout.com/using-blockscout/merits/streak-rewards
Connecting to Blockscout on consecutive days increases your streak and your Merits
Available at [https://merits.blockscout.com/](https://merits.blockscout.com/) and on the Blockscout Merits dashboard.
Earn additional Merits by visiting and claiming once per day. A day starts at 00:00 UTC and ends at 23:59 UTC.
To maintain a streak, you must make a claim each calendar day. The timing on the claim doesn't matter, it can occur any time between 00:00 UTC and 23:59 UTC.
* Merits must be claimed once per day to maintain a streak. Every day you make a Merits claim, your streak increases by 1.
* If you fail to make a claim on a calendar day, your streak resets to 0.
* Every 7 days of a streak results in an increased Merit reward. This is a single day award which can is claimed each 7th day of your streak (7,14,21,28 etc).
* Currently, the highest reward is 20 Merits, for a total of 30 Merits (10 daily claim Merits + 20 streak reward Merits) available to claim on streak reward days.
*See the table below for more details on streak rewards.*
### Streak rewards for daily claims
| Streak | Daily Claim | Reward | Total Merits Claim |
| ------ | ----------- | ------ | ------------------ |
| 1-6 | 10 | 0 | 10 |
| 7 | 10 | 10 | 20 |
| 8-13 | 10 | 0 | 10 |
| 14 | 10 | 20 | 30 |
| 15-20 | 10 | 0 | 10 |
| 21 | 10 | 20 | 30 |
| 22-27 | 10 | 0 | 10 |
| 28 | 10 | 20 | 30 |
# My Account
Source: https://docs.blockscout.com/using-blockscout/my-account
The My Account feature provides the ability to watch addresses (and receive email notifications regarding activity), create private tags, add API keys to an account and more.
It does not contain any private key info or allow you to withdraw funds. It is designed as an organization and personalization tool for the block explorer, giving you additional ways to customize the data you want to receive.
You can sign up for an account using either an email or your Github credentials.
The following options are currently available:
* **Watch list:** Watch specific addresses and receive email notifications for transactions.
* **Private Tags**: Private tags for addresses & transactions
* **Public Tags**: Request a public category tag displayed to all Blockscout users. Requests are processed manually.
* **API keys:** Add to receive an individually rate limited key.
* **Custom ABI**: Useful for testing & debugging, can be used with verified or unverified contracts.
* **Verified Addresses**: Verify ownership of a smart contract address to easily update information in Blockscout
* **Sign Out**: Sign out, info kept in local storage for easy sign-in.
Additional future features include an upcoming redesign and multi-chain rollout.
## Get Started
*The following example is created using the *[*Optimism Blockscout instance*](https://optimism.blockscout.com/)*.*
#### 1) Click the MyAccount Icon
#### 2) Sign in / Create an Account
a. Sign in with your existing email and password
b. Create a new blockscout account with an email/password
c. Sign in with an existing github account
#### 2a) Email and Password
Enter a valid email and password to setup an account. You will receive a validation notice to your email, be sure to check spam filters as it will come from *[noreply@blockscout.com](mailto:noreply@blockscout.com)*.
#### 2b) Github
#### 3) View Options
Once logged in, you can view options in the My Account Dropdown or on the activated toolbar.
# API keys
Source: https://docs.blockscout.com/using-blockscout/my-account/api-keys
API Keys are available to enhance request availability. Keys give users the ability to query the API up to 10 requests/sec.
A maximum of 3 keys can be created for each account.
## Create API key
**1) Login to My Account in Blockscout** \<[*login instructions*](/using-blockscout/my-account)> to get started. Once logged in:
1. Go to API keys in the user menu.
2. Press Add API key.
**2)** **Fill in the Name field**. Add a Name for your API key. This is for your information only and to differentiate between different keys. Press **Generate API key.**
**3) API key generated.** The API Key is now added to your API dashboard. You can copy the key or edit the name/delete the key at any time. In addition you can add 2 additional keys (up to 3 per account).
## Use API key
Add the following to the end of a query to use your API key: `&apikey=your-api-key`
For example, a query to get more info on USDT on Optimism with the API key `fdbfa288-1695-454e-a369-4501253a120`would be formatted as follows:
`https://optimism.blockscout.com/api?module=token&action=getToken&contractaddress=0x94b008aA00579c1307B0EF2c499aD98a8ce58e58&apikey=fdbfa288-1695-454e-a369-4501253a120`
For more info on RPC calls see the [RPC API Endpoints documentation](/devs/apis/rpc).
# Custom ABI
Source: https://docs.blockscout.com/using-blockscout/my-account/custom-abi
The Custom ABI feature is useful for debugging and testing newly deployed smart contracts. This feature can be used with verified or unverified contracts.
Once a custom ABI is added, the user can test methods using the `Write Custom` feature.
## Add Custom ABI
**1) [Login to My Account](/using-blockscout/my-account)** in Blockscout to get started. Once logged in:
1. Go to **Custom ABI** in the My Account menu.
2. Press the **Add Custom ABI** button.
**2)** **Fill in the fields**.
1. **Smart Contract Address**. Enter the correct `0x` address of the deployed contract.
2. **Project Name**. Create a name for your own reference.
3. **Custom ABI**: Copy and paste in the ABI for the contract from your development environment (truffle, hardhat, remix etc) or if the contract is verified you can copy from Blockscout.
4. Press **Create custom ABI**.
**3) Custom ABI added** to the home screen. You can edit or remove current custom ABIs or add additional custom ABIs from here.
## Interact with a Custom ABI
You will need to be logged into My Account to interact with your custom ABIs. Once you added, you can visit the contract to interact with the custom ABI.
1. Go to the contract page.
2. You will see a Write custom button.
3. Connect your wallet to interact with the contract.
4. Write to the available methods.
# For Developers
Source: https://docs.blockscout.com/using-blockscout/my-account/for-developers
When setting up My Account for your chain
Please see [My Account settings in configurations](/setup/configuration-options/my-account-settings) for notes about setting up the proper variables and linking to your airtable.
# Private tags
Source: https://docs.blockscout.com/using-blockscout/my-account/private-tags
Private tags help customize your Blockscout instance to track addresses and transactions that are important to you. You can track specific addresses, either EOAs (Externally Owned Addresses) or smart contracts, as well as group and organize specific transactions.
Use the private tags feature to add your own **address tags** and **transaction tags**. These will be viewable on your instance of Blockscout only.
When logged in, a small grey tag is added with the selected name to any specified addresses or transactions. You can also add emojis π for easy identification.
Use cases might include tags for specific wallet accounts (EOAs) of interest, Gnosis safe multisig wallets to highlight, tags for specific applications, tags for specific transaction types, tokens, NFTs etc.
*The following example is created using the *[*Optimism Blockscout instance*](https://optimism.blockscout.com/)*.*
To start with private tags, you must first [login to My Account](/using-blockscout/my-account).
### 1) Create a Private Address Tag
1. Go to Private Tags in the My Account user menu. Address tag will be the default option
2. Press the **Add address tag** button.
**2)** **Fill in the fields**.
1. Address. Double check you are entering the correct address for the chain. Search the address in Blockscout to confirm.
2. Name. Create a name for the tag (35 characters or less). Emojis are a nice way to differentiate and add style and color to tags.
3. Press **Add tag**.
**3) Address tag added** to the Address Tags home screen. You can add additional tags or remove old tags from here.
**4) View tags in Blockscout**. They will appear in grey next to additional tags that may exist for that address.
Note, you must be logged in to My Account to see your private tags.
## 2) Create a Private Transaction Tag
* Go to **Private Tags** in the My Account user menu. Select the **Transaction** tab.
* Press the **Add transaction tag** button.
**2)** **Fill in the fields**.
1. Transaction hash. Double check you are entering the correct tx for the chain. Search the transaction and copy/paste from Blockscout to easily add.
2. Name. Create a name for the tag (35 characters or less). Emojis are a nice way to differentiate and add style and color to tags.
3. Press **Add tag**.
**3) Transaction tag added** to the transaction tags home screen. You can add additional tags or remove old tags from here.
**4) View tags in Blockscout**. They will appear in grey next to additional tags that may exist for that address.
Note, you must be logged in to My Account to see your private tags.
# Public tags
Source: https://docs.blockscout.com/using-blockscout/my-account/public-tags
Request a tag or report an incorrect tag
Request a public tag for your project's contracts on the public Blockscout instance. Tags appear in search, help create brand awareness for projects, and make exploration easier.
Once submitted, tags are reviewed and accepted/denied manually by the instance admin. If accepted, the tag is added to the public instance. It is also possible to report incorrect public tags through the public tags section.
*The following example is created using the *[*Optimism Blockscout instance*](https://optimism.blockscout.com/)*.*
## Request Public Tags
**1) Login to** [**My Account**](/using-blockscout/my-account)
1. Go to **Public tags** in the My Account Menu
2. Press **Request to add public tag**.
**2)** **Fill in the fields**. Fields with \* are required.
* Your name\*
* E-mail\*
* Company name
* Company website
* Select either:
1. I want to add tags for my project
2. I want to report an incorrect public tag
* Public tags\*: 2 tags max, 35 character max per tag, use the ; as a separator
* Smart contract / Address (0x...)\*: Provide the 0x address of the contract. If you have several, press the "+" to add.
* Reason and Description\*: Add any relevant details and include your color preference for the tags. Include any other helpful or clarifying information here.
**3) Public tag request added** to the Public tags home screen. You can edit, request additional tags or delete old tags from here. Public tags are reviewed manually and can take some time in the queue. If your tag request appears in the dashboard it has been successfully submitted and will be reviewed in the order in which it was received.
# Verified Addresses
Source: https://docs.blockscout.com/using-blockscout/my-account/verified-addresses
Verify ownership of a smart contract address to easily update information in Blockscout. To verify your ownership, a contract must be deployed on the chain and [verified](/devs/verification).
You will sign a single message to verify contract ownership. Once verified, you can update token information, address name tags, and address labels from the Blockscout console.
1\) **Login to My Account in Blockscout** \<[*login instructions*](/using-blockscout/my-account)>.
1. Go to the **Verified addrs** menu item.
2. Click **Add address**.
More info coming soon
# Copy and Sign Message
Source: https://docs.blockscout.com/using-blockscout/my-account/verified-addresses/copy-and-sign-message
Instructions coming soon
# Watch list
Source: https://docs.blockscout.com/using-blockscout/my-account/watchlist
*The following example is created using the *[*Optimism Blockscout instance*](https://optimism.blockscout.com/)*.*
Sign up for email notifications for different actions related to an EOA or contract address. This can include incoming/outgoing transactions for native tokens, ERC-20 tokens or NFTs like ERC-721 and ERC-1155s.
1\) **Login to My Account in Blockscout** \<[*login instructions*](/using-blockscout/my-account)>. From the Watchlist menu click Add address.
2\) **Fill in information** including:
* **Address**: 0x address of the EOA or contract to watch.
* **Private tag**: For your reference, will be displayed as a private tag for your Blockscout instance when you are logged in (emoji's accepted π)
* **Notification types**: Select which types of transactions you would like to receive email notifications for. These include native tokens (in this case ETH), ERC-20 tokens, and NFT tokens.
* **Email Notifications**: Select to receive.
* **Add address**: Click button to add to your watchlist.
3\) A new address along with an info overview will be added to your watchlist dashboard. You can edit info, remove, or add more items.
4\) Click the address to view in the Blockscout console. Watch list addresses show the private tag when logged into My Account.
5\) If selected, you will receive emails based on actions completed by this address.
# UI Sections
Source: https://docs.blockscout.com/using-blockscout/overviews
Blockscout is a full-featured explorer with many uses. A block explorer provides views and insights into various data stored on chain. Depending on the page, section and instance, different types of data is displayed. See below for different views and learn how to navigate blockchain data.
Blockscout offers different informational displays depending on the page, section and instance you are viewing. Learn more about different views and data displays in Blockscout:
* [Top Menu](/using-blockscout/overviews/top-menu)
* [Blocks](/using-blockscout/overviews/blocks)
* [My Account](/using-blockscout/my-account)
# Address Page
Source: https://docs.blockscout.com/using-blockscout/overviews/address-page
Address page details
# Exploring EOA Addresses on Blockscout
Blockscout provides comprehensive information about Externally Owned Accounts (EOA) on Ethereum and other EVM-compatible blockchains. This guide breaks down the sections of a Blockscout address page using Vitalik Buterin's address (0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045) as an example.
## What is an EOA Address?
An Externally Owned Account (EOA) is a wallet address controlled by a private key, as opposed to a smart contract address. EOAs can initiate transactions, hold ETH and tokens, and interact with smart contracts.
## Section A: Address Header & Identification
### Address Information
| Field | Description | Example | Purpose |
| :----------------------------- | :---------------------------------- | :----------------------------------------- | :-------------------------------- |
| **ENS Name (when applicable)** | Ethereum Name Service domain | vitalik.eth | Human-readable address identifier |
| **Address Hash** | 42-character hexadecimal identifier | 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 | Unique blockchain address |
| **Copy Button** | Click to copy address | π | Quick clipboard access |
| **QR Code** | Visual representation of address | QR icon | Easy mobile wallet scanning |
| **Star Button** | Add to favorites/watchlist | β | Personal tracking |
| **Public Name Tag** | Community-assigned label | "Vitalik Buterin" | Identity verification |
| **Additional Tags** | Category labels | "EOA", "Gitcoin Grantee" | Classification information |
### Action Buttons
| Button | Description | Function | Use Case |
| :--------------- | :----------------------------- | :--------------------------------- | :--------------------------------- |
| **40+** | ENS names owned by the address | Open to show other ENS properties | ENS usage |
| **5** | Verify in other environments | Explore address on other explorers | Address credibility & transparency |
| **Tag Menu (β―)** | Add tags | Add public & private tags | Tagging |
## Section B: Navigation Tabs
### Tab Overview
| Tab | Description | Content Type | Purpose |
| :----------------------- | :------------------------------ | :-------------------------- | :----------------------- |
| **Details** | Basic address information | Balance, tokens, statistics | Primary account overview |
| **Transactions 50+** | All blockchain transactions | Incoming/outgoing transfers | Transaction history |
| **Token transfers 50+** | ERC-20/ERC-721 movements | Token-specific activity | Asset tracking |
| **Tokens 50+** | Token holdings | Current token balances | Portfolio overview |
| **Internal txns 50+** | Contract-generated transactions | Smart contract interactions | Advanced activity |
| **Coin balance history** | ETH balance over time | Historical balance data | Balance tracking |
| **Coin balance history** | ETH balance over time | Historical balance data | Balance tracking |
## Section C: Address Details
### Basic Information
| Field | Description | Value Example | Significance |
| :---------------------- | :------------------------------ | :--------------------------- | :------------------ |
| **Balance** | Current ETH holdings | 4.77725266 ETH (\$16,037.91) | Available funds |
| **Tokens** | Number of different tokens held | >153 (>\$9,680,718.59) | Portfolio diversity |
| **Net worth** | Total portfolio value | >\$9,696,756.50 | Overall wealth |
| **Transactions** | Total transaction count | 73,149 | Activity level |
| **Transfers** | Token transfer count | 282,412 | Token activity |
| **Gas used** | Total gas consumed | 789,854,535 | Network usage |
| **Last balance update** | Most recent activity | Block 22933842 | Freshness indicator |
### Token Holdings Details
| Element | Description | Format | Purpose |
| :------------------- | :---------------------- | :---------------------- | :--------------------- |
| **Token Count** | Number of unique tokens | ">153" | Portfolio size |
| **Total Value** | USD value of all tokens | ">\$9,680,718.59" | Portfolio worth |
| **Dropdown Arrow** | Expand token list | βΌ | View individual tokens |
| **Multichain Badge** | Cross-chain presence | "Multichain" with icons | Multi-network activity |
## Section D: Advanced Features
### Special Indicators
| Feature | Description | Appearance | Meaning |
| :------------------- | :--------------------- | :---------------------- | :----------------------------- |
| **ENS Integration** | Domain name display | "vitalik.eth" | Verified identity |
| **Verified Status** | Authentication markers | Checkmarks/badges | Trusted account |
| **Multichain Data** | Cross-network presence | Chain icons | View Multi-blockchain activity |
| **Gas Optimization** | Efficiency suggestions | "Save 32% with GasHawk" | Cost reduction tips |
### Action Capabilities
| Action | Description | Access Method | Result |
| :------------------- | :---------------- | :------------ | :---------------------- |
| **Copy Address** | Copy to clipboard | Copy button | Address in clipboard |
| **View QR Code** | Generate QR code | QR button | Mobile-friendly display |
| **Add to Watchlist** | Personal tracking | Star button | Monitoring setup |
| **Share Address** | Social sharing | Share options | Public distribution |
## Section E: Activity Analysis
### Understanding Address Metrics
| Metric Range | Activity Level | Interpretation | Example |
| :---------------------------- | :------------- | :------------------ | :--------------- |
| **0-100 transactions** | Light user | Occasional activity | Personal wallet |
| **100-1,000 transactions** | Regular user | Consistent activity | Active trader |
| **1,000-10,000 transactions** | Heavy user | High activity | Power user |
| **10,000+ transactions** | Power user | Very high activity | Vitalik (73,149) |
### Token Holdings Analysis
| Token Count | Portfolio Type | Risk Level | Example |
| :---------------- | :------------- | :--------- | :------------------- |
| **1-10 tokens** | Conservative | Low | Basic portfolio |
| **10-50 tokens** | Moderate | Medium | Diversified investor |
| **50-100 tokens** | Aggressive | High | DeFi enthusiast |
| **100+ tokens** | Experimental | Very High | Vitalik (153+) |
### Net Worth Categories
| Value Range | Wealth Level | Classification | Significance |
| :--------------------- | :------------ | :------------------- | :--------------------- |
| **\<\$1,000** | Small holder | Retail investor | Learning/testing |
| **\$1,000-\$10,000** | Medium holder | Active investor | Serious participation |
| **\$10,000-\$100,000** | Large holder | Significant investor | Substantial commitment |
| **\$100,000+** | Whale | Major investor | Market influence |
**Note:** This guide is based on Vitalik Buterin's address (0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045) as viewed on Blockscout. Address information and values are subject to change as blockchain activity continues.
# Beacon Chain Withdrawal Views
Source: https://docs.blockscout.com/using-blockscout/overviews/beacon-chain-withdrawal-views
Coming Soon
Validator withdrawals will soon be activated on the Ethereum mainnet with the Shanghai/Capella hardfork ([EIP-4895](https://eips.ethereum.org/EIPS/eip-4895)), and Blockscout will provide views for partial and full withdrawals.
Withdrawals are akin to simple transactions (though they are actually 0 gas balance increases) included in the block structure. Coins are transferred from a validator to a preset withdrawal address (either EOA or contract). Each withdrawal also includes a unique integer index starting from 0 and incrementing by 1 with each withdrawal.
The unique `index`, assigned `validatorIndex`, withdrawal receiving `address`, and `amount` are all included in the withdrawals structure and will be displayed on Blockscout on the block and addresses pages.
```json theme={null}
"withdrawals": [
{
"index": "0xbd8d0",
"validatorIndex": "0x81e",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d1",
"validatorIndex": "0x81f",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
],
```
```json theme={null}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x7",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"gasUsed": "0x0",
"hash": "0x5262de0c24b0cab3fdc32fadda1904f4698ab0b12d505bf733cf47cb3e60f7f7",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xf97e180c050e5ab072211ad2c213eb5aee4df134",
"mixHash": "0x08471cc3dbac65574f049af479631af782cf31c841710640ed615dc50670b378",
"nonce": "0x0000000000000000",
"number": "0xd62f",
"parentHash": "0xdabf9e7ebfad879ad44270c2a7a5ff8e848e72316def4d5b0305f2a1216089f7",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x465",
"stateRoot": "0x9f2a690353b6d8cfa75cb12347104f42d38463471cda1293696a6c3b685aa839",
"timestamp": "0x63af29e4",
"totalDifficulty": "0x1",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": [],
"withdrawals": [
{
"index": "0xbd8d0",
"validatorIndex": "0x81e",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d1",
"validatorIndex": "0x81f",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d2",
"validatorIndex": "0x820",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d3",
"validatorIndex": "0x821",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d4",
"validatorIndex": "0x822",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d5",
"validatorIndex": "0x823",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d6",
"validatorIndex": "0x824",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x651c03f6de00"
},
{
"index": "0xbd8d7",
"validatorIndex": "0x825",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d8",
"validatorIndex": "0x826",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8d9",
"validatorIndex": "0x827",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8da",
"validatorIndex": "0x828",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x1a2950b4af800"
},
{
"index": "0xbd8db",
"validatorIndex": "0x829",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8dc",
"validatorIndex": "0x82a",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8dd",
"validatorIndex": "0x82b",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8de",
"validatorIndex": "0x82c",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
},
{
"index": "0xbd8df",
"validatorIndex": "0x82d",
"address": "0xe7c180eada8f60d63e9671867b2e0ca2649207a8",
"amount": "0x6dcf0a644000"
}
],
"withdrawalsRoot": "0xb28f757020474ee478a03be8ca4a2efaa7ebddbf565129bb08202ce9a8670d44"
}
}
```
## UI display examples
### Block page example
### Address page example
# Blocks
Source: https://docs.blockscout.com/using-blockscout/overviews/blocks
Blocks update on the homepage as they are created with basic information including block number (block height), number of transactions in the block, and time since the block was created.
Click on a specific block number for information about that block, or **View All Blocks** for a more detailed overview of recent blocks.
The all blocks page can also be accessed from the top menu.
Blockscout displays are configurable and may show different information depending on the instance and/or consensus method. These examples use a V1 instance of the UI. **V2 views are in process.**
## View All Blocks
The view all blocks page shows updated details from the most recent blocks. Use the page arrows to navigate
#### Details by line
1. Number of transactions in the block / size of block in bytes / time since block was created.
2. Validator appending the block to the chain (fee recipient).
3. Reward to validator (in ETH). Equals the amount of priority fees sent by users to include transactions in the block.
4. Same as (3).
5. Portion of tx fee (in ETH) burned due to EIP-1559. Amount burned = `baseFeePerGas * gasUsed`
6. Block Gas limit. On Ethereum this is 30M gas: 2x the target size of 15M.
7. Amount of gas used in the block (amount and % of block space used). The blue line visualizes the %.
## Individual Block Page
Click on a block number (this number, also referred to as block height, indicates how many blocks have been added to the chain) to view additional details about the block. Scroll down to view individual transactions contained in a block.
Click on the tooltip (i) next to each item to view relevant info.
1. **Block Height**: Also known as block number, shows the position of the block on the chain.
2. **Timestamp**: Time & date the block was produced.
3. **Transactions**: Number of transactions included in the block.
4. **Fee Recipient**: Address of the validator (block producer) that received priority fees. Copy the address with the blue icon and paste into search to find more details about this validator.
5. **Size**: Size of the data contained in the block in bytes.
6. **Hash**: Cryptographic hash of the block header.
7. **Parent Hash**: Hash of the preceding block.
8. **Difficulty**: *NA for PoS. W*ork required to mine a block in PoW.
9. **Total Difficulty**: *NA for PoS.* Total difficulty to mine the chain up until this block.
10. **Gas Used**: Total amount of gas used in the block & % of filled space.
11. **Gas Limit**: Total gas limit for the block. 30M is Ethereum limit, which represents 2x the 15M target.
12. **Nonce**: *N/A for PoS*. Demonstrates work in PoW.
13. **Base Fee per Gas**: Minimum multiplier required for a transaction to be included in a block.
14. **Burnt Fees**: Amount of ETH burned in the block.
15. **Priority Fee/Tip**: Total tips for transactions included in the block
16. **Miner Reward**: Amount received by fee recipient in PoS. Matches (15).
Scroll below the block details to view transactions contained within the block.
# Glossary of Terms
Source: https://docs.blockscout.com/using-blockscout/overviews/glossary-of-terms
Under Construction
## Block Explorer Glossary
**Address**: A unique identifier for a wallet or smart contract on the blockchain.
**Block**: A group of transactions that have been verified and added to the blockchain.
**Block Height**: The number of blocks in the chain between any given block and the first block (genesis block).
**Contract**: Also known as a smart contract, it's a self-executing program stored on the blockchain.
**Gas**: The unit of measure for the computational work required to execute transactions or smart contracts on Ethereum.
**Gas Price**: The amount of cryptocurrency you're willing to pay per unit of gas for a transaction.
**Hash**: A unique fixed-length string of characters that represents data. In blockchain, it's used to identify blocks and transactions.
**Miner/Validator**: Entities that verify and add new transactions to the blockchain.
**Nonce**: A number used once, typically to verify the uniqueness of transactions.
**Pending Transaction**: A transaction that has been broadcast to the network but not yet included in a block.
**Token**: A type of cryptocurrency that represents a tradable asset or utility and is often built on top of an existing blockchain.
**Transaction**: The transfer of cryptocurrency or data between addresses on the blockchain.
**Transaction Fee**: The cost to process a transaction on the blockchain, typically paid to the chain miners or validators.
**Wallet**: A tool that allows users to store, send, and receive cryptocurrency.
*Note: Specific terms may vary slightly depending on the blockchain network and the block explorer being used.*
# Main Menu
Source: https://docs.blockscout.com/using-blockscout/overviews/top-menu
## V2 UI
*The following views are taken from the* [*Optimism Blockscout instance*](https://optimism.blockscout.com/)*.*
### Network Menu
Shows available Mainnet and Testnets.
### Blockchain Menu
Access transactions, blocks, batches and L1 \<-> L2 data.
### API Menu
Access API information including the REST API which serves the v2 UI.
## V1 UI
Many projects still use the previous Blockscout UI, and info below relates to the previous v1 UI. We encourage projects to [upgrade to the new U](/setup/deployment/frontend-migration)I.
## Top Menu
The top menu contains navigational items for exploration. The menu is customizable, and different instances can have different menus depending on the needs of the chain.
## Blocks
* **Blocks:** Access high-level data for blocks, beginning with the most recent.
* **Uncles:** Not valid for PoS consensus (but available for PoW consensus chains such as Ethereum Classic), uncles are created when 2 blocks are mined at the same time. Only 1 block can be added to the chain, and Uncles are the blocks that are not added, but miners still receive rewards for these blocks.
* **Forked Blocks (Reorgs):** Blocks which are not included in the primary chain due to chain reorganizations.
## Transactions
* **Mined**: Transactions which have been added to the chain, either by validators or miners depending on the chain type.
* **Pending**: Transactions still in the mempool which are waiting to be mined. These transactions may be mined or excluded depending on gas fees or network congestion.
## Tokens
Token menu is often configured differently depending on the instance.
* **All:** A list of ERC-20 tokens deployed to the chain.
* **Native** (ie **ETH** on mainnet): Displays native token holders, ordered by balance.
* **Bridged**: If a chain includes bridged tokens (ie [Gnosis Chain](https://gnosis.blockscout.com/)) these can be catalogued here.
## APIs
* **GraphQL**: Explore API calls using GraphQL and the in-browser IDE. Learn more about the [GraphQL Blockscout integration here](/devs/apis/graphql).
* **RPC**: API supporting GET and POST requests for many different API calls.
* **Eth RPC**: Supports the most popular [JSON RPC methods.](https://ethereum.github.io/execution-apis/api-documentation/)
## Apps
Customizable menu that can link to different ecosystem applications, utilities and statistics. [Gnosis Chain](https://gnosis.blockscout.com/) currently has the most robust example of the Apps menu.
## Networks
The current network name along with a dropdown displaying available instances. Self-hosted chains may choose to only show their Mainnet and testnets. Hosted instances typically include links to other Hosted instances including Ethereum, Ethereum Classic, and Gnosis Chain.
## Night Mode
Switch to a dark background using the night-mode toggle.
## Search Bar
The comprehensive search bar allows for search by address, token name, token symbol, transaction hash, block number, tag or project name. It is typically the easiest way to find data quickly, and populates with inline results as you type.
## Custom Project Logo
Also included in the top menu is the Project logo. Projects can add and change custom logo using ENV variables during deployment. [More info here](/setup/configuration-options/branding-configs).
# Transaction Fields
Source: https://docs.blockscout.com/using-blockscout/overviews/transaction-fields
Description of your new file.
# Blockscout Transaction Fields Reference Guide
Example transaction on Ethereum
## Transaction Summary (Header)
| Field | Description | Format/Example | Purpose |
| :---------------------- | :------------------------------------- | :------------------------------------- | :------------------------------------- |
| **Transaction Summary** | Quick overview of transaction action | "β‘ Transfer 0.0019 ETH to 0x1e...2988" | Instant understanding of what happened |
| **Transaction Icon** | Visual indicator of transaction type | Lightning bolt (β‘) for transfers | Quick visual identification |
| **Amount Display** | Primary value being transferred | "0.0019 ETH" | Main transaction amount |
| **Recipient Address** | Shortened destination address | "0x1e...2988" with copy button | Quick recipient identification |
| **View Counter** | Number of times transaction was viewed | "π 8" | Shows transaction popularity/interest |
## Transaction Overview Fields
| Field | Description | Format/Example | Purpose |
| :-------------------- | :------------------------------------------------ | :------------------------------------------------------------ | :-------------------------------------------------------- |
| **Transaction Hash** | Unique identifier for this specific transaction | 66-character hex string starting with "0x" | Transaction's "receipt number" for tracking and reference |
| **Status and Method** | Current state and transaction type | β Success | Shows whether transaction completed successfully |
| **Block** | Block number and confirmations | 22933572 | Show BlockNumber |
| **Timestamp** | When transaction was mined with confirmation time | π 8m ago | Reflects timestamp: Jul 16 2025 12:33:59 PM (-06:00 UTC) |
| **Sponsored** | Advertisement or sponsored content section | Ad banner with "Advertise to" message | Supports open source block explorer |
| **From** | Sender address with label | "π΄ Huobi: Deposit Funder 7" with copy button | Identified sender (exchange, contract, etc.) |
| **To** | Recipient address | π‘ 0x1ec7cB3FE99bD07E6faBa7D296857bCC102988" with copy button | Destination address |
## Blockscout-UI Features
| Feature | Description | Location | Purpose |
| :--------------------------- | :--------------------------------------- | :----------------------- | :----------------------------------- |
| **Transaction Summary Line** | Quick overview with icon and key details | Top of page | Instant understanding of transaction |
| **View Counter** | Shows transaction popularity | Next to summary | Community interest indicator |
| **Address Labels** | Known entity identification | From/To fields | Better context than raw addresses |
| **Sponsored Content** | Advertisement section | Middle of details | Revenue for block explorer |
| **Copy Buttons** | Quick copy functionality | Next to addresses/hashes | User convenience |
| **Tabbed Navigation** | Organized information sections | Below summary | Easy access to different data types |
| **Color-Coded Status** | Visual status indicators | Status field | Quick success/failure identification |
| **Confirmation Speed** | Time to confirmation | Timestamp field | Network performance insight |
## Navigation Tabs
| Tab | Description | Contents | Purpose |
| :------------------ | :----------------------------- | :----------------------------------------- | :-------------------------------------- |
| **Details** | Main transaction information | Hash, status, block, addresses, gas, value | Primary transaction data |
| **Token transfers** | ERC token movements | Token name, amount, from/to addresses | Track token transfers separate from ETH |
| **User operations** | Account abstraction operations | User operation details for AA wallets | Advanced wallet interactions |
| **Internal txns** | Internal transactions | Contract-to-contract calls | See all sub-transactions |
| **Logs** | Event logs from contracts | Contract events and their data | Smart contract activity |
| **State** | State changes | Storage and balance modifications | What changed on the blockchain |
| **Raw trace** | Complete execution trace | Step-by-step execution details | Debug and analysis |
## Visual Elements and Icons
| Element | Description | Meaning | Context |
| :-------------------- | :------------------------- | :--------------------------------- | :-------------------------- |
| **β‘ Lightning Icon** | Transaction type indicator | Fast/standard transaction | Used in transaction summary |
| **π΄ Red Circle** | Address label indicator | Exchange or known entity | Huobi exchange identifier |
| **π‘ Yellow Circle** | Address label indicator | Contract or user wallet | Regular address marker |
| **β Green Checkmark** | Success status | Transaction completed successfully | Status indicator |
| **π Eye Icon** | View counter | Number of page views | Popularity metric |
| **π Copy Button** | Copy to clipboard | Click to copy address/hash | User convenience |
| **π Clock Icon** | Timestamp indicator | Time-related information | Timing reference |
## Transaction Details Fields
| Field | Description | Format/Example | Purpose |
| :------------------ | :------------------------------------------------------- | :------------------------------- | :-------------------------------------------------------- |
| **From Address** | Wallet address that initiated the transaction | Labeled address with copy button | Identifies the sender with context |
| **To Address** | Destination address for the transaction | Labeled address with copy button | Identifies recipient with context |
| **Value** | Amount of native currency (ETH) transferred | ETH amount with USD equivalent | Shows direct ETH transfer (separate from token transfers) |
| **Transaction Fee** | Total cost paid to miners/validators | ETH amount with USD equivalent | Total processing cost |
| **Nonce** | Sequential counter for transactions from sending address | Number (e.g., 1,247) | Prevents replay attacks and ensures ordering |
## Gas Information Fields
| Field | Description | Format/Example | Purpose |
| :------------------- | :----------------------------------------------- | :------------------------------------------- | :------------------------------------------------- |
| **Gas Limit** | Maximum gas the sender was willing to pay | Number (e.g., 21,000) | Upper bound on computational work |
| **Gas Used** | Actual gas consumed by the transaction | Number with percentage (e.g., 21,000 (100%)) | Actual computational work performed |
| **Gas Price** | Price per unit of gas | Gwei amount (e.g., 20.5 Gwei) | Cost per unit of computation |
| **Max Fee Per Gas** | Maximum fee willing to pay per gas unit (Type 2) | Gwei amount (e.g., 25 Gwei) | EIP-1559 fee mechanism for predictable fees |
| **Max Priority Fee** | Maximum tip willing to pay to miners (Type 2) | Gwei amount (e.g., 2 Gwei) | Incentivizes miners to include transaction quickly |
| **Base Fee Per Gas** | Network's base fee at transaction time (Type 2) | Gwei amount (e.g., 18.5 Gwei) | Burned portion of fee (not given to miners) |
## Transaction Type Fields
| Field | Description | Format/Example | Purpose |
| :------------------- | :------------------------------------- | :----------------------------- | :----------------------------------------- |
| **Transaction Type** | EIP standard used for this transaction | Type 0, Type 1, Type 2 | Indicates fee mechanism and features |
| **Type 0** | Legacy transactions | Standard format | Original transaction format |
| **Type 1** | EIP-2930 (Access List) | With access list | Gas optimization for contract interactions |
| **Type 2** | EIP-1559 (Dynamic Fee) | With base fee and priority fee | More predictable fee mechanism |
| Type 3 | EIP-4844 (Blobs) | Blob carrying transaction | Accomodate batched data |
## Input Data Fields
| Field | Description | Format/Example | Purpose |
| :----------------------- | :------------------------------------------ | :---------------------------- | :-------------------------------------------- |
| **Input Data** | Data payload sent with transaction | Hexadecimal string | Contains function calls and parameters |
| **Method ID** | First 4 bytes identifying contract function | 4-byte hex (e.g., 0xa9059cbb) | Identifies which contract function was called |
| **Input Data (Hex)** | Raw hexadecimal data | 0x followed by hex characters | Raw transaction data |
| **Input Data (UTF-8)** | Human-readable text format | Plain text (when applicable) | Readable version of data |
| **Input Data (Decoded)** | Function calls with parameter names | Function name and parameters | User-friendly view of contract interactions |
## Token Transfer Fields
| Field | Description | Format/Example | Purpose |
| :----------------- | :------------------------------------ | :------------------------ | :------------------------------------- |
| **Token Name** | Name of the transferred token | Text (e.g., "USD Coin") | Identifies the token being transferred |
| **Token Symbol** | Token's ticker symbol | Text (e.g., "USDC") | Short identifier for the token |
| **Token Amount** | Quantity of tokens transferred | Number with decimals | Amount being moved |
| **Token Type** | Standard used for the token | ERC-20, ERC-721, ERC-1155 | Indicates token functionality |
| **From Address** | Token sender address | 42-character hex string | Who sent the tokens |
| **To Address** | Token recipient address | 42-character hex string | Who received the tokens |
| **Token Contract** | Address of the token's smart contract | 42-character hex string | Contract managing this token |
## Event Logs Fields
| Field | Description | Format/Example | Purpose |
| :------------------- | :------------------------------- | :---------------------- | :--------------------------------- |
| **Log Index** | Sequential numbering of events | Number (e.g., 0, 1, 2) | Order of events within transaction |
| **Contract Address** | Address that emitted the event | 42-character hex string | Source of the event |
| **Event Name** | Name of the emitted event | Text (e.g., "Transfer") | Type of event that occurred |
| **Topics** | Indexed event parameters | Array of hex strings | Searchable event data |
| **Data** | Non-indexed event data | Hex string | Additional event information |
| **Decoded Logs** | Human-readable event information | Structured data | User-friendly view of events |
## State Changes Fields
| Field | Description | Format/Example | Purpose |
| :------------------ | :------------------------ | :---------------------- | :--------------------------- |
| **Address** | Account that changed | 42-character hex string | Which account was modified |
| **Storage Changes** | Before and after values | Hex values | What data changed in storage |
| **Balance Changes** | ETH balance modifications | ETH amounts | How balances changed |
| **Nonce Changes** | Account nonce updates | Number changes | Transaction counter updates |
## Status Indicators
| Status | Visual Indicator | Meaning | Next Steps |
| :---------- | :--------------- | :---------------------------------- | :------------------------------------ |
| **Success** | Green checkmark | Transaction completed successfully | Transaction is final |
| **Failed** | Red X | Transaction failed during execution | Check revert reason, retry if needed |
| **Pending** | Orange clock | Transaction waiting to be mined | Wait for confirmation or increase gas |
| **Dropped** | Gray indicator | Transaction removed from mempool | Resubmit with higher gas price |
## Additional Information Fields
| Field | Description | Format/Example | Purpose |
| :---------------------- | :------------------------------------ | :---------------------- | :------------------------------- |
| **Block Hash** | Unique identifier for the block | 66-character hex string | Reference to containing block |
| **Block Timestamp** | When the block was mined | UTC timestamp | Block creation time |
| **Transaction Receipt** | Proof of transaction processing | JSON data | Technical execution details |
| **Raw Transaction** | Complete transaction data | JSON format | Developer-level transaction info |
| **Revert Reason** | Error message for failed transactions | Text description | Explains why transaction failed |
## Common Transaction Patterns
| Pattern | From Address | To Address | Value | Input Data | Tokens Transferred |
| :----------------------- | :----------- | :------------- | :------ | :---------------- | :----------------- |
| **Simple ETH Transfer** | User wallet | User wallet | > 0 ETH | Empty/minimal | None |
| **Token Transfer** | User wallet | Token contract | 0 ETH | Function call | Token amount |
| **Contract Interaction** | User wallet | Contract | 0 ETH | Function data | Possibly tokens |
| **Contract Creation** | User wallet | null | 0 ETH | Contract bytecode | None |
| **Multi-token Transfer** | User wallet | Contract | 0 ETH | Function call | Multiple tokens |
## Troubleshooting Guide
| Issue | Possible Causes | What to Check |
| :------------------------ | :------------------------------------ | :--------------------------------------------------------- |
| **Transaction Not Found** | Wrong hash, wrong network, too recent | Verify hash, check network, wait for indexing |
| **Failed Transaction** | Out of gas, revert, invalid input | Check gas limit, read revert reason, verify input |
| **High Gas Fees** | Network congestion, complex operation | Check gas price, simplify transaction, wait for lower fees |
| **Pending Too Long** | Low gas price, network issues | Increase gas price, check network status |
| **Wrong Token Amount** | Decimal confusion, display issue | Check token decimals, verify actual amount |
**Quick Reference:** Use Ctrl+F to search for specific field names in this guide. All fields are organized by the section they appear in on the Blockscout transaction page.
# Transaction Types
Source: https://docs.blockscout.com/using-blockscout/overviews/transaction-types
Different types of transactions are categorized in the Blockscout UI to allow for quick identification. Types include:
* **Blob txn:** 4844-type transactions which include large amounts of data
* **Coin transfer**: value transfer, value >= 0, no tx input
* **Contract call**: tx input is present (any value including 0)
* **Contract creation**: creation of a smart-contract
* **Token burning**: recognized token transfer of any of ERC-20, 721, 1155 token instance (single or bulk) to 0x0000... address
* **Token creation**: creation of token instance in ERC-1155
* **Token minting**: token transfer of any of ERC-20, 721, 1155 token instance (single or bulk) from 0x0000... address
* **Token transfer**: token transfer of any of ERC-20, 721, 1155 token instance (single or bulk)
* **Transaction**: A contract call where the contract has not yet been identified by Blockscout.
# Token Support
Source: https://docs.blockscout.com/using-blockscout/token-support
Blockscout supports the following token types:
* ERC-20: Fungible tokens
* Standard for interchangeable tokens
* Used for cryptocurrencies, stablecoins, utility tokens
* ERC-721: Non-fungible tokens (NFTs)
* Unique, indivisible tokens
* Often used for digital art, collectibles, game items
* ERC-1155: Multi-token standard
* Combines fungible and non-fungible tokens
* Efficient for gaming and complex ecosystems
* ERC-777: Advanced fungible tokens (basic indexing but no additional views, provides similar info to ERC-20)
* Adds features like operator support and hooks
* Backward compatible with ERC-20.
* ERC-4626: Tokenized Vaults (basic indexing but no additional views, provides similar info to ERC-20)
* Standard for yield-bearing tokens
* Used in DeFi for lending and yield farming
# ERC 1155 Support
Source: https://docs.blockscout.com/using-blockscout/token-support/erc-1155-support
Basic support for ERC-1155s
[ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) contracts are designed to support multiple token types within a single contract. This standard is being adopted rapidly for efficiency and optimization, and is being used to bundle multi-token transactions and approvals while supporting both fungible and non-fungible tokens.
Recognition and labelling for ERC-1155 contracts, indexing instance balances for both fts and nfts, parsing single and batched transactions, and monitoring and displaying minting events are included.
## GnosisChain Example
ERC-1155s are supported for the Gnosis Chain and any new ERC-1155 instances are recognized on deployment. For ERC-1155 contracts created prior to the enhanced support, a new single or batched transfer, mint, or token instance creation triggers contract recognition.
[https://gnosis.blockscout.com/token/0x93d0c9a35c43f6BC999416A06aaDF21E68B29EBA?tab=token\_transfers](https://gnosis.blockscout.com/token/0x93d0c9a35c43f6BC999416A06aaDF21E68B29EBA?tab=token_transfers)
# Widgets
Source: https://docs.blockscout.com/using-blockscout/widgets
Quick access to essential 3rd party address and contract info
If your project would like to incorporate a widget into the explorer, please [contact us in Discord](https://discord.gg/blockscout). Learn more -> [Widgets Deck](/images/widgets-deck.pdf)
## Overview
Blockscout Widgets deliver contextual data from third-party protocols directly on address and contract pages. Essential information about onchain identity, activity, security amd ecosystem participation provides a broad overview of relevant information.
## Viewing Widgets
1. Navigate to any externally owned account (EOA) address, ENS name (like [vitalik.eth](https://eth.blockscout.com/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045)) or contract (i.e. the [UniV2 factory contract](https://eth.blockscout.com/address/0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f)) in your Blockscout explorer.
2. Scroll down to the Widgets section below the address/contract details to view widgets.
3. You can also view via the **Widgets tab** for any address or contract, which will show all available widgets.
## Key Features
### Enhanced Address Insights
Widgets display engagement and activity across the Web3 ecosystem, providing a holistic view beyond basic balances and transactions.
### Security & Risk Assessment
For contracts and tokens, widgets surface risk scores, audit information, complexity metrics, and other security analytics.
### Ecosystem Integration
Blockscout integrates with multiple protocols. Additional details are provided in the Available Widgets section.
**Address Pages**
* **Talent Protocol:** Onchain creator score
* **Drops**: Airdrop checker
* **GitPOAP**: Contributor reward badges
* **Blockscout Badges**: Minted Blockscout badges
* **Ethereum Follow Protocol (EFP)**: Onchain social graph
* **EtherScore**: Onchain reputation badges
* **Webacy**: Risk analysis
* **Human Passport**: Humanity verificaiton
* **Humanode**: Onchain biomapper
**Contract Pages**
* **Webacy**: Risk score
* **Trustblock**: Audit info
* **SmartMUV**: Contract Complexity
## Supported Networks
Widgets are available on Blockscout hosted chains including:
* Ethereum Mainnet
* Optimism
* Base
* Arbitrum
* Celo
* Gnosis
* Soneium
* Polygon
## Benefits
### For Users
* Comprehensive onchain identity view
* Quick access to ecosystem participation data
* Security assessment at a glance
* Airdrop eligibility tracking
### For Developers
* Contract complexity analysis
* Audit verification
* Risk assessment tools
* Integration opportunities
### For the Ecosystem
* Enhanced transparency
* Improved security awareness
* Stronger protocol integrations
* Better user experience
## Currently Available Widgets
Widgets show an overview score. Each widget can be clicked on to reveal additional details.
### Address Page Widgets
#### Creator Score
**Source:** Talent Protocol
Measures a content creator's reputation by analyzing data from various platforms. The Creator Score evaluates both quantity and quality of work using verifiable data points, providing comprehensive assessment of a creator's influence and trustworthiness.
**Additional available details:**
* Overall creator score
* Platform-specific scores (Farcaster, Lens, etc.)
* Total earnings
* Content quality metrics
#### Drops
**Source:** Drops (Airdrop Checker)
Automatically identifies unclaimed crypto airdrops by monitoring wallet addresses across multiple networks. Shows eligibility for recent and verified airdrops.
**Additional available details:**
* Eligible airdrops
* Claimable amounts
* Claimed rewards history
* Airdrop status
**Features:**
* Multi-network monitoring
* Telegram alerts for new airdrops
* Real-time eligibility checking
#### GitPOAP
**Source:** GitPOAP
Rewards and permanently records contributions to open-source projects via GitHub using the POAP (Proof of Attendance Protocol) model. Provides public, permissionless, onchain verification of open-source contributions.
**Additional available details:**
* Total GitPOAPs earned
* Project contributions
* Contribution history
* GitHub integration status
#### Blockscout Badges
**Source:** Blockscout Merits
Limited-edition NFT badges celebrating community involvement in Blockscout campaigns and contributions.
**Additional available details:**
* Earned merits
* Referral count
* Activity streaks
* Collectible NFT badges
#### EFP Followers
**Source:** Ethereum Follow Protocol (EFP)
Onchain social graph protocol for Ethereum accounts that complements ENS. Enables users to follow or tag other addresses through NFT lists, creating a decentralized social network.
**Additional available details:**
* Follower count
* Following list
* Recent transactions
* Social connections
#### Onchain Achievement Badges
**Source:** EtherScore
Represents onchain achievements completed across DeFi protocols, NFT platforms, and DAOs. Each badge signifies a specific milestone or activity in Web3.
**Additional available details:**
* Total badge count
* Badge categories
* Achievement progress
* Protocol integrations
#### Address/Contract Risk Score (available for both)
**Source:** Webacy
Numerical assessment evaluating potential security threats, compliance issues, or suspicious activities associated with a wallet address.
**Additional available details:**
* Overall risk rating (Low/Medium/High)
* Suspicious activity flags
* Security warnings
* Risk analysis details
**Purpose:**
* Assess wallet security status
* Identify potential threats
* Provide security insights
#### Humanity Score
**Source:** Gitcoin Passport
Proof-of-personhood system using verifiable credentials ("stamps") from trusted web2 and web3 sources to verify humanity without compromising privacy. Helps distinguish real humans from bots and Sybil attacks.
**Additional available details:**
* Unique Humanity Points
* HUMN Points
* Collected stamps
* Verification status
**Stamp Sources:**
* Government ID
* Biometrics
* ENS domains
* Social profiles
* Other verified credentials
#### Biomapper Score
**Source:** Humanode
Biomapper is an on-chain, private facial recognition tool that provides Sybil resistance by ensuring each verified person can link only one EVM-compatible address to a dApp
**Additional available details:**
* Humanode biomapper verification status
**Purpose:**
* Shows if a user is verified with biomapper, proving they are a unique human via facial recognition.
### Contract Page Widgets
#### Audits
**Source:** Trustblock
Displays verified smart contract audits recorded onchain through Trustblock, a web3 protocol for audit transparency.
**Requirements:**
* Auditors and audit firms must publish contracts on Trustblock for audits to appear
**Additional available details:**
* Audit status
* Auditor information
* Audit reports
* Verification details
#### Complexity Score
**Source:** SmartMuv Explorer
Evaluates the structural complexity of a smart contract's storage layout. Primarily intended for developers and auditors who need to understand, migrate, or upgrade smart contracts safely.
**Additional available details:**
* Layout summary
* Deep analysis
* Complexity score
* Storage structure breakdown
**Use Cases:**
* Contract migration planning
* Upgrade safety assessment
* Security auditing
* Development review