> For the complete documentation index, see [llms.txt](https://developers.term.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.term.finance/latest/term-repo-class/term-servicer-group/termreporollovermanager.md).

# TermRepoRolloverManager.sol

## TermRepoRolloverManager

This contract accepts and carries out borrower Term Repo rollover instructions

*This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment*

### ADMIN\_ROLE

```solidity
bytes32 ADMIN_ROLE
```

### DEVOPS\_ROLE

```solidity
bytes32 DEVOPS_ROLE
```

### INITIALIZER\_ROLE

```solidity
bytes32 INITIALIZER_ROLE
```

### ROLLOVER\_BID\_FULFILLER\_ROLE

```solidity
bytes32 ROLLOVER_BID_FULFILLER_ROLE
```

### DIAMOND\_ROLE

```solidity
bytes32 DIAMOND_ROLE
```

### termRepoId

```solidity
bytes32 termRepoId
```

### termRepoCollateralManager

```solidity
contract ITermRepoCollateralManager termRepoCollateralManager
```

### termRepoServicer

```solidity
contract ITermRepoServicer termRepoServicer
```

### termController

```solidity
contract ITermController termController
```

### emitter

```solidity
contract ITermEventEmitter emitter
```

### approvedRolloverAuctionBidLockers

```solidity
mapping(address => bool) approvedRolloverAuctionBidLockers
```

### rolloverElections

```solidity
mapping(address => struct TermRepoRolloverElection) rolloverElections
```

### termContractPaired

```solidity
bool termContractPaired
```

### notPastRepaymentWindow

```solidity
modifier notPastRepaymentWindow()
```

### notTermContractPaired

```solidity
modifier notTermContractPaired()
```

### constructor

```solidity
constructor() public
```

### initialize

```solidity
function initialize(string termRepoId_, contract ITermRepoServicer termRepoServicer_, contract ITermRepoCollateralManager termRepoCollateralManager_, contract ITermController termController_, address termInitializer_) external
```

### pairTermContracts

```solidity
function pairTermContracts(address termRepoServicer_, address termDiamond_, contract ITermEventEmitter emitter_, address devopsMultisig_, address adminWallet_) external
```

### electRollover

```solidity
function electRollover(struct TermRepoRolloverElectionSubmission termRepoRolloverElectionSubmission) external
```

An external function that accepted Term Repo rollover instructions

#### Parameters

| Name                               | Type                                      | Description                                        |
| ---------------------------------- | ----------------------------------------- | -------------------------------------------------- |
| termRepoRolloverElectionSubmission | struct TermRepoRolloverElectionSubmission | A struct containing borrower rollover instructions |

### electRollover

```solidity
function electRollover(address borrower, struct TermRepoRolloverElectionSubmission termRepoRolloverElectionSubmission) external
```

Allows DIAMOND\_ROLE to elect rollover on behalf of a borrower

#### Parameters

| Name                               | Type                                      | Description                                                    |
| ---------------------------------- | ----------------------------------------- | -------------------------------------------------------------- |
| borrower                           | address                                   | The address of the borrower for whom rollover is being elected |
| termRepoRolloverElectionSubmission | struct TermRepoRolloverElectionSubmission | A struct containing borrower rollover instructions             |

### getRolloverInstructions

```solidity
function getRolloverInstructions(address borrower) external view returns (struct TermRepoRolloverElection)
```

A view function that returns borrower rollover instructions

#### Parameters

| Name     | Type    | Description                 |
| -------- | ------- | --------------------------- |
| borrower | address | The address of the borrower |

#### Return Values

| Name | Type                            | Description                                        |
| ---- | ------------------------------- | -------------------------------------------------- |
| \[0] | struct TermRepoRolloverElection | A struct containing borrower rollover instructions |

### cancelRollover

```solidity
function cancelRollover() external
```

An external function to cancel previously submitted rollover instructions

### cancelRollover

```solidity
function cancelRollover(address borrower) external
```

Allows DIAMOND\_ROLE to cancel rollover on behalf of a borrower

#### Parameters

| Name     | Type    | Description                                                      |
| -------- | ------- | ---------------------------------------------------------------- |
| borrower | address | The address of the borrower for whom rollover is being cancelled |

### fulfillRollover

```solidity
function fulfillRollover(address borrower) external
```

An external function called by repo servicer to mark rollover as fulfilled

#### Parameters

| Name     | Type    | Description                 |
| -------- | ------- | --------------------------- |
| borrower | address | The address of the borrower |

### approveRolloverAuction

```solidity
function approveRolloverAuction(contract ITermAuctionBidLocker auctionBidLocker) external
```

#### Parameters

| Name             | Type                           | Description                                 |
| ---------------- | ------------------------------ | ------------------------------------------- |
| auctionBidLocker | contract ITermAuctionBidLocker | The ABI for ITermAuctionBidLocker interface |

### revokeRolloverApproval

```solidity
function revokeRolloverApproval(contract ITermAuctionBidLocker auctionBidLocker) external
```

#### Parameters

| Name             | Type                           | Description                                 |
| ---------------- | ------------------------------ | ------------------------------------------- |
| auctionBidLocker | contract ITermAuctionBidLocker | The ABI for ITermAuctionBidLocker interface |

### \_electRolloverInternal

```solidity
function _electRolloverInternal(address borrower, struct TermRepoRolloverElectionSubmission termRepoRolloverElectionSubmission) internal
```

### \_cancelRolloverInternal

```solidity
function _cancelRolloverInternal(address borrower) internal
```

### \_processRollover

```solidity
function _processRollover(address borrowerToRollover) internal
```

### \_authorizeUpgrade

```solidity
function _authorizeUpgrade(address impl) internal
```

*required override by the OpenZeppelin UUPS module*

#### Parameters

| Name | Type    | Description                        |
| ---- | ------- | ---------------------------------- |
| impl | address | new impl address for proxy upgrade |


---

# 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://developers.term.finance/latest/term-repo-class/term-servicer-group/termreporollovermanager.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.
