x
493
1023
{ parameter (or (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))))) (or (pair %configure (string %addr) (pair (string %body_after_addr) (pair (string %body_before_addr) (string %head)))) (bls12_381_fr %contribute))) (or (pair %mint (bls12_381_g1 %a) (pair (bls12_381_g2 %b) (pair (bls12_381_g1 %c) (bls12_381_fr %commitment)))) (or (list %transfer (pair (address %from_) (list %txs (pair (address %to_) (pair (nat %token_id) (nat %amount)))))) (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)))))))) ; storage (pair (big_map %colors nat bytes) (pair (big_map %content nat string) (pair (big_map %contributed int nat) (pair (bytes %digits) (pair (bytes %head) (pair (big_map %ledger nat address) (pair (big_map %metadata string bytes) (pair (big_map %minted int bool) (pair (nat %next_id) (pair (nat %next_token_id) (pair (big_map %operators (pair (address %owner) (pair (address %operator) (nat %token_id))) unit) (pair (bytes %tail) (big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes))))))))))))))) ; code { LAMBDA (pair (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (pair address nat)) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (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 11 ; 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 (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair unit (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) { UNPAIR ; DUP ; CAR ; SENDER ; COMPARE ; EQ ; IF { DROP ; PUSH bool True } { DUP 2 ; GET 21 ; DUP 2 ; GET 4 ; SENDER ; DIG 3 ; CAR ; PAIR 3 ; MEM } ; IF {} { PUSH string "FA2_NOT_OPERATOR" ; FAILWITH } ; UNIT ; PAIR } ; SWAP ; LAMBDA (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) { UNPAIR ; SWAP ; DUP ; GET 24 ; DIG 2 ; MEM ; PAIR } ; SWAP ; LAMBDA (pair (pair address (pair address nat)) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) { UNPAIR ; SWAP ; DUP ; GET 21 ; DIG 2 ; MEM ; PAIR } ; SWAP ; LAMBDA (pair (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) nat) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (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 (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair unit (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) { UNPAIR ; PUSH nat 1 ; DUP 2 ; GET 6 ; COMPARE ; EQ ; IF { DUP ; CAR ; DUP 3 ; GET 11 ; 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 11 ; DUP 3 ; GET 3 ; SOME ; DIG 3 ; GET 5 ; UPDATE ; UPDATE 11 ; 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 { LAMBDA (pair (pair (pair address nat) (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (lambda (pair (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (pair address nat)) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))))) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair (pair (pair address nat) nat) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (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 13 ; DUP 11 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 4 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; DUG 11 ; DUG 11 ; DUG 11 ; DUG 11 ; DIG 9 ; DIG 11 ; DIG 11 ; DIG 11 } ; 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 ; NIL operation ; DIG 2 ; CDR ; PUSH mutez 0 ; DIG 3 ; TRANSFER_TOKENS ; CONS } { 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 { SWAP ; LAMBDA string bytes { PACK ; DUP ; PUSH nat 6 ; DIG 2 ; SIZE ; SUB ; ISNAT ; IF_NONE { PUSH int 34 ; FAILWITH } {} ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 34 ; FAILWITH } {} } ; DUP 3 ; GET 6 ; EXEC ; UPDATE 9 ; LAMBDA string bytes { PACK ; DUP ; PUSH nat 6 ; DIG 2 ; SIZE ; SUB ; ISNAT ; IF_NONE { PUSH int 34 ; FAILWITH } {} ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 34 ; FAILWITH } {} } ; DIG 2 ; DUP ; GET 3 ; SWAP ; DUP ; CAR ; SWAP ; GET 5 ; CONCAT ; CONCAT ; EXEC ; UPDATE 23 } { SWAP ; DUP ; GET 5 ; LEVEL ; SOME ; DIG 3 ; INT ; UPDATE ; UPDATE 5 } ; NIL operation } } { IF_LEFT { DUP ; GET 6 ; INT ; PUSH bls12_381_g1 0x0a72dca01ecb44a3d282f9962ecfe816e8694a2aecc5bcd948ab8a690d762d8f8edcd47c202e4fb9db780f0df34370f416850acec2475998743a75ec35cb6b6836f02bc9f04419e0073d72c9a06fe7105c104d2970e15560415178ba53e5f682 ; PUSH bls12_381_g2 0x0fc6035e7c9832f98b51c5b62e2dfcab06bf29ca79fc1b581715fcdb0007e737d102c044dfe7c5dcda245df5569b5362178dbcf1f6edb5133ee59a1a71f47621f06a1c378239aa7603b6b2881988c7357842a04a286e604a324c5ff653f6b1ce04c622cba3fe07ba5785cc573979927acab1a9f88201cf9183035838d448c36560bc7d1d042192c142ab588ed5188d9b19bebd83290fc8eeafdc9f38a3695ff60ce809dd16102046839996973c4767e6390081af6b3fbdc5439d810382b85a60 ; PUSH bls12_381_g2 0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb80606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801 ; PUSH bls12_381_g2 0x106c100d9dde23db7df7e1705860b12dfc6515ddc8a0467a49daa2a1b61361665fc8b2f8c158474c4f4b6e23327da5790c7a288fce6a09342c593d4d33760ede1a9ec0801b82f25f844372b1d362d005ddddccbaf55bc50d34dd36732a4686b70cd6991854742435c1004f1a71e4dab05fde638e3c2dfd35e7c9e79830a9d0f4b64094b1c077c943ee6149b7c2fda7c401bad5660d3dabd57fba4229ebd423dff3d7572bd6a3428c9ef214de19f832d6c4c3ac4d3e016f1b30bf3bf8f4b631d1 ; PUSH bls12_381_g1 0x13ab0365e93c6b35b43c38903e158e29a6042d0478ba4fed9fb686964346c3f99cd832521506d909b189eb448461e78818d12e0290ccce677c3160a179d89ca2ee257f1d748e4fb23a7f09fa3013b99067d74df67c7953580a38fb0c746be212 ; PUSH bls12_381_g1 0x0f31b145b92d18331893a2b150d02b5a17eabb0fbb183027aa1c02a93d471e6651b822421a9fcfd4172e1ae38135346815fb43810442a97b002321ddd123cc272d964735f91431f2892788c91fdead01f7169e6b76edd2b4a5b73fb9bdffcee0 ; DUP 8 ; GET 6 ; SWAP ; MUL ; ADD ; NIL (pair bls12_381_g1 bls12_381_g2) ; DIG 2 ; DUP 8 ; GET 5 ; PAIR ; CONS ; DUG 2 ; PAIR ; CONS ; SWAP ; DIG 2 ; PAIR ; CONS ; DUP 3 ; GET 3 ; DUP 4 ; CAR ; NEG ; PAIR ; CONS ; PAIRING_CHECK ; IF {} { PUSH string "Assert failure: sp.pairing_check(sp.list([(- params.a, params.b), (alpha, beta), (vk_x, gamma), (params.c, delta)]))" ; FAILWITH } ; DUP 3 ; GET 17 ; DIG 3 ; DUP ; GET 11 ; SENDER ; SOME ; DUP 4 ; UPDATE ; UPDATE 11 ; DUP ; CAR ; LAMBDA bls12_381_fr bytes { LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "0123456789abcdef" ; EXEC ; DUP 2 ; INT ; ISNAT ; IF_NONE { PUSH int 40 ; FAILWITH } {} ; PUSH bytes 0x ; PUSH int 0 ; PUSH bool True ; LOOP { PUSH nat 16 ; DUP 4 ; EDIV ; IF_NONE { PUSH int 45 ; FAILWITH } { CDR } ; DIG 2 ; DUP 5 ; PUSH nat 1 ; DIG 3 ; SLICE ; IF_NONE { PUSH int 46 ; FAILWITH } {} ; CONCAT ; SWAP ; DIG 2 ; PUSH nat 16 ; SWAP ; EDIV ; IF_NONE { PUSH int 47 ; FAILWITH } { CAR } ; DUG 2 ; PUSH int 1 ; ADD ; DUP ; PUSH int 6 ; COMPARE ; GT } ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "#" ; EXEC ; CONCAT } ; DIG 5 ; GET 6 ; EXEC ; SOME ; DUP 4 ; UPDATE ; UPDATE 1 ; DUP ; GET 17 ; PUSH nat 1 ; ADD ; UPDATE 17 ; DUG 2 ; PUSH timestamp "1970-01-01T00:00:00Z" ; NOW ; SUB ; ISNAT ; IF_NONE { PUSH int 53 ; FAILWITH } {} ; DUP ; INT ; NEQ ; IF { PUSH string "" ; DUP 2 ; INT ; NEQ ; LOOP { PUSH string "0123456789" ; PUSH nat 1 ; PUSH nat 10 ; DUP 5 ; EDIV ; IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ; SLICE ; IF_NONE { PUSH int 58 ; FAILWITH } {} ; CONCAT ; PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ; SWAP ; DUP 2 ; INT ; NEQ } ; DROP 2 ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP ; DIG 3 ; DROP } { 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 } ; LAMBDA int string { ISNAT ; IF_NONE { PUSH int 53 ; FAILWITH } {} ; PUSH string "0" ; DUP 2 ; INT ; NEQ ; IF { DROP ; PUSH string "" ; DUP 2 ; INT ; NEQ ; LOOP { PUSH string "0123456789" ; PUSH nat 1 ; PUSH nat 10 ; DUP 5 ; EDIV ; IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ; SLICE ; IF_NONE { PUSH int 58 ; FAILWITH } {} ; CONCAT ; PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ; SWAP ; DUP 2 ; INT ; NEQ } ; SWAP ; DROP } { SWAP ; DROP } } ; DUP 2 ; INT ; EXEC ; DUP 4 ; GET 23 ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; DUP 3 ; EXEC ; DUP 6 ; GET 9 ; CONCAT ; CONCAT ; DIG 4 ; DUP ; GET 13 ; DIG 2 ; SOME ; DUP 4 ; UPDATE ; UPDATE 13 ; DUG 3 ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; DUP 2 ; EXEC ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "tezos-storage:" ; EXEC ; CONCAT ; DIG 4 ; DUP ; GET 24 ; EMPTY_MAP string bytes ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; DIG 5 ; EXEC ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "Moment " ; EXEC ; CONCAT ; SOME ; PUSH string "name" ; UPDATE ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "0" ; EXEC ; SOME ; PUSH string "decimals" ; UPDATE ; DIG 3 ; SOME ; PUSH string "artifactUri" ; UPDATE ; LAMBDA string bytes { DUP ; PACK ; SWAP ; SIZE ; PUSH nat 6 ; SLICE ; IF_NONE { PUSH int 30 ; FAILWITH } {} } ; PUSH string "https://www.larvalabs.com/public/assetsv2/cryptopunks-gallery/cryptopunk-7488.png" ; EXEC ; SOME ; PUSH string "displayUri" ; UPDATE ; DUP 4 ; PAIR ; SOME ; DIG 3 ; UPDATE ; UPDATE 24 ; DUP ; GET 15 ; PUSH (option bool) (Some True) ; DIG 3 ; UPDATE ; UPDATE 15 } { 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 12 ; DUG 12 ; DUG 12 ; DUG 12 ; DUG 12 ; DIG 9 ; DIG 12 ; DIG 12 ; DIG 12 ; DIG 12 ; IF {} { PUSH string "FA2_TOKEN_UNDEFINED" ; FAILWITH } ; DUP 10 ; DUP 2 ; GET 3 ; DUP 3 ; CAR ; DUP 5 ; CAR ; PAIR 3 ; SWAP ; DIG 5 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 11 ; DUG 11 ; DUG 11 ; DUG 11 ; DIG 8 ; DIG 11 ; DIG 11 ; DIG 11 ; PUSH nat 0 ; DUP 2 ; GET 4 ; COMPARE ; GT ; IF { DUP 2 ; CAR ; PAIR ; DUP 6 ; DIG 4 ; DIG 2 ; PAIR ; EXEC ; CDR ; DUG 10 ; DUG 10 ; DUG 10 ; DIG 8 ; DIG 10 ; DIG 10 } { DROP } } ; DROP } ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP } { PUSH string "FA2_TX_DENIED" ; FAILWITH } } { DUP 3 ; GET 5 ; IF { DUP ; ITER { IF_LEFT { DUP 10 ; DUP 2 ; EXEC ; DROP ; DIG 2 ; DUP ; GET 21 ; PUSH (option unit) (Some Unit) ; DIG 3 ; UPDATE ; UPDATE 21 ; SWAP } { DUP 10 ; DUP 2 ; EXEC ; DROP ; DIG 2 ; DUP ; GET 21 ; NONE unit ; DIG 3 ; UPDATE ; UPDATE 21 ; SWAP } } ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP } { PUSH string "FA2_OPERATORS_UNSUPPORTED" ; FAILWITH } } } ; NIL operation } ; PAIR } ; view "render" nat string { CAR ; PUSH string "</p>" ; LAMBDA int string { ISNAT ; IF_NONE { PUSH int 53 ; FAILWITH } {} ; PUSH string "0" ; DUP 2 ; INT ; NEQ ; IF { DROP ; PUSH string "" ; DUP 2 ; INT ; NEQ ; LOOP { PUSH string "0123456789" ; PUSH nat 1 ; PUSH nat 10 ; DUP 5 ; EDIV ; IF_NONE { PUSH int 58 ; FAILWITH } { CDR } ; SLICE ; IF_NONE { PUSH int 58 ; FAILWITH } {} ; CONCAT ; PUSH nat 10 ; DIG 2 ; EDIV ; IF_NONE { PUSH int 59 ; FAILWITH } { CAR } ; SWAP ; DUP 2 ; INT ; NEQ } ; SWAP ; DROP } { SWAP ; DROP } } ; DIG 2 ; INT ; EXEC ; PUSH string "<p>HELLO" ; CONCAT ; CONCAT } ; view "get_balance_of" (list (pair (address %owner) (nat %token_id))) (list (pair (pair %request (address %owner) (nat %token_id)) (nat %balance))) { UNPAIR ; LAMBDA (pair (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (pair address nat)) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (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 11 ; DIG 2 ; CDR ; GET ; IF_NONE { PUSH int 372 ; FAILWITH } {} ; COMPARE ; EQ ; IF { PUSH nat 1 } { PUSH nat 0 } ; PAIR } ; SWAP ; LAMBDA (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) { UNPAIR ; SWAP ; DUP ; GET 24 ; DIG 2 ; MEM ; PAIR } ; SWAP ; LAMBDA (pair (pair (pair address nat) (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (lambda (pair (pair (lambda (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair bool (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))) (pair address nat)) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair nat (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes))))))))))))))))))) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (big_map nat (pair nat (map string bytes)))))))))))))))) (pair (pair (pair address nat) nat) (pair (big_map nat bytes) (pair (big_map nat string) (pair (big_map int nat) (pair bytes (pair bytes (pair (big_map nat address) (pair (big_map string bytes) (pair (big_map int bool) (pair nat (pair nat (pair (big_map (pair address (pair address nat)) unit) (pair bytes (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 ; MAP { DUP 2 ; DUP 6 ; DUP 6 ; PAIR ; DIG 2 ; PAIR ; SWAP ; DIG 6 ; DIG 2 ; PAIR ; EXEC ; UNPAIR ; SWAP ; DUG 5 } ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP ; SWAP ; DROP } }