# UManager

[Git Source](https://github.com/Ion-Protocol/nucleus-boring-vault/blob/cc0b494b83e17b9b169a73b96050d2810b690477/src/micro-managers/UManager.sol)

**Inherits:** Auth

## State Variables

### period

The period in seconds for the rate limit.

```solidity
uint16 public period;
```

### allowedCallsPerPeriod

The number of calls allowed per period.

```solidity
uint16 public allowedCallsPerPeriod;
```

### callCountPerPeriod

The number of calls made in the current period.

```solidity
mapping(uint256 => uint256) public callCountPerPeriod;
```

### manager

The ManagerWithMerkleVerification this uManager works with.

```solidity
ManagerWithMerkleVerification internal immutable manager;
```

### boringVault

The BoringVault this uManager works with.

```solidity
address internal immutable boringVault;
```

## Functions

### enforceRateLimit

```solidity
modifier enforceRateLimit();
```

### constructor

```solidity
constructor(address _owner, address _manager, address _boringVault) Auth(_owner, Authority(address(0)));
```

### setPeriod

Sets the duration of the period.

*Callable by MULTISIG\_ROLE.*

```solidity
function setPeriod(uint16 _period) external requiresAuth;
```

### setAllowedCallsPerPeriod

Sets the number of calls allowed per period.

*Callable by MULTISIG\_ROLE.*

```solidity
function setAllowedCallsPerPeriod(uint16 _allowedCallsPerPeriod) external requiresAuth;
```

### revokeTokenApproval

Allows auth to set token approvals to zero.

*Callable by STRATEGIST\_ROLE.*

```solidity
function revokeTokenApproval(
    bytes32[][] calldata manageProofs,
    address[] calldata decodersAndSanitizers,
    ERC20[] calldata tokens,
    address[] calldata spenders
)
    external
    requiresAuth;
```

## Events

### PeriodUpdated

```solidity
event PeriodUpdated(uint16 oldPeriod, uint16 newPeriod);
```

### AllowedCallsPeriodUpdated

```solidity
event AllowedCallsPeriodUpdated(uint16 oldAllowance, uint16 newAllowance);
```

## Errors

### UManager\_\_CallCountExceeded

```solidity
error UManager__CallCountExceeded();
```


---

# 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.nucleusearn.io/nucleus-architecture/smart-contracts/contracts/micro-managers/umanager.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.
