IBC Tokens
IBC (Inter-Blockchain Communication) tokens are tokens that have been transferred from other blockchains to ZIGChain through the IBC protocol. OroSwap uses a predefined registry to fetch token information for IBC tokens.
How OroSwap Fetches IBC Token Information
Token Registry Source
OroSwap sources IBC token information from a predefined GitHub registry based on the token's denomination.
Registry Location: OroSwap Tokens List
Token Information Retrieved
- Symbol: Token symbol for display
- Exponent: Decimal precision for calculations
- Icon: Token icon/logo for UI display
- Chain Information: Source blockchain details
Icon Fetching Process
- Denomination Lookup: The system uses the IBC token's denomination to look up information in the registry
- Metadata Retrieval: Token metadata including logo URL is fetched from the predefined registry
- Logo Display: The logo is displayed in the OroSwap interface
Registry Structure
The OroSwap tokens list registry contains:
- Token denominations and their corresponding metadata
- Logo URLs for each supported IBC token
- Decimal precision information
- Token symbols
- Source chain information
Example
When a user interacts with an IBC token like ibc/... (transferred from another chain), OroSwap:
- Identifies the token as an IBC token by its denomination format
- Queries the OroSwap tokens list registry using the denomination
- Retrieves the token's metadata including Icon URL
- Displays the token with proper branding and information
This centralized registry approach ensures consistent token representation across the OroSwap ecosystem and makes it easy to add support for new IBC tokens.
Adding New IBC Tokens
To add support for new IBC tokens, you need to add the token information to the OroSwap tokens list registry. Follow these detailed steps:
Step-by-Step Process
-
Fork the Repository
- Fork the OroSwap Tokens List repository
- Clone your fork to your local machine
-
Add Token Details
- Navigate to the
tokenListsdirectory - Add the token details in an existing token list file
- Include all required fields: denomination, symbol, name, decimals, logo URI
- Navigate to the
-
Add Token Logo
- Add or refer to a token logo in the
imgdirectory - Logo Requirements:
- Use PNG or SVG format only
- Save in subdirectory:
/img/TOKEN_SYMBOL/ - Maximum resolution: 350x350 pixels
- Optimize file size for web performance
- Update the
urifield in the token list to point to your logo
- Add or refer to a token logo in the
-
Create Pull Request
- Commit your changes with a descriptive message
- Create a Pull Request (PR) with your changes
- Provide details about the token and its source chain
- Wait for review and approval from the Admin.
Token List Format
When adding a token, ensure your entry follows this structure:
{
"protocol": "noble",
"denom": "ibc/6490A7EAB61059BFC1CDDEB05917DD70BDF3A611654162A1A47DB930D40D8AF4",
"symbol": "USDC",
"exponent": 6,
"uri": "https://raw.githubusercontent.com/oroswap/oroswap-tokens-list/main/img/USDC/logo.png",
"token_type": "native",
"coingeckoId": "usd-coin",
"originDenom": "uusdc",
"originChainId": "noble-1"
}
Important Notes
- Logo Quality: Ensure logos are high-quality and recognizable
- Naming Convention: Use consistent naming for token symbols
- Verification: Double-check denomination and decimal precision
- Testing: Verify the token displays correctly after addition
This process ensures that the token will display correctly with its proper icon and metadata in the OroSwap interface across all supported platforms.