INNER CODE UNIT · Rust
max_repr
renegade-fi/renegade · crates/circuits/circuit-types/src/lib.rs:160
let max_repr = (1u128 << PRICE_BITS) - 1;
price.repr <= Scalar::from(max_repr)
}
/// Converts an element of the arkworks `ScalarField` to an `ark-mpc` type
/// `Scalar`
#[macro_export]
macro_rules! scalar {
($x:expr) => {
Scalar::new($x)
};
}
/// A helper to serialize a Scalar to a hex string
pub fn scalar_to_hex_string<S>(val: &Scalar, s: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{