# Smart Contracts & NFTs

#### **Contract Templates**

| Template       | Standard | Use Case               |
| -------------- | -------- | ---------------------- |
| Basic Token    | ERC-20   | Fungible tokens        |
| NFT Collection | ERC-721  | Unique collectibles    |
| Multi-Token    | ERC-1155 | Gaming assets          |
| Escrow         | Custom   | Trustless transactions |
| SPL Token      | Solana   | Solana fungible tokens |
| Metaplex NFT   | Solana   | Solana NFTs            |

***

#### **IPFS Integration**

NFT metadata and assets are stored on IPFS via Pinata:

```
POST /api/ipfs/upload-metadata
{
"name": "My NFT",
"description": "A unique piece", "image": "ipfs://Qm...",
"attributes": [...]
}
```

**Response:**

```
{
"success": true, "cid": "Qm...",
"uri": "ipfs://Qm..."
}
```

***

#### **NFT Metadata Standard**

Both EVM and Solana NFTs follow compatible metadata:

```
{
"name": "NFT Name",
"symbol": "SYM", "description": "Description", "image": "ipfs://...", "attributes": [
{ "trait_type": "Background", "value": "Blue" },
{ "trait_type": "Rarity", "value": "Rare" }
],
"seller_fee_basis_points":  500
}
```


---

# 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://docs.eitherway.ai/documentation/web3/smart-contracts-and-nfts.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.
