Skip to content

Instantly share code, notes, and snippets.

@marekkirejczyk
Last active March 20, 2019 20:36
Show Gist options
  • Save marekkirejczyk/a6948b35f0f6533c8554bface413b9a8 to your computer and use it in GitHub Desktop.
Save marekkirejczyk/a6948b35f0f6533c8554bface413b9a8 to your computer and use it in GitHub Desktop.
klab/examples/token/src/spec.md
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