Skip to content

Instantly share code, notes, and snippets.

@renatoalencar
Created May 18, 2022 19:06
Show Gist options
  • Save renatoalencar/c92ea5f74262a4fd2b11b94cf46887d7 to your computer and use it in GitHub Desktop.
Save renatoalencar/c92ea5f74262a4fd2b11b94cf46887d7 to your computer and use it in GitHub Desktop.
Deku ticket contract compiled
{ 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