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": "Full token description in markdown or plain text, no more then 60k symbols..."
  },
  "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.)


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:

curl -s https://cdn.example.com/exmpl.json | sha256sum

On Windows (PowerShell):

Invoke-WebRequest -Uri "https://cdn.example.com/exmpl.json" -UseBasicParsing | % Content | `
    Out-File -Encoding ascii -FilePath metadata.json
Get-FileHash metadata.json -Algorithm SHA256

Suppose the result is:

aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899

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:

axmd tx wasm execute <contract_address> '{
  "update_marketing": {
    "project": "https://cdn.example.com/exmpl.json?sha256sum=aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
  }
}' \
--from <your_wallet_name> \
--gas auto --gas-adjustment 1.3 --fees 5000uaxm \
--chain-id demo

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