Created
May 18, 2022 19:06
-
-
Save renatoalencar/c92ea5f74262a4fd2b11b94cf46887d7 to your computer and use it in GitHub Desktop.
Deku ticket contract compiled
This file contains hidden or 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
{ parameter | |
(pair (pair (address %deposit_address) (bytes %hash_)) (address %vault_address)) ; | |
storage nat ; | |
code { PUSH mutez 0 ; | |
AMOUNT ; | |
COMPARE ; | |
EQ ; | |
IF {} { PUSH string "failed assertion" ; FAILWITH } ; | |
UNPAIR ; | |
UNPAIR ; | |
UNPAIR ; | |
DIG 2 ; | |
CONTRACT %deposit (pair address (ticket bytes)) ; | |
IF_NONE | |
{ DROP 2 ; PUSH string "bad contract" ; FAILWITH } | |
{ PUSH mutez 0 ; | |
PUSH nat 1 ; | |
DIG 4 ; | |
TICKET ; | |
DIG 3 ; | |
PAIR ; | |
TRANSFER_TOKENS ; | |
NIL operation ; | |
SWAP ; | |
CONS } ; | |
PUSH nat 1 ; | |
DIG 2 ; | |
ADD ; | |
SWAP ; | |
PAIR } } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment