MegaYours Docs
  • 🚀MegaYours
    • Extending your on chain data
  • 💾Megadata
    • Solana Integration
  • 🌎Yours Protocol
    • 🤔Getting Started
      • Setting up Your Project
      • Creating Your First Module
      • Creating & Minting Tokens
      • Composable Tokens
      • Making Your Tokens Interoperable
    • 💱Tokens
      • Types
      • Functions
      • Unique Identifier
    • 🧩Modules
      • 🔌Attaching Modules
      • 🌈Relationships
      • 🎭ERC1155
      • 📚Declaration
      • 👾External
    • 📄Metadata
    • 🔗Interoperability
    • 🔄Migration from Originals
      • FT3
      • Interfaces
      • Prototype
  • 👾Import Existing Tokens from any Chain
    • 🛰️Gamma Chain
  • 🔗Links
    • Github: Yours Protocol
Powered by GitBook
On this page

Was this helpful?

  1. Yours Protocol
  2. Tokens

Unique Identifier

A token can be identified by its project, collection, and token ID, which serves as a composite key. But it can also be identified by its unique identifier uid, which is a deterministic hash of its project, collection, and token ID.

When a token is created, its uid is generated and stored on-chain. The uid makes it easier for client applications to look up and target tokens due to it being a single value rather than three.

A token may be fetched by its uid using the get_token_by_uid and get_active_token_by_uid functions.

function get_token_by_uid(uid: text): token?
function get_active_token_by_uid(uid: text): token?
PreviousFunctionsNextModules

Last updated 6 months ago

Was this helpful?

🌎
💱