# GenericRateProvider

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

**Inherits:** IRateProvider

## State Variables

### target

The address to make rate calls to.

```solidity
address public immutable target;
```

### selector

The selector to call on the target.

```solidity
bytes4 public immutable selector;
```

### staticArgument0

Static arguments to pass to the target.

```solidity
bytes32 public immutable staticArgument0;
```

### staticArgument1

```solidity
bytes32 public immutable staticArgument1;
```

### staticArgument2

```solidity
bytes32 public immutable staticArgument2;
```

### staticArgument3

```solidity
bytes32 public immutable staticArgument3;
```

### staticArgument4

```solidity
bytes32 public immutable staticArgument4;
```

### staticArgument5

```solidity
bytes32 public immutable staticArgument5;
```

### staticArgument6

```solidity
bytes32 public immutable staticArgument6;
```

### staticArgument7

```solidity
bytes32 public immutable staticArgument7;
```

## Functions

### constructor

```solidity
constructor(
    address _target,
    bytes4 _selctor,
    bytes32 _staticArgument0,
    bytes32 _staticArgument1,
    bytes32 _staticArgument2,
    bytes32 _staticArgument3,
    bytes32 _staticArgument4,
    bytes32 _staticArgument5,
    bytes32 _staticArgument6,
    bytes32 _staticArgument7
);
```

### getRate

Get the rate of some generic asset.

*This function only supports selectors that only contain static arguments, dynamic arguments will not be encoded correctly, and calls will likely fail.*

*If staticArgumentN is not used, it can be left as 0.*

```solidity
function getRate() public view returns (uint256);
```


---

# 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/helper/genericrateprovider.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.
