# launch\_auction

An entrypoint that allows anyone to launch an auction for any **NON** whitelisted token.

{% hint style="warning" %}
You need to add the [Auction](/smart-contracts/dex-2.0/auction-contract.md) contract as the operator for your QUIPU tokens to make a first bet.
{% endhint %}

### Call parameters

```pascaligo
type tez_t              is unit

type fa12_token_t       is address

type fa2_token_t        is [@layout:comb] record [
  token                   : address;
  id                      : nat;
]

type token_t            is
| Tez                     of tez_t
| Fa12                    of fa12_token_t
| Fa2                     of fa2_token_t

type launch_auction_t   is [@layout:comb] record [
  token                   : token_t;
  amt                     : nat;
  bid                     : nat;
]
```

<table><thead><tr><th width="199.33333333333331">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>token_t</td><td>FA1.2/FA2/TEZ token</td></tr><tr><td>amt</td><td>nat</td><td>Number of tokens for an auction</td></tr><tr><td>bid</td><td>nat</td><td>First bet on auctions' tokens</td></tr></tbody></table>

### Usage

{% tabs %}
{% tab title="🌮 Taquito" %}

```javascript
const auctionAddress = "KT1...";
const params = {
    token: {
        token: "KT1...",
        id: 0,
    },
    amt: 100,
    bid: 10,
};
const auction = await tezos.contract.at(auctionAddress);
const operation = await dexCore.methodsObject.launch_auction(params).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `305` - token for auction is whitelisted. It is not possible to start an auction with whitelisted tokens.
* `307` - [Auction](/smart-contracts/dex-2.0/auction-contract.md) contract have insufficient balance of tokens for a new auction launch.
* `308` - user's bid is less than minimum bid for an auction launch or less that previous bid.
* `412` - non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).
* `FA2_NOT_OPERATOR` - [Auction](/smart-contracts/dex-2.0/auction-contract.md) contract is not an `operator` for users' QUIPU tokens.


---

# 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.quipuswap.com/smart-contracts/dex-2.0/auction-contract/entrypoints-overview/auction-entrypoints/launch_auction.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.
