Monorepo for Aesthetic.Computer aesthetic.computer
at main 75 lines 14 kB view raw
1Comment... 2 h1: Keeps FA2 v2 Tests 3Creating contract KT1TezoooozzSmartPyzzSTATiCzzzwwBFA1 4 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {} (Pair False (Pair 0 (Pair {} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {} (Pair 0 (Pair {} {}))))))))) 5file KeepsFA2v2/step_002_cont_0_storage.tz 6file KeepsFA2v2/step_002_cont_0_storage.json 7file KeepsFA2v2/step_002_cont_0_storage.py 8file KeepsFA2v2/step_002_cont_0_types.py 9file KeepsFA2v2/step_002_cont_0_contract.tz contract KeepsFA2 10file KeepsFA2v2/step_002_cont_0_contract.json contract KeepsFA2 11Comment... 12 h2: Mint token using keep entrypoint 13file KeepsFA2v2/step_004_cont_0_params.py 14file KeepsFA2v2/step_004_cont_0_params.tz 15file KeepsFA2v2/step_004_cont_0_params.json 16Executing keep(sp.record(artifactUri = sp.bytes('0x697066733a2f2f516d58595a'), attributes = sp.bytes('0x5b5d'), content_hash = sp.bytes('0x516d58595a'), content_type = sp.bytes('0x6b69646c697370'), creators = sp.bytes('0x5b226165737468657469632e636f6d7075746572225d'), decimals = sp.bytes('0x30'), description = sp.bytes('0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572'), displayUri = sp.bytes('0x697066733a2f2f516d58595a'), formats = sp.bytes('0x5b5d'), isBooleanAmount = sp.bytes('0x74727565'), metadata_uri = sp.bytes('0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e'), name = sp.bytes('0x5465737420546f6b656e'), owner = sp.address('tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi'), rights = sp.bytes('0xc2a920416c6c207269676874732072657365727665642e'), shouldPreferSymbol = sp.bytes('0x66616c7365'), symbol = sp.bytes('0x4b454550'), tags = sp.bytes('0x5b5d'), thumbnailUri = sp.bytes('0x697066733a2f2f516d58595a')))... 17 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {Elt 0x516d58595a 0} (Pair False (Pair 0 (Pair {Elt 0 "tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi"} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {Elt 0 False} (Pair 1 (Pair {} {Elt 0 (Pair 0 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d58595a; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d58595a; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572; Elt "displayUri" 0x697066733a2f2f516d58595a; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x5465737420546f6b656e; Elt "rights" 0xc2a920416c6c207269676874732072657365727665642e; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d58595a})}))))))))) 18Verifying sp.contract_data(0).next_token_id == 1... 19 OK 20Verifying sp.static_view(0, "get_balance", sp.record(owner = sp.test_account("Alice").address, token_id = 0)) == 1... 21 OK 22Verifying sp.static_view(0, "total_supply", sp.record(token_id = 0)) == 1... 23 OK 24Comment... 25 h2: Transfer token 26file KeepsFA2v2/step_009_cont_0_params.py 27file KeepsFA2v2/step_009_cont_0_params.tz 28file KeepsFA2v2/step_009_cont_0_params.json 29Executing transfer([sp.record(from_ = sp.address('tz1WxrQuZ4CK1MBUa2GqUWK1yJ4J6EtG1Gwi'), txs = [sp.record(to_ = sp.address('tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C'), token_id = 0, amount = 1)])])... 30 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {Elt 0x516d58595a 0} (Pair False (Pair 0 (Pair {Elt 0 "tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C"} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {Elt 0 False} (Pair 1 (Pair {} {Elt 0 (Pair 0 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d58595a; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d58595a; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572; Elt "displayUri" 0x697066733a2f2f516d58595a; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x5465737420546f6b656e; Elt "rights" 0xc2a920416c6c207269676874732072657365727665642e; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d58595a})}))))))))) 31Verifying sp.static_view(0, "get_balance", sp.record(owner = sp.test_account("Alice").address, token_id = 0)) == 0... 32 OK 33Verifying sp.static_view(0, "get_balance", sp.record(owner = sp.test_account("Bob").address, token_id = 0)) == 1... 34 OK 35Comment... 36 h2: Mint second token 37file KeepsFA2v2/step_013_cont_0_params.py 38file KeepsFA2v2/step_013_cont_0_params.tz 39file KeepsFA2v2/step_013_cont_0_params.json 40Executing keep(sp.record(artifactUri = sp.bytes('0x697066733a2f2f516d414243'), attributes = sp.bytes('0x5b5d'), content_hash = sp.bytes('0x516d414243'), content_type = sp.bytes('0x6b69646c697370'), creators = sp.bytes('0x5b226165737468657469632e636f6d7075746572225d'), decimals = sp.bytes('0x30'), description = sp.bytes('0x5365636f6e64207465737420746f6b656e'), displayUri = sp.bytes('0x697066733a2f2f516d414243'), formats = sp.bytes('0x5b5d'), isBooleanAmount = sp.bytes('0x74727565'), metadata_uri = sp.bytes('0x68747470733a2f2f6578616d706c652e636f6d2f6d65746164617461322e6a736f6e'), name = sp.bytes('0x546f6b656e2054776f'), owner = sp.address('tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq'), rights = sp.bytes('0xc2a9'), shouldPreferSymbol = sp.bytes('0x66616c7365'), symbol = sp.bytes('0x4b454550'), tags = sp.bytes('0x5b5d'), thumbnailUri = sp.bytes('0x697066733a2f2f516d414243')))... 41 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {Elt 0x516d414243 1; Elt 0x516d58595a 0} (Pair False (Pair 0 (Pair {Elt 0 "tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C"; Elt 1 "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq"} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {Elt 0 False; Elt 1 False} (Pair 2 (Pair {} {Elt 0 (Pair 0 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d58595a; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d58595a; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572; Elt "displayUri" 0x697066733a2f2f516d58595a; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x5465737420546f6b656e; Elt "rights" 0xc2a920416c6c207269676874732072657365727665642e; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d58595a}); Elt 1 (Pair 1 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d65746164617461322e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d414243; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d414243; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x5365636f6e64207465737420746f6b656e; Elt "displayUri" 0x697066733a2f2f516d414243; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x546f6b656e2054776f; Elt "rights" 0xc2a9; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d414243})}))))))))) 42Verifying sp.contract_data(0).next_token_id == 2... 43 OK 44Comment... 45 h2: Lock metadata 46file KeepsFA2v2/step_016_cont_0_params.py 47file KeepsFA2v2/step_016_cont_0_params.tz 48file KeepsFA2v2/step_016_cont_0_params.json 49Executing lock_metadata(1)... 50 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {Elt 0x516d414243 1; Elt 0x516d58595a 0} (Pair False (Pair 0 (Pair {Elt 0 "tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C"; Elt 1 "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq"} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {Elt 0 False; Elt 1 True} (Pair 2 (Pair {} {Elt 0 (Pair 0 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d58595a; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d58595a; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572; Elt "displayUri" 0x697066733a2f2f516d58595a; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x5465737420546f6b656e; Elt "rights" 0xc2a920416c6c207269676874732072657365727665642e; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d58595a}); Elt 1 (Pair 1 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d65746164617461322e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d414243; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d414243; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x5365636f6e64207465737420746f6b656e; Elt "displayUri" 0x697066733a2f2f516d414243; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x546f6b656e2054776f; Elt "rights" 0xc2a9; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d414243})}))))))))) 51Verifying sp.contract_data(0).metadata_locked[1] == True... 52 OK 53Comment... 54 h2: Try to edit locked metadata - should fail 55file KeepsFA2v2/step_019_cont_0_params.py 56file KeepsFA2v2/step_019_cont_0_params.tz 57file KeepsFA2v2/step_019_cont_0_params.json 58Executing edit_metadata(sp.record(token_id = 1, token_info = {'name' : sp.bytes('0x4e6577204e616d65')}))... 59Expected error: 'METADATA_LOCKED' 60Comment... 61 h2: Non-admin cannot mint to someone else 62file KeepsFA2v2/step_021_cont_0_params.py 63file KeepsFA2v2/step_021_cont_0_params.tz 64file KeepsFA2v2/step_021_cont_0_params.json 65Executing keep(sp.record(artifactUri = sp.bytes('0x697066733a2f2f516d'), attributes = sp.bytes('0x5b5d'), content_hash = sp.bytes('0x6f746865725f7069656365'), content_type = sp.bytes('0x74657874'), creators = sp.bytes('0x5b5d'), decimals = sp.bytes('0x30'), description = sp.bytes('0x53686f756c64206661696c'), displayUri = sp.bytes('0x697066733a2f2f516d'), formats = sp.bytes('0x5b5d'), isBooleanAmount = sp.bytes('0x74727565'), metadata_uri = sp.bytes('0x'), name = sp.bytes('0x556e617574686f72697a6564'), owner = sp.address('tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq'), rights = sp.bytes('0x'), shouldPreferSymbol = sp.bytes('0x66616c7365'), symbol = sp.bytes('0x4b454550'), tags = sp.bytes('0x5b5d'), thumbnailUri = sp.bytes('0x697066733a2f2f516d')))... 66Expected error: 'MUST_MINT_TO_SELF' 67Comment... 68 h2: Non-admin CAN mint to self (user-callable keep) 69file KeepsFA2v2/step_023_cont_0_params.py 70file KeepsFA2v2/step_023_cont_0_params.tz 71file KeepsFA2v2/step_023_cont_0_params.json 72Executing keep(sp.record(artifactUri = sp.bytes('0x697066733a2f2f516d55736572'), attributes = sp.bytes('0x5b5d'), content_hash = sp.bytes('0x626f625f7069656365'), content_type = sp.bytes('0x4b69644c697370'), creators = sp.bytes('0x5b2240626f62225d'), decimals = sp.bytes('0x30'), description = sp.bytes('0x426f62206d696e747320746f2068696d73656c66'), displayUri = sp.bytes('0x697066733a2f2f516d55736572'), formats = sp.bytes('0x5b5d'), isBooleanAmount = sp.bytes('0x74727565'), metadata_uri = sp.bytes('0x697066733a2f2f516d426f624d65746164617461'), name = sp.bytes('0x55736572204d696e74'), owner = sp.address('tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C'), rights = sp.bytes('0x'), shouldPreferSymbol = sp.bytes('0x66616c7365'), symbol = sp.bytes('0x4b454550'), tags = sp.bytes('0x5b22757365722d6d696e746564225d'), thumbnailUri = sp.bytes('0x697066733a2f2f516d557365725468756d62')))... 73 -> (Pair "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq" (Pair {Elt 0x516d414243 1; Elt 0x516d58595a 0; Elt 0x626f625f7069656365 2} (Pair False (Pair 0 (Pair {Elt 0 "tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C"; Elt 1 "tz1SfRoaCkrBkXqTzhz67QYVPJAU9Y2g48kq"; Elt 2 "tz1Rp4Bv8iUhYnNoCryHQgNzN2D7i3L1LF9C"} (Pair {Elt "" 0x697066733a2f2f6578616d706c65} (Pair {Elt 0 False; Elt 1 True; Elt 2 False} (Pair 3 (Pair {} {Elt 0 (Pair 0 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d657461646174612e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d58595a; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d58595a; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x41207465737420746f6b656e20666f72206165737468657469632e636f6d7075746572; Elt "displayUri" 0x697066733a2f2f516d58595a; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x5465737420546f6b656e; Elt "rights" 0xc2a920416c6c207269676874732072657365727665642e; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d58595a}); Elt 1 (Pair 1 {Elt "" 0x68747470733a2f2f6578616d706c652e636f6d2f6d65746164617461322e6a736f6e; Elt "artifactUri" 0x697066733a2f2f516d414243; Elt "attributes" 0x5b5d; Elt "content_hash" 0x516d414243; Elt "content_type" 0x6b69646c697370; Elt "creators" 0x5b226165737468657469632e636f6d7075746572225d; Elt "decimals" 0x30; Elt "description" 0x5365636f6e64207465737420746f6b656e; Elt "displayUri" 0x697066733a2f2f516d414243; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x546f6b656e2054776f; Elt "rights" 0xc2a9; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b5d; Elt "thumbnailUri" 0x697066733a2f2f516d414243}); Elt 2 (Pair 2 {Elt "" 0x697066733a2f2f516d426f624d65746164617461; Elt "artifactUri" 0x697066733a2f2f516d55736572; Elt "attributes" 0x5b5d; Elt "content_hash" 0x626f625f7069656365; Elt "content_type" 0x4b69644c697370; Elt "creators" 0x5b2240626f62225d; Elt "decimals" 0x30; Elt "description" 0x426f62206d696e747320746f2068696d73656c66; Elt "displayUri" 0x697066733a2f2f516d55736572; Elt "formats" 0x5b5d; Elt "isBooleanAmount" 0x74727565; Elt "name" 0x55736572204d696e74; Elt "rights" 0x; Elt "shouldPreferSymbol" 0x66616c7365; Elt "symbol" 0x4b454550; Elt "tags" 0x5b22757365722d6d696e746564225d; Elt "thumbnailUri" 0x697066733a2f2f516d557365725468756d62})}))))))))) 74Verifying sp.contract_data(0).ledger[2] == sp.test_account("Bob").address... 75 OK