INNER CODE UNIT · Rust
from
renegade-fi/renegade · crates/circuits/circuit-types/src/lib.rs:126
fn from(value: AuthenticatedBool) -> Self {
value.0
}
}
// -----------
// | Helpers |
// -----------
/// Get the maximum representable price
pub fn max_price() -> FixedPoint {
let repr_bigint = (BigUint::from(1u8) << PRICE_BITS) - 1u8;
let repr = biguint_to_scalar(&repr_bigint);
FixedPoint::from_repr(repr)
}
/// Get the maximum representable amount
pub fn max_amount() -> Amount {