x
28
parameter (or (unit %default) (contract %get_price nat));storage (pair (address %oracle) (string %symbol));code { UNPAIR ; IF_LEFT { DROP ; NIL operation ; SENDER ; CONTRACT unit ; IF_NONE { PUSH int 201 ; FAILWITH } {} ; AMOUNT ; UNIT ; TRANSFER_TOKENS ; CONS } { NIL operation ; SWAP ; PUSH mutez 0 ; DIG 3 ; DUP ; CAR ; SWAP ; DUP ; DUG 5 ; CDR ; VIEW "get_price" nat ; IF_NONE { PUSH int 502 ; FAILWITH } {} ; TRANSFER_TOKENS ; CONS } ; PAIR }