Last active
November 25, 2019 11:11
-
-
Save frankhillard/00eb5b2428901a66b26123a7a99c7558 to your computer and use it in GitHub Desktop.
simpliest michelson example
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
# 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