> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/modules/funding-manager/bonding-curve/fm_bc_tools.md).

# 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. |
