> For the complete documentation index, see [llms.txt](https://docs.ideamarket.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ideamarket.io/contracts/ideatokennameverifier.md).

# IdeaTokenNameVerifier

Each market has its own `IdeaTokenNameVerifier` which is a small contract performing basic checks on a token name. These name verifiers are used by the `IdeaTokenFactory` when a new token is listed. For example on the `Twitter` market the `TwitterHandleNameVerifier` is used to verify the token name is a valid Twitter handle (@ followed by 1-15 letters or numbers including "\_". All lower-case) :

```
contract TwitterHandleNameVerifier is IIdeaTokenNameVerifier {
    /**
     * Verifies whether a string matches the required format
     *
     * @param name The input string (Twitter handle)
     *
     * @return Bool; True=matches, False=does not match
     */
    function verifyTokenName(string calldata name) external pure override returns (bool) {
        bytes memory b = bytes(name);
        if(b.length < 2 || b.length > 16) {
            return false;
        }

        if(b[0] != 0x40) { // @
            return false;
        }

        for(uint i = 1; i < b.length; i++) {
            bytes1 char = b[i];
            if (!(char >= 0x30 && char <= 0x39) && //9-0
                !(char >= 0x61 && char <= 0x7A) && //a-z
                !(char == 0x5F)) { //_
                
                return false;
            }
        }

        return true;
    }
}
```

If the token name verification is unsuccessful the `IdeaTokenFactory` will revert on `addToken`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ideamarket.io/contracts/ideatokennameverifier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
