I want contracts or constraints to declare invariants that certain types must follow.
I am thinking they need to be followed on the function boundary incase it takes intermediate steps to make the constraint satisfied. But ideally it would be at the statement level .
But the contract block consists of a list of boolean expressions that must remain true at all times. These constraints must also be validatable at compile time and not require runtime checks
pack Test {
a: String[]
b: i32[]
}
contract Test {
a.len() == b.len()
a.len() < 10000
}
I want contracts or constraints to declare invariants that certain types must follow.
I am thinking they need to be followed on the function boundary incase it takes intermediate steps to make the constraint satisfied. But ideally it would be at the statement level .
But the contract block consists of a list of boolean expressions that must remain true at all times. These constraints must also be validatable at compile time and not require runtime checks