Contracts: How they are checked
● Intermediate3 min
While you develop, every contract is checked. In a release build, public functions' contracts and every invariant are.
kavach run, kavach test, debug builds | every contract |
| release builds | contracts of pub functions, and every invariant |
A contract must only read values: it can't change anything or use a capability, so checking it never changes what the program does.