Last active
March 20, 2019 20:36
-
-
Save marekkirejczyk/a6948b35f0f6533c8554bface413b9a8 to your computer and use it in GitHub Desktop.
klab/examples/token/src/spec.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
behaviour transfer of Token | |
interface transfer(address To, uint Value) | |
types | |
FromBal : uint256 | |
ToBal : uint256 | |
storage | |
#Token.balances[CALLER_ID] |-> FromBal => FromBal - Value | |
#Token.balances[To] |-> ToBal => ToBal + Value | |
iff in range uint256 | |
FromBal - Value | |
ToBal + Value | |
if | |
CALLER_ID =/= To |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment