Function toAssetAmount

  • Converts worth value to specified asset amount

    Parameters

    • worth: bigint

      worth value (decimals = 9)

    • scale: bigint

      asset scale (10^asset_decimals)

    • price: bigint

      asset price

    Returns bigint