Skip to content

Comments

Add new chain assets and reserved fees for Near Intents#965

Merged
0xh3rman merged 1 commit intomainfrom
near-intents-more
Feb 23, 2026
Merged

Add new chain assets and reserved fees for Near Intents#965
0xh3rman merged 1 commit intomainfrom
near-intents-more

Conversation

@0xh3rman
Copy link
Collaborator

@0xh3rman 0xh3rman commented Feb 21, 2026

  • Introduce asset constants and NEAR intent mappings for additional chains and tokens (Berachain, Gnosis, Stellar, XLayer, Monad, Plasma, Litecoin, BitcoinCash).
  • Update imports to include new USDC/USDT asset IDs and add NEAR_INTENTS entries (native and token-specific) plus asset_key mappings.
  • Also add reserved native fee amounts for Litecoin, BitcoinCash, Monad, XLayer and Plasma to ensure correct fee reservation for these chains.

Introduce asset constants and NEAR intent mappings for additional chains and tokens (Berachain, Gnosis, Stellar, XLayer, Monad, Plasma, Litecoin, BitcoinCash). Update imports to include new USDC/USDT asset IDs and add NEAR_INTENTS entries (native and token-specific) plus asset_key mappings. Also add reserved native fee amounts for Litecoin, BitcoinCash, Monad, XLayer and Plasma to ensure correct fee reservation for these chains.
@semanticdiff-com
Copy link

semanticdiff-com bot commented Feb 21, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  crates/swapper/src/near_intents/assets.rs  21% smaller
  crates/primitives/src/asset_constants.rs  0% smaller
  crates/swapper/src/near_intents/fees.rs  0% smaller

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @0xh3rman, 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 expands the platform's support for various blockchain networks and their associated tokens. It integrates new asset identifiers and establishes the necessary NEAR intent mappings, enabling the system to recognize and interact with these additional chains and their specific assets. Furthermore, it sets up the required native fee reservations for these newly supported networks, ensuring smooth operation for transactions involving them.

Highlights

  • New Asset Constants: Introduced new asset ID constants for USDT on Berachain and Gnosis, USDC on Stellar and XLayer, and USDT on XLayer.
  • NEAR Intent Mappings: Added NEAR intent mappings for native assets on Litecoin, BitcoinCash, Monad, XLayer, and Plasma, as well as token-specific mappings for USDT on Berachain, Gnosis, Monad, XLayer, and Plasma, and USDC on Monad and XLayer.
  • Reserved Native Fees: Configured reserved native fee amounts for Litecoin, BitcoinCash, Monad, XLayer, and Plasma to ensure proper transaction fee handling.

🧠 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.

Changelog
  • crates/primitives/src/asset_constants.rs
    • Added USDT_BERA_ASSET_ID for Berachain.
    • Added USDT_GNOSIS_ASSET_ID for Gnosis.
    • Added USDC_STELLAR_ASSET_ID for Stellar.
    • Added USDC_XLAYER_ASSET_ID and USDT_XLAYER_ASSET_ID for XLayer.
  • crates/swapper/src/near_intents/assets.rs
    • Imported new asset constants including USDC_MONAD_ASSET_ID, USDC_XLAYER_ASSET_ID, USDT_BERA_ASSET_ID, USDT_GNOSIS_ASSET_ID, USDT_MONAD_ASSET_ID, USDT_PLASMA_ASSET_ID, and USDT_XLAYER_ASSET_ID.
    • Added new NEAR_INTENTS constants for Litecoin (native), BitcoinCash (native), Berachain (USDT), Gnosis (USDT), Monad (native, USDT, USDC), XLayer (native, USDT, USDC), and Plasma (native, USDT).
    • Updated NEAR_INTENTS_ASSETS map to include USDT for Berachain and Gnosis.
    • Added new entries to NEAR_INTENTS_ASSETS map for Litecoin, BitcoinCash, Monad (native, USDT, USDC), XLayer (native, USDT, USDC), and Plasma (native, USDT).
  • crates/swapper/src/near_intents/fees.rs
    • Added reserved native fees for Litecoin (0.001 LTC), BitcoinCash (0.001 BCH), Monad (0.005 MON), XLayer (0.005 OKB), and Plasma (0.005 XPL).
Activity
  • No specific human activity (comments, reviews, approvals) has been recorded for this pull request yet.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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 several new chains and tokens by adding their asset constants, NEAR intent mappings, and reserved fee amounts. The changes cover Berachain, Gnosis, Stellar, XLayer, Monad, Plasma, Litecoin, and BitcoinCash. The implementation is straightforward, adding new entries to existing data structures. I've pointed out a minor issue related to what appears to be incomplete support for Stellar USDC, where a constant is added but not used, and a related mapping is commented out. It would be cleaner to remove this code until the feature is fully ready.

@0xh3rman 0xh3rman changed the title Add new chain assets and reserved fees Add new chain assets and reserved fees for Near Intents Feb 21, 2026
@0xh3rman 0xh3rman marked this pull request as ready for review February 23, 2026 09:20
@0xh3rman 0xh3rman merged commit eabc8b4 into main Feb 23, 2026
4 checks passed
@0xh3rman 0xh3rman deleted the near-intents-more branch February 23, 2026 09:22
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