# MockRewardManager v0.3.1 API Reference
Source: https://docs.chain.link/chainlink-local/api-reference/v0.3.1/mock-reward-manager

> For the complete documentation index, see [llms.txt](/llms.txt).

> **NOTE: Integrate Chainlink Local into your project**
>
> ### npm
>
> If you use [NPM](https://www.npmjs.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> npm install @chainlink/local@0.3.1
> ```
>
> ### yarn
>
> If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> yarn add @chainlink/local@0.3.1
> ```
>
> ### foundry
>
> If you use [Foundry](https://book.getfoundry.sh/):
>
> ```shell
> forge install smartcontractkit/chainlink-local@v0.3.1
> ```
>
> and then set remappings to: `@chainlink/local/=lib/chainlink-local/` in either `remappings.txt` or `foundry.toml` file
>
> ### RemixIDE
>
> Import the `CCIPLocalSimulator` contract from the `@chainlink/local` package:
>
> ```solidity
> import {CCIPLocalSimulator} from "@chainlink/local@0.3.1/src/ccip/CCIPLocalSimulator.sol";
> ```

## MockRewardManager

A mock implementation of the Data Streams reward manager for local testing.

[`MockRewardManager`](https://github.com/smartcontractkit/chainlink-local/blob/v0.3.1/src/data-streams/MockRewardManager.sol)

> **NOTE**
>
> This contract receives the LINK rewards collected by the
> [`MockFeeManager`](/chainlink-local/api-reference/v0.3.1/mock-fee-manager). Only the fee manager may call `onFeePaid`.

## Errors

### Unauthorized

```solidity
error Unauthorized()
```

> **NOTE**
>
> Reverts when `onFeePaid` is called by anyone other than the fee manager.

## Events

### FeePaid

```solidity
event FeePaid(IRewardManager.FeePayment[] payments, address payer)
```

## Functions

### constructor

Initializes the contract with the LINK token address.

```solidity
constructor(address linkAddress)
```

#### Parameters

| Parameter   | Type      | Description            |
| ----------- | --------- | ---------------------- |
| linkAddress | `address` | The LINK token address |

### onFeePaid

Records a fee payment and pulls the LINK from the payer.

```solidity
function onFeePaid(FeePayment[] calldata payments, address payer) external override onlyFeeManager
```

> **NOTE**
>
> Tallies the total payable fees and transfers the LINK from the payer to this contract.

#### Parameters

| Parameter | Type           | Description                                |
| --------- | -------------- | ------------------------------------------ |
| payments  | `FeePayment[]` | The fee payments (pool ID and amount each) |
| payer     | `address`      | The address that paid the fees             |

### claimRewards

Not implemented.

```solidity
function claimRewards(bytes32[] memory) external pure override
```

> **NOTE**
>
> Always reverts with "Not implemented".

### setFeeManager

Sets the fee manager address.

```solidity
function setFeeManager(address newFeeManager) external override
```

### supportsInterface

```solidity
function supportsInterface(bytes4 interfaceId) external pure override returns (bool)
```

> **NOTE**
>
> Returns true only for the `onFeePaid` selector.