Skip to content

Add NFT explorer URLs#1025

Open
DRadmir wants to merge 5 commits intomainfrom
nft-explorer-urls
Open

Add NFT explorer URLs#1025
DRadmir wants to merge 5 commits intomainfrom
nft-explorer-urls

Conversation

@DRadmir
Copy link
Contributor

@DRadmir DRadmir commented Mar 24, 2026

No description provided.

@DRadmir DRadmir self-assigned this Mar 24, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the block explorer integration by adding support for Non-Fungible Token (NFT) URLs. It introduces a new method to the core BlockExplorer trait, extends the metadata structure to accommodate NFT paths, and updates all existing explorer implementations to leverage this new capability. This change allows for direct linking to NFT details on various blockchain explorers, improving the utility and completeness of the block explorer service.

Highlights

  • New NFT URL Functionality: Introduced a new get_nft_url method to the BlockExplorer trait, enabling the generation of URLs for Non-Fungible Tokens (NFTs) on supported block explorers.
  • Metadata Extension: Added an nft_path field to the Metadata struct, which is used by various block explorer implementations to construct NFT-specific URLs.
  • Explorer Implementations Updated: Updated all existing block explorer implementations (e.g., Algorand, Aptos, Solana, TON, Tronscan) to initialize the new nft_path field, defaulting to None where NFT-specific paths are not yet available.
  • Solana Explorer Refactoring: Refactored the Solana block explorer logic to use a dedicated SolanaExplorer struct, which now includes a get_nft_url implementation that reuses the get_token_url logic.
  • API Exposure and Testing: Exposed the new NFT URL functionality through the gemstone crate's Explorer struct and added comprehensive unit tests to ensure correct URL generation for NFTs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for NFT URLs across the block explorer functionality. It adds a get_nft_url method to the BlockExplorer trait, updates the Metadata struct to include an nft_path field, and integrates this new field into various block explorer implementations and their constructors. The changes also include corresponding test updates. A review comment highlights an inconsistency in the full constructor for Metadata, where the nft_path is set to None despite the constructor being described as "full-featured".

address_path: ADDRESS_PATH,
token_path: Some(TOKEN_PATH),
nft_path: None,
validator_path: Some(VALIDATOR_PATH),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The full constructor is documented as creating a "full-featured explorer with all standard paths", but it's setting nft_path to None. To be consistent with the documentation and the function's intent, it should be configured with the NFT path.

The corresponding test in test_metadata_helpers will also need to be updated to assert Some(NFT_PATH) for full.nft_path.

Suggested change
validator_path: Some(VALIDATOR_PATH),
nft_path: Some(NFT_PATH),

@DRadmir DRadmir force-pushed the nft-explorer-urls branch from 90db27d to 196591a Compare March 25, 2026 08:44
@DRadmir DRadmir force-pushed the nft-explorer-urls branch from 196591a to f01ba34 Compare March 25, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants