# FA2 Token entrypoints

This section has an explanation about using yToken `tokens`.

Each market has related token and it's ID. It allows users to operate their liquidity as one of `yTokens` that bound to lending market.

### Entrypoints

#### transfer

Allows transfer batch (list) of token *transfers*. Each *transfer* in the batch is specified between one source (`from_`) address and a list of *destinations*. Each *destination* specifies `token_id`, the `amount` to be transferred from the source and address of the *destination* (`to_`).

{% content-ref url="/pages/9uKgFyjEsHdLSviSFRLQ" %}
[transfer](/yupana-document-portal/developer-space/ytoken-contract-methods/fa2-token-entrypoints/transfer.md)
{% endcontent-ref %}

#### update\_operators

FA2 interface [specifies](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-12/tzip-12.md#operators) an entrypoint to update operators. Operators are permitted per specific token owner and token ID (`token_id`). Once permitted, an operator can transfer tokens of that type belonging to the owner. To update own tokens operators user should use `update_oprators` call.

{% content-ref url="/pages/OKpJUi0kDiPwRbQa0RRM" %}
[update\_operators](/yupana-document-portal/developer-space/ytoken-contract-methods/fa2-token-entrypoints/update_operators.md)
{% endcontent-ref %}

#### balance\_of

Gets the balance of multiple account/token pairs. Accepts a list of `balance_of_request`s (`token_id` and `owner`) and a callback contract `callback` which accepts a list of `balance_of_response` (`balance_of_request` and requested `balance`) records.

{% content-ref url="/pages/byN1wONcTYiR6BuYHdpH" %}
[balance\_of](/yupana-document-portal/developer-space/ytoken-contract-methods/fa2-token-entrypoints/balance_of.md)
{% endcontent-ref %}

#### get\_total\_supply

Gets total supply of token by it's `token_id` and sends a callback with value to received contract `callback` which accepts a `nat` (natural number).

{% content-ref url="/pages/SMxsYBFEhzwcGvoeRFhq" %}
[get\_total\_supply](/yupana-document-portal/developer-space/ytoken-contract-methods/fa2-token-entrypoints/get_total_supply.md)
{% endcontent-ref %}

### General errors

* `yToken/token-lambda-not-set` - lambda of called entrypoint is not set yet.
* `cant-unpack-token-lambda` - lambda bytes of function is broken.


---

# 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://yupana-finance.gitbook.io/yupana-document-portal/developer-space/ytoken-contract-methods/fa2-token-entrypoints.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.
