Table of Contents

<aside> 🚧 In this guide, you can expect that you’ll be able to:

  1. Get a list of all meTokens created
  2. Get metadata about the owner of each meToken (username, bio, picture)
  3. Get metadata about each meToken (symbol, owner, hubId)
  4. Get market data about each meToken (TVL, token price)
  5. Execute buy & sell orders directly with the meTokens AMM </aside>

Enumerating All meTokens

Enumeration of all meTokens is available through our Subgraph on Mainnet. Here is an example query to fetch all available meTokens.

Metadata

Owner Data

Information about the creator is all stored using Ceramic Network's DID product, called self.id. We’re currently using their Clay Testnet implementation.

You can use their read/write Clay node here, and you call the self.id data stream following their docs here. This will provide you with:

  1. Username of the meToken issuer
  2. Avatar photo - used as token logo
  3. Issuer's bio - used as token description

In order to lookup the self.id of a user, you'll need to use the owner address of a meToken for the lookup. You can get the owner address in two steps:

  1. Take an address of a meToken (enumerated by the subgraph),
  2. Pass the address as the arg in the getMeTokenInfo() func in the diamond ABI - instructions & file included below,

You'll then be returned the owner address.

ABI

Note: instructions below

MeTokensDiamond.json

Token Data

Includes instructions for ABIs.

Note: all ABIs are listed in the Resources/ABIs section at the bottom.