# 🏭 CabalFactory

## 🏭 CabalFactory

The `CabalFactory` contract is the **main contract for deploying tokens** on The Cabal platform. It orchestrates token creation, liquidity provisioning, LP locking, and developer buy functionality — all within a single permissionless transaction.

Whether you're launching with **Uniswap V3 or V4**, this contract provides a seamless and secure on-chain deployment experience.

***

### ⚙️ Key Responsibilities

* 🪙 Deploys a new ERC-20 token with:
  * Fixed 1,000,000,000 (1B) supply
  * Ownership immediately **renounced**
* 💧 Automatically adds liquidity on:
  * **Uniswap V3** via `CabalV3Helpers`
  * **Uniswap V4** via `CabalV4Helpers`
* 🔒 Locks LP via:
  * `CabalV3LiquidityLocker` (for V3)
  * `CabalV4LiquidityLocker` (for V4)
* 🎯 Executes **Developer Buy** (optional ETH buy-in at launch)
* 🧾 Saves metadata:
  * Token name, symbol, IPFS image hash, website, socials
* 📤 Emits `TokenDeployedWithLiquidity` for Dapp indexing

***

### 🧪 Deployment Flow

1. A new `CabalToken` contract is deployed
2. Liquidity is added to either Uniswap V3 or V4
3. LP is sent directly to the appropriate **locker contract**
4. Remaining tokens are sent to deployer
5. If `devBuyAmount` is set, ETH is used to buy back tokens instantly
6. Deployment metadata is stored on-chain
7. Token contract ownership is renounced

> ✅ Everything happens **trustlessly in one transaction** — no manual setup required

***

### 📌 Notes

* All deployments are **permissionless**
* LP is **always locked** by default
* Token ownership is **renounced** to ensure decentralization
* Metadata is public and can be used for verification/indexing
* Built for smooth integration with <https://thecabal.app>

***

### 🧰 Want to Launch?

Use the Cabal Buy Bot to launch directly from Telegram\
Or deploy through the Web UI: [TheCabal.app](https://thecabal.app)

Need help? Join our [Telegram Community](https://t.me/thecabalapp)


---

# 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.thecabal.app/cabal-protocol-contract-overview/cabalfactory.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.
