Check Required Amount
0x484428507A212cA56D71baa27Ca6089a6dB63a88

What this does

This plug computes a required amount by multiplying two caller inputs, then composes Morpho's Check Minimum Threshold to test it and surfaces the boolean result. It asks the caller for available_amount, needed_amount, and multiplier_definition at execution time. It runs whenever a caller executes it, returning the meets_required_amount flag from the composed threshold check. Computing the product and running the Morpho check by hand risks a mismatched required_amount or a stale threshold read.

Actions · 5

  • Calculate
    Calculate
    Applies a binary arithmetic operation to two values and returns the result.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • Use
    Use where
    valueis
    minimum_definitionis
    Composes another plug inside this one.
  • Set
    Set to
    Assigns a value to a named variable that later steps reference.
  • Bubble
    Bubble
    Surfaces a value as an output of this plug.

Related plugs · 8