> For the complete documentation index, see [llms.txt](https://docs.wildcat.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wildcat.finance/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarkettoken.sol.md).

# WildcatMarketToken.sol

The `WildcatMarketToken` is the token-related logic contract containing functions for transfers and approvals.

#### allowance

```solidity
mapping(address => mapping(address => uint256)) public allowance;
```

Amount of the market token that a spender may transfer on behalf of another owner.

#### balanceOf

```solidity
function balanceOf(address account) public view virtual nonReentrantView returns (uint256);
```

Balance of an account based on the [current market state](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarketbase.sol.md#currentstate) scaled by the [scale factor](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarketbase.sol.md#scalefactor).

Reverts if:

* the reentrancy lock is engaged.

#### totalSupply

```solidity
function totalSupply() external view virtual nonReentrantView returns (uint256);
```

Total supply of the market token based on the [current market state](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarketbase.sol.md#currentstate) scaled by the [scale factor](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarketbase.sol.md#scalefactor).

Reverts if:

* the reentrancy lock is engaged.

#### approve

```solidity
function approve(address spender, uint256 amount) external virtual nonReentrant returns (bool);
```

Sets the [allowance](#allowance) of the caller for the given spender to [transfer](#transfer) on their behalf.

Reverts if:

* the reentrancy lock is engaged.

Logs:

* [Approval](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/events.md#approval)

#### transfer

```solidity
function transfer(address to, uint256 amount) external virtual nonReentrant returns (bool);
```

Transfers an amount of the market token from the caller to another account and [updates the market state](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarket.sol.md#updatestate).

Reverts if:

* the reentrancy lock is engaged.
* the caller's scaled [balance](#balanceof) is less than the scaled transfer amount.
* the caller is blacklisted.
* the receiver is blacklisted.

Logs:

* [Transfer](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/events.md#transfer)

#### transferFrom

```solidity
function transferFrom(
    address from,
    address to,
    uint256 amount
) external virtual nonReentrant returns (bool);
```

Transfers an amount of the market token from one account to another, decreases the [allowance](#allowance) by the amount if applicable, and [updates the market state](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarket.sol.md#updatestate).

Reverts if:

* the reentrancy lock is engaged.
* the caller's [allowance](#allowance) for the sender is less than the amount.
* the caller's scaled [balance](#balanceof) is less than the scaled transfer amount.
* the caller is blacklisted.
* the receiver is blacklisted.

Logs:

* [Transfer](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/events.md#transfer)
* [Approval](/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/events.md#approval)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.wildcat.finance/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarkettoken.sol.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
