Copy-paste fix pattern
library CB-Math
fn main() {
u256 value = CB-Math.min(max, 1_000_000)
save value
}
ClosedBit Docs
ClosedBit error docs
u256 overflow. A checked unsigned 256-bit result exceeded the maximum allowed value.
A checked unsigned 256-bit result exceeded the maximum allowed value.
Use smaller operands, clamp before the operation, or switch to a design that stores multiple values instead of one overflowing lane.
library CB-Math
fn main() {
u256 value = CB-Math.min(max, 1_000_000)
save value
}