{
  "description": "a schema for defining markets for wormhole-wrapped assets",
  "type": "object",
  "properties": {
    "markets": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/marketInfo"
      }
    },
    "tokens": {
      "description": "keys of source chain id",
      "type": "object",
      "properties": {
        "1": { "$ref": "#/$defs/tokenSourceChain" },
        "2": { "$ref": "#/$defs/tokenSourceChain" },
        "3": { "$ref": "#/$defs/tokenSourceChain" },
        "4": { "$ref": "#/$defs/tokenSourceChain" },
        "5": { "$ref": "#/$defs/tokenSourceChain" },
        "6": { "$ref": "#/$defs/tokenSourceChain" },
        "7": { "$ref": "#/$defs/tokenSourceChain" },
        "8": { "$ref": "#/$defs/tokenSourceChain" },
        "9": { "$ref": "#/$defs/tokenSourceChain" },
        "10": { "$ref": "#/$defs/tokenSourceChain" },
        "11": { "$ref": "#/$defs/tokenSourceChain" },
        "12": { "$ref": "#/$defs/tokenSourceChain" },
        "13": { "$ref": "#/$defs/tokenSourceChain" },
        "14": { "$ref": "#/$defs/tokenSourceChain" },
        "15": { "$ref": "#/$defs/tokenSourceChain" },
        "16": { "$ref": "#/$defs/tokenSourceChain" },
        "18": { "$ref": "#/$defs/tokenSourceChain" },
        "19": { "$ref": "#/$defs/tokenSourceChain" },
        "22": { "$ref": "#/$defs/tokenSourceChain" },
        "23": { "$ref": "#/$defs/tokenSourceChain" },
        "24": { "$ref": "#/$defs/tokenSourceChain" },
        "28": { "$ref": "#/$defs/tokenSourceChain" }
      },
      "additionalProperties": false
    },
    "tokenMarkets": {
      "description": "keys of source chain id",
      "type": "object",
      "properties": {
        "1": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "2": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "3": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "4": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "5": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "6": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "7": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "8": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "9": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "10": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "11": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "12": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "13": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "14": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "15": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "16": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "18": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "19": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "22": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "23": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "24": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "28": { "$ref": "#/$defs/tokenMarketSourceChain" }
      },
      "additionalProperties": false
    }
  },
  "required": ["markets", "tokens", "tokenMarkets"],
  "additionalProperties": false,
  "$defs": {
    "marketInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "link": {
          "type": "string"
        }
      },
      "required": ["name", "link"],
      "additionalProperties": false
    },
    "tokenSourceChain": {
      "description": "keys of target chain id",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/tokenInfo"
      }
    },
    "tokenInfo": {
      "type": "object",
      "properties": {
        "symbol": {
          "type": "string"
        },
        "logo": {
          "type": "string"
        }
      },
      "required": ["symbol", "logo"],
      "additionalProperties": false
    },
    "tokenMarketSourceChain": {
      "description": "keys of target chain id",
      "type": "object",
      "properties": {
        "1": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "2": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "3": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "4": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "5": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "6": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "7": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "8": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "9": { "$ref": "#/$defs/tokenMarketSourceChain" },
        "10": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "11": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "12": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "13": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "14": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "15": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "16": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "18": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "19": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "22": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "23": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "24": { "$ref": "#/$defs/tokenMarketTargetChain" },
        "28": { "$ref": "#/$defs/tokenMarketTargetChain" }
      },
      "additionalProperties": false
    },
    "tokenMarketTargetChain": {
      "description": "keys of token addresses",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/tokenMarketInfo"
      }
    },
    "tokenMarketInfo": {
      "description": "contains list of markets for a given source - target - address tuple",
      "type": "object",
      "properties": {
        "markets": {
          "description": "list of market ids that support this token",
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      },
      "required": ["markets"],
      "additionalProperties": false
    }
  }
}
