Skip to content

feat: cross-chain token compatibility validation layer, hook, and integration#98

Merged
mijinummi merged 1 commit intoMDTechLabs:mainfrom
Cybermaxi7:feat/token-compatibility-validation
Feb 25, 2026
Merged

feat: cross-chain token compatibility validation layer, hook, and integration#98
mijinummi merged 1 commit intoMDTechLabs:mainfrom
Cybermaxi7:feat/token-compatibility-validation

Conversation

@Cybermaxi7
Copy link
Contributor

✨ Cross-Chain Token Compatibility Validation

Overview

This PR implements a robust cross-chain token compatibility validation layer for BridgeWise, ensuring users and developers cannot attempt unsupported or invalid token transfers between Stellar and EVM networks.

Features

  • Centralized Token Registry:
    • Defines supported tokens per chain and bridge in a single, extensible source.
  • Validation Logic:
    • Utility function isTokenSupported(token, sourceChain, destinationChain) returns structured validation results and errors.
  • SSR-Safe Hook:
    • useTokenValidation(token, sourceChain, destinationChain) hook for UI and headless integration.
  • Quote Integration:
    • Validation is enforced in useBridgeQuotes to prevent fetching quotes for unsupported tokens, with clear error feedback.
  • UI/Headless Ready:
    • Structured errors and validation results for both UI components and programmatic use.

Developer Experience

  • Prevents unsupported or non-existent token transfers.
  • Reduces failed transactions and improves UX.
  • Simple API for validation in both UI and backend/headless flows.

Example Usage

const { isValid, errors } = useTokenValidation('USDC', 'Ethereum', 'Stellar');

closes #68 
closes #71 

@mijinummi mijinummi merged commit 3be0871 into MDTechLabs:main Feb 25, 2026
1 check failed
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