> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lootexplus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Contracts

> Allows you to create and manage complete NFT drop campaigns programmatically. You can deploy custom ERC721 contracts, upload assets, set pricing conditions, and control the entire lifecycle of your NFT drops using your project wallet

## What You Can Build

With the deploy-drop feature, you can:

* **Deploy Custom NFT Contracts**: Create ERC721 contracts with your own branding and configuration
* **Manage Asset Lifecycle**: Upload images, create metadata, and lazy mint NFTs
* **Configure Drop Conditions**: Set pricing, timing, and purchase limits
* **Control Visibility**: Show or hide your drops from public marketplaces
* **Collect Creator Fees**: Configure royalties and fee collection addresses

## Complete Workflow

A typical NFT drop follows this sequence:

1. **Upload Image** → Host your NFT artwork
2. **Deploy Contract** → Create your custom ERC721 contract
3. **Lazy Mint** → Prepare NFTs for sale without upfront gas costs
4. **Set Conditions** → Configure pricing, timing, and limits
5. **Update Visibility** → Control marketplace visibility

***

## Authentication

All deploy-drop endpoints require a **secret key** for authentication. Include your project's secret key in the `Authorization` header:

```
Authorization: Bearer sk-your-secret-key
```

Your project wallet will be used to sign all transactions and pay gas fees.

***

## Supported Networks

The deploy-drop feature supports deployment on:

* **Soneium** (Chain ID: 1868) - Primary network
* Additional networks available upon request

***

## Integration Workflow

### 1. Upload Image

Upload your NFT artwork to get a hosted URL for metadata.

**Endpoint:** `POST /v1/project-wallet/deploy-drop/upload-image`

**Parameters:**

* `imageFile` (file): Image file (max 10MB)
* `assetName` (string): Name for your asset

**Example:**

```bash theme={null}
curl -X POST https://local-api.lootex.dev/v1/project-wallet/deploy-drop/upload-image \
  -H "Authorization: Bearer sk-your-secret-key" \
  -F "imageFile=@artwork.png" \
  -F "assetName=My Awesome NFT"
```

### 2. Deploy Contract

Create your custom ERC721 contract on the blockchain.

**Endpoint:** `POST /v1/project-wallet/deploy-drop/deploy-contract`

**Parameters:**

* `chainId` (number): Network chain ID (e.g., 1868 for Soneium)
* `imageUrl` (string): URL from the upload-image step
* `name` (string): Contract name (e.g., "My Awesome Collection")
* `symbol` (string): Contract symbol (e.g., "MAC")
* `isCreatorFee` (boolean, optional): Enable creator fees
* `creatorFeeAddress` (string, optional): Address to receive fees

**Example:**

```bash theme={null}
curl -X POST https://local-api.lootex.dev/v1/project-wallet/deploy-drop/deploy-contract \
  -H "Authorization: Bearer sk-your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 1868,
    "imageUrl": "https://lootex-dev.s3.us-east-1.amazonaws.com/your-image.png",
    "name": "My Awesome Collection",
    "symbol": "MAC",
    "isCreatorFee": true,
    "creatorFeeAddress": "0x1234567890123456789012345678901234567890"
  }'
```

### 3. Lazy Mint NFTs

Prepare NFTs for sale without paying upfront minting costs. Gas is only paid when users actually purchase.

**Endpoint:** `POST /v1/project-wallet/deploy-drop/lazy-mint`

**Parameters:**

* `chainId` (number): Network chain ID
* `contractId` (string): Contract ID from deploy step
* `assetName` (string): NFT name
* `assetDescription` (string, optional): NFT description
* `assetImageUrl` (string): Image URL for this NFT
* `amount` (number): Quantity to make available

**Example:**

```bash theme={null}
curl -X POST https://local-api.lootex.dev/v1/project-wallet/deploy-drop/lazy-mint \
  -H "Authorization: Bearer sk-your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 1868,
    "contractId": "28921269-8a81-4d72-a723-af29a1a0b32c",
    "assetName": "Legendary Badge #1",
    "assetDescription": "A rare badge with special powers",
    "assetImageUrl": "https://lootex-dev.s3.us-east-1.amazonaws.com/badge.png",
    "amount": 100
  }'
```

### 4. Set Drop Conditions

Configure pricing, timing, and purchase limits for your drop.

**Endpoint:** `POST /v1/project-wallet/deploy-drop/set-conditions`

**Parameters:**

* `chainId` (number): Network chain ID
* `contractId` (string): Contract ID
* `price` (string): Price per NFT in ETH (e.g., "0.1")
* `currencyAddress` (string, optional): Custom token address (defaults to ETH)
* `amount` (number): Total NFTs available for sale
* `startTime` (string, optional): Start time in UTC (defaults to now)
* `endTime` (string, optional): End time in UTC (defaults to 24h from now)
* `limitPerWallet` (number, optional): Max NFTs per wallet

**Example:**

```bash theme={null}
curl -X POST https://local-api.lootex.dev/v1/project-wallet/deploy-drop/set-conditions \
  -H "Authorization: Bearer sk-your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 1868,
    "contractId": "28921269-8a81-4d72-a723-af29a1a0b32c",
    "price": "0.05",
    "amount": 100,
    "startTime": "2025-08-01T00:00:00Z",
    "endTime": "2025-08-31T23:59:59Z",
    "limitPerWallet": 5
  }'
```

### 5. Update Visibility

Control whether your drop appears on public marketplaces.

**Endpoint:** `POST /v1/project-wallet/deploy-drop/update-visibility`

**Parameters:**

* `contractId` (string): Contract ID
* `isVisible` (boolean): Show (true) or hide (false) from marketplaces

**Example:**

```bash theme={null}
curl -X POST https://local-api.lootex.dev/v1/project-wallet/deploy-drop/update-visibility \
  -H "Authorization: Bearer sk-your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "contractId": "28921269-8a81-4d72-a723-af29a1a0b32c",
    "isVisible": true
  }'
```
