-
-
Save itsN1X/95914538065d99872cd6c05b27fe4c2c 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