Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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