Skip to content

Search functionality for smart contracts in the block explorer #22

@lufa23

Description

@lufa23

Summary

Enable users to search for smart contract IDs in the block explorer, alongside existing Block/Hash searches, to provide detailed information about smart contracts directly within the block explorer interface. If the searched smart contract ID does not match a contract, display a user-friendly error message (e.g., “Smart contract ID not found.”).

Possible solution design or implementation

In the block explorer's search bar, we should add support for searching smart contract IDs.

If the entered ID corresponds to a deployed smart contract, redirect the user to a detailed Smart Contract Overview Page.

The Smart Contract Overview Page should display useful information such as:

  • contract name (e.g., "Tether")
  • contract type (e.g., TC, XC ...)
  • contract address
  • number of token decimals (if applicable)
  • maximum supply (if applicable)
  • circulating supply (if applicable)

Potentially, it would be great if we could show other metadata such as

  • Number of total transfers
  • List of recent transactions involving the contract
  • Number of token holders
  • Verification details of contract's source code

as well as allowing users to search by partial smart contract names or token symbols (e.g., "Tether" or "USDT").

Completion Criteria:

  • Users can input a valid smart contract ID into the search bar, and the block explorer successfully retrieves and displays the corresponding contract overview page.

The contract overview page displays:

  • Basic contract information (name, type, supply metrics).
  • Number of holders
  • Number of total transfers
  • Verified contract source code
  • List of recent transactions

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureimplementing a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions