# check\_is\_banned\_baker

This on-chain view checks if baker on the specific [Bucket](/smart-contracts/dex-2.0/bucket-contract.md) contract is banned or not. If baker is banned, voting for him is not possible.

### Call parameters

```pascaligo
type token_id_t         is nat

type is_banned_baker_t  is key_hash

type check_is_banned_t  is [@layout:comb] record [
  pair_id                 : token_id_t;
  baker                   : is_banned_baker_t;
]
```

<table><thead><tr><th width="150">Field</th><th width="202.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>pair_id</td><td>token_id_t (nat)</td><td>Pair ID for which you need to check if baker is banned or not</td></tr><tr><td>baker</td><td>is_banned_baker_t (key_hash)</td><td>Baker to check</td></tr></tbody></table>

### Return type

```pascaligo
bool
```

### Usage

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

```javascript
const dexCoreAddress = "KT1...";
const params = {
    pair_id: 1,
    baker: "tz1...",
};
const viewCaller = "tz1...";
const dexCore = await tezos.contract.at(dexCoreAddress);
const isBannedBaker = await dexCore.contract.contractViews.check_is_banned_baker(params).executeView({ viewCaller: viewCaller });
```

{% endtab %}
{% endtabs %}

### Errors

* `108` - pair (pool) with the specified `token_id` not listed.
* `113` - a [Bucket](/smart-contracts/dex-2.0/bucket-contract.md) contract not found (not TOK/TEZ LP pair).
* `125` - [***is\_banned\_baker***](/smart-contracts/dex-2.0/bucket-contract/on-chain-views-overview/is_banned_baker.md) view of [Bucket](/smart-contracts/dex-2.0/bucket-contract.md) contract isn't found.


---

# 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/dexcore-contract/on-chain-views-overview/check_is_banned_baker.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.
