Numscript
Requires flag: experimental-get-amount-function
This is a feature of the experimental Numscript interpreter. To run it through the API, set runtime: experimental-interpreter in the transaction request body (the default is machine) and enable the relevant feature flag. See Selecting an Interpreter for per-feature availability.
Returns the numeric amount part of a monetary value.
With $payment = [EUR/2 5000], $amount resolves to 5000.
Use cases#
- Store the amount of a dynamic monetary variable in transaction metadata
- Compute fees or splits based on the amount
- Log transaction amounts independently of the asset