# Metadata

Apart from the name and symbol the metadata is not stored on the token itself. We only store the metadata hash.

We actually emit following event on EVM level:

```solidity
event CreateToken(bytes32 indexed metadataHash, address indexed token, uint256 indexed tokenId, string name, string symbol, string description, string image, string web, string twitter, string telegram)
```

Where the metadata is "logged", i.e. not directly retrievable via storage on the actual token, but it can be searched via the event logs. Together with the saved metadata hash and the provided metadata from the log you can verify that it really is the same metadata if you hash the logged metadata in the following combination:

```solidity
function combineInputs(
        string memory str0,
        string memory str1,
        string memory str2,
        string memory str3,
        string memory str4,
        string memory str5,
        string memory str6,
        uint256 number
    ) public pure returns (string memory) {
        return string(
            abi.encodePacked(
                "ID:",
                uintToString(number),
                "|Name:",
                str0,
                "|Symbol:",
                str1,
                "|Description:",
                str2,
                "|Image:",
                str3,
                "|Web:",
                str4,
                "|X:",
                str5,
                "|Telegram:",
                str6
            )
        );
    }
```

Hashing this in solidity with

```solidity
hash = keccak256(abi.encode(combinedInputs));
```

will give you the correct metadata hash. Instead of using solidity you can also use JS, Python, or whatever you want to generate the metadata hash.

This saves a lot of gas while still ensuring that the data is actually on the blockchain.


---

# Agent Instructions: 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://lfg-club.gitbook.io/lfgclub/bonding-curve/metadata.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.
