# Commom Integration Patterns

#### Collection Management

```move
Initialize collection with deny list
public entry fun init_collection(
    collection_cap: &mut CollectionCap,
    ctx: &mut TxContext
) {
    ART20::initialize_deny_list(collection_cap, ctx);
}

// Update collection metadata
public entry fun update_collection(
    collection_cap: &mut CollectionCap,
    new_uri: vector<u8>,
    ctx: &mut TxContext
) {
    // Your update logic here
}
```

#### 2. NFT Trading

```move
Implement NFT purchase
public entry fun purchase_nft<CURRENCY: store>(
    sale: &mut SALE::NFTSale<CURRENCY>,
    payment: Coin<CURRENCY>,
    asset_ids: vector<u64>,
    collection_cap: &CollectionCap,
    ctx: &mut TxContext
) {
    SALE::purchase_nfts(
        sale,
        payment,
        asset_ids,
        collection_cap,
        ctx
    );
}
```

#### 3. Liquidity Pool Operations

```move
Add liquidity to pool
public entry fun add_pool_liquidity<CURRENCY: store>(
    collection_pool: &mut TRADE::CollectionPool<CURRENCY>,
    pool: &mut TRADE::TradingPool<CURRENCY>,
    nfts: vector<NFT>,
    tokens: Coin<CURRENCY>,
    user_balance: &mut UserBalance,
    min_lp_tokens: u64,
    ctx: &mut TxContext
) {
    TRADE::add_liquidity(
        collection_pool,
        pool,
        nfts,
        tokens,
        user_balance,
        min_lp_tokens,
        ctx
    );
}
```


---

# 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.artinals.com/artinals-protocol/building-on-top-of-the-artinals-contract/commom-integration-patterns.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.
