# BaseToken

`BaseToken.sol` is a contract that provides the base implementation for ERC20 tokens used within the Unlockd Protocol.

### Key functions:

<pre class="language-solidity"><code class="lang-solidity"><strong>function __BaseToken_init(
</strong>    address aclManager_, 
    address uTokenVault_, 
    uint8 decimals_, 
    string calldata name_, 
    string calldata symbol_
) internal onlyInitializing
</code></pre>

Initializes the `BaseToken` contract with the provided parameters.

### Parameters:

`aclManager_`: The address of the ACL manager contract.

`uTokenVault_`: The address of the UToken vault contract.

`decimals_`: The number of decimals used by the token.

`name_`: The name of the token.

`symbol_`: The symbol of the token.

***

```solidity
function setActive(bool active) external onlyEmergencyAdmin
```

Sets the active state of the token.

### Parameters:

`active`: A boolean indicating whether to set the token as active or not.

***

```solidity
function setFrozen(bool frozen) external onlyEmergencyAdmin
```

Sets the frozen state of the token.

### Parameters:

`frozen`: A boolean indicating whether to set the token as frozen or not.

***

```solidity
function decimals() public view virtual override returns (uint8)
```

Returns the number of decimals used by the token.

### Returns:&#x20;

The number of decimals as a `uint8`.

***

```solidity
function _transfer(
    address sender, 
    address recipient, 
    uint256 amount
) internal virtual override
```

Transfers tokens from the sender to the recipient.

### Parameters:

`sender`: The address of the sender.

`recipient`: The address of the recipient.

`amount`: The amount of tokens to transfer.

***

```solidity
function _mint(
    address account, 
    uint256 amount
) internal virtual override isFrozen isActive
```

Mints new tokens to the specified account.

### Parameters:

`account`: The address of the account to mint tokens to.

`amount`: The amount of tokens to mint.

***

<pre class="language-solidity"><code class="lang-solidity"><strong>function _burn(
</strong>    address account, 
    uint256 amount
) internal virtual override isFrozen
</code></pre>

Burns tokens from the specified account.

### Parameters:

`account`: The address of the account to burn tokens from.

`amount`: The amount of tokens to burn.


---

# 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://devs.unlockd.finance/vault-and-tokens/basetoken.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.
