CW20 Tokens
CW20 tokens are smart contract-based tokens built on the CosmWasm framework. OroSwap fetches token metadata for CW20 tokens directly from the smart contract's marketing metadata.
How OroSwap Fetches CW20 Token Information
Token Metadata Source
OroSwap retrieves CW20 token information from the token's marketing metadata stored in the smart contract.
Logo Fetching Process
- Contract Query: The system queries the CW20 smart contract for marketing metadata
- URL Extraction: The logo URL is retrieved from the token's marketing metadata
- Logo Display: The logo is fetched and displayed in the OroSwap interface
Token Information Retrieved
- Symbol: Token symbol from contract metadata
- Exponent: Decimal precision from contract metadata
- Logo: Token icon/logo from marketing metadata
Updating CW20 Token Metadata
To update the logo or other marketing information for a CW20 token, you need to update the smart contract's marketing metadata.
Steps to Update logo in case of CW20 token: CosmWasm CW20 Documentation - Messages
This process allows token creators to update their token's branding and marketing information directly through the smart contract.
Example
When a user interacts with a CW20 token, OroSwap:
- Identifies the token as a CW20 token by its contract address
- Queries the smart contract for token metadata
- Retrieves marketing information including logo URL
- Displays the token with proper branding and information
This approach ensures that CW20 tokens display with their official branding as defined by the token creators in their smart contract metadata.