FM_BC_Tools

Git Source

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.

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.

Last updated