# FM\_BC\_Tools

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/649b450f02fc8b735c128ff0821467e71966c666/src/modules/fundingManager/bondingCurve/FM_BC_Tools.sol)

**Author:** Inverter Network

### Functions

#### \_convertAmountToRequiredDecimal

*Error thrown when the fee amount is too high. This error is thrown when the fee amount is greater than the maximum fee percentage. It takes care of both upscaling and downscaling the decimals based on the required decimals.*

```solidity
function _convertAmountToRequiredDecimal(
    uint _amount,
    uint8 _tokenDecimals,
    uint8 _requiredDecimals
) internal pure returns (uint);
```

**Parameters**

| Name                | Type      | Description                                |
| ------------------- | --------- | ------------------------------------------ |
| `_amount`           | `uint256` | The amount to be converted.                |
| `_tokenDecimals`    | `uint8`   | The current decimal places of the token.   |
| `_requiredDecimals` | `uint8`   | The required decimal places for the token. |

**Returns**

| Name     | Type      | Description                                        |
| -------- | --------- | -------------------------------------------------- |
| `<none>` | `uint256` | The converted amount with required decimal places. |


---

# 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.inverter.network/contracts/technical-reference/modules/funding-manager/bonding-curve/fm_bc_tools.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.
