You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, we need to track more than purity, but effects:
contract state reads,
contract state writes,
blockchain state reads (e.g. time),
sending messages,
randomness.
For instance, getters can have the following set of effects: contract state reads, blockchain state reads, randomness.
Const-eval (comptime) functions must be (observationally) pure, i.e. those can only modify some internal state.
Also, showing those effects in the compilation report is important for contract audits.
The text was updated successfully, but these errors were encountered:
Useful, for instance, for static analysis: nowarp/misti#88.
Actually, we need to track more than purity, but effects:
For instance, getters can have the following set of effects: contract state reads, blockchain state reads, randomness.
Const-eval (comptime) functions must be (observationally) pure, i.e. those can only modify some internal state.
Also, showing those effects in the compilation report is important for contract audits.
The text was updated successfully, but these errors were encountered: