x
63
parameter (or (contract %get_price nat) (or (contract %get_price_internal nat) (nat %set_usd_lp_price)));storage (pair (pair (string %symbol) (address %symbol_usd_price_oracle)) (pair (nat %usd_lp_price) (address %usd_lp_price_oracle)));code { UNPAIR ; IF_LEFT { NIL operation ; DUP 3 ; GET 4 ; CONTRACT %get_price (contract nat) ; IF_NONE { PUSH int 93 ; FAILWITH } {} ; PUSH mutez 0 ; SELF %set_usd_lp_price ; TRANSFER_TOKENS ; CONS ; SELF %get_price_internal ; PUSH mutez 0 ; DIG 3 ; TRANSFER_TOKENS ; CONS } { IF_LEFT { SELF_ADDRESS ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "INCORRECT_SENDER" ; FAILWITH } ; NIL operation ; SWAP ; PUSH mutez 0 ; PUSH nat 1000000 ; DIG 4 ; DUP ; GET 3 ; SWAP ; DUP ; CAR ; CDR ; SWAP ; DUP ; DUG 7 ; CAR ; CAR ; VIEW "get_price" nat ; IF_NONE { PUSH int 502 ; FAILWITH } {} ; MUL ; EDIV ; IF_NONE { PUSH int 111 ; FAILWITH } { CAR } ; TRANSFER_TOKENS ; CONS } { SWAP ; DUP ; DUG 2 ; GET 4 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "INCORRECT_SENDER" ; FAILWITH } ; UPDATE 3 ; NIL operation } } ; NIL operation ; SWAP ; ITER { CONS } ; PAIR }