# PureTokenAdapter

### assetManager

```solidity
address assetManager
```

*The address of the AssetManager*

### floorMap

```solidity
mapping(address => uint256) floorMap
```

*Mapping of token address to floor balance*

### ceilingMap

```solidity
mapping(address => uint256) ceilingMap
```

*Mapping of token address to ceiling balance*

### \_\_PureTokenAdapter\_init

```solidity
function __PureTokenAdapter_init(address _assetManager) public
```

### TokenNotSupported

```solidity
error TokenNotSupported()
```

### SenderNotAssetManager

```solidity
error SenderNotAssetManager()
```

### checkTokenSupported

```solidity
modifier checkTokenSupported(address tokenAddress)
```

*Check supplied token address is supported*

### onlyAssetManager

```solidity
modifier onlyAssetManager()
```

*Check sender is the asset manager*

### setAssetManager

```solidity
function setAssetManager(address _assetManager) external
```

*Set the asset manager contract*

#### Parameters

| Name           | Type    | Description      |
| -------------- | ------- | ---------------- |
| \_assetManager | address | The AssetManager |

### setFloor

```solidity
function setFloor(address tokenAddress, uint256 floor) external
```

*Set the floor balance for this token. When assets are deposited into adapters the floors are filled first*

#### Parameters

| Name         | Type    | Description       |
| ------------ | ------- | ----------------- |
| tokenAddress | address | The Token address |
| floor        | uint256 | Floor balance     |

### setCeiling

```solidity
function setCeiling(address tokenAddress, uint256 ceiling) external
```

*Set the ceiling balance for this token. The ceiling is the max balance we want to be managed by this adapter*

#### Parameters

| Name         | Type    | Description       |
| ------------ | ------- | ----------------- |
| tokenAddress | address | The Token address |
| ceiling      | uint256 | Ceiling balance   |

### getRate

```solidity
function getRate(address) external pure returns (uint256)
```

*Get the underlying market rate The PureAdapter doesn't have an underlying market so we return 0*

### getSupply

```solidity
function getSupply(address tokenAddress) external view returns (uint256)
```

*Get total supply of this Contracts*

#### Parameters

| Name         | Type    | Description                   |
| ------------ | ------- | ----------------------------- |
| tokenAddress | address | The token to check supply for |

### getSupplyView

```solidity
function getSupplyView(address tokenAddress) external view returns (uint256)
```

*Get total supply of this Contracts including any balance that has been deposited into the underlying market. As the PureAdapter doesn't have an underlying market this is the same as getSupply*

#### Parameters

| Name         | Type    | Description                   |
| ------------ | ------- | ----------------------------- |
| tokenAddress | address | The token to check supply for |

### supportsToken

```solidity
function supportsToken(address tokenAddress) external view returns (bool)
```

*Check if this token is supported*

#### Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| tokenAddress | address | The token to check |

### deposit

```solidity
function deposit(address tokenAddress) external
```

*Deposits the given amount of tokens in the underlying money market.*

### withdraw

```solidity
function withdraw(address tokenAddress, address recipient, uint256 tokenAmount) external
```

*Withdraw tokens from this adapter Only callable by the AssetManager*

#### Parameters

| Name         | Type    | Description                  |
| ------------ | ------- | ---------------------------- |
| tokenAddress | address | Token to withdraw            |
| recipient    | address | Recieved by                  |
| tokenAmount  | uint256 | Amount of tokens to withdraw |

### withdrawAll

```solidity
function withdrawAll(address tokenAddress, address recipient) external
```

*Withdraw entire balance of this token Only callable by AssetManager*

#### Parameters

| Name         | Type    | Description       |
| ------------ | ------- | ----------------- |
| tokenAddress | address | Token to withdraw |
| recipient    | address | Recieved by       |

### claimRewards

```solidity
function claimRewards(address tokenAddress, address recipient) external
```

### \_supportsToken

```solidity
function _supportsToken(address tokenAddress) internal view returns (bool)
```

### \_getSupply

```solidity
function _getSupply(address tokenAddress) internal view returns (uint256)
```


---

# 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.union.finance/developers/core/puretokenadapter.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.
