# Example Scripts and Transactions

1. **Full Lifecycle**:
   * **Create and Mint**: Deploy ART20 and mint 500 NFTs of a new collection.
   * **Initial Sale**: List 100 NFTs at a fixed price using SALE, introduce them to initial collectors.
   * **Liquidity Pool Creation**: Once the initial sale creates interest, set up a TRADE pool with some of the remaining NFTs, providing tokens to offer dynamic pricing and instant swaps.
   * **User Actions**:
     * A user buys one NFT from the SALE listing and later sells it into the TRADE pool if the pool price is higher.
     * Another user becomes a liquidity provider by adding more NFTs and tokens to the pool, hoping to earn fees from future trades.
2. **Price Discovery and Arbitrage**:
   * If the SALE’s fixed price is lower than what the TRADE pool’s AMM would suggest, arbitrageurs can buy from SALE and sell into TRADE for a profit.
   * This activity aligns SALE prices with TRADE pool prices over time, supporting healthy price discovery.

**Transaction Sequence Example**:

1. **Creator**: `mint_art20(...)` -> `create_nft_sale(...)`
2. **User A**: `purchase_nfts(...)` from SALE -> Now holds newly minted NFT.
3. **User B**: `create_pool(...)` on TRADE with some NFTs and tokens.
4. **User A**: `swap_nfts_for_tokens_with_slippage(...)` on TRADE to sell the NFT they bought, potentially at a higher price.
5. **Creator**: `withdraw_currency(...)` on SALE to claim proceeds from the initial sale.

***


---

# 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/integration-and-workflows/example-scripts-and-transactions.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.
