Rendering: 76%
x
456
1064
{ parameter (or (or (or (or (address %add_moderator) (or (address %add_rng_contract) (address %add_sale_contract))) (or (pair %airdrop (bytes %entropy) (pair (nat %generator_id) (pair (bytes %params) (address %recipient)))) (or (pair %balance_of (list %requests (pair (address %owner) (nat %token_id))) (contract %callback (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))))) (pair %buy (nat %amount) (pair (bytes %entropy) (pair (nat %generator_id) (pair (bytes %params) (bytes %sale_extra)))))))) (or (or (pair %create_generator (bool %allow_bl_metadata_update) (pair (option %artifact_signature signature) (pair (bytes %artifact_uri) (pair (bytes %bootloader_spec_id) (pair (bytes %metadata_cid) (pair (bytes %name) (pair (nat %reserved_editions) (address %rng_contract)))))))) (or (nat %delete_generator) (pair %flag_generator (nat %flag) (nat %generator_id)))) (or (nat %regenerate_token) (or (address %remove_moderator) (address %remove_rng_contract))))) (or (or (or (address %remove_sale_contract) (or (address %set_administrator) (pair %set_bootloader_spec (bool %active) (pair (option %signer key) (bytes %spec_id))))) (or (pair %set_entropy (bytes %entropy) (nat %token_id)) (or (pair %set_offchain_metadata (bytes %metadata_cid) (nat %token_id)) (pair %set_sale (nat %editions) (pair (nat %generator_id) (address %sale_contract)))))) (or (or (bytes %set_thumbnail_prefix) (or (list %transfer (pair (address %from_) (list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount)))))) (pair %update_generator (bool %allow_bl_metadata_update) (pair (option %artifact_signature signature) (pair (bytes %artifact_uri) (pair (bytes %bootloader_spec_id) (pair (nat %generator_id) (pair (bytes %metadata_cid) (pair (bytes %name) (pair (nat %reserved_editions) (address %rng_contract))))))))))) (or (list %update_operators (or (pair %add_operator (address %owner) (pair (address %operator) (nat %token_id))) (pair %remove_operator (address %owner) (pair (address %operator) (nat %token_id))))) (or (pair %update_rng_contract (address %new_rng_contract) (nat %token_id)) (pair %update_token_thumbnail (bytes %thumbnail_cid) (nat %token_id))))))) ; storage (pair (address %administrator) (pair (big_map %approved_sale_contracts address unit) (pair (big_map %bootloader_specs bytes (pair (bool %active) (option %signer key))) (pair (big_map %generators nat (pair (bool %allow_bl_metadata_update) (pair (bytes %artifact_uri) (pair (address %author) (pair (bytes %bootloader_spec_id) (pair (timestamp %created) (pair (nat %flag) (pair (timestamp %last_update) (pair (bytes %metadata_cid) (pair (nat %n_tokens) (pair (bytes %name) (pair (nat %reserved_editions) (pair (address %rng_contract) (pair (option %sale (pair (address %contract) (nat %editions))) (nat %version))))))))))))))) (pair (big_map %ledger nat address) (pair (big_map %metadata string bytes) (pair (big_map %moderators address unit) (pair (nat %next_generator_id) (pair (nat %next_token_id) (pair (big_map %operators (pair (address %owner) (pair (address %operator) (nat %token_id))) unit) (pair (big_map %rng_contracts address unit) (pair (bytes %thumbnail_prefix) (pair (big_map %token_extra nat (pair (nat %generator_id) (pair (nat %generator_version) (pair (nat %iteration_number) (pair (bool %offchain_metadata_updated) (pair (bytes %params) (pair (option %raw_seed bytes) (address %rng_contract)))))))) (big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes)))))))))))))))) ; code { LAMBDA (pair (pair (option signature) (pair bytes (pair address bytes))) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair unit (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; DUP 2 ; GET 5 ; DUP 2 ; GET 6 ; GET ; IF_NONE { PUSH string "BOOTLOADER_SPEC_NOT_FOUND" ; FAILWITH } {} ; DUP ; CAR ; IF {} { PUSH string "BOOTLOADER_SPEC_DISABLED" ; FAILWITH } ; CDR ; IF_NONE { DROP } { DUP 2 ; CAR ; IF_NONE { PUSH string "MISSING_ARTIFACT_SIGNATURE" ; FAILWITH } { DROP } ; DUP 2 ; GET 5 ; DUP 3 ; GET 3 ; PAIR ; DUP 3 ; GET 6 ; PAIR ; PACK ; DIG 2 ; CAR ; IF_NONE { PUSH int 182 ; FAILWITH } {} ; DIG 2 ; CHECK_SIGNATURE ; IF {} { PUSH string "INVALID_ARTIFACT_SIGNATURE" ; FAILWITH } } ; UNIT ; PAIR } ; SWAP ; LAMBDA (pair (pair bytes (pair nat (pair bytes address))) (pair (list operation) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) (pair unit (pair (list operation) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) { UNPAIR 3 ; SWAP ; DUP 3 ; GET 7 ; DUP 3 ; GET 3 ; GET ; IF_NONE { PUSH int 190 ; FAILWITH } {} ; DUP 4 ; GET 17 ; PUSH nat 1 ; DUP 3 ; GET 17 ; ADD ; DIG 5 ; DUP ; GET 26 ; EMPTY_MAP string bytes ; LAMBDA (pair nat bytes) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; CAR ; EXEC ; PUSH bytes 0x23 ; PUSH bytes 0x20 ; DIG 3 ; CDR ; CONCAT ; CONCAT ; CONCAT } ; DUP 7 ; GET 19 ; DUP 6 ; PAIR ; EXEC ; SOME ; PUSH string "name" ; UPDATE ; LAMBDA (pair bytes (pair nat (pair bytes bytes))) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; GET 3 ; EXEC ; PUSH bytes 0x693d ; PUSH bytes 0x26 ; DUP 4 ; GET 6 ; PUSH bytes 0x733d ; PUSH bytes 0x3f ; DUP 7 ; CAR ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; PUSH bytes 0x ; DUP 3 ; GET 5 ; COMPARE ; NEQ ; IF { SWAP ; GET 5 ; PUSH bytes 0x703d ; PUSH bytes 0x26 ; CONCAT ; CONCAT ; SWAP ; CONCAT } { SWAP ; DROP } } ; LAMBDA bytes bytes { PUSH bytes 0x ; DUP 2 ; SIZE ; PUSH bytes 0xf0 ; PUSH bytes 0x0f ; DUP 3 ; PUSH nat 0 ; DUP 2 ; INT ; GT ; LOOP { DUP 7 ; PUSH nat 1 ; DUP 3 ; SLICE ; IF_NONE { PUSH int 38 ; FAILWITH } {} ; PUSH nat 4 ; DUP 6 ; DUP 3 ; AND ; LSR ; DUP 5 ; DIG 2 ; AND ; DIG 7 ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 2 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 3 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; CONCAT ; SWAP ; CONCAT ; DUG 5 ; PUSH nat 1 ; ADD ; DUP ; DUP 3 ; COMPARE ; GT } ; DROP 5 ; SWAP ; DROP } ; PUSH bytes 0xb00710ade2b00710ade2b00710ade2b00710ade2b00710ade2b00710ade21337 ; EXEC ; DUP 10 ; GET 5 ; DUP 7 ; DUP 10 ; GET 3 ; PAIR 4 ; EXEC ; SOME ; PUSH string "_artifactUri" ; UPDATE ; DUP 5 ; PAIR ; SOME ; DUP 5 ; UPDATE ; UPDATE 26 ; DUP ; GET 9 ; DUP 7 ; GET 6 ; SOME ; DUP 5 ; UPDATE ; UPDATE 9 ; DUP ; GET 25 ; DUP 5 ; GET 23 ; NONE bytes ; DUP 9 ; GET 5 ; PUSH bool False ; DUP 7 ; DUP 10 ; GET 26 ; DUP 13 ; GET 3 ; PAIR 7 ; DIG 3 ; DROP ; SOME ; DUP 4 ; UPDATE ; UPDATE 25 ; DUP ; GET 7 ; DUP ; DUP 7 ; GET 3 ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 224 ; FAILWITH } {} ; DUP ; GET 17 ; PUSH nat 1 ; ADD ; UPDATE 17 ; SOME ; SWAP ; UPDATE ; UPDATE 7 ; DUP ; GET 17 ; PUSH nat 1 ; ADD ; UPDATE 17 ; DUG 4 ; SWAP ; GET 23 ; CONTRACT %request_entropy (pair (bytes %entropy) (nat %token_id)) ; IF_NONE { PUSH int 226 ; FAILWITH } {} ; DIG 2 ; SWAP ; PUSH mutez 0 ; DIG 3 ; DIG 4 ; CAR ; PAIR ; TRANSFER_TOKENS ; CONS ; UNIT ; PAIR 3 } ; SWAP ; LAMBDA (pair (pair (lambda (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) (pair address nat)) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; UNPAIR ; SWAP ; DUP ; CDR ; DIG 2 ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 2 ; IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ; DUP ; CAR ; DUP 3 ; GET 9 ; DIG 2 ; CDR ; GET ; IF_NONE { PUSH int 372 ; FAILWITH } {} ; COMPARE ; EQ ; IF { PUSH nat 1 } { PUSH nat 0 } ; PAIR } ; SWAP ; LAMBDA (pair address (pair address nat)) unit { CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "FA2_NOT_OWNER" ; FAILWITH } ; UNIT } ; SWAP ; LAMBDA (pair (pair address (pair address nat)) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair unit (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; DUP ; CAR ; SENDER ; COMPARE ; EQ ; IF { DROP ; PUSH bool True } { DUP 2 ; GET 19 ; DUP 2 ; GET 4 ; SENDER ; DIG 3 ; CAR ; PAIR 3 ; MEM } ; IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } ; UNIT ; PAIR } ; SWAP ; LAMBDA (pair unit (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { CDR ; DUP ; CAR ; SENDER ; COMPARE ; EQ ; PAIR } ; SWAP ; LAMBDA (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; SWAP ; DUP ; GET 26 ; DIG 2 ; MEM ; PAIR } ; SWAP ; LAMBDA (pair (pair address (pair address nat)) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; SWAP ; DUP ; GET 19 ; DIG 2 ; MEM ; PAIR } ; SWAP ; LAMBDA (pair (pair (lambda (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) nat) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; UNPAIR ; DUG 2 ; PAIR ; EXEC ; UNPAIR ; IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ; PUSH nat 1 ; PAIR } ; SWAP ; LAMBDA (pair (pair address (pair address (pair nat nat))) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair unit (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; PUSH nat 1 ; DUP 2 ; GET 6 ; COMPARE ; EQ ; IF { DUP ; CAR ; DUP 3 ; GET 9 ; DUP 3 ; GET 5 ; GET ; IF_NONE { PUSH int 380 ; FAILWITH } {} ; COMPARE ; EQ } { PUSH bool False } ; IF {} { PUSH string "FA2_INSUFFICIENT_BALANCE" ; FAILWITH } ; SWAP ; DUP ; GET 9 ; DUP 3 ; GET 3 ; SOME ; DIG 3 ; GET 5 ; UPDATE ; UPDATE 9 ; UNIT ; PAIR } ; SWAP ; PUSH (pair (string %ledger_type) (pair %policy (string %name) (pair (bool %supports_operator) (bool %supports_transfer)))) (Pair "NFT" (Pair "owner-or-operator-transfer" (Pair True True))) ; SWAP ; UNPAIR ; IF_LEFT { IF_LEFT { IF_LEFT { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; IF_LEFT { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_ADMIN" ; FAILWITH } ; SWAP ; DUP ; GET 13 ; PUSH (option unit) (Some Unit) ; DIG 3 ; UPDATE ; UPDATE 13 } { IF_LEFT { DUP 2 ; GET 13 ; SENDER ; MEM ; IF { PUSH bool True } { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; SWAP ; DUP ; GET 21 ; PUSH (option unit) (Some Unit) ; DIG 3 ; UPDATE ; UPDATE 21 } { DUP 2 ; GET 13 ; SENDER ; MEM ; IF { PUSH bool True } { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; SWAP ; DUP ; GET 3 ; PUSH (option unit) (Some Unit) ; DIG 3 ; UPDATE ; UPDATE 3 } } ; NIL operation } { IF_LEFT { DUP 2 ; GET 7 ; DUP 2 ; GET 3 ; GET ; IF_NONE { PUSH int 500 ; FAILWITH } {} ; DUP ; GET 5 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_AUTHOR" ; FAILWITH } ; PUSH nat 0 ; DUP 2 ; GET 21 ; COMPARE ; GT ; IF {} { PUSH string "NO_RESERVED_LEFT" ; FAILWITH } ; PUSH nat 32 ; DUP 3 ; CAR ; SIZE ; COMPARE ; EQ ; IF {} { PUSH string "INVALID_ENTROPY_LEN" ; FAILWITH } ; DUP ; GET 25 ; IF_NONE {} { CDR ; DUP 2 ; GET 21 ; DUP 3 ; GET 17 ; ADD ; COMPARE ; LE ; IF {} { PUSH string "MINTED_PLUS_RESERVED_EXCEEDS_EDITION_CAP" ; FAILWITH } } ; DIG 2 ; DUP ; GET 7 ; DUP ; DUP 5 ; GET 3 ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 511 ; FAILWITH } {} ; PUSH nat 1 ; DUP 6 ; GET 21 ; SUB ; ISNAT ; IF_NONE { PUSH int 511 ; FAILWITH } {} ; UPDATE 21 ; SOME ; SWAP ; UPDATE ; UPDATE 7 ; DUG 2 ; NIL operation ; DUP 14 ; DUP 4 ; GET 6 ; DUP 5 ; GET 5 ; DUP 6 ; GET 3 ; DUP 7 ; CAR ; PAIR 4 ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; SWAP ; DUG 3 ; PAIR 3 ; EXEC ; CDR ; UNPAIR } { IF_LEFT { LAMBDA (pair (pair (pair address nat) (pair (lambda (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) (lambda (pair (pair (lambda (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair bool (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))) (pair address nat)) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair nat (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes)))))))))))))))))))) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) (pair (pair (pair address nat) nat) (pair address (pair (big_map address unit) (pair (big_map bytes (pair bool (option key))) (pair (big_map nat (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat)))))))))))))) (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map address unit) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair (big_map address unit) (pair bytes (pair (big_map nat (pair nat (pair nat (pair nat (pair bool (pair bytes (pair (option bytes) address))))))) (big_map nat (pair nat (map string bytes))))))))))))))))) { UNPAIR ; UNPAIR 3 ; DIG 2 ; DUP 2 ; DIG 3 ; PAIR ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 2 ; SWAP ; PAIR ; PAIR } ; DUP 2 ; CAR ; MAP { DUP 2 ; DUP 14 ; DUP 11 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 4 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; DUG 14 ; DUG 14 ; DUG 14 ; DUG 14 ; DIG 12 ; DIG 14 ; DIG 14 ; DIG 14 } ; SWAP ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; NIL operation ; DIG 2 ; CDR ; PUSH mutez 0 ; DIG 3 ; TRANSFER_TOKENS ; CONS } { PUSH nat 0 ; DUP 2 ; CAR ; COMPARE ; GT ; IF {} { PUSH string "ZERO_AMOUNT" ; FAILWITH } ; DUP ; CAR ; PUSH nat 32 ; MUL ; DUP 2 ; GET 3 ; SIZE ; COMPARE ; EQ ; IF {} { PUSH string "INVALID_ENTROPY_LEN" ; FAILWITH } ; DUP 2 ; GET 7 ; DUP 2 ; GET 5 ; GET ; IF_NONE { PUSH int 535 ; FAILWITH } {} ; DUP ; GET 25 ; IF_NONE { PUSH string "NO_SALE_CONFIG" ; FAILWITH } { DUP 4 ; GET 3 ; DUP 2 ; CAR ; MEM ; IF {} { PUSH string "SALE_CONTRACT_DISABLED" ; FAILWITH } ; DUP 2 ; GET 21 ; DUP 3 ; GET 17 ; ADD ; DUP 2 ; CDR ; DUP 2 ; COMPARE ; LE ; IF {} { PUSH string "MINTED_PLUS_RESERVED_EXCEEDS_EDITION_CAP" ; FAILWITH } ; DUP ; DUP 3 ; CDR ; SUB ; ISNAT ; IF_NONE { PUSH int 547 ; FAILWITH } {} ; DUP ; DUP 6 ; CAR ; COMPARE ; LE ; IF {} { PUSH string "INSUFFICIENT_PUBLIC_SUPPLY" ; FAILWITH } ; DUP 3 ; CAR ; CONTRACT %execute_sale (pair (bytes %sale_id) (pair (address %buyer) (pair (nat %amount) (bytes %extra)))) ; IF_NONE { PUSH int 554 ; FAILWITH } {} ; NIL operation ; DUP ; DUP 3 ; AMOUNT ; DUP 10 ; GET 8 ; DUP 11 ; CAR ; SENDER ; LAMBDA nat bytes { SELF_ADDRESS ; PAIR ; PACK } ; DUP 14 ; GET 5 ; EXEC ; PAIR 4 ; DIG 4 ; DROP ; TRANSFER_TOKENS ; CONS ; DUP 7 ; CAR ; PUSH nat 0 ; DUP 2 ; INT ; GT ; LOOP { DUP 20 ; SENDER ; DUP 11 ; GET 7 ; DUP 12 ; GET 5 ; DUP 13 ; GET 3 ; PUSH nat 32 ; DUP ; DUP 8 ; MUL ; SLICE ; IF_NONE { PUSH int 575 ; FAILWITH } {} ; PAIR 4 ; SWAP ; DIG 11 ; DIG 5 ; DIG 3 ; PAIR 3 ; EXEC ; CDR ; UNPAIR ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DUG 20 ; DIG 12 ; DIG 20 ; DIG 20 ; DIG 20 ; DIG 20 ; DIG 20 ; DIG 20 ; DIG 18 ; DIG 20 ; DIG 20 ; PUSH nat 1 ; ADD ; DUP ; DUP 3 ; COMPARE ; GT } ; DROP 2 ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP } } } } } { IF_LEFT { IF_LEFT { DUP 2 ; GET 21 ; DUP 2 ; GET 14 ; MEM ; IF {} { PUSH string "INVALID_RNG_CONTRACT" ; FAILWITH } ; DUP 13 ; DUP 2 ; GET 7 ; SENDER ; DUP 4 ; GET 5 ; DUP 5 ; GET 3 ; PAIR 4 ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 12 ; DUG 12 ; DIG 11 ; DIG 12 ; DUP 2 ; DUP ; GET 7 ; PUSH nat 1 ; NONE (pair address nat) ; DUP 5 ; GET 14 ; DUP 6 ; GET 13 ; DUP 7 ; GET 11 ; PUSH nat 0 ; DUP 9 ; GET 9 ; NOW ; PUSH nat 0 ; NOW ; DUP 13 ; GET 7 ; SENDER ; DUP 15 ; GET 5 ; DUP 16 ; CAR ; PAIR 14 ; DIG 3 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; SOME ; DIG 3 ; GET 15 ; UPDATE ; UPDATE 7 ; DUP ; GET 15 ; PUSH nat 1 ; ADD ; UPDATE 15 } { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; IF_LEFT { DUP 2 ; GET 7 ; DUP 2 ; GET ; IF_NONE { PUSH int 365 ; FAILWITH } {} ; DUP ; GET 5 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_AUTHOR" ; FAILWITH } ; GET 17 ; PUSH nat 0 ; COMPARE ; EQ ; IF {} { PUSH string "TOKENS_MINTED" ; FAILWITH } ; SWAP ; DUP ; GET 7 ; NONE (pair bool (pair bytes (pair address (pair bytes (pair timestamp (pair nat (pair timestamp (pair bytes (pair nat (pair bytes (pair nat (pair address (pair (option (pair address nat)) nat))))))))))))) ; DIG 3 ; UPDATE ; UPDATE 7 } { DUP 2 ; GET 13 ; SENDER ; MEM ; IF { PUSH bool True } { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; SWAP ; DUP ; GET 7 ; DUP ; DUP 4 ; CDR ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 427 ; FAILWITH } {} ; DIG 4 ; CAR ; UPDATE 11 ; SOME ; SWAP ; UPDATE ; UPDATE 7 } } } { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; IF_LEFT { SENDER ; DUP 3 ; GET 9 ; DUP 3 ; GET ; IF_NONE { PUSH int 453 ; FAILWITH } {} ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_OWNER" ; FAILWITH } ; DUP 2 ; GET 25 ; DUP 2 ; GET ; IF_NONE { PUSH int 454 ; FAILWITH } {} ; DUP 3 ; GET 7 ; DUP 2 ; CAR ; GET ; IF_NONE { PUSH int 455 ; FAILWITH } {} ; DUP 2 ; GET 3 ; DUP 2 ; GET 26 ; COMPARE ; GT ; IF {} { PUSH string "NO_UPDATE_POSSIBLE" ; FAILWITH } ; DUP 2 ; GET 11 ; IF_NONE { PUSH string "SEED_NOT_SET" ; FAILWITH } { DROP } ; DUP 4 ; DUP ; GET 26 ; EMPTY_MAP string bytes ; LAMBDA (pair nat bytes) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; CAR ; EXEC ; PUSH bytes 0x23 ; PUSH bytes 0x20 ; DIG 3 ; CDR ; CONCAT ; CONCAT ; CONCAT } ; DUP 5 ; GET 19 ; DUP 7 ; GET 5 ; PAIR ; EXEC ; SOME ; PUSH string "name" ; UPDATE ; LAMBDA (pair bytes (pair nat (pair bytes bytes))) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; GET 3 ; EXEC ; PUSH bytes 0x693d ; PUSH bytes 0x26 ; DUP 4 ; GET 6 ; PUSH bytes 0x733d ; PUSH bytes 0x3f ; DUP 7 ; CAR ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; PUSH bytes 0x ; DUP 3 ; GET 5 ; COMPARE ; NEQ ; IF { SWAP ; GET 5 ; PUSH bytes 0x703d ; PUSH bytes 0x26 ; CONCAT ; CONCAT ; SWAP ; CONCAT } { SWAP ; DROP } } ; LAMBDA bytes bytes { PUSH bytes 0x ; DUP 2 ; SIZE ; PUSH bytes 0xf0 ; PUSH bytes 0x0f ; DUP 3 ; PUSH nat 0 ; DUP 2 ; INT ; GT ; LOOP { DUP 7 ; PUSH nat 1 ; DUP 3 ; SLICE ; IF_NONE { PUSH int 38 ; FAILWITH } {} ; PUSH nat 4 ; DUP 6 ; DUP 3 ; AND ; LSR ; DUP 5 ; DIG 2 ; AND ; DIG 7 ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 2 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 3 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; CONCAT ; SWAP ; CONCAT ; DUG 5 ; PUSH nat 1 ; ADD ; DUP ; DUP 3 ; COMPARE ; GT } ; DROP 5 ; SWAP ; DROP } ; DUP 7 ; GET 11 ; IF_NONE { PUSH int 473 ; FAILWITH } {} ; EXEC ; DUP 7 ; GET 9 ; DUP 8 ; GET 5 ; DUP 8 ; GET 3 ; PAIR 4 ; DIG 6 ; DROP ; EXEC ; SOME ; PUSH string "artifactUri" ; UPDATE ; LAMBDA (pair bytes (pair nat nat)) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; GET 4 ; EXEC ; PUSH bytes 0x763d ; PUSH bytes 0x3f ; LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 5 ; GET 3 ; EXEC ; DIG 4 ; CAR ; CONCAT ; CONCAT ; CONCAT ; CONCAT } ; DUP 5 ; GET 26 ; DUP 7 ; DIG 8 ; GET 23 ; PAIR 3 ; EXEC ; SOME ; PUSH string "thumbnailUri" ; UPDATE ; DUP 5 ; PAIR ; SOME ; DUP 5 ; UPDATE ; UPDATE 26 ; DUP ; GET 25 ; DUP ; DUP 5 ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 489 ; FAILWITH } {} ; DIG 4 ; GET 26 ; UPDATE 3 ; SOME ; SWAP ; UPDATE ; UPDATE 25 ; DUP ; GET 25 ; DUP ; DIG 3 ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 490 ; FAILWITH } {} ; PUSH bool False ; UPDATE 7 ; SOME ; SWAP ; UPDATE ; UPDATE 25 } { IF_LEFT { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_ADMIN" ; FAILWITH } ; SWAP ; DUP ; GET 13 ; NONE unit ; DIG 3 ; UPDATE ; UPDATE 13 } { DUP 2 ; GET 13 ; SENDER ; MEM ; IF { PUSH bool True } { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; SWAP ; DUP ; GET 21 ; NONE unit ; DIG 3 ; UPDATE ; UPDATE 21 } } } ; NIL operation } } { IF_LEFT { IF_LEFT { IF_LEFT { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DUP 2 ; GET 13 ; SENDER ; MEM ; IF { PUSH bool True } { DUP 2 ; CAR ; SENDER ; COMPARE ; EQ } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; SWAP ; DUP ; GET 3 ; NONE unit ; DIG 3 ; UPDATE ; UPDATE 3 } { IF_LEFT { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 2 ; UNIT ; SWAP ; DIG 3 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 2 ; IF {} { PUSH string "FA2_NOT_ADMIN" ; FAILWITH } ; UPDATE 1 } { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DUP 2 ; CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_ADMIN" ; FAILWITH } ; SWAP ; DUP ; GET 5 ; DUP 3 ; GET 3 ; DUP 4 ; CAR ; PAIR ; SOME ; DIG 3 ; GET 4 ; UPDATE ; UPDATE 5 } } } { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; IF_LEFT { PUSH nat 32 ; DUP 2 ; CAR ; SIZE ; COMPARE ; EQ ; IF {} { PUSH string "INVALID_SEED_LENGTH" ; FAILWITH } ; DUP 2 ; GET 25 ; DUP 2 ; CDR ; GET ; IF_NONE { PUSH int 608 ; FAILWITH } {} ; DUP ; GET 11 ; IF_NONE {} { PUSH string "SEED_SET" ; FAILWITH } ; DUP ; GET 12 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "INVALID_RNG_CONTRACT" ; FAILWITH } ; DUP 3 ; GET 7 ; DUP 2 ; CAR ; GET ; IF_NONE { PUSH int 611 ; FAILWITH } {} ; DUP 4 ; DUP ; GET 26 ; EMPTY_MAP string bytes ; LAMBDA (pair nat bytes) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; CAR ; EXEC ; PUSH bytes 0x23 ; PUSH bytes 0x20 ; DIG 3 ; CDR ; CONCAT ; CONCAT ; CONCAT } ; DUP 5 ; GET 19 ; DUP 7 ; GET 5 ; PAIR ; EXEC ; SOME ; PUSH string "name" ; UPDATE ; LAMBDA (pair bytes (pair nat (pair bytes bytes))) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; GET 3 ; EXEC ; PUSH bytes 0x693d ; PUSH bytes 0x26 ; DUP 4 ; GET 6 ; PUSH bytes 0x733d ; PUSH bytes 0x3f ; DUP 7 ; CAR ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; CONCAT ; PUSH bytes 0x ; DUP 3 ; GET 5 ; COMPARE ; NEQ ; IF { SWAP ; GET 5 ; PUSH bytes 0x703d ; PUSH bytes 0x26 ; CONCAT ; CONCAT ; SWAP ; CONCAT } { SWAP ; DROP } } ; LAMBDA bytes bytes { PUSH bytes 0x ; DUP 2 ; SIZE ; PUSH bytes 0xf0 ; PUSH bytes 0x0f ; DUP 3 ; PUSH nat 0 ; DUP 2 ; INT ; GT ; LOOP { DUP 7 ; PUSH nat 1 ; DUP 3 ; SLICE ; IF_NONE { PUSH int 38 ; FAILWITH } {} ; PUSH nat 4 ; DUP 6 ; DUP 3 ; AND ; LSR ; DUP 5 ; DIG 2 ; AND ; DIG 7 ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 2 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; PUSH (map bytes bytes) { Elt 0x00 0x30 ; Elt 0x01 0x31 ; Elt 0x02 0x32 ; Elt 0x03 0x33 ; Elt 0x04 0x34 ; Elt 0x05 0x35 ; Elt 0x06 0x36 ; Elt 0x07 0x37 ; Elt 0x08 0x38 ; Elt 0x09 0x39 ; Elt 0x0a 0x61 ; Elt 0x0b 0x62 ; Elt 0x0c 0x63 ; Elt 0x0d 0x64 ; Elt 0x0e 0x65 ; Elt 0x0f 0x66 } ; DIG 3 ; GET ; IF_NONE { PUSH int 41 ; FAILWITH } {} ; CONCAT ; SWAP ; CONCAT ; DUG 5 ; PUSH nat 1 ; ADD ; DUP ; DUP 3 ; COMPARE ; GT } ; DROP 5 ; SWAP ; DROP } ; DUP 8 ; CAR ; EXEC ; DUP 7 ; GET 9 ; DUP 8 ; GET 5 ; DUP 8 ; GET 3 ; PAIR 4 ; DIG 5 ; DROP ; EXEC ; SOME ; PUSH string "artifactUri" ; UPDATE ; LAMBDA (pair bytes (pair nat nat)) bytes { LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 2 ; GET 4 ; EXEC ; PUSH bytes 0x763d ; PUSH bytes 0x3f ; LAMBDA nat bytes { DUP ; INT ; EQ ; IF { DROP ; PUSH bytes 0x30 } { NIL bytes ; DUP 2 ; INT ; GT ; LOOP { PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 115 ; FAILWITH } {} ; UNPAIR ; DIG 2 ; LAMBDA int bytes { PUSH (map int bytes) { Elt 0 0x30 ; Elt 1 0x31 ; Elt 2 0x32 ; Elt 3 0x33 ; Elt 4 0x34 ; Elt 5 0x35 ; Elt 6 0x36 ; Elt 7 0x37 ; Elt 8 0x38 ; Elt 9 0x39 } ; DUP 2 ; GE ; IF { PUSH int 10 ; DUP 3 ; COMPARE ; LT } { PUSH bool False } ; IF {} { PUSH string "Assert failure: (d >= 0) and (d < 10)" ; FAILWITH } ; SWAP ; GET ; IF_NONE { PUSH int 60 ; FAILWITH } {} } ; DIG 3 ; INT ; EXEC ; CONS ; DUP 2 ; INT ; GT } ; SWAP ; DROP ; CONCAT } } ; DUP 5 ; GET 3 ; EXEC ; DIG 4 ; CAR ; CONCAT ; CONCAT ; CONCAT ; CONCAT } ; DIG 4 ; GET 3 ; DUP 6 ; CDR ; DIG 7 ; GET 23 ; PAIR 3 ; EXEC ; SOME ; PUSH string "thumbnailUri" ; UPDATE ; DUP 4 ; CDR ; PAIR ; SOME ; DUP 4 ; CDR ; UPDATE ; UPDATE 26 ; DUP ; GET 25 ; DUP ; DUP 4 ; CDR ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 642 ; FAILWITH } {} ; DIG 4 ; CAR ; SOME ; UPDATE 11 ; SOME ; SWAP ; UPDATE ; UPDATE 25 } { IF_LEFT { DUP 2 ; GET 25 ; DUP 2 ; CDR ; GET ; IF_NONE { PUSH int 589 ; FAILWITH } {} ; DUP 3 ; GET 7 ; SWAP ; CAR ; GET ; IF_NONE { PUSH int 590 ; FAILWITH } {} ; DUP 3 ; GET 25 ; DUP 3 ; CDR ; GET ; IF_NONE { PUSH int 592 ; FAILWITH } {} ; GET 7 ; IF { CAR } { DROP ; PUSH bool True } ; IF {} { PUSH string "METADATA_ALREADY_UPDATED" ; FAILWITH } ; DUP 2 ; CAR ; SENDER ; COMPARE ; EQ ; IF { PUSH bool True } { DUP 2 ; GET 13 ; SENDER ; MEM } ; IF {} { PUSH string "ONLY_MODS" ; FAILWITH } ; DUP 2 ; GET 26 ; DUP 2 ; CDR ; GET ; IF_NONE { PUSH int 598 ; FAILWITH } {} ; CDR ; DUP 2 ; CAR ; SOME ; PUSH string "" ; UPDATE ; DIG 2 ; DUP ; GET 26 ; DIG 2 ; DUP 4 ; CDR ; PAIR ; SOME ; DUP 4 ; CDR ; UPDATE ; UPDATE 26 ; DUP ; GET 25 ; DUP ; DIG 3 ; CDR ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 603 ; FAILWITH } {} ; PUSH bool True ; UPDATE 7 ; SOME ; SWAP ; UPDATE ; UPDATE 25 } { DUP 2 ; GET 7 ; DUP 2 ; GET 3 ; GET ; IF_NONE { PUSH int 377 ; FAILWITH } {} ; DUP ; GET 5 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_AUTHOR" ; FAILWITH } ; DUP 3 ; GET 3 ; DUP 3 ; GET 4 ; MEM ; IF {} { PUSH string "INVALID_SALE_CONTRACT" ; FAILWITH } ; DUP ; GET 25 ; IF_NONE {} { PUSH nat 0 ; DUP 3 ; GET 17 ; COMPARE ; GT ; IF { DUP ; CDR ; DUP 4 ; CAR ; COMPARE ; LE ; IF {} { PUSH string "EDITION_CAP_CANNOT_INCREASE_AFTER_MINT" ; FAILWITH } ; CAR ; DUP 3 ; GET 4 ; COMPARE ; EQ ; IF {} { PUSH string "NO_SALE_CONTRACT_CHANGE" ; FAILWITH } } { DROP } } ; DUP ; GET 21 ; SWAP ; GET 17 ; ADD ; DUP 2 ; CAR ; COMPARE ; GE ; IF {} { PUSH string "EDITION_CAP_BELOW_MINTED_PLUS_RESERVED" ; FAILWITH } ; LAMBDA nat bytes { SELF_ADDRESS ; PAIR ; PACK } ; DUP 2 ; GET 3 ; EXEC ; SWAP ; DUP ; GET 4 ; DIG 2 ; SELF_ADDRESS ; PAIR ; VIEW "is_sale_configured" bool ; IF_NONE { PUSH string "INVALID_SALE_MODULE" ; FAILWITH } {} ; IF {} { PUSH string "SALE_NOT_CONFIGURED" ; FAILWITH } ; SWAP ; DUP ; GET 7 ; DUP ; DUP 4 ; GET 3 ; DUP ; DUG 2 ; GET ; IF_NONE { PUSH int 401 ; FAILWITH } {} ; DIG 4 ; DUP ; CAR ; SWAP ; GET 4 ; PAIR ; SOME ; UPDATE 25 ; SOME ; SWAP ; UPDATE ; UPDATE 7 } } } } { IF_LEFT { IF_LEFT { DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DIG 2 ; DROP ; DUP 2 ; CAR ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_ADMIN" ; FAILWITH } ; UPDATE 23 } { IF_LEFT { DUP 3 ; GET 6 ; IF { DUP ; ITER { DUP ; CDR ; ITER { DUP 9 ; SWAP ; DUP ; GET 3 ; DIG 2 ; DIG 5 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; DUG 15 ; DUG 15 ; DUG 15 ; DUG 15 ; DUG 15 ; DIG 12 ; DIG 15 ; DIG 15 ; DIG 15 ; DIG 15 ; IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ; DUP 11 ; DUP 2 ; GET 3 ; DUP 3 ; CAR ; DUP 5 ; CAR ; PAIR 3 ; SWAP ; DIG 5 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 14 ; DUG 14 ; DUG 14 ; DUG 14 ; DIG 11 ; DIG 14 ; DIG 14 ; DIG 14 ; PUSH nat 0 ; DUP 2 ; GET 4 ; COMPARE ; GT ; IF { DUP 2 ; CAR ; PAIR ; DUP 6 ; DIG 4 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 13 ; DUG 13 ; DUG 13 ; DIG 11 ; DIG 13 ; DIG 13 } { DROP } } ; DROP } ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP } { PUSH string "FA2_TX_DENIED" ; FAILWITH } } { DUP 2 ; GET 7 ; DUP 2 ; GET 9 ; GET ; IF_NONE { PUSH string "GENERATOR_NOT_FOUND" ; FAILWITH } {} ; DUP ; GET 5 ; SENDER ; COMPARE ; EQ ; IF {} { PUSH string "ONLY_AUTHOR" ; FAILWITH } ; DUP 3 ; GET 21 ; DUP 3 ; GET 16 ; MEM ; IF {} { PUSH string "INVALID_RNG_CONTRACT" ; FAILWITH } ; DUP ; GET 25 ; IF_NONE {} { CDR ; DUP 3 ; GET 15 ; DUP 3 ; GET 17 ; ADD ; COMPARE ; LE ; IF {} { PUSH string "MINTED_PLUS_RESERVED_EXCEEDS_EDITION_CAP" ; FAILWITH } } ; DUP ; GET 3 ; DUP 3 ; GET 5 ; COMPARE ; NEQ ; IF { PUSH bool True } { DUP ; GET 7 ; DUP 3 ; GET 7 ; COMPARE ; NEQ } ; DUP ; IF { DUP 15 ; DUP 4 ; GET 7 ; SENDER ; DUP 6 ; GET 5 ; DUP 7 ; GET 3 ; PAIR 4 ; SWAP ; DIG 5 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 14 ; DUG 14 ; DUG 14 ; DUG 14 ; DIG 11 ; DIG 14 ; DIG 14 ; DIG 14 } {} ; DUP 2 ; GET 26 ; DUP 2 ; IF { PUSH nat 1 ; ADD } {} ; DIG 4 ; DUP ; GET 7 ; DUP 3 ; DUP 6 ; GET 25 ; DUP 8 ; GET 16 ; DUP 9 ; GET 15 ; DUP 10 ; GET 13 ; DUP 10 ; GET 17 ; DUP 12 ; GET 11 ; NOW ; DUP 13 ; GET 11 ; DUP 14 ; GET 9 ; DUP 16 ; GET 7 ; SENDER ; DUP 18 ; GET 5 ; DUP 19 ; CAR ; PAIR 14 ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; DIG 4 ; DROP ; SOME ; DIG 3 ; GET 9 ; UPDATE ; UPDATE 7 } } } { IF_LEFT { DUP 3 ; GET 5 ; IF { DUP ; ITER { IF_LEFT { DUP 11 ; DUP 2 ; EXEC ; DROP ;