> For the complete documentation index, see [llms.txt](https://docs.nucleusearn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nucleusearn.io/nucleus-architecture/smart-contracts/contracts/micro-managers/umanager.md).

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