Add Extended CW20 Token Info

You can enhance your CW20 token with rich metadata such as website, social links, full description, images, and legal/audit info — stored off-chain and referenced from marketing_info.project in your smart contract.


Step 1: Prepare Extended Metadata

The extended metadata must be stored as a JSON file hosted on a publicly accessible URL. The URL will be placed in the CW20 marketing_info.project field with SHA-256 checksum verification to ensure data integrity.

JSON Format Specification

Here is the approved format of the metadata file:

{
  "version": "1.0",
  "name": "MyToken",
  "symbol": "MTK",
  "website": "https://mytoken.example.com",
  "description": {
    "format": "markdown",
    "image_url": "https://mytoken.example.com/images/logo-large.png",
    "video_url": "https://www.youtube.com/@axiome_ru",
    "content": [
       {
         "language": "en",
         "text": "Full token description in markdown or plain text, no more then 60k symbols..."
       },
       {
         "language": "de",
         "text": "Vollständige Token-Beschreibung in Markdown- oder Klartextformat, nicht mehr als 60.000 Zeichen …"
       }
     }
  },
  "socials": {
    "X (ex. Twitter)": "https://twitter.com/mytoken",
    "Telegram": "https://t.me/mytokenchat",
    "Discord": "https://discord.gg/mytoken",
    "GitHub": "https://github.com/mytoken"
  },
  "legal": {
    "terms_url": "https://mytoken.example.com/terms",
    "privacy_url": "https://mytoken.example.com/privacy"
  },
  "audit": [
    {
      "provider": "Certik",
      "url": "https://certik.com/projects/mytoken",
      "date": "2024-12-01"
    }
  ],
  "contacts": {
    "email": "[email protected]",
    "support_url": "https://mytoken.example.com/support"
  }
}

Notes:

  • description.format must be either "markdown" or "text"

  • any fields except version, name, symbol can be set to null if not used

  • socials can include any keys (e.g., TikTok, Instagram, etc.)

  • description.content can contain either a string or an array of objects:

    • If a string is provided, it will be used directly as the token description.

    • If an array of objects is provided, each object must have the following structure: { "language": "<2-letter code>", "text": "<description string>" }. In this case, the application or explorer will select the most appropriate translation based on the user’s selected language. The selection algorithm is as follows:

      1. Attempt to find a translation matching the user’s language using a two-letter language code according to ISO 639-1.

      2. If no matching language is found, attempt to use the en (English) translation.

      3. If en is not available, use the first translation in the list.


Step 2: Calculate SHA-256

To ensure the metadata has not been tampered with, calculate its SHA-256 checksum (of the raw file content).

On Linux/macOS:

On Windows (PowerShell):

Suppose the result is:


Step 3: Upload Project Info to the Contract

CW20 contracts support setting marketing_info.project with a URL that includes the sha256sum as a query parameter.

Example axmd TX to set the project info:

Replace:

  • <contract_address> — with the CW20 contract address

  • <your_wallet_name> — with your wallet (keyring) name


Done!

Once the transaction is confirmed, your token will have a verifiable extended metadata link accessible via marketing_info.project.

Axiome Wallet, Axiome Explorer, and dApps can parse this JSON and render:

  • Full token details

  • Social links

  • Brand image/video

  • Contact and legal info

Last updated