Submitting a Token

Prerequisites

  • The token must be a valid ERC20 contract

  • You must have the token's metadata ready (logoURI, description, etc.)

  • The token must not already be in the registry

Step-by-Step Guide

  1. Prepare Token Information

    struct MetadataInput {
        string field;
        string value;
    }

    Example metadata preparation:

    const metadata = [
        { field: "logoURI", value: "ipfs://..." },
        { field: "description", value: "My Token Description" },
        { field: "websiteURI", value: "https://..." }
    ];
  2. Submit the Token Using the TokenRegistry contract:

    tokenRegistry.addToken(tokenAddress, metadata);

    Or using the Helper contract for immediate approval (if authorized):

    helper.addAndApproveToken(tokenAddress, metadata);
  3. Monitor Status Check the token's status using:

    tokenRegistry.tokenStatus(tokenAddress);

Requirements

  • Ensure all required metadata fields are included

  • Use high-quality logos (128x128px minimum)

  • Provide accurate and detailed information

  • Double-check the token address before submission

Last updated