pub fn convert_denom(
    source_amount: u128,
    source_denom: &Denom,
    target_denom: &Denom
) -> Result<DenomConversion, ContractError>
Expand description

Converts the source denom amount to the target denom’s amount, accounting for any remaining funds.

§Parameters

  • source_amount The amount of source denom to convert to target denom.
  • source_denom The denom defining the source amount.
  • target_denom The denom defining the target amount, allowing the relation between source and target to dictate the results.