Skip to content

Instantly share code, notes, and snippets.

@frankhillard
Last active November 25, 2019 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankhillard/00eb5b2428901a66b26123a7a99c7558 to your computer and use it in GitHub Desktop.
Save frankhillard/00eb5b2428901a66b26123a7a99c7558 to your computer and use it in GitHub Desktop.
simpliest michelson example
# This contract contains an integer in the storage (= a counter).
# It has two entrypoints :
# - increaseCounterBy : storage = storage + value
# - decreaseCounterBy : storage = storage - value
parameter (or (int %increaseCounterBy) (int %decreaseCounterBy));
storage int;
code {
UNPAIR;
IF_LEFT {
ADD
}
{
SWAP;
SUB
};
NIL operation;
PAIR;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment